Debug output tweaks in the Linux target backends
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-03-24 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4 output. Also dump TRAP_TRACE.
5 (linux_low_filter_event): In debug output, distinguish a
6 resume_stop SIGSTOP from a delayed SIGSTOP.
7
8 2015-03-24 Gary Benson <gbenson@redhat.com>
9
10 * linux-x86-low.c (x86_linux_new_thread): Moved to
11 nat/x86-linux.c.
12 (x86_linux_prepare_to_resume): Likewise.
13
14 2015-03-24 Gary Benson <gbenson@redhat.com>
15
16 * Makefile.in (x86-linux-dregs.o): New rule.
17 * configure.srv: Add x86-linux-dregs.o to relevant targets.
18 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
19 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
20 (x86_linux_dr_get): Likewise.
21 (x86_linux_dr_set): Likewise.
22 (update_debug_registers_callback): Likewise.
23 (x86_linux_dr_set_addr): Likewise.
24 (x86_linux_dr_get_addr): Likewise.
25 (x86_linux_dr_set_control): Likewise.
26 (x86_linux_dr_get_control): Likewise.
27 (x86_linux_dr_get_status): Likewise.
28 (x86_linux_update_debug_registers): Likewise.
29
30 2015-03-24 Gary Benson <gbenson@redhat.com>
31
32 * linux-x86-low.c (x86_linux_update_debug_registers):
33 New function, factored out from...
34 (x86_linux_prepare_to_resume): ...this.
35
36 2015-03-24 Gary Benson <gbenson@redhat.com>
37
38 * linux-x86-low.c (x86_linux_dr_get): Update comments.
39 (x86_linux_dr_set): Likewise.
40 (update_debug_registers_callback): Likewise.
41 (x86_linux_dr_set_addr): Likewise.
42 (x86_linux_dr_get_addr): Likewise.
43 (x86_linux_dr_set_control): Likewise.
44 (x86_linux_dr_get_control): Likewise.
45 (x86_linux_dr_get_status): Likewise.
46 (x86_linux_prepare_to_resume): Likewise.
47
48 2015-03-24 Gary Benson <gbenson@redhat.com>
49
50 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
51 Use perror_with_name. Pass string through gettext.
52 (x86_linux_dr_set): Likewise.
53
54 2015-03-24 Gary Benson <gbenson@redhat.com>
55
56 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
57 (x86_linux_dr_set_addr): ...this.
58 (x86_dr_low_get_addr): Rename to...
59 (x86_linux_dr_get_addr): ...this.
60 (x86_dr_low_set_control): Rename to...
61 (x86_linux_dr_set_control): ...this.
62 (x86_dr_low_get_control): Rename to...
63 (x86_linux_dr_get_control): ...this.
64 (x86_dr_low_get_status): Rename to...
65 (x86_linux_dr_get_status): ...this.
66 (x86_dr_low): Update with new function names.
67
68 2015-03-24 Gary Benson <gbenson@redhat.com>
69
70 * Makefile.in (x86-linux.o): New rule.
71 * configure.srv: Add x86-linux.o to relevant targets.
72 * linux-low.c (lwp_set_arch_private_info): New function.
73 (lwp_arch_private_info): Likewise.
74 * linux-x86-low.c: Include nat/x86-linux.h.
75 (arch_lwp_info): Removed structure.
76 (update_debug_registers_callback):
77 Use lwp_set_debug_registers_changed.
78 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
79 and lwp_set_debug_registers_changed.
80 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
81
82 2015-03-24 Gary Benson <gbenson@redhat.com>
83
84 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
85 * linux-arm-low.c (arm_new_thread): Likewise.
86 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
87 * linux-mips-low.c (mips_linux_new_thread): Likewise.
88 * linux-x86-low.c (x86_linux_new_thread): Likewise.
89 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
90
91 2015-03-24 Gary Benson <gbenson@redhat.com>
92
93 * linux-low.c (ptid_of_lwp): New function.
94 (lwp_is_stopped): Likewise.
95 (lwp_stop_reason): Likewise.
96 * linux-x86-low.c (update_debug_registers_callback):
97 Use lwp_is_stopped.
98 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
99 lwp_stop_reason.
100
101 2015-03-24 Gary Benson <gbenson@redhat.com>
102
103 * linux-low.h (linux_stop_lwp): Remove declaration.
104
105 2015-03-24 Gary Benson <gbenson@redhat.com>
106
107 * linux-low.h: Include nat/linux-nat.h.
108 * linux-low.c (iterate_over_lwps_args): New structure.
109 (iterate_over_lwps_filter): New function.
110 (iterate_over_lwps): Likewise.
111 * linux-x86-low.c (update_debug_registers_callback):
112 Update signature to what iterate_over_lwps expects.
113 Remove PID check that iterate_over_lwps now performs.
114 (x86_dr_low_set_addr): Use iterate_over_lwps.
115 (x86_dr_low_set_control): Likewise.
116
117 2015-03-24 Gary Benson <gbenson@redhat.com>
118
119 * linux-x86-low.c (x86_debug_reg_state): New function.
120 (x86_linux_prepare_to_resume): Use the above.
121
122 2015-03-24 Gary Benson <gbenson@redhat.com>
123
124 * linux-low.c (current_lwp_ptid): New function.
125 * linux-x86-low.c: Include nat/linux-nat.h.
126 (x86_dr_low_get_addr): Use current_lwp_ptid.
127 (x86_dr_low_get_control): Likewise.
128 (x86_dr_low_get_status): Likewise.
129
130 2015-03-20 Pedro Alves <palves@redhat.com>
131
132 * tracepoint.c (cmd_qtstatus): Make "str" const.
133
134 2015-03-20 Pedro Alves <palves@redhat.com>
135
136 * server.c (handle_general_set): Make "req_str" const.
137
138 2015-03-19 Pedro Alves <palves@redhat.com>
139
140 * linux-low.c (linux_resume_one_lwp): Rename to ...
141 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
142 instead call perror_with_name.
143 (check_ptrace_stopped_lwp_gone): New function.
144 (linux_resume_one_lwp): Reimplement as wrapper around
145 linux_resume_one_lwp_throw that swallows errors if the LWP is
146 gone.
147
148 2015-03-19 Pedro Alves <palves@redhat.com>
149
150 * linux-low.c (count_events_callback, select_event_lwp_callback):
151 No longer check whether the thread has resume_stop as last resume
152 kind.
153
154 2015-03-19 Pedro Alves <palves@redhat.com>
155
156 * linux-low.c (count_events_callback, select_event_lwp_callback):
157 Use the lwp's status_pending_p field, not the thread's.
158
159 2015-03-19 Pedro Alves <palves@redhat.com>
160
161 * linux-low.c (select_event_lwp_callback): Update comments to
162 no longer mention SIGTRAP.
163
164 2015-03-18 Gary Benson <gbenson@redhat.com>
165
166 * server.c (handle_query): Do not report vFile:fstat as supported.
167
168 2015-03-11 Gary Benson <gbenson@redhat.com>
169
170 * hostio.c (sys/types.h): New include.
171 (sys/stat.h): Likewise.
172 (common-remote-fileio.h): Likewise.
173 (handle_fstat): New function.
174 (handle_vFile): Handle vFile:fstat packets.
175
176 2015-03-11 Gary Benson <gbenson@redhat.com>
177
178 * configure.ac (AC_CHECK_MEMBERS): Add checks for
179 struct stat.st_blocks and struct stat.st_blksize.
180 * configure: Regenerate.
181 * config.in: Likewise.
182 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
183 (OBS): Add common-remote-fileio.o.
184 (common-remote-fileio.o): New rule.
185
186 2015-03-09 Pedro Alves <palves@redhat.com>
187
188 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
189 'struct sockaddr' pointer in 'accept' call.
190
191 2015-03-09 Pedro Alves <palves@redhat.com>
192
193 Revert:
194 2015-03-07 Pedro Alves <palves@redhat.com>
195 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
196 or <winsock2.h> here. Instead include "gdb_socket.h".
197 (remote_open): Use union gdb_sockaddr_u.
198 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
199 or <winsock2.h> here. Instead include "gdb_socket.h".
200 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
201 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
202 or <sys/un.h>.
203 (init_named_socket, gdb_agent_helper_thread): Use union
204 gdb_sockaddr_u.
205
206 2015-03-07 Pedro Alves <palves@redhat.com>
207
208 * configure.ac (build_warnings): Move
209 -Wdeclaration-after-statement to the C-specific set.
210 * configure: Regenerate.
211
212 2015-03-07 Pedro Alves <palves@redhat.com>
213
214 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
215 or <winsock2.h> here. Instead include "gdb_socket.h".
216 (remote_open): Use union gdb_sockaddr_u.
217 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
218 or <winsock2.h> here. Instead include "gdb_socket.h".
219 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
220 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
221 or <sys/un.h>.
222 (init_named_socket, gdb_agent_helper_thread): Use union
223 gdb_sockaddr_u.
224
225 2015-03-07 Pedro Alves <palves@redhat.com>
226
227 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
228 instead.
229
230 2015-03-06 Yao Qi <yao.qi@linaro.org>
231
232 * linux-aarch64-low.c (aarch64_insert_point): Use
233 show_debug_regs as a boolean.
234 (aarch64_remove_point): Likewise.
235
236 2015-03-05 Pedro Alves <palves@redhat.com>
237
238 * lynx-low.c (lynx_target_ops): Install NULL hooks for
239 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
240 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
241 * nto-low.c (nto_target_ops): Likewise.
242 * spu-low.c (spu_target_ops): Likewise.
243 * win32-low.c (win32_target_ops): Likewise.
244
245 2015-03-04 Pedro Alves <palves@redhat.com>
246
247 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
248 Decide whether a breakpoint triggered based on the SIGTRAP's
249 siginfo.si_code.
250 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
251 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
252 (linux_low_filter_event): Check for breakpoints before checking
253 watchpoints.
254 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
255 siginfo.si_code.
256 (linux_stopped_by_sw_breakpoint)
257 (linux_supports_stopped_by_sw_breakpoint)
258 (linux_stopped_by_hw_breakpoint)
259 (linux_supports_stopped_by_hw_breakpoint): New functions.
260 (linux_target_ops): Install new target methods.
261
262 2015-03-04 Pedro Alves <palves@redhat.com>
263
264 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
265 * server.c (swbreak_feature, hwbreak_feature): New globals.
266 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
267 (captured_main): Clear swbreak_feature and hwbreak_feature.
268 * server.h (swbreak_feature, hwbreak_feature): Declare.
269 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
270 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
271 supports_stopped_by_hw_breakpoint>: New fields.
272 (target_supports_stopped_by_sw_breakpoint)
273 (target_stopped_by_sw_breakpoint)
274 (target_supports_stopped_by_hw_breakpoint)
275 (target_stopped_by_hw_breakpoint): Declare.
276
277 2015-03-04 Pedro Alves <palves@redhat.com>
278
279 enum lwp_stop_reason -> enum target_stop_reason
280 * linux-low.c (check_stopped_by_breakpoint): Adjust.
281 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
282 (linux_wait_1, stuck_in_jump_pad_callback)
283 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
284 (linux_stopped_by_watchpoint):
285 * linux-low.h (enum lwp_stop_reason): Delete.
286 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
287 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
288
289 2015-03-04 Yao Qi <yao.qi@linaro.org>
290
291 * Makefile.in (SFILES): Add linux-aarch64-low.c.
292
293 2015-03-03 Gary Benson <gbenson@redhat.com>
294
295 * hostio.c (handle_vFile): Fix prefix lengths.
296
297 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
298
299 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
300 ptr_bits.
301
302 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
303
304 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
305 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
306 (clean): Add "rm -f" for above C files.
307 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
308 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
309 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
310 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
311 * linux-s390-low.c (HWCAP_S390_VX): New macro.
312 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
313 (init_registers_s390x_vx_linux64)
314 (init_registers_s390x_tevx_linux64)
315 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
316 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
317 declarations.
318 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
319 (s390_store_vxrs_high): New functions.
320 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
321 NT_S390_VXRS_HIGH.
322 (s390_arch_setup): Add logic for selecting one of the new target
323 descriptions. Activate the new vector regsets if applicable.
324 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
325 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
326 and init_registers_s390x_tevx_linux64.
327
328 2015-03-01 Pedro Alves <palves@redhat.com>
329
330 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
331 parameter.
332
333 2015-02-27 Pedro Alves <palves@redhat.com>
334
335 * linux-x86-low.c (u_debugreg_offset): New function.
336 (x86_linux_dr_get, x86_linux_dr_set): Use it.
337
338 2015-02-27 Pedro Alves <palves@redhat.com>
339
340 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
341 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
342 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
343 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
344 (ps_lsetfpregs, ps_getpid)
345 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
346 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
347 (ps_lsetxregs, ps_plog): Declare.
348
349 2015-02-27 Pedro Alves <palves@redhat.com>
350
351 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
352 IP_AGENT_EXPORT_FUNC.
353 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
354 IP_AGENT_EXPORT_FUNC.
355 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
356 (IP_AGENT_EXPORT): Delete.
357 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
358 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
359 (gdb_trampoline_buffer_error, collecting, gdb_collect)
360 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
361 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
362 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
363 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
364 (traceframe_read_count, traceframe_write_count)
365 (traceframes_created, trace_state_variables, get_raw_reg)
366 (get_trace_state_variable_value, set_trace_state_variable_value)
367 (ust_loaded, helper_thread_id, cmd_buf): Use
368 IPA_SYM_EXPORTED_NAME.
369 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
370 (tracepoints) Use IP_AGENT_EXPORT_VAR.
371 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
372 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
373 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
374 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
375 EXTERN_C_PUSH/EXTERN_C_POP.
376 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
377 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
378 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
379 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
380 (traceframe_write_count, traceframe_read_count)
381 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
382 (about_to_request_buffer_space, get_trace_state_variable_value)
383 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
384 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
385 EXTERN_C_PUSH/EXTERN_C_POP.
386 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
387 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
388 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
389 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
390 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
391 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
392 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
393 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
394 Define.
395 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
396 (IP_AGENT_EXPORT_VAR_DECL): Define.
397 (tracing): Declare.
398 (gdb_agent_get_raw_reg): Declare.
399
400 2015-02-27 Tom Tromey <tromey@redhat.com>
401 Pedro Alves <palves@redhat.com>
402
403 Rename symbols whose names are reserved C++ keywords throughout.
404
405 2015-02-27 Pedro Alves <palves@redhat.com>
406
407 * Makefile.in (COMPILER): New, get it from autoconf.
408 (CXX): Get from autoconf instead.
409 (COMPILE.pre): Use COMPILER.
410 (CC-LD): Rename to ...
411 (CC_LD): ... this. Use COMPILER.
412 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
413 (CXX_FOR_TARGET): Default to g++ instead of gcc.
414 * acinclude.m4: Include build-with-cxx.m4.
415 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
416 Disable -Werror by default if building in C++ mode.
417 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
418 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
419 the C++ compiler. Save/restore CXXFLAGS too.
420 * configure: Regenerate.
421
422 2015-02-27 Pedro Alves <palves@redhat.com>
423
424 * acinclude.m4: Include libiberty.m4.
425 * configure.ac: Call libiberty_INIT.
426 * config.in, configure: Regenerate.
427
428 2015-02-26 Pedro Alves <palves@redhat.com>
429
430 * linux-low.c (linux_wait_1): When incrementing the PC past a
431 program breakpoint always use the_low_target.breakpoint_len as
432 increment, rather than the maximum between that and
433 the_low_target.decr_pc_after_break.
434
435 2015-02-23 Pedro Alves <palves@redhat.com>
436
437 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
438 thread was doing a step-over; always adjust the PC if
439 we stepped over a permanent breakpoint.
440 (linux_wait_1): If we stepped over breakpoint that was on top of a
441 permanent breakpoint, manually advance the PC past it.
442
443 2015-02-23 Pedro Alves <palves@redhat.com>
444
445 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
446 modes.
447 (x86_fill_gregset, x86_store_gregset): Use it when handling
448 $orig_eax.
449
450 2015-02-20 Pedro Alves <palves@redhat.com>
451
452 * thread-db.c: Include "nat/linux-procfs.h".
453 (thread_db_init): Skip listing new threads if the kernel supports
454 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
455
456 2015-02-20 Pedro Alves <palves@redhat.com>
457
458 * linux-low.c (status_pending_p_callback): Use ptid_match.
459
460 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
461
462 PR breakpoints/16812
463 * linux-low.c (wstatus_maybe_breakpoint): Remove.
464 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
465 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
466
467 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
468
469 PR breakpoints/15956
470 * tracepoint.c (cmd_qtinit): Add check for current_thread.
471
472 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
473
474 * linux-low.c (linux_low_btrace_conf): Print size.
475 * server.c (handle_btrace_conf_general_set): New.
476 (hanle_general_set): Call handle_btrace_conf_general_set.
477 (handle_query): Report Qbtrace-conf:bts:size as supported.
478
479 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
480
481 * linux-low.c (linux_low_enable_btrace): Update parameters.
482 (linux_low_btrace_conf): New.
483 (linux_target_ops)<to_btrace_conf>: Initialize.
484 * server.c (current_btrace_conf): New.
485 (handle_btrace_enable): Rename to ...
486 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
487 to target_enable_btrace. Update comment. Update users.
488 (handle_qxfer_btrace_conf): New.
489 (qxfer_packets): Add btrace-conf entry.
490 (handle_query): Report qXfer:btrace-conf:read as supported packet.
491 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
492 (target_ops)<read_btrace_conf>: New.
493 (target_enable_btrace): Update parameters.
494 (target_read_btrace_conf): New.
495
496 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
497
498 * server.c (handle_btrace_general_set): Remove call to
499 target_supports_btrace.
500 (supported_btrace_packets): New.
501 (handle_query): Call supported_btrace_packets.
502 * target.h: include btrace-common.h.
503 (btrace_target_info): Removed.
504 (supports_btrace, target_supports_btrace): Update parameters.
505
506 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
507
508 * Makefile.in (SFILES): Add common/btrace-common.c.
509 (OBS): Add common/btrace-common.o.
510 (btrace-common.o): Add build rules.
511 * linux-low: Include btrace-common.h.
512 (linux_low_read_btrace): Use struct btrace_data. Call
513 btrace_data_init and btrace_data_fini.
514
515 2015-02-06 Pedro Alves <palves@redhat.com>
516
517 * thread-db.c (find_new_threads_callback): Add debug output.
518
519 2015-02-04 Pedro Alves <palves@redhat.com>
520
521 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
522 (resume_stopped_resumed_lwps): New function.
523 (linux_wait_for_event_filtered): Use it.
524
525 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
526
527 * Makefile.in (SFILES): Add linux-personality.c.
528 (linux-personality.o): New rule.
529 * configure.srv (srv_linux_obj): Add linux-personality.o to the
530 list of objects to be built.
531 * linux-low.c: Include nat/linux-personality.h.
532 (linux_create_inferior): Remove code to disable address space
533 randomization (moved to ../nat/linux-personality.c). Create
534 cleanup to disable address space randomization.
535
536 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
537
538 * Makefile.in (posix-strerror.o): New rule.
539 (mingw-strerror.o): Likewise.
540 * configure: Regenerated.
541 * configure.ac: Source file ../common/common.host. Initialize new
542 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
543
544 2015-01-14 Yao Qi <yao@codesourcery.com>
545
546 * Makefile.in (SFILES): Add nat/ppc-linux.c.
547 (ppc-linux.o): New rule.
548 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
549 * configure.ac: AC_CHECK_FUNCS(getauxval).
550 * config.in: Re-generated.
551 * configure: Re-generated.
552 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
553 ppc64_64bit_inferior_p
554
555 2015-01-14 Yao Qi <yao@codesourcery.com>
556
557 * linux-ppc-low.c: Include "nat/ppc-linux.h".
558 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
559 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
560 (PT_ORIG_R3, PT_TRAP): Likewise.
561 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
562 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
563 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
564
565 2015-01-10 Joel Brobecker <brobecker@adacore.com>
566
567 * i387-fp.c (i387_cache_to_xsave): In look over
568 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
569 zmmh_low_space field by use of zmmh_high_space.
570
571 2015-01-09 Pedro Alves <palves@redhat.com>
572
573 * linux-low.c (step_over_bkpt): Move higher up in the file.
574 (handle_extended_wait): Don't store the stop_pc here.
575 (get_stop_pc): Adjust comments and rename to ...
576 (check_stopped_by_breakpoint): ... this. Record whether the LWP
577 stopped for a software breakpoint or hardware breakpoint.
578 (thread_still_has_status_pending_p): New function.
579 (status_pending_p_callback): Use
580 thread_still_has_status_pending_p. If the event is no longer
581 interesting, resume the LWP.
582 (handle_tracepoints): Add assert.
583 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
584 (wstatus_maybe_breakpoint): New function.
585 (cancel_breakpoint): Delete function.
586 (check_stopped_by_watchpoint): New function, factored out from
587 linux_low_filter_event.
588 (lp_status_maybe_breakpoint): Delete function.
589 (linux_low_filter_event): Remove filter_ptid argument.
590 Leave thread group exits pending here. Store the LWP's stop PC.
591 Always leave events pending.
592 (linux_wait_for_event_filtered): Pull all events out of the
593 kernel, and leave them all pending.
594 (count_events_callback, select_event_lwp_callback): Consider all
595 events.
596 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
597 (select_event_lwp): Only give preference to the stepping LWP in
598 all-stop mode. Adjust comments.
599 (ignore_event): New function.
600 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
601 references to cancel_breakpoints. Adjust to renames. Also give
602 equal priority to all LWPs that have had events in non-stop mode.
603 If reporting a software breakpoint event, unadjust the LWP's PC.
604 (linux_wait): If linux_wait_1 returned an ignored event, retry.
605 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
606 Adjust.
607 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
608 (resume_status_pending_p): Use thread_still_has_status_pending_p.
609 (linux_stopped_by_watchpoint): Adjust.
610 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
611 * linux-low.h (enum lwp_stop_reason): New.
612 (struct lwp_info) <stop_pc>: Adjust comment.
613 <stopped_by_watchpoint>: Delete field.
614 <stop_reason>: New field.
615 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
616 * mem-break.c (software_breakpoint_inserted_here)
617 (hardware_breakpoint_inserted_here): New function.
618 * mem-break.h (software_breakpoint_inserted_here)
619 (hardware_breakpoint_inserted_here): Declare.
620 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
621 (cancel_breakpoints): Delete.
622 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
623 (upload_fast_traceframes): Remove references to
624 cancel_breakpoints.
625
626 2015-01-09 Pedro Alves <palves@redhat.com>
627
628 * thread-db.c (find_new_threads_callback): Ignore thread if the
629 kernel thread ID is -1.
630
631 2015-01-09 Pedro Alves <palves@redhat.com>
632
633 * linux-low.c (linux_attach_fail_reason_string): Move to
634 nat/linux-ptrace.c, and rename.
635 (linux_attach_lwp): Update comment.
636 (attach_proc_task_lwp_callback): New function.
637 (linux_attach): Adjust to rename and use
638 linux_proc_attach_tgid_threads.
639 (linux_attach_fail_reason_string): Delete declaration.
640
641 2015-01-01 Joel Brobecker <brobecker@adacore.com>
642
643 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
644 * server.c (gdbserver_version): Likewise.
645
646 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
647
648 * remote-utils.c: Include ctype.h.
649 (input_interrupt): Explicitly handle the case when the char
650 received is the NUL byte. Improve the printing of non-ASCII
651 characters.
652
653 2014-12-16 Joel Brobecker <brobecker@adacore.com>
654
655 * linux-low.c (linux_low_filter_event): Update call to
656 linux_enable_event_reporting following the addition of
657 a new parameter to that function.
658
659 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
660
661 PR server/17457
662 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
663 (AARCH64_FPCR_REGNO): Likewise.
664 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
665 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
666 (aarch64_store_fpregset): Likewise.
667
668 2014-12-15 Joel Brobecker <brobecker@adacore.com>
669
670 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
671 Remove FIXME comment about assumption about N.
672
673 2014-12-13 Joel Brobecker <brobecker@adacore.com>
674
675 * configure.ac: If large-file support is disabled in GDBserver,
676 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
677 * configure: Regenerate.
678
679 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
680
681 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
682 warning upon ENODATA from ptrace.
683 * linux-s390-low.c (s390_store_tdb): New.
684 (s390_regsets): Add regset for NT_S390_TDB.
685
686 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
687
688 * linux-low.c (regsets_store_inferior_registers): Skip regsets
689 without a fill_function.
690 * linux-s390-low.c (s390_fill_last_break): Remove.
691 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
692 (s390_arch_setup): Use regset's size instead of fill_function for
693 loop end condition.
694
695 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
696
697 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
698 the regset's store function when ptrace returned an error.
699 * regcache.c (get_thread_regcache): Invalidate register cache
700 before fetching inferior's registers.
701
702 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
703
704 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
705 while-loop as for-loop.
706 (regsets_store_inferior_registers): Likewise.
707
708 2014-11-28 Yao Qi <yao@codesourcery.com>
709
710 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
711 * config.in, configure: Re-generate.
712 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
713 is defined.
714
715 2014-11-21 Yao Qi <yao@codesourcery.com>
716
717 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
718 (AC_CHECK_HEADERS): Remove malloc.h.
719 * configure: Re-generated.
720 * config.in: Re-generated.
721 * server.h: Don't include alloca.h and malloc.h.
722 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
723 Don't include malloc.h.
724
725 2014-11-17 Joel Brobecker <brobecker@adacore.com>
726
727 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
728 corresponding ERRNO check in same block.
729
730 2014-11-12 Pedro Alves <palves@redhat.com>
731
732 * server.c (cont_thread): Update comment.
733 (start_inferior, attach_inferior): No longer clear cont_thread.
734 (handle_v_cont): No longer set cont_thread.
735 (captured_main): Clear cont_thread each time a GDB connects.
736
737 2014-11-12 Pedro Alves <palves@redhat.com>
738
739 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
740 thread, and don't resume all threads if the Hc thread has exited.
741
742 2014-11-12 Pedro Alves <palves@redhat.com>
743
744 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
745 the process group instead of to a specific LWP.
746
747 2014-10-15 Pedro Alves <palves@redhat.com>
748
749 PR server/17487
750 * win32-arm-low.c (arm_set_thread_context): Remove current_event
751 parameter.
752 (arm_set_thread_context): Delete.
753 (the_low_target): Adjust.
754 * win32-i386-low.c (debug_registers_changed)
755 (debug_registers_used): Delete.
756 (update_debug_registers_callback): New function.
757 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
758 needing to update their debug registers.
759 (win32_get_current_dr): New function.
760 (x86_dr_low_get_addr, x86_dr_low_get_control)
761 (x86_dr_low_get_status): Fetch the debug register from the thread
762 record's context.
763 (i386_initial_stuff): Adjust.
764 (i386_get_thread_context): Remove current_event parameter. Don't
765 clear debug_registers_changed nor copy DR values to
766 debug_reg_state.
767 (i386_set_thread_context): Delete.
768 (i386_prepare_to_resume): New function.
769 (i386_thread_added): Mark the thread as needing to update irs
770 debug registers.
771 (the_low_target): Remove i386_set_thread_context and install
772 i386_prepare_to_resume.
773 * win32-low.c (win32_get_thread_context): Adjust.
774 (win32_set_thread_context): Use SetThreadContext
775 directly.
776 (win32_prepare_to_resume): New function.
777 (win32_require_context): New function, factored out from ...
778 (thread_rec): ... this.
779 (continue_one_thread): Call win32_prepare_to_resume on each thread
780 we're about to continue.
781 (win32_resume): Call win32_prepare_to_resume on the event thread.
782 * win32-low.h (struct win32_thread_info)
783 <debug_registers_changed>: New field.
784 (struct win32_target_ops): Change prototype of set_thread_context,
785 delete set_thread_context and add prepare_to_resume.
786 (win32_require_context): New declaration.
787
788 2014-10-08 Gary Benson <gbenson@redhat.com>
789
790 * server.h: Do not include common-exceptions.h.
791
792 2014-10-08 Gary Benson <gbenson@redhat.com>
793
794 * server.h: Do not include cleanups.h.
795
796 2014-09-30 James Hogan <james.hogan@imgtec.com>
797
798 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
799 mips64-dsp-linux.c.
800
801 2014-09-23 Yao Qi <yao@codesourcery.com>
802
803 * linux-low.c (lp_status_maybe_breakpoint): New function.
804 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
805 (count_events_callback): Likewise.
806 (select_event_lwp_callback): Likewise.
807 (cancel_breakpoints_callback): Likewise.
808
809 2014-09-19 Don Breazeal <donb@codesourcery.com>
810
811 * linux-low.c (handle_extended_wait): Call
812 linux_ptrace_get_extended_event.
813 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
814 linux_is_extended_waitstatus.
815
816 2014-09-16 Joel Brobecker <brobecker@adacore.com>
817
818 * Makefile.in (CPPFLAGS): Define.
819 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
820 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
821
822 2014-09-16 Gary Benson <gbenson@redhat.com>
823
824 * inferiors.h (current_inferior): Renamed as...
825 (current_thread): New variable. All uses updated.
826 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
827 (maybe_move_out_of_jump_pad): Likewise.
828 (cancel_breakpoint): Likewise.
829 (linux_low_filter_event): Likewise.
830 (wait_for_sigstop): Likewise.
831 (linux_resume_one_lwp): Likewise.
832 (need_step_over_p): Likewise.
833 (start_step_over): Likewise.
834 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
835 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
836 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
837 and save_inferior as saved_thread.
838 * regcache.c (get_thread_regcache): Renamed saved_inferior as
839 saved_thread.
840 (regcache_invalidate_thread): Likewise.
841 * remote-utils.c (prepare_resume_reply): Likewise.
842 * thread-db.c (thread_db_get_tls_address): Likewise.
843 (disable_thread_event_reporting): Likewise.
844 (remove_thread_event_breakpoints): Likewise.
845 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
846 as saved_thread.
847 * target.h (set_desired_inferior): Renamed as...
848 (set_desired_thread): New declaration. All uses updated.
849 * server.c (myresume): Updated comment to reference thread instead
850 of inferior.
851 (handle_serial_event): Likewise.
852 (handle_target_event): Likewise.
853
854 2014-09-12 Tom Tromey <tromey@redhat.com>
855 Gary Benson <gbenson@redhat.com>
856
857 * regcache.h: Include common-regcache.h.
858 (regcache_read_pc): Don't declare.
859 * regcache.c (get_thread_regcache_for_ptid): New function.
860
861 2014-09-11 Tom Tromey <tromey@redhat.com>
862 Gary Benson <gbenson@redhat.com>
863
864 * symbol.c: New file.
865 * Makefile.in (SFILES): Add symbol.c.
866 (OBS): Add symbol.o.
867
868 2014-09-11 Gary Benson <gbenson@redhat.com>
869
870 * target.c (target_stop_ptid, target_continue_ptid): New
871 functions.
872
873 2014-09-11 Tom Tromey <tromey@redhat.com>
874 Gary Benson <gbenson@redhat.com>
875
876 * target.h: Include target/target.h.
877 * target.c (target_read_memory, target_read_uint32)
878 (target_write_memory): New functions.
879
880 2014-09-11 Gary Benson <gbenson@redhat.com>
881
882 * server.h (debug_hw_points): Don't declare.
883 * server.c (debug_hw_points): Don't define. Replace all uses
884 with show_debug_regs.
885 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
886 all uses with show_debug_regs.
887
888 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
889
890 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
891 endianness into account.
892 (ppc_supply_ptrace_register): Likewise.
893
894 2014-09-03 James Hogan <james.hogan@imgtec.com>
895
896 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
897 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
898
899 2014-09-03 Gary Benson <gbenson@redhat.com>
900
901 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
902 ALL_DEBUG_ADDRESS_REGISTERS.
903
904 2014-09-02 Gary Benson <gbenson@redhat.com>
905
906 * i386-low.h: Renamed as...
907 * x86-low.h: New file. All type, function and variable name
908 prefixes changed from "i386_" to "x86_". All references updated.
909 * i386-low.c: Renamed as...
910 * x86-low.c: New file. All type, function and variable name
911 prefixes changed from "i386_" to "x86_". All references updated.
912
913 2014-09-02 Gary Benson <gbenson@redhat.com>
914
915 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
916 (x86_linux_new_thread): Likewise.
917
918 2014-08-29 Gary Benson <gbenson@redhat.com>
919
920 * server.h (setjmp.h): Do not include.
921 (toplevel): Do not declare.
922 (common-exceptions.h): Include.
923 (cleanups.h): Likewise.
924 * server.c (toplevel): Do not define.
925 (exit_code): New static global.
926 (detach_or_kill_for_exit_cleanup): New function.
927 (main): New function. Original main renamed to...
928 (captured_main): New function.
929 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
930
931 2014-08-29 Gary Benson <gbenson@redhat.com>
932
933 * Makefile.in (SFILES): Add common/common-exceptions.c.
934 (OBS): Add common-exceptions.o.
935 (common-exceptions.o): New rule.
936 * utils.c (prepare_to_throw_exception): New function.
937
938 2014-08-29 Gary Benson <gbenson@redhat.com>
939
940 * config.in: Regenerate.
941 * configure: Likewise.
942
943 2014-08-29 Gary Benson <gbenson@redhat.com>
944
945 * Makefile.in (SFILES): Add common/cleanups.c.
946 (OBS): cleanups.o.
947 (cleanups.o): New rule.
948
949 2014-08-29 Gary Benson <gbenson@redhat.com>
950
951 * utils.c (internal_vwarning): New function.
952
953 2014-08-28 Gary Benson <gbenson@redhat.com>
954
955 * utils.h (fatal): Remove declaration.
956 * utils.c (fatal): Remove function.
957
958 2014-08-28 Gary Benson <gbenson@redhat.com>
959
960 * tracepoint.c (gdb_agent_init): Replace fatal with
961 perror_with_name.
962 (initialize_tracepoint): Likewise.
963
964 2014-08-28 Gary Benson <gbenson@redhat.com>
965
966 * remote-utils.c (remote_prepare): Replace fatal with error.
967
968 2014-08-28 Gary Benson <gbenson@redhat.com>
969
970 * linux-low.c (linux_async): Replace fatal with warning.
971 Tidy up and return.
972 (linux_start_non_stop): Return -1 if linux_async failed.
973
974 2014-08-28 Gary Benson <gbenson@redhat.com>
975
976 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
977 gdb_assert.
978 (i386_dr_low_get_addr): Remove vague comment.
979 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
980 gdb_assert.
981
982 2014-08-28 Gary Benson <gbenson@redhat.com>
983
984 * inferiors.c (get_thread_process): Replace check with gdb_assert.
985 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
986 internal_error.
987 (linux_resume_one_lwp): Likewise.
988 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
989 gdb_assert.
990 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
991 with internal_error.
992 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
993 (init_register_cache): Replace fatal with gdb_assert_not_reached.
994 (find_register_by_name): Replace fatal with internal_error.
995 (find_regno): Likewise.
996 * tdesc.c (init_target_desc): Replace check with gdb_assert.
997 * thread-db.c (thread_db_create_event): Likewise.
998 (thread_db_load_search): Likewise.
999 (try_thread_db_load_1): Likewise.
1000 * tracepoint.c (get_jump_space_head): Replace fatal with
1001 internal_error.
1002 (claim_trampoline_space): Likewise.
1003 (have_fast_tracepoint_trampoline_buffer): Likewise.
1004 (cmd_qtstart): Likewise.
1005 (stop_tracing): Likewise.
1006 (fast_tracepoint_collecting): Likewise.
1007 (target_malloc): Likewise.
1008 (download_tracepoint): Likewise.
1009 (download_trace_state_variables): Replace check with gdb_assert.
1010 (upload_fast_traceframes): Replace fatal with internal_error.
1011
1012 2014-08-19 Tom Tromey <tromey@redhat.com>
1013 Gary Benson <gbenson@redhat.com>
1014
1015 * Makefile.in (SFILES): Add common/common-debug.c.
1016 (OBS): Add common-debug.o.
1017 (common-debug.o): New rule.
1018 * debug.h (debug_printf): Don't declare.
1019 * debug.c (debug_printf): Renamed and rewritten as...
1020 (debug_vprintf): New function.
1021
1022 2014-08-19 Gary Benson <gbenson@redhat.com>
1023
1024 * utils.h: Do not include print-utils.h.
1025
1026 2014-08-19 Tom Tromey <tromey@redhat.com>
1027 Gary Benson <gbenson@redhat.com>
1028
1029 * server.h: Add static assertion.
1030 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1031
1032 2014-08-19 Tom Tromey <tromey@redhat.com>
1033 Gary Benson <gbenson@redhat.com>
1034
1035 * Makefile.in (SFILES): Add common/errors.c.
1036 (OBS): Add errors.o.
1037 (IPA_OBS): Add errors-ipa.o.
1038 (errors.o): New rule.
1039 (errors-ipa.o): Likewise.
1040 * utils.h (perror_with_name, error, warning): Don't declare.
1041 * utils.c (warning): Renamed and rewritten as...
1042 (vwarning): New function.
1043 (error): Renamed and rewritten as...
1044 (verror): New function.
1045 (internal_error): Renamed and rewritten as...
1046 (internal_verror): New function.
1047
1048 2014-08-07 Gary Benson <gbenson@redhat.com>
1049
1050 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1051 * configure: Regenerate.
1052 * config.in: Likewise.
1053 * server.h: Do not include errno.h.
1054 * event-loop.c: Likewise.
1055 * hostio-errno.c: Likewise.
1056 * linux-low.c: Likewise.
1057 * remote-utils.c: Likewise.
1058 * spu-low.c: Likewise.
1059 * utils.c: Likewise.
1060 * gdbreplay.c: Unconditionally include errno.h.
1061
1062 2014-08-07 Gary Benson <gbenson@redhat.com>
1063
1064 * server.h: Do not include string.h.
1065 * event-loop.c: Likewise.
1066 * linux-low.c: Likewise.
1067 * regcache.c: Likewise.
1068 * remote-utils.c: Likewise.
1069 * spu-low.c: Likewise.
1070 * utils.c: Likewise.
1071
1072 2014-08-07 Gary Benson <gbenson@redhat.com>
1073
1074 * server.h: Do not include gdb_assert.h.
1075
1076 2014-08-07 Gary Benson <gbenson@redhat.com>
1077
1078 * server.h: Do not include common-utils.h.
1079
1080 2014-08-07 Gary Benson <gbenson@redhat.com>
1081
1082 * server.h: Do not include ptid.h.
1083 * notif.h: Likewise.
1084
1085 2014-08-07 Gary Benson <gbenson@redhat.com>
1086
1087 * server.h: Do not include gdb_locale.h.
1088
1089 2014-08-07 Gary Benson <gbenson@redhat.com>
1090
1091 * server.h: Do not include gdb/signals.h.
1092 * win32-low.c: Likewise.
1093
1094 2014-08-07 Gary Benson <gbenson@redhat.com>
1095
1096 * server.h: Do not include pathmax.h.
1097
1098 2014-08-07 Gary Benson <gbenson@redhat.com>
1099
1100 * server.h: Do not include libiberty.h.
1101 * linux-bfin-low.c: Likewise.
1102
1103 2014-08-07 Gary Benson <gbenson@redhat.com>
1104
1105 * server.h: Do not include ansidecl.h.
1106
1107 2014-08-07 Gary Benson <gbenson@redhat.com>
1108
1109 * linux-x86-low.c: Do not include stddef.h.
1110 * lynx-ppc-low.c: Likewise.
1111 * tracepoint.c: Likewise.
1112
1113 2014-08-07 Gary Benson <gbenson@redhat.com>
1114
1115 * server.h: Do not include stdarg.h.
1116 * nto-low.c: Likewise.
1117
1118 2014-08-07 Gary Benson <gbenson@redhat.com>
1119
1120 * server.h: Do not include stdlib.h.
1121 * inferiors.c: Likewise.
1122 * linux-low.c: Likewise.
1123 * regcache.c: Likewise.
1124 * spu-low.c: Likewise.
1125 * tracepoint.c: Likewise.
1126 * utils.c: Likewise.
1127
1128 2014-08-07 Gary Benson <gbenson@redhat.com>
1129
1130 * server.h: Do not include stdio.h.
1131 * linux-low.c: Likewise.
1132 * remote-utils.c: Likewise.
1133 * spu-low.c: Likewise.
1134 * utils.c: Likewise.
1135 * wincecompat.c: Likewise.
1136
1137 2014-08-06 Gary Benson <gbenson@redhat.com>
1138
1139 * regcache.c (init_register_cache): Move conditionals inside if.
1140
1141 2014-08-06 Gary Benson <gbenson@redhat.com>
1142
1143 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1144
1145 2014-07-31 Gary Benson <gbenson@redhat.com>
1146
1147 * ax.h: Do not include server.h.
1148 * gdbthread.h: Likewise.
1149 * lynx-low.h: Likewise.
1150 * notif.h: Likewise.
1151
1152 2014-07-30 Gary Benson <gbenson@redhat.com>
1153
1154 * server.h: Include common-defs.h.
1155 Do not include config.h or build-gnulib-gdbserver/config.h.
1156
1157 2014-07-30 Gary Benson <gbenson@redhat.com>
1158
1159 * hostio-errno.c: Move server.h to top of includes list.
1160 * inferiors.c: Likewise.
1161 * linux-x86-low.c: Likewise.
1162 * notif.c: Include server.h.
1163
1164 2014-07-24 Tom Tromey <tromey@redhat.com>
1165 Gary Benson <gbenson@redhat.com>
1166
1167 * server.h (CORE_ADDR): Now unsigned.
1168
1169 2014-07-16 Pedro Alves <palves@redhat.com>
1170
1171 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1172
1173 2014-07-15 Pedro Alves <palves@redhat.com>
1174
1175 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1176 copy.
1177
1178 2014-07-11 Pedro Alves <palves@redhat.com>
1179
1180 * linux-low.c (kill_wait_lwp): New function, based on
1181 kill_one_lwp_callback, but use my_waitpid directly.
1182 (kill_one_lwp_callback, linux_kill): Use it.
1183
1184 2014-06-23 Pedro Alves <palves@redhat.com>
1185
1186 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1187 before setting DR0..DR3.
1188
1189 2014-06-20 Gary Benson <gbenson@redhat.com>
1190
1191 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1192 * configure: Regenerated.
1193 * config.in: Likewise.
1194
1195 2014-06-20 Gary Benson <gbenson@redhat.com>
1196
1197 * Makefile.in (SFILES): Update locations for files moved
1198 from common to nat.
1199 (object file files): Reordered.
1200
1201 2014-06-20 Gary Benson <gbenson@redhat.com>
1202
1203 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1204 (i386_dr_low_set_addr): Likewise.
1205 (i386_dr_low_get_addr): Likewise.
1206 (i386_dr_low_can_set_control): Likewise.
1207 (i386_dr_low_set_control): Likewise.
1208 (i386_dr_low_get_control): Likewise.
1209 (i386_dr_low_get_status): Likewise.
1210 (i386_get_debug_register_length): Likewise.
1211 * linux-x86-low.c (i386_dr_low_set_addr):
1212 Changed signature. Made static.
1213 (i386_dr_low_get_addr): Likewise.
1214 (i386_dr_low_set_control): Likewise.
1215 (i386_dr_low_get_control): Likewise.
1216 (i386_dr_low_get_status): Likewise.
1217 (i386_dr_low): New global variable.
1218 * win32-i386-low.c (i386_dr_low_set_addr):
1219 Changed signature. Made static.
1220 (i386_dr_low_get_addr): Likewise.
1221 (i386_dr_low_set_control): Likewise.
1222 (i386_dr_low_get_control): Likewise.
1223 (i386_dr_low_get_status): Likewise.
1224 (i386_dr_low): New global variable.
1225
1226 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1227
1228 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1229 * Makefile.in (AR, AR_FLAGS): Define.
1230 * configure: Regenerate.
1231
1232 2014-06-19 Gary Benson <gbenson@redhat.com>
1233
1234 * Makefile.in (i386-dregs.o): New rule.
1235 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1236 * i386-low.c (target.h): Remove include.
1237 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1238 (DR_CONTROL_SHIFT): Likewise.
1239 (DR_CONTROL_SIZE): Likewise.
1240 (DR_RW_EXECUTE): Likewise.
1241 (DR_RW_WRITE): Likewise.
1242 (DR_RW_READ): Likewise.
1243 (DR_RW_IORW): Likewise.
1244 (DR_LEN_1): Likewise.
1245 (DR_LEN_2): Likewise.
1246 (DR_LEN_4): Likewise.
1247 (DR_LEN_8): Likewise.
1248 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1249 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1250 (DR_ENABLE_SIZE): Likewise.
1251 (DR_LOCAL_SLOWDOWN): Likewise.
1252 (DR_GLOBAL_SLOWDOWN): Likewise.
1253 (DR_CONTROL_RESERVED): Likewise.
1254 (I386_DR_CONTROL_MASK): Likewise.
1255 (I386_DR_VACANT): Likewise.
1256 (I386_DR_LOCAL_ENABLE): Likewise.
1257 (I386_DR_GLOBAL_ENABLE): Likewise.
1258 (I386_DR_DISABLE): Likewise.
1259 (I386_DR_SET_RW_LEN): Likewise.
1260 (I386_DR_GET_RW_LEN): Likewise.
1261 (I386_DR_WATCH_HIT): Likewise.
1262 (i386_wp_op_t): Likewise.
1263 (i386_show_dr): Likewise.
1264 (i386_length_and_rw_bits): Likewise.
1265 (i386_insert_aligned_watchpoint): Likewise.
1266 (i386_remove_aligned_watchpoint): Likewise.
1267 (i386_handle_nonaligned_watchpoint): Likewise.
1268 i386_update_inferior_debug_regs(): Likewise.
1269 (i386_dr_insert_watchpoint): Likewise.
1270 (i386_dr_remove_watchpoint): Likewise.
1271 (i386_dr_region_ok_for_watchpoint): Likewise.
1272 (i386_dr_stopped_data_address): Likewise.
1273 (i386_dr_stopped_by_watchpoint): Likewise.
1274
1275 2014-06-19 Gary Benson <gbenson@redhat.com>
1276
1277 * i386-low.c (i386_dr_show): Renamed to
1278 i386_show_dr and made static. All uses updated.
1279 (i386_dr_length_and_rw_bits): Renamed to
1280 i386_length_and_rw_bits and made static.
1281 All uses updated.
1282 (i386_dr_insert_aligned_watchpoint): Renamed to
1283 i386_insert_aligned_watchpoint and made static.
1284 All uses updated.
1285 (i386_dr_remove_aligned_watchpoint): Renamed to
1286 i386_remove_aligned_watchpoint and made static.
1287 All uses updated.
1288 (i386_dr_update_inferior_debug_regs): Renamed to
1289 i386_update_inferior_debug_regs and made static.
1290 All uses updated.
1291
1292 2014-06-18 Gary Benson <gbenson@redhat.com>
1293
1294 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1295 (i386_dr_low_can_set_control): Likewise.
1296 (i386_get_debug_register_length): Likewise.
1297 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1298 (i386_dr_low_can_set_control): Likewise.
1299 (i386_get_debug_register_length): Likewise.
1300
1301 2014-06-17 Gary Benson <gbenson@redhat.com>
1302
1303 * i386-low.h (i386-dregs.h): New include.
1304 (DR_FIRSTADDR): Now in i386-dregs.h.
1305 (DR_LASTADDR): Likewise.
1306 (DR_NADDR): Likewise.
1307 (DR_STATUS): Likewise.
1308 (DR_CONTROL): Likewise.
1309 (i386_debug_reg_state): Likewise.
1310 (i386_dr_insert_watchpoint): Likewise.
1311 (i386_dr_remove_watchpoint): Likewise.
1312 (i386_dr_region_ok_for_watchpoint): Likewise.
1313 (i386_dr_stopped_data_address): Likewise.
1314 (i386_dr_stopped_by_watchpoint): Likewise.
1315 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1316
1317 2014-06-18 Gary Benson <gbenson@redhat.com>
1318
1319 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1320 i386_dr_insert_watchpoint.
1321 (i386_low_remove_watchpoint): Renamed to
1322 i386_dr_remove_watchpoint.
1323 (i386_low_region_ok_for_watchpoint): Renamed to
1324 i386_dr_region_ok_for_watchpoint.
1325 (i386_low_stopped_data_address): Renamed to
1326 i386_dr_stopped_data_address.
1327 (i386_low_stopped_by_watchpoint): Renamed to
1328 i386_dr_stopped_by_watchpoint.
1329 * i386-low.c (i386_show_dr): Renamed to
1330 i386_dr_show and made nonstatic. All uses updated.
1331 (i386_length_and_rw_bits): Renamed to
1332 i386_dr_length_and_rw_bits and made nonstatic.
1333 All uses updated.
1334 (i386_insert_aligned_watchpoint): Renamed to
1335 i386_dr_insert_aligned_watchpoint and made nonstatic.
1336 All uses updated.
1337 (i386_remove_aligned_watchpoint): Renamed to
1338 i386_dr_remove_aligned_watchpoint and made nonstatic.
1339 All uses updated.
1340 (i386_update_inferior_debug_regs): Renamed to
1341 i386_dr_update_inferior_debug_regs and made nonstatic.
1342 All uses updated.
1343 (i386_low_insert_watchpoint): Renamed to
1344 i386_dr_insert_watchpoint. All uses updated.
1345 (i386_low_remove_watchpoint): Renamed to
1346 i386_dr_remove_watchpoint. All uses updated.
1347 (i386_low_region_ok_for_watchpoint): Renamed to
1348 i386_dr_region_ok_for_watchpoint. All uses updated.
1349 (i386_low_stopped_data_address): Renamed to
1350 i386_dr_stopped_data_address. All uses updated.
1351 (i386_low_stopped_by_watchpoint): Renamed to
1352 i386_dr_stopped_by_watchpoint. All uses updated.
1353
1354 2014-06-18 Gary Benson <gbenson@redhat.com>
1355
1356 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1357 (i386_dr_low_can_set_control): Likewise.
1358 (i386_insert_aligned_watchpoint): New check.
1359
1360 2014-06-18 Gary Benson <gbenson@redhat.com>
1361
1362 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1363 Renamed to state.
1364
1365 2014-06-18 Gary Benson <gbenson@redhat.com>
1366
1367 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1368 instead of fatal and error.
1369 (i386_handle_nonaligned_watchpoint): Likewise.
1370
1371 2014-06-18 Gary Benson <gbenson@redhat.com>
1372
1373 * i386-low.c (i386_get_debug_register_length): New macro.
1374 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1375 (i386_show_dr): Use debug_printf instead of fprintf. Use
1376 phex to format values.
1377
1378 2014-06-18 Gary Benson <gbenson@redhat.com>
1379
1380 * i386-low.h: Comment changes.
1381 * i386-low.c: Likewise.
1382
1383 2014-06-18 Gary Benson <gbenson@redhat.com>
1384
1385 * i386-low.c: Whitespace changes.
1386
1387 2014-06-12 Tom Tromey <tromey@redhat.com>
1388
1389 * utils.c (freeargv): Remove.
1390
1391 2014-06-12 Tom Tromey <tromey@redhat.com>
1392
1393 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1394 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1395 (parse_debug_format_options): Likewise.
1396 (gdbserver_usage): Likewise.
1397 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1398 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1399 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1400 against libiberty.
1401 ($(LIBGNU)): Depend on libiberty.
1402 (all-lib): Recurse into all subdirs.
1403 (install-only): Invoke "install" target in subdirs.
1404 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1405 targets.
1406 * configure: Rebuild.
1407 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1408 for vasprintf, vsnprintf, or gettimeofday.
1409 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1410 srv_tgtobj.
1411
1412 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1413
1414 * development.sh: Delete.
1415 * Makefile.in (config.status): Adjust dependency on development.sh.
1416 * configure.ac: Adjust development.sh source call.
1417 * configure: Regenerate.
1418
1419 2014-06-02 Pedro Alves <palves@redhat.com>
1420
1421 * ax.c (gdb_free_agent_expr): New function.
1422 * ax.h (gdb_free_agent_expr): New declaration.
1423 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1424 list.
1425 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1426 static.
1427 (clear_breakpoint_conditions_and_commands): New function.
1428 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1429 (clear_breakpoint_conditions_and_commands): New declaration.
1430
1431 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1432
1433 * linux-aarch64-low.c (asm/ptrace.h): Include.
1434
1435 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1436
1437 Fix TLS access for -static -pthread.
1438 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1439 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1440 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1441
1442 2014-05-20 Pedro Alves <palves@redhat.com>
1443
1444 * linux-aarch64-low.c (aarch64_insert_point)
1445 (aarch64_remove_point): No longer check whether the type is
1446 supported here. Adjust to new interface.
1447 (the_low_target): Install aarch64_supports_z_point_type as
1448 supports_z_point_type method.
1449 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1450 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1451 instead of a Z packet char. Adjust.
1452 (arm_supports_z_point_type): New function.
1453 (arm_insert_point, arm_remove_point): Adjust to new interface.
1454 (the_low_target): Install arm_supports_z_point_type.
1455 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1456 (cris_insert_point, cris_remove_point): Adjust to new interface.
1457 Don't check whether the type is supported here.
1458 (the_low_target): Install cris_supports_z_point_type.
1459 * linux-low.c (linux_supports_z_point_type): New function.
1460 (linux_insert_point, linux_remove_point): Adjust to new interface.
1461 * linux-low.h (struct linux_target_ops) <insert_point,
1462 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1463 raw_breakpoint pointer parameter.
1464 <supports_z_point_type>: New method.
1465 * linux-mips-low.c (mips_supports_z_point_type): New function.
1466 (mips_insert_point, mips_remove_point): Adjust to new interface.
1467 Use mips_supports_z_point_type.
1468 (the_low_target): Install mips_supports_z_point_type.
1469 * linux-ppc-low.c (the_low_target): Install NULL as
1470 supports_z_point_type method.
1471 * linux-s390-low.c (the_low_target): Install NULL as
1472 supports_z_point_type method.
1473 * linux-sparc-low.c (the_low_target): Install NULL as
1474 supports_z_point_type method.
1475 * linux-x86-low.c (x86_supports_z_point_type): New function.
1476 (x86_insert_point): Adjust to new insert_point interface. Use
1477 insert_memory_breakpoint. Adjust to new
1478 i386_low_insert_watchpoint interface.
1479 (x86_remove_point): Adjust to remove_point interface. Use
1480 remove_memory_breakpoint. Adjust to new
1481 i386_low_remove_watchpoint interface.
1482 (the_low_target): Install x86_supports_z_point_type.
1483 * lynx-low.c (lynx_target_ops): Install NULL as
1484 supports_z_point_type callback.
1485 * nto-low.c (nto_supports_z_point_type): New.
1486 (nto_insert_point, nto_remove_point): Adjust to new interface.
1487 (nto_target_ops): Install nto_supports_z_point_type.
1488 * mem-break.c: Adjust intro comment.
1489 (struct raw_breakpoint) <raw_type, size>: New fields.
1490 <inserted>: Update comment.
1491 <shlib_disabled>: Delete field.
1492 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1493 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1494 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1495 (raw_bkpt_type_to_target_hw_bp_type): New function.
1496 (find_enabled_raw_code_breakpoint_at): New function.
1497 (find_raw_breakpoint_at): New type and size parameters. Use them.
1498 (insert_memory_breakpoint): New function, based off
1499 set_raw_breakpoint_at.
1500 (remove_memory_breakpoint): New function.
1501 (set_raw_breakpoint_at): Reimplement.
1502 (set_breakpoint): New, based on set_breakpoint_at.
1503 (set_breakpoint_at): Reimplement.
1504 (delete_raw_breakpoint): Go through the_target->remove_point
1505 instead of assuming memory breakpoints.
1506 (find_gdb_breakpoint_at): Delete.
1507 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1508 (find_gdb_breakpoint): New function.
1509 (set_gdb_breakpoint_at): Delete.
1510 (z_type_supported): New function.
1511 (set_gdb_breakpoint_1): New function, loosely based off
1512 set_gdb_breakpoint_at.
1513 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1514 (delete_gdb_breakpoint_at): Delete.
1515 (delete_gdb_breakpoint_1): New function, loosely based off
1516 delete_gdb_breakpoint_at.
1517 (delete_gdb_breakpoint): New function.
1518 (clear_gdb_breakpoint_conditions): Rename to ...
1519 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1520 breakpoint.
1521 (add_condition_to_breakpoint): Make static.
1522 (add_breakpoint_condition): Take a struct breakpoint pointer
1523 instead of an address. Adjust.
1524 (gdb_condition_true_at_breakpoint): Rename to ...
1525 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1526 z_type parameter.
1527 (gdb_condition_true_at_breakpoint): Reimplement.
1528 (add_breakpoint_commands): Take a struct breakpoint pointer
1529 instead of an address. Adjust.
1530 (gdb_no_commands_at_breakpoint): Rename to ...
1531 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1532 parameter. Return true if no breakpoint was found. Change debug
1533 output.
1534 (gdb_no_commands_at_breakpoint): Reimplement.
1535 (run_breakpoint_commands): Rename to ...
1536 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1537 and change return type to boolean.
1538 (run_breakpoint_commands): New function.
1539 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1540 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1541 breakpoint. Go through the_target->remove_point instead of
1542 assuming memory breakpoint.
1543 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1544 software and hardware breakpoints.
1545 (reinsert_raw_breakpoint): Go through the_target->insert_point
1546 instead of assuming memory breakpoint.
1547 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1548 software and hardware breakpoints.
1549 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1550 Check both software and hardware breakpoints.
1551 (validate_inserted_breakpoint): Assert the breakpoint is a
1552 software breakpoint. Set the inserted flag to -1 instead of
1553 setting shlib_disabled.
1554 (delete_disabled_breakpoints): Adjust.
1555 (validate_breakpoints): Only validate software breakpoints.
1556 Adjust to inserted flag change.
1557 (check_mem_read, check_mem_write): Skip breakpoint types other
1558 than software breakpoints. Adjust to inserted flag change.
1559 * mem-break.h (enum raw_bkpt_type): New enum.
1560 (raw_breakpoint, struct process_info): Forward declare.
1561 (Z_packet_to_target_hw_bp_type): Delete declaration.
1562 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1563 (set_gdb_breakpoint, delete_gdb_breakpoint)
1564 (clear_breakpoint_conditions): New declarations.
1565 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1566 (breakpoint_inserted_here): Update comment.
1567 (add_breakpoint_condition, add_breakpoint_commands): Replace
1568 address parameter with a breakpoint pointer parameter.
1569 (gdb_breakpoint_here): Update comment.
1570 (delete_gdb_breakpoint_at): Delete.
1571 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1572 * server.c (process_point_options): Take a struct breakpoint
1573 pointer instead of an address. Adjust.
1574 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1575 delete_gdb_breakpoint.
1576 * spu-low.c (spu_target_ops): Install NULL as
1577 supports_z_point_type method.
1578 * target.h: Include mem-break.h.
1579 (struct target_ops) <prepare_to_access_memory>: Update comment.
1580 <supports_z_point_type>: New field.
1581 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1582 instead of a char. Also take a raw breakpoint pointer.
1583 * win32-arm-low.c (the_low_target): Install NULL as
1584 supports_z_point_type.
1585 * win32-i386-low.c (i386_supports_z_point_type): New function.
1586 (i386_insert_point, i386_remove_point): Adjust to new interface.
1587 (the_low_target): Install i386_supports_z_point_type.
1588 * win32-low.c (win32_supports_z_point_type): New function.
1589 (win32_insert_point, win32_remove_point): Adjust to new interface.
1590 (win32_target_ops): Install win32_supports_z_point_type.
1591 * win32-low.h (struct win32_target_ops):
1592 <supports_z_point_type>: New method.
1593 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1594 instead of a char. Also take a raw breakpoint pointer.
1595
1596 2014-05-20 Pedro Alves <palves@redhat.com>
1597
1598 * mem-break.h: Include break-common.h.
1599 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1600 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1601 (Z_packet_to_target_hw_bp_type): New declaration.
1602 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1603 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1604 (Z_PACKET_ACCESS_WP): Delete macros.
1605 (Z_packet_to_hw_type): Delete function.
1606 * i386-low.h: Don't include break-common.h here.
1607 (Z_packet_to_hw_type): Delete declaration.
1608 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1609 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1610 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1611 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1612 * linux-aarch64-low.c: Don't include break-common.h here.
1613 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1614 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1615 (Z_packet_to_target_hw_bp_type): Delete function.
1616 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1617 function.
1618 (mips_insert_point, mips_remove_point): Use
1619 Z_packet_to_target_hw_bp_type.
1620
1621 2014-05-20 Pedro Alves <palves@redhat.com>
1622
1623 * linux-aarch64-low.c: Include break-common.h.
1624 (enum target_point_type): Delete.
1625 (Z_packet_to_point_type): Rename to ...
1626 (Z_packet_to_target_hw_bp_type): ... this, and return a
1627 target_hw_bp_type instead.
1628 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1629 instead of an enum target_point_type.
1630 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1631 breakpoint type.
1632 (aarch64_dr_state_insert_one_point)
1633 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1634 (aarch64_handle_aligned_watchpoint)
1635 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1636 Take an enum target_hw_bp_type instead of an enum
1637 target_point_type.
1638 (aarch64_supports_z_point_type): New function.
1639 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1640 use Z_packet_to_target_hw_bp_type.
1641
1642 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1643
1644 * configure.ac: Only use -Werror by default when DEVELOPMENT
1645 is true.
1646 * configure: Regenerate.
1647
1648 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1649
1650 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1651 * linux-x86-low.c (X86_64_USER_REGS): New.
1652 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1653
1654 2014-04-28 Yao Qi <yao@codesourcery.com>
1655
1656 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1657 name.
1658
1659 2014-04-25 Pedro Alves <palves@redhat.com>
1660
1661 PR server/16255
1662 * linux-low.c (linux_attach_fail_reason_string): New function.
1663 (linux_attach_lwp): Delete.
1664 (linux_attach_lwp_1): Rename to ...
1665 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1666 argument. Remove "initial" parameter. Return int instead of
1667 void. Don't error or warn here.
1668 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1669 failure to attach to the tgid. Call warning when failing to
1670 attach to an lwp.
1671 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1672 argument. Remove "initial" parameter. Return int instead of
1673 void. Don't error or warn here.
1674 (linux_attach_fail_reason_string): New declaration.
1675 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1676 interface change. Use linux_attach_fail_reason_string.
1677
1678 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1679 Walfred Tedeschi <walfred.tedeschi@intel.com>
1680
1681 * Makefile.in: Added rules to handle new files
1682 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1683 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1684 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1685 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1686 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1687 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1688 x32-avx512-linux.o.
1689 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1690 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1691 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1692 i386/x32-avx512.xml.
1693 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1694 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1695 i386/x32-avx512-linux.xml.
1696 * i387-fp.c (num_avx512_k_registers): New constant for number
1697 of K registers.
1698 (num_avx512_zmmh_low_registers): New constant for number of
1699 lower ZMM registers (0-15).
1700 (num_avx512_zmmh_high_registers): New constant for number of
1701 higher ZMM registers (16-31).
1702 (num_avx512_ymmh_registers): New contant for number of higher
1703 YMM registers (ymm16-31 added by avx521 on x86_64).
1704 (num_avx512_xmm_registers): New constant for number of higher
1705 XMM registers (xmm16-31 added by AVX512 on x86_64).
1706 (struct i387_xsave): Add space for AVX512 registers.
1707 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1708 Add code to handle AVX512 registers.
1709 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1710 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1711 prototypei from generated file.
1712 (tdesc_amd64_avx512_linux): Likewise.
1713 (init_registers_x32_avx512_linux): Likewise.
1714 (tdesc_x32_avx512_linux): Likewise.
1715 (init_registers_i386_avx512_linux): Likewise.
1716 (tdesc_i386_avx512_linux): Likewise.
1717 (x86_64_regmap): Add AVX512 registers.
1718 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1719 mask.
1720 (initialize_low_arch): Add code to initialize AVX512 registers.
1721
1722 2014-04-23 Pedro Alves <palves@redhat.com>
1723
1724 * mem-break.c (find_gdb_breakpoint_at): Make static.
1725 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1726
1727 2014-04-23 Pedro Alves <palves@redhat.com>
1728
1729 * i386-low.c: Don't include break-common.h here.
1730 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1731 prototype to take target_hw_bp_type as argument instead of a Z
1732 packet char.
1733 * i386-low.h: Include break-common.h here.
1734 (Z_packet_to_hw_type): Declare.
1735 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1736 prototypes.
1737 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1738 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1739 (x86_remove_point): Convert the packet number to a
1740 target_hw_bp_type before calling i386_low_remove_watchpoint.
1741 * win32-i386-low.c (i386_insert_point): Convert the packet number
1742 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1743 (i386_remove_point): Convert the packet number to a
1744 target_hw_bp_type before calling i386_low_remove_watchpoint.
1745
1746 2014-04-23 Pedro Alves <palves@redhat.com>
1747
1748 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1749
1750 2014-04-10 Pedro Alves <palves@redhat.com>
1751
1752 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1753 Check if the condition or command is NULL before checking if the
1754 breakpoint is known. On success, return true.
1755 * mem-break.h (add_breakpoint_condition): Document return.
1756 (add_breakpoint_commands): Add describing comment.
1757 * server.c (skip_to_semicolon): New function.
1758 (process_point_options): Use it.
1759
1760 2014-04-09 Pedro Alves <palves@redhat.com>
1761
1762 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1763 to lwpid_of.
1764
1765 2014-02-27 Pedro Alves <palves@redhat.com>
1766
1767 PR 12702
1768 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1769 macros.
1770 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1771 output.
1772 (last_thread_of_process_p): Take a PID argument instead of a
1773 thread pointer.
1774 (linux_wait_for_lwp): Delete.
1775 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1776 functions.
1777 (linux_low_filter_event): New function, party factored out from
1778 linux_wait_for_event.
1779 (linux_wait_for_event): Rename to ...
1780 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1781 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1782 sigsuspend. Check for zombie leaders.
1783 (linux_wait_for_event): Reimplement as wrapper around
1784 linux_wait_for_event_filtered.
1785 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1786 a normal or signal exit is seen, it's the whole process exiting.
1787 (wait_for_sigstop): No longer a for_each_inferior callback.
1788 Rewrite on top of linux_wait_for_event_filtered.
1789 (stop_all_lwps): Call wait_for_sigstop directly.
1790 * server.c (resume, handle_target_event): Handle
1791 TARGET_WAITKIND_NO_RESUMED.
1792
1793 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1794
1795 * win32-low.c (psapi_get_dll_name,
1796 * win32_CreateToolhelp32Snapshot): Delete.
1797 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1798 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1799 Delete.
1800 (handle_load_dll): Add function description.
1801 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1802
1803 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1804
1805 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1806 Add comment.
1807 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1808 base address when calling win32_add_one_solib.
1809 (handle_load_dll): Delete local variable load_addr.
1810 Remove 0x1000 offset applied to DLL base address when calling
1811 win32_add_one_solib.
1812 (handle_unload_dll): Add comment.
1813
1814 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1815
1816 * win32-low.c (win32_add_all_dlls): Renames
1817 win32_ensure_ntdll_loaded. Rewrite function documentation.
1818 Adjust implementation to always load all DLLs.
1819 Add 0x1000 offset to DLL base address when calling
1820 win32_add_one_solib.
1821 (child_initialization_done): New static global.
1822 (do_initial_child_stuff): Set child_initialization_done to
1823 zero during child initialization, and 1 after. Replace call
1824 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1825 Add comment.
1826 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1827 (handle_unload_dll): Add function documentation.
1828 (get_child_debug_event): Ignore load and unload DLL events
1829 during child initialization.
1830
1831 2014-02-20 Doug Evans <dje@google.com>
1832
1833 Remove global all_lwps.
1834 * inferiors.h (ptid_of): Move here from linux-low.h.
1835 (pid_of, lwpid_of): Ditto.
1836 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1837 parameter is a struct thread_info * now.
1838 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1839 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1840 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1841 directly.
1842 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1843 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1844 * linux-arm-low.c (update_registers_callback): Update, "entry"
1845 parameter is a struct thread_info * now.
1846 Fetch lwpid from current_inferior directly.
1847 (arm_insert_point): Pass &all_threads to find_inferior instead of
1848 &all_lwps.
1849 (arm_remove_point): Ditto.
1850 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1851 (arm_prepare_to_resume): Fetch pid from thread.
1852 (arm_read_description): Fetch lwpid from current_inferior directly.
1853 * linux-low.c (all_lwps): Delete.
1854 (delete_lwp): Delete call to remove_inferior.
1855 (handle_extended_wait): Fetch lwpid from thread.
1856 (add_lwp): Don't set lwp->entry.id. Remove call to
1857 add_inferior_to_list.
1858 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1859 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1860 (kill_one_lwp_callback): Ditto.
1861 (linux_kill): Don't dereference NULL pointer.
1862 Fetch ptid,lwpid from thread.
1863 (get_detach_signal): Fetch ptid from thread.
1864 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1865 Simplify call to regcache_invalidate_thread.
1866 (delete_lwp_callback): Update, "entry" parameter is a
1867 struct thread_info * now. Fetch pid from thread.
1868 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1869 (status_pending_p_callback): Update, "entry" parameter is a
1870 struct thread_info * now. Fetch ptid from thread.
1871 (find_lwp_pid): Update, "entry" parameter is a
1872 struct thread_info * now.
1873 (linux_wait_for_lwp): Fetch pid from thread.
1874 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1875 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1876 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1877 (dequeue_one_deferred_signal): Ditto.
1878 (cancel_breakpoint): Fetch ptid from current_inferior.
1879 (linux_wait_for_event): Pass &all_threads to find_inferior,
1880 not &all_lwps. Fetch ptid, lwpid from thread.
1881 (count_events_callback): Update, "entry" parameter is a
1882 struct thread_info * now.
1883 (select_singlestep_lwp_callback): Ditto.
1884 (select_event_lwp_callback): Ditto.
1885 (cancel_breakpoints_callback): Ditto.
1886 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1887 not &all_lwps.
1888 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1889 (unsuspend_one_lwp): Update, "entry" parameter is a
1890 struct thread_info * now.
1891 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1892 not &all_lwps.
1893 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1894 Fetch lwpid from thread, not lwp.
1895 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1896 Pass &all_threads to find_inferior, not &all_lwps.
1897 (send_sigstop): Fetch lwpid from thread, not lwp.
1898 (send_sigstop_callback): Update, "entry" parameter is a
1899 struct thread_info * now.
1900 (suspend_and_send_sigstop_callback): Ditto.
1901 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1902 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1903 struct thread_info * now.
1904 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1905 from thread, lwp.
1906 (lwp_running): Update, "entry" parameter is a
1907 struct thread_info * now.
1908 (stop_all_lwps): Fetch ptid from thread.
1909 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1910 (linux_resume_one_lwp): Fetch lwpid from thread.
1911 (linux_set_resume_request): Update, "entry" parameter is a
1912 struct thread_info * now. Fetch pid, lwpid from thread.
1913 (resume_status_pending_p): Update, "entry" parameter is a
1914 struct thread_info * now.
1915 (need_step_over_p): Ditto. Fetch lwpid from thread.
1916 (start_step_over): Fetch lwpid from thread.
1917 (linux_resume_one_thread): Update, "entry" parameter is a
1918 struct thread_info * now. Fetch lwpid from thread.
1919 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1920 (proceed_one_lwp): Update, "entry" parameter is a
1921 struct thread_info * now. Fetch lwpid from thread.
1922 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1923 struct thread_info * now.
1924 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1925 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1926 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1927 directly.
1928 (regsets_store_inferior_registers): Ditto.
1929 (fetch_register, store_register): Ditto.
1930 (linux_read_memory, linux_write_memory): Ditto.
1931 (linux_request_interrupt): Ditto.
1932 (linux_read_auxv): Ditto.
1933 (linux_xfer_siginfo): Ditto.
1934 (linux_qxfer_spu): Ditto.
1935 (linux_qxfer_libraries_svr4): Ditto.
1936 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1937 moved to inferiors.h.
1938 (get_lwp): Delete.
1939 (get_thread_lwp): Update.
1940 (struct lwp_info): Delete member "entry". Simplify comment for
1941 member "thread".
1942 (all_lwps): Delete.
1943 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1944 current_inferior directly.
1945 (update_watch_registers_callback): Update, "entry" parameter is a
1946 struct thread_info * now. Fetch pid from thread.
1947 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1948 (mips_insert_point): Fetch lwpid from current_inferior.
1949 Pass &all_threads to find_inferior, not &all_lwps.
1950 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1951 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1952 directly.
1953 (mips_stopped_data_address): Ditto.
1954 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1955 directly.
1956 * linux-tile-low.c (tile_arch_setup): Ditto.
1957 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1958 (update_debug_registers_callback): Update, "entry" parameter is a
1959 struct thread_info * now. Fetch pid from thread.
1960 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1961 Pass &all_threads to find_inferior, not &all_lwps.
1962 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1963 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1964 Pass &all_threads to find_inferior, not &all_lwps.
1965 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1966 (i386_dr_low_get_status): Ditto.
1967 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1968 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1969 (x86_linux_read_description): Ditto.
1970 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1971
1972 2014-02-20 Doug Evans <dje@google.com>
1973
1974 * inferiors.c (get_first_inferior): Fix buglet.
1975
1976 2014-02-19 Doug Evans <dje@google.com>
1977
1978 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1979 * inferiors.c (add_thread): Change result type to struct thread_info *.
1980 All callers updated.
1981 (add_lwp): Call add_thread here instead of in callers.
1982 All callers updated.
1983 * linux-low.h (get_lwp_thread): Rewrite.
1984 (struct lwp_info): New member "thread".
1985
1986 2014-02-19 Doug Evans <dje@google.com>
1987
1988 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1989 All callers updated.
1990
1991 2014-02-19 Doug Evans <dje@google.com>
1992
1993 * inferiors.c (add_thread): Fix whitespace.
1994
1995 2014-02-19 Doug Evans <dje@google.com>
1996
1997 * dll.c (clear_dlls): Replace accessing list implemention details
1998 with API function.
1999 * gdbthread.h (get_first_thread): Declare.
2000 * inferiors.c (for_each_inferior_with_data): New function.
2001 (get_first_thread): New function.
2002 (find_thread_ptid): Simplify.
2003 (get_first_inferior): New function.
2004 (clear_list): Delete.
2005 (one_inferior_p): New function.
2006 (clear_inferior_list): New function.
2007 (clear_inferiors): Update.
2008 * inferiors.h (for_each_inferior_with_data): Declare.
2009 (clear_inferior_list): Declare.
2010 (one_inferior_p): Declare.
2011 (get_first_inferior): Declare.
2012 * linux-low.c (linux_wait_for_event): Replace accessing list
2013 implemention details with API function.
2014 * server.c (target_running): Ditto.
2015 (accumulate_file_name_length): New function.
2016 (emit_dll_description): New function.
2017 (handle_qxfer_libraries): Replace accessing list implemention
2018 details with API function.
2019 (handle_qxfer_threads_worker): New function.
2020 (handle_qxfer_threads_proper): Replace accessing list implemention
2021 details with API function.
2022 (handle_query): Ditto.
2023 (visit_actioned_threads_callback_ftype): New typedef.
2024 (visit_actioned_threads_data): New struct.
2025 (visit_actioned_threads): Rewrite to be find_inferior callback.
2026 (resume): Call find_inferior.
2027 (handle_status): Replace accessing list implemention
2028 details with API function.
2029 (process_serial_event): Replace accessing list implemention details
2030 with API function.
2031 * target.c (set_desired_inferior): Replace accessing list implemention
2032 details with API function.
2033 * tracepoint.c (same_process_p): New function.
2034 (gdb_agent_about_to_close): Replace accessing list implemention
2035 details with API function.
2036 * win32-low.c (child_delete_thread): Replace accessing list
2037 implemention details with API function.
2038 (match_dll_by_basename): New function.
2039 (dll_is_loaded_by_basename): New function.
2040 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2041 details call to dll_is_loaded_by_basename.
2042
2043 2014-02-19 Doug Evans <dje@google.com>
2044
2045 * dll.h (struct dll_info): Add comment.
2046 * gdbthread.h (struct thread_info): Add comment.
2047 (current_ptid): Simplify.
2048 * inferiors.c (add_process): Update.
2049 (remove_process): Update.
2050 * inferiors.h (struct process_info): Rename member "head" to "entry".
2051 * linux-low.c (delete_lwp): Update.
2052 (add_lwp): Update.
2053 (last_thread_of_process_p): Update.
2054 (kill_one_lwp_callback, linux_kill): Update.
2055 (status_pending_p_callback): Update.
2056 (wait_for_sigstop): Update. Simplify read of ptid.
2057 (start_step_over): Update.
2058 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2059 (get_lwp_thread): Update.
2060 (struct lwp_info): Rename member "head" to "entry".
2061 * regcache.h (inferior_list_entry): Delete.
2062 * server.c (kill_inferior_callback): Update.
2063 (detach_or_kill_inferior_callback): Update.
2064 (print_started_pid): Update.
2065 (print_attached_pid): Update.
2066 (process_serial_event): Simplify read of ptid.
2067 * thread-db.c (thread_db_create_event): Update.
2068 (thread_db_get_tls_address): Update.
2069 * win32-low.c (current_inferior_ptid): Simplify.
2070
2071 2014-02-19 Tom Tromey <tromey@redhat.com>
2072
2073 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2074 argument.
2075 (target_supports_btrace): Update.
2076
2077 2014-02-14 Yao Qi <yao@codesourcery.com>
2078
2079 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2080 (rsp-low-ipa.o): New target.
2081
2082 2014-02-12 Tom Tromey <tromey@redhat.com>
2083
2084 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2085 convert_ascii_to_int.
2086 * regcache.c (registers_to_string): Likewise.
2087 * remote-utils.c (decode_M_packet): Likewise.
2088 * server.c (process_serial_event): Likewise.
2089
2090 2014-02-12 Tom Tromey <tromey@redhat.com>
2091
2092 * server.c (handle_query, handle_v_run): Use hex2bin, not
2093 unhexify.
2094 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2095
2096 2014-02-12 Tom Tromey <tromey@redhat.com>
2097
2098 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2099 convert_int_to_ascii.
2100 * regcache.c (registers_to_string, collect_register_as_string):
2101 Likewise.
2102 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2103 Likewise.
2104 * server.c (process_serial_event): Likewise.
2105 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2106 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2107
2108 2014-02-12 Tom Tromey <tromey@redhat.com>
2109
2110 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2111 bin2hex, not hexify.
2112 * tracepoint.c (cmd_qtstatus): Likewise.
2113
2114 2014-02-12 Tom Tromey <tromey@redhat.com>
2115
2116 * remote-utils.c (monitor_output): Pass explicit length to
2117 hexify.
2118
2119 2014-02-12 Tom Tromey <tromey@redhat.com>
2120
2121 * tracepoint.c: Include rsp-low.h.
2122 * server.c: Include rsp-low.h.
2123 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2124 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2125 declare.
2126 * remote-utils.c: Include rsp-low.h.
2127 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2128 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2129 (convert_int_to_ascii, convert_ascii_to_int): Move to
2130 common/rsp-low.c.
2131 * regcache.c: Include rsp-low.h.
2132 * ax.c: Include rsp-low.h.
2133 * Makefile.in (SFILES): Add common/rsp-low.c.
2134 (OBS): Add rsp-low.o.
2135 (rsp-low.o): New target.
2136
2137 2014-02-12 Tom Tromey <tromey@redhat.com>
2138
2139 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2140 Include print-utils.h.
2141 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2142 (plongest, thirty_two, phex_nz): Remove.
2143 * Makefile.in (SFILES): Add common/print-utils.c.
2144 (OBS): Add print-utils.o.
2145 (print-utils-ipa.o): New target.
2146 (print-utils.o): New target.
2147 (IPA_OBJS): Add print-utils-ipa.o.
2148
2149 2014-02-06 Tom Tromey <tromey@redhat.com>
2150
2151 * Makefile.in (SFILES): Fix indentation.
2152
2153 2014-02-05 Doug Evans <dje@google.com>
2154
2155 * linux-low.c (linux_wait_for_event): Improve comment.
2156 (linux_wait_1): Keep current_inferior in sync with event_child.
2157
2158 2014-01-22 Doug Evans <dje@google.com>
2159
2160 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2161
2162 2014-01-22 Doug Evans <dje@google.com>
2163
2164 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2165 * configure: Regenerate.
2166 * config.in: Regenerate.
2167 * Makefile.in (SFILES): Add debug.c.
2168 (OBS): Add debug.o.
2169 * debug.c: New file.
2170 * debug.h: New file.
2171 * linux-aarch64-low.c (*): Update all debugging printfs to use
2172 debug_printf instead of fprintf.
2173 * linux-arm-low.c (*): Ditto.
2174 * linux-cris-low.c (*): Ditto.
2175 * linux-crisv32-low.c (*): Ditto.
2176 * linux-m32r-low.c (*): Ditto.
2177 * linux-sparc-low.c (*): Ditto.
2178 * linux-x86.c (*): Ditto.
2179 * linux-low.c (*): Ditto.
2180 (linux_wait_1): Add calls to debug_enter, debug_exit.
2181 (linux_wait): Remove redundant debugging printf.
2182 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2183 (linux_resume, unstop_all_lwps): Ditto.
2184 * mem-break.c (*): Update all debugging printfs to use
2185 debug_printf instead of fprintf.
2186 * remote-utils.c (*): Ditto.
2187 * thread-db.c (*): Ditto.
2188 * server.c #include <ctype.h>, "gdb_vecs.h".
2189 (debug_threads): Moved to debug.c.
2190 (*): Update all debugging printfs to use debug_printf instead of
2191 fprintf.
2192 (start_inferior): Replace call to fflush with call to debug_flush.
2193 (monitor_show_help): Mention set debug-format.
2194 (parse_debug_format_options): New function.
2195 (handle_monitor_command): Handle "monitor set debug-format".
2196 (gdbserver_usage): Mention --debug-format.
2197 (main): Parse --debug-format.
2198 * server.h (debug_threads): Declaration moved to debug.h.
2199 #include "debug.h".
2200 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2201 trace_debug_1 that uses debug_printf.
2202 (tracepoint_look_up_symbols): Update all debugging printfs to use
2203 debug_printf instead of fprintf.
2204
2205 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2206
2207 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2208 sys/ptrace.h.
2209
2210 2014-01-17 Pedro Alves <palves@redhat.com>
2211
2212 PR build/16445
2213 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2214 defined after including gdb_proc_service.h.
2215
2216 2014-01-16 Doug Evans <dje@google.com>
2217
2218 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2219 (match_dll): Use it.
2220
2221 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2222
2223 * target.h (target_ops) <read_btrace>: Change parameters and
2224 return type to allow error reporting.
2225 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2226 trace reading errors on.
2227 * linux-low.c (linux_low_read_btrace): Pass trace reading
2228 errors on.
2229 (linux_low_disable_btrace): New.
2230
2231 2014-01-15 Doug Evans <dje@google.com>
2232
2233 * inferiors.c (thread_id_to_gdb_id): Delete.
2234 * inferiors.h (thread_id_to_gdb_id): Delete.
2235
2236 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2237
2238 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2239 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2240 versions.
2241
2242 2014-01-08 Pedro Alves <palves@redhat.com>
2243
2244 * server.c (handle_status): Don't discard previous queued stop
2245 replies or thread's pending status here.
2246 (main) <disconnection>: Do it here instead.
2247
2248 2014-01-08 Pedro Alves <palves@redhat.com>
2249
2250 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2251 * server.c (visit_actioned_threads, handle_pending_status): New
2252 function.
2253 (handle_v_cont): Factor out parts to ...
2254 (resume): ... this new function. If in all-stop, and a thread
2255 being resumed has a pending status, report it without actually
2256 resuming.
2257 (myresume): Adjust to use the new 'resume' function.
2258 (clear_pending_status_callback, set_pending_status_callback)
2259 (find_status_pending_thread_callback): New functions.
2260 (handle_status): Handle the case of multiple threads having
2261 interesting statuses to report. Report threads' real last signal
2262 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2263 with an interesting thread to report the status for, instead of
2264 always reporting the status of the first thread.
2265
2266 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2267
2268 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2269 * gdbreplay.c (gdbreplay_version): Likewise.
2270
2271 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2272
2273 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2274 iov.iov_len with the real length in use.
2275
2276 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2277
2278 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2279 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2280 for all targets that use win32-low.c.
2281 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2282 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2283
2284 2013-12-13 Pedro Alves <palves@redhat.com>
2285
2286 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2287 if equal to TARGET_WAITKIND_LOADED.
2288 * win32-low.c (cached_status): New static global.
2289 (win32_wait): Add declaration.
2290 (do_initial_child_stuff): Flush all initial pending debug events
2291 up to the initial breakpoint.
2292 (win32_wait): If CACHED_STATUS was set, return that instead
2293 of doing a real wait. Remove the code resuming the execution
2294 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2295 during the initial phase. Also remove the code changing
2296 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2297 TARGET_WAITKIND_STOPPED.
2298
2299 2013-12-11 Yao Qi <yao@codesourcery.com>
2300
2301 * notif.c (handle_notif_ack): Return 0 if no notification
2302 matches.
2303
2304 2013-11-20 Doug Evans <dje@google.com>
2305
2306 * linux-low.c (linux_set_resume_request): Fix comment.
2307
2308 2013-11-20 Doug Evans <dje@google.com>
2309
2310 * linux-low.c (resume_status_pending_p): Tweak comment.
2311
2312 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2313
2314 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2315 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2316 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2317 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2318 (srv_amd64_regobj): Add amd64-mpx.o.
2319 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2320 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2321 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2322 * i387-fp.c (num_pl_bnd_register) Added constant.
2323 (num_pl_bnd_cfg_registers) Added constant.
2324 (struct i387_xsave) Added reserved area and MPX fields.
2325 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2326 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2327 function.
2328 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2329 (init_registers_amd64_mpx_linux): Declare new function.
2330 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2331 (x86_64_regmap): Add MPX registers.
2332 (x86_linux_read_description): Add MPX case.
2333 (initialize_low_arch): Initialize MPX targets.
2334
2335 2013-11-18 Tom Tromey <tromey@redhat.com>
2336
2337 * configure: Rebuild.
2338 * configure.ac: Don't check for stdlib.h.
2339 * gdbreplay.c: Unconditionally include stdlib.h.
2340
2341 2013-11-18 Tom Tromey <tromey@redhat.com>
2342
2343 * config.in: Rebuild.
2344 * configure: Rebuild.
2345 * configure.ac: Don't use AC_HEADER_DIRENT.
2346
2347 2013-11-18 Tom Tromey <tromey@redhat.com>
2348
2349 * server.h: Don't check HAVE_STRING_H.
2350 * gdbreplay.c: Don't check HAVE_STRING_H.
2351 * configure: Rebuild.
2352
2353 2013-11-18 Tom Tromey <tromey@redhat.com>
2354
2355 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2356 LIBGNU.
2357
2358 2013-11-08 Tom Tromey <tromey@redhat.com>
2359
2360 * configure, config.in: Rebuild.
2361 * configure.ac: Remove unused configury.
2362
2363 2013-11-08 Tom Tromey <tromey@redhat.com>
2364
2365 * acinclude.m4: Include common.m4, codeset.m4.
2366 * configure, config.in: Rebuild.
2367 * configure.ac: Use GDB_AC_COMMON.
2368
2369 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2370
2371 * linux-s390-low.c (HWCAP_S390_TE): New define.
2372 (s390_arch_setup): Consider the TE field in the HWCAP for
2373 determining 'have_regset_tdb'.
2374
2375 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2376
2377 PR gdb/16014
2378 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2379 call to sizeof.
2380
2381 2013-10-02 Pedro Alves <palves@redhat.com>
2382
2383 * server.c (process_serial_event): Don't output "GDBserver
2384 exiting" if GDB is connected through stdio.
2385 * target.c (mywait): Likewise, be silent if GDB is connected
2386 through stdio.
2387
2388 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2389
2390 * lynx-low.c (lynx_add_threads_after_attach): New function.
2391 (lynx_attach): Remove call to add_thread. Add call to
2392 lynx_add_threads_after_attach instead.
2393
2394 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2395
2396 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2397 * config.in, configure: Regenerated.
2398
2399 2013-09-18 Yao Qi <yao@codesourcery.com>
2400
2401 PR server/15959
2402 * server.c (start_inferior): Clear 'resume_info'.
2403
2404 2013-09-16 Jiong Wang <jiwang@tilera.com>
2405
2406 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2407 for each register.
2408
2409 2013-09-16 Jiong Wang <jiwang@tilera.com>
2410
2411 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2412 linux-tile-low.o to srv_tgtobj.
2413
2414 2013-09-16 Will Newton <will.newton@linaro.org>
2415
2416 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2417 out regs.
2418
2419 2013-09-06 Pedro Alves <palves@redhat.com>
2420
2421 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2422 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2423 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2424 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2425 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2426 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2427
2428 2013-09-06 Pedro Alves <palves@redhat.com>
2429
2430 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2431 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2432
2433 2013-09-06 Pedro Alves <palves@redhat.com>
2434
2435 * linux-amd64-ipa.c: Include tracepoint.h.
2436 * linux-i386-ipa.c: Include tracepoint.h.
2437
2438 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2439
2440 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2441 (ps_get_thread_area): New function.
2442
2443 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2444
2445 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2446 (initialize_low_arch): Call init_registers_crisv32 rather than
2447 init_register_crisv32.
2448
2449 2013-09-05 Pedro Alves <palves@redhat.com>
2450
2451 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2452 to ...
2453 * hostio.h: ... this new file.
2454 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2455 win32-low.c: Include hostio.h.
2456
2457 2013-09-05 Pedro Alves <palves@redhat.com>
2458
2459 * server.h (gdb_client_data, handler_func, callback_handler_func)
2460 (delete_file_handler, add_file_handler, append_callback_event)
2461 (delete_callback_event, start_event_loop, initialize_event_loop):
2462 Move to event-loop.h and include it.
2463 * event-loop.h: New file.
2464
2465 2013-09-05 Pedro Alves <palves@redhat.com>
2466
2467 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2468 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2469 (loaded_dll, unloaded_dll): Move to ...
2470 * dll.h: ... this new file.
2471 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2472
2473 2013-09-05 Pedro Alves <palves@redhat.com>
2474
2475 * server.h (current_process, get_thread_process, all_processes)
2476 (add_inferior_to_list, for_each_inferior, current_inferior)
2477 (remove_inferior, add_process, remove_process, find_process_pid)
2478 (have_started_inferiors_p, have_attached_inferiors_p)
2479 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2480 (clear_inferiors, find_inferior, find_inferior_id)
2481 (inferior_target_data, set_inferior_target_data)
2482 (inferior_regcache_data, set_inferior_regcache_data): Move to
2483 inferiors.h, and include it.
2484 * inferiors.h: New file.
2485
2486 2013-09-05 Pedro Alves <palves@redhat.com>
2487
2488 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2489 Move ...
2490 * ax.h: ... here.
2491
2492 2013-09-05 Pedro Alves <palves@redhat.com>
2493
2494 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2495 tracepoint.h.
2496 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2497 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2498 (handle_tracepoint_general_set, handle_tracepoint_query)
2499 (tracepoint_finished_step, tracepoint_was_hit)
2500 (release_while_stepping_state_list, current_traceframe)
2501 (in_readonly_region, traceframe_read_mem)
2502 (fetch_traceframe_registers, traceframe_read_sdata)
2503 (traceframe_read_info, struct fast_tpoint_collect_status)
2504 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2505 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2506 (supply_fast_tracepoint_registers)
2507 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2508 (ipa_tdesc, claim_trampoline_space)
2509 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2510 (agent_mem_read, agent_get_trace_state_variable_value)
2511 (agent_set_trace_state_variable_value, agent_tsv_read)
2512 (agent_mem_read_string, get_raw_reg_func_addr)
2513 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2514 * tracepoint.h: ... this new file.
2515
2516 2013-09-05 Pedro Alves <palves@redhat.com>
2517
2518 * server.h (perror_with_name, error, fatal, warning, paddress)
2519 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2520 include it.
2521 * utils.h: New file.
2522
2523 2013-09-05 Pedro Alves <palves@redhat.com>
2524
2525 * server.h (remote_debug, noack_mode, transport_is_reliable)
2526 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2527 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2528 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2529 (write_enn, initialize_async_io, enable_async_io)
2530 (disable_async_io, check_remote_input_interrupt_request)
2531 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2532 (dead_thread_notify, prepare_resume_reply)
2533 (decode_address_to_semicolon, decode_address, decode_m_packet)
2534 (decode_M_packet, decode_X_packet, decode_xfer_write)
2535 (decode_search_memory_packet, unhexify, hexify)
2536 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2537 (look_up_one_symbol, relocate_instruction)
2538 (monitor_output): Move to remote-utils.h, and include it.
2539 * remote-utils.h: New file.
2540
2541 2013-09-05 Pedro Alves <palves@redhat.com>
2542
2543 * server.h (_): Delete.
2544
2545 2013-09-02 Pedro Alves <palves@redhat.com>
2546
2547 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2548 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2549 allocated.
2550 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2551
2552 2013-09-02 Pierre Muller <muller@sourceware.org>
2553
2554 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2555 or WriteProcessMemory complete successfully and handle
2556 ERROR_PARTIAL_COPY error.
2557
2558 2013-09-02 Pedro Alves <palves@redhat.com>
2559
2560 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2561 error instead of EIO.
2562
2563 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2564
2565 PR server/15604
2566 * linux-low.c: Include filestuff.h.
2567 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2568 * lynx-low.c: Include filestuff.h.
2569 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2570 * server.c: Include filestuff.h.
2571 (main): Call notice_open_fds.
2572 * spu-low.c: Include filestuff.h.
2573 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2574
2575 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2576
2577 * Makefile.in: Explain why ../target and ../nat are not
2578 listed as include file search paths.
2579 (linux-waitpid.o): New object file rule.
2580 * configure.srv (srv_native_linux_obj): New variable.
2581 Replace all occurrences of linux native object files with
2582 $srv_native_linux_obj.
2583 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2584 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2585 (linux_enable_event_reporting): Remove declaration.
2586 (my_waitpid): Moved to common/linux-waitpid.c.
2587 (linux_wait_for_event): Pass ptid when calling
2588 linux_enable_event_reporting.
2589 (linux_supports_tracefork_flag): Remove.
2590 (linux_enable_event_reporting): Likewise.
2591 (linux_tracefork_grandchild): Remove.
2592 (STACK_SIZE): Moved to common/linux-ptrace.c.
2593 (linux_tracefork_child): Remove.
2594 (linux_test_for_tracefork): Remove.
2595 (linux_look_up_symbols): Call linux_supports_traceclone.
2596 (initialize_low): Remove call to linux_test_for_tracefork.
2597 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2598 common/linux-ptrace.h.
2599 (PTRACE_TYPE_ARG4): Likewise.
2600 Include linux-ptrace.h.
2601
2602 2013-08-21 Pedro Alves <palves@redhat.com>
2603
2604 * config.in: Renegerate.
2605
2606 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2607
2608 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2609 (SFILES): Remove $(srcdir)/common/target-common.c and
2610 add $(srcdir)/target/waitstatus.c.
2611 (OBS): Remove target-common.o and add waitstatus.o.
2612 (server_h): Remove $(srcdir)/../common/target-common.h and
2613 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2614 and $(srcdir)/../target/waitstatus.h.
2615 (target-common.o): Remove.
2616 (waitstatus.o): New target object file.
2617 * target.h: Do not include target-common.h and
2618 include target/resume.h, target/wait.h and
2619 target/waitstatus.h.
2620
2621 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2622
2623 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2624 to PTRACE_TYPE_ARG3.
2625 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2626 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2627 PTRACE_TYPE_ARG4.
2628 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2629 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2630
2631 2013-07-27 Jie Zhang <jie@codesourcery.com>
2632 Daniel Jacobowitz <dan@codesourcery.com>
2633 Yao Qi <yao@codesourcery.com>
2634
2635 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2636 (mips-linux-watch.o): New rule.
2637 (mips_linux_watch_h): New variable.
2638 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2639 srv_tgtobj.
2640 * linux-mips-low.c: Include mips-linux-watch.h.
2641 (struct arch_process_info, struct arch_lwp_info): New.
2642 (update_watch_registers_callback): New function.
2643 (mips_linux_new_process, mips_linux_new_thread) New functions.
2644 (mips_linux_prepare_to_resume, mips_insert_point): New
2645 functions.
2646 (mips_remove_point, mips_stopped_by_watchpoint): New
2647 functions.
2648 (rsp_bp_type_to_target_hw_bp_type): New function.
2649 (mips_stopped_data_address): New function.
2650 (the_low_target): Add watchpoint support functions.
2651
2652 2013-07-27 Yao Qi <yao@codesourcery.com>
2653
2654 * i386-low.c: Include break-common.h.
2655 (enum target_hw_bp_type): Remove.
2656
2657 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2658
2659 * Makefile.in (SFILES): /common/target-common.c.
2660 (OBS): Add target-common.o.
2661 (server_h): Add $(srcdir)/../common/target-common.h.
2662 (target-common.o): New target.
2663 * server.c (queue_stop_reply_callback): Free
2664 status string after use.
2665 * target.c (target_waitstatus_to_string): Remove.
2666 * target.h: Include target-common.h.
2667 (resume_kind): Likewise.
2668 (target_waitkind): Likewise.
2669 (target_waitstatus): Likewise.
2670 (TARGET_WNOHANG): Likewise.
2671
2672 2013-07-04 Yao Qi <yao@codesourcery.com>
2673
2674 * Makefile.in (host_alias): Use @host_noncanonical@.
2675 (target_alias): Use @target_noncanonical@.
2676 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2677 ACX_NONCANONICAL_HOST.
2678 * configure: Regenerated.
2679
2680 Revert:
2681 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2682
2683 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2684 * configure: Rebuild.
2685 * Makefile.in (version_host, version_target): Get from configure.
2686 (version.c): Use $(version_host) and $(version_target).
2687
2688 2013-07-03 Pedro Alves <palves@redhat.com>
2689
2690 * Makefile.in (config.status): Depend on development.sh.
2691 * acinclude.m4: Include libmcheck.m4.
2692 * configure: Regenerate.
2693
2694 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2695
2696 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2697 attribute inside the parentheses.
2698 (winapi_DebugSetProcessKillOnExit): Ditto.
2699 (winapi_DebugBreakProcess): Ditto.
2700 (winapi_GenerateConsoleCtrlEvent): Ditto.
2701
2702 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2703
2704 * notif.h (notif_event): Add a dummy member to avoid compiler
2705 errors.
2706
2707 2013-07-01 Pedro Alves <palves@redhat.com>
2708
2709 * hostio.c (HOSTIO_PATH_MAX): Define.
2710 (require_filename, handle_open, handle_unlink, handle_readlink):
2711 Use it.
2712
2713 2013-07-01 Pedro Alves <palves@redhat.com>
2714
2715 * server.h: Include "pathmax.h".
2716 * linux-low.c: Don't include sys/param.h.
2717 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2718 MAXPATHLEN.
2719 * win32-low.c: Don't include sys/param.h.
2720 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2721
2722 2013-07-01 Pedro Alves <palves@redhat.com>
2723
2724 * event-loop.c: Don't check HAVE_UNISTD_H before including
2725 <unistd.h>.
2726 * gdbreplay.c: Likewise.
2727 * remote-utils.c: Likewise.
2728 * server.c: Likewise.
2729 * configure.ac: Don't check for unistd.h.
2730 * configure: Regenerate.
2731
2732 2013-06-28 Tom Tromey <tromey@redhat.com>
2733
2734 * Makefile.in (version.c): Use version.in, not
2735 common/version.in.
2736
2737 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2738
2739 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2740 * configure: Rebuild.
2741 * Makefile.in (version_host, version_target): Get from configure.
2742 (version.c): Use $(version_host) and $(version_target).
2743
2744 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2745
2746 Fix trace-status to output user name without trailing colon.
2747 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2748
2749 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2750
2751 Fix trace-status to output proper start-time and stop-time.
2752 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2753 output start time and stop time in hex as gdb expects.
2754
2755 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2756
2757 * tracepoint.c (build_traceframe_info_xml): Output trace state
2758 variables present in the trace buffer.
2759
2760 2013-06-24 Tom Tromey <tromey@redhat.com>
2761
2762 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2763 create-version.sh.
2764 (version.o): Remove.
2765 * gdbreplay.c: Include version.h.
2766 (version, host_name): Don't declare.
2767 * server.h: Include version.h.
2768 (version, host_name): Don't declare.
2769
2770 2013-06-12 Pedro Alves <palves@redhat.com>
2771
2772 * linux-x86-low.c (linux_is_elf64): Delete global.
2773 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2774 with local linux_pid_exe_is_elf_64_file use.
2775
2776 2013-06-11 Pedro Alves <palves@redhat.com>
2777
2778 * linux-low.c (regset_disabled, disable_regset): New functions.
2779 (regsets_fetch_inferior_registers)
2780 (regsets_store_inferior_registers): Use them.
2781 (initialize_regsets_info); Don't allocate the disabled_regsets
2782 array here.
2783 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2784 comment.
2785
2786 2013-06-11 Pedro Alves <palves@redhat.com>
2787
2788 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2789 xmalloc.
2790
2791 2013-06-11 Pedro Alves <palves@redhat.com>
2792
2793 * linux-x86-low.c (initialize_low_arch): Call
2794 init_registers_x32_avx_linux.
2795
2796 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2797
2798 Fix compatibility with Android Bionic.
2799 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2800 it is not empty.
2801
2802 2013-06-07 Pedro Alves <palves@redhat.com>
2803
2804 PR server/14823
2805 * Makefile.in (OBS): Add tdesc.o.
2806 (IPA_OBJS): Add tdesc-ipa.o.
2807 (tdesc-ipa.o): New rule.
2808 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2809 interface.
2810 * linux-low.c (new_inferior): Delete.
2811 (disabled_regsets, num_regsets): Delete.
2812 (linux_add_process): Adjust to set the new per-process
2813 new_inferior flag.
2814 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2815 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2816 was a stop. When calling arch_setup, switch the current inferior
2817 to the thread that got an event.
2818 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2819 (regsets_fetch_inferior_registers)
2820 (regsets_store_inferior_registers): New regsets_info parameter.
2821 Adjust to use it.
2822 (linux_register_in_regsets): New regs_info parameter. Adjust to
2823 use it.
2824 (register_addr, fetch_register, store_register): New usrregs_info
2825 parameter. Adjust to use it.
2826 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2827 parameter regs_info. Adjust to use it.
2828 (linux_fetch_registers): Get the current inferior's regs_info, and
2829 adjust to use it.
2830 (linux_store_registers): Ditto.
2831 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2832 (initialize_low): Don't initialize the target_regsets here. Call
2833 initialize_low_arch.
2834 * linux-low.h (target_regsets): Delete declaration.
2835 (struct regsets_info): New.
2836 (struct usrregs_info): New.
2837 (struct regs_info): New.
2838 (struct process_info_private) <new_inferior>: New field.
2839 (struct linux_target_ops): Delete the num_regs, regmap, and
2840 regset_bitmap fields. New field regs_info.
2841 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2842 * i387-fp.c (num_xmm_registers): Delete.
2843 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2844 calls to new interface.
2845 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2846 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2847 Infer the number of xmm registers from the regcache's target
2848 description.
2849 * i387-fp.h (num_xmm_registers): Delete.
2850 * inferiors.c (add_thread): Don't install the thread's regcache
2851 here.
2852 * proc-service.c (gregset_info): Fetch the current inferior's
2853 regs_info. Adjust to use it.
2854 * regcache.c: Include tdesc.h.
2855 (register_bytes, reg_defs, num_registers)
2856 (gdbserver_expedite_regs): Delete.
2857 (get_thread_regcache): If the thread doesn't have a regcache yet,
2858 create one, instead of aborting gdbserver.
2859 (regcache_invalidate_one): Rename to ...
2860 (regcache_invalidate_thread): ... this.
2861 (regcache_invalidate_one): New.
2862 (regcache_invalidate): Only invalidate registers of the current
2863 process.
2864 (init_register_cache): Add target_desc parameter, and use it.
2865 (new_register_cache): Ditto. Assert the target description has a
2866 non zero registers_size.
2867 (regcache_cpy): Add assertions. Adjust.
2868 (realloc_register_cache, set_register_cache): Delete.
2869 (registers_to_string, registers_from_string): Adjust.
2870 (find_register_by_name, find_regno, find_register_by_number)
2871 (register_cache_size): Add target_desc parameter, and use it.
2872 (free_register_cache_thread, free_register_cache_thread_one)
2873 (regcache_release, register_cache_size): New.
2874 (register_size): Add target_desc parameter, and use it.
2875 (register_data, supply_register, supply_register_zeroed)
2876 (supply_regblock, supply_register_by_name, collect_register)
2877 (collect_register_as_string, collect_register_by_name): Adjust.
2878 * regcache.h (struct target_desc): Forward declare.
2879 (struct regcache) <tdesc>: New field.
2880 (init_register_cache, new_register_cache): Add target_desc
2881 parameter.
2882 (regcache_invalidate_thread): Declare.
2883 (regcache_invalidate_one): Delete declaration.
2884 (regcache_release): Declare.
2885 (find_register_by_number, register_cache_size, register_size)
2886 (find_regno): Add target_desc parameter.
2887 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2888 declarations.
2889 * remote-utils.c: Include tdesc.h.
2890 (outreg, prepare_resume_reply): Adjust.
2891 * server.c: Include tdesc.h.
2892 (gdbserver_xmltarget): Delete declaration.
2893 (get_features_xml, process_serial_event): Adjust.
2894 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2895 declare.
2896 (struct process_info) <tdesc>: New field.
2897 (ipa_tdesc): Declare.
2898 * tdesc.c: New file.
2899 * tdesc.h: New file.
2900 * tracepoint.c: Include tdesc.h.
2901 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2902 (get_context_regcache): Adjust to pass ipa_tdesc down.
2903 (do_action_at_tracepoint): Adjust to get the register cache size
2904 from the context regcache's description.
2905 (traceframe_walk_blocks): Adjust to get the register cache size
2906 from the current trace frame's description.
2907 (traceframe_get_pc): Adjust to get current trace frame's
2908 description and pass it down.
2909 (gdb_collect): Adjust to get the register cache size from the
2910 IPA's description.
2911 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2912 (gdbserver_xmltarget): Delete.
2913 (initialize_low_tracepoint): Set the ipa's target description.
2914 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2915 (initialize_low_tracepoint): Set the ipa's target description.
2916 * linux-x86-low.c: Include tdesc.h.
2917 [__x86_64__] (is_64bit_tdesc): New.
2918 (ps_get_thread_area, x86_get_thread_area): Use it.
2919 (i386_cannot_store_register): Rename to ...
2920 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2921 (i386_cannot_fetch_register): Rename to ...
2922 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2923 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2924 to new interface.
2925 (target_regsets): Rename to ...
2926 (x86_regsets): ... this.
2927 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2928 interface.
2929 (x86_siginfo_fixup): Use is_64bit_tdesc.
2930 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2931 (tdesc_x32_avx_linux, tdesc_x32_linux)
2932 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2933 Declare.
2934 (x86_linux_update_xmltarget): Delete.
2935 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2936 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2937 (AMD64_LINUX_USER64_CS): New.
2938 (x86_linux_read_description): New, based on
2939 x86_linux_update_xmltarget.
2940 (same_process_callback): New.
2941 (x86_arch_setup_process_callback): New.
2942 (x86_linux_update_xmltarget): New.
2943 (x86_regsets_info): New.
2944 (amd64_linux_regs_info): New.
2945 (i386_linux_usrregs_info): New.
2946 (i386_linux_regs_info): New.
2947 (x86_linux_regs_info): New.
2948 (x86_arch_setup): Reimplement.
2949 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2950 (x86_emit_ops): Ditto.
2951 (the_low_target): Adjust. Install x86_linux_regs_info,
2952 x86_cannot_fetch_register, and x86_cannot_store_register.
2953 (initialize_low_arch): New.
2954 * linux-ia64-low.c (tdesc_ia64): Declare.
2955 (ia64_fetch_register): Adjust.
2956 (ia64_usrregs_info, regs_info): New globals.
2957 (ia64_regs_info): New function.
2958 (the_low_target): Adjust.
2959 (initialize_low_arch): New function.
2960 * linux-sparc-low.c (tdesc_sparc64): Declare.
2961 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2962 Adjust.
2963 (sparc_arch_setup): New function.
2964 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2965 (the_low_target): Adjust.
2966 (initialize_low_arch): New function.
2967 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2968 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2969 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2970 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2971 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2972 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2973 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2974 (tdesc_powerpc_isa205_vsx64l): Declare.
2975 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2976 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2977 (ppc_set_pc, ppc_get_hwcap): Adjust.
2978 (ppc_usrregs_info): Forward declare.
2979 (!__powerpc64__) ppc_regmap_adjusted: New global.
2980 (ppc_arch_setup): Adjust to the current process'es target
2981 description.
2982 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2983 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2984 (ppc_store_evrregset): Adjust.
2985 (target_regsets): Rename to ...
2986 (ppc_regsets): ... this, and make static.
2987 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2988 (ppc_regs_info): New function.
2989 (the_low_target): Adjust.
2990 (initialize_low_arch): New function.
2991 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2992 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2993 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2994 (tdesc_s390x_linux64v2): Declare.
2995 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2996 (s390_fill_gregset, s390_store_last_break): Adjust.
2997 (target_regsets): Rename to ...
2998 (s390_regsets): ... this, and make static.
2999 (s390_get_pc, s390_set_pc): Adjust.
3000 (s390_get_hwcap): New target_desc parameter, and use it.
3001 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3002 (s390_arch_setup): Adjust to set the current process'es target
3003 description. Don't adjust the regmap.
3004 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3005 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3006 (regs_info_3264): New globals.
3007 (s390_regs_info): New function.
3008 (the_low_target): Adjust.
3009 (initialize_low_arch): New function.
3010 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3011 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3012 [__mips64] (init_registers_mips_linux)
3013 (init_registers_mips_dsp_linux): Delete defines.
3014 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3015 (have_dsp): New global.
3016 (mips_read_description): New, based on mips_arch_setup.
3017 (mips_arch_setup): Reimplement.
3018 (get_usrregs_info): New function.
3019 (mips_cannot_fetch_register, mips_cannot_store_register)
3020 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3021 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3022 (target_regsets): Rename to ...
3023 (mips_regsets): ... this, and make static.
3024 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3025 (dsp_regs_info, regs_info): New globals.
3026 (mips_regs_info): New function.
3027 (the_low_target): Adjust.
3028 (initialize_low_arch): New function.
3029 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3030 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3031 Declare.
3032 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3033 (arm_read_description): New, with bits factored from
3034 arm_arch_setup.
3035 (arm_arch_setup): Reimplement.
3036 (target_regsets): Rename to ...
3037 (arm_regsets): ... this, and make static.
3038 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3039 (arm_regs_info): New function.
3040 (the_low_target): Adjust.
3041 (initialize_low_arch): New function.
3042 * linux-m68k-low.c (tdesc_m68k): Declare.
3043 (target_regsets): Rename to ...
3044 (m68k_regsets): ... this, and make static.
3045 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3046 (m68k_regs_info): New function.
3047 (m68k_arch_setup): New function.
3048 (the_low_target): Adjust.
3049 (initialize_low_arch): New function.
3050 * linux-sh-low.c (tdesc_sharch): Declare.
3051 (target_regsets): Rename to ...
3052 (sh_regsets): ... this, and make static.
3053 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3054 (sh_regs_info, sh_arch_setup): New functions.
3055 (the_low_target): Adjust.
3056 (initialize_low_arch): New function.
3057 * linux-bfin-low.c (tdesc_bfin): Declare.
3058 (bfin_arch_setup): New function.
3059 (bfin_usrregs_info, regs_info): New globals.
3060 (bfin_regs_info): New function.
3061 (the_low_target): Adjust.
3062 (initialize_low_arch): New function.
3063 * linux-cris-low.c (tdesc_cris): Declare.
3064 (cris_arch_setup): New function.
3065 (cris_usrregs_info, regs_info): New globals.
3066 (cris_regs_info): New function.
3067 (the_low_target): Adjust.
3068 (initialize_low_arch): New function.
3069 * linux-cris-low.c (tdesc_crisv32): Declare.
3070 (cris_arch_setup): New function.
3071 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3072 (cris_regs_info): New function.
3073 (the_low_target): Adjust.
3074 (initialize_low_arch): New function.
3075 * linux-m32r-low.c (tdesc_m32r): Declare.
3076 (m32r_arch_setup): New function.
3077 (m32r_usrregs_info, regs_info): New globals.
3078 (m32r_regs_info): Adjust.
3079 (initialize_low_arch): New function.
3080 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3081 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3082 (tic6x_usrregs_info): Forward declare.
3083 (tic6x_read_description): New function, based on ...
3084 (tic6x_arch_setup): ... this. Reimplement.
3085 (target_regsets): Rename to ...
3086 (tic6x_regsets): ... this, and make static.
3087 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3088 (tic6x_regs_info): New function.
3089 (the_low_target): Adjust.
3090 (initialize_low_arch): New function.
3091 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3092 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3093 (target_regsets): Rename to ...
3094 (xtensa_regsets): ... this, and make static.
3095 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3096 globals.
3097 (xtensa_arch_setup, xtensa_regs_info): New functions.
3098 (the_low_target): Adjust.
3099 (initialize_low_arch): New function.
3100 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3101 (nios2_arch_setup): Set the current process'es tdesc.
3102 (target_regsets): Rename to ...
3103 (nios2_regsets): ... this.
3104 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3105 (nios2_regs_info): New function.
3106 (the_low_target): Adjust.
3107 (initialize_low_arch): New function.
3108 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3109 (aarch64_arch_setup): Set the current process'es tdesc.
3110 (target_regsets): Rename to ...
3111 (aarch64_regsets): ... this.
3112 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3113 (aarch64_regs_info): New function.
3114 (the_low_target): Adjust.
3115 (initialize_low_arch): New function.
3116 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3117 globals.
3118 (target_regsets): Rename to ...
3119 (tile_regsets): ... this.
3120 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3121 (tile_regs_info): New function.
3122 (tile_arch_setup): Set the current process'es tdesc.
3123 (the_low_target): Adjust.
3124 (initialize_low_arch): New function.
3125 * spu-low.c (tdesc_spu): Declare.
3126 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3127 * win32-arm-low.c (tdesc_arm): Declare.
3128 (arm_arch_setup): New function.
3129 (the_low_target): Install arm_arch_setup instead of
3130 init_registers_arm.
3131 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3132 (init_windows_x86): Rename to ...
3133 (i386_arch_setup): ... this. Set `win32_tdesc'.
3134 (the_low_target): Adjust.
3135 * win32-low.c (win32_tdesc): New global.
3136 (child_add_thread): Don't create the thread cache here.
3137 (do_initial_child_stuff): Set the new process'es tdesc.
3138 * win32-low.h (struct target_desc): Forward declare.
3139 (win32_tdesc): Declare.
3140 * lynx-i386-low.c (tdesc_i386): Declare global.
3141 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3142 * lynx-low.c (lynx_tdesc): New global.
3143 (lynx_add_process): Set the new process'es tdesc.
3144 * lynx-low.h (struct target_desc): Forward declare.
3145 (lynx_tdesc): Declare global.
3146 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3147 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3148 * nto-low.c (nto_tdesc): New global.
3149 (do_attach): Set the new process'es tdesc.
3150 * nto-low.h (struct target_desc): Forward declare.
3151 (nto_tdesc): Declare.
3152 * nto-x86-low.c (tdesc_i386): Declare.
3153 (nto_x86_arch_setup): Set `nto_tdesc'.
3154
3155 2013-06-04 Gary Benson <gbenson@redhat.com>
3156
3157 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3158 to qSupported response when appropriate.
3159 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3160 with nonzero-length annex.
3161 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3162 arguments supplied in annex.
3163
3164 2013-05-31 Doug Evans <dje@google.com>
3165
3166 PR server/15594
3167 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3168 64 bits in 64-cross-32 environment.
3169
3170 2013-05-28 Pedro Alves <palves@redhat.com>
3171
3172 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3173 (aarch64-without-fpu.c): Delete rule.
3174 * configure.srv (aarch64*-*-linux*): Remove references to
3175 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3176 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3177 declaration.
3178
3179 2013-05-24 Pedro Alves <palves@redhat.com>
3180
3181 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3182 instead of strchr/decode_address. Error if the range isn't split
3183 with a ','. Don't assume there's be a ':' in the action.
3184
3185 2013-05-23 Yao Qi <yao@codesourcery.com>
3186 Pedro Alves <palves@redhat.com>
3187
3188 * linux-low.c (lwp_in_step_range): New function.
3189 (linux_wait_1): If the thread was range stepping and stopped
3190 outside the stepping range, report the stop to GDB. Otherwise,
3191 continue stepping. Add range stepping debug output.
3192 (linux_set_resume_request): Copy the step range from the resume
3193 request to the lwp.
3194 (linux_supports_range_stepping): New.
3195 (linux_target_ops) <supports_range_stepping>: Set to
3196 linux_supports_range_stepping.
3197 * linux-low.h (struct linux_target_ops)
3198 <supports_range_stepping>: New field.
3199 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3200 * linux-x86-low.c (x86_supports_range_stepping): New.
3201 (the_low_target) <supports_range_stepping>: Set to
3202 x86_supports_range_stepping.
3203 * server.c (handle_v_cont): Handle 'r' action.
3204 (handle_v_requests): Append ";r" if the target supports range
3205 stepping.
3206 * target.h (struct thread_resume) <step_range_start,
3207 step_range_end>: New fields.
3208 (struct target_ops) <supports_range_stepping>:
3209 New field.
3210 (target_supports_range_stepping): New macro.
3211
3212 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3213
3214 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3215 confusion in comment.
3216
3217 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3218
3219 * lynx-low.c (struct process_info_private): New type.
3220 (lynx_add_process): New function.
3221 (lynx_create_inferior, lynx_attach): Replace calls to
3222 add_process by calls to lynx_add_process.
3223 (lynx_resume): If PTID is null, then try using
3224 current_process()->private->last_wait_event_ptid.
3225 Add comments.
3226 (lynx_clear_inferiors): Delete. The contents of that function
3227 has been inlined in lynx_mourn;
3228 (lynx_wait_1): Save the ptid in the process's private data.
3229 (lynx_mourn): Free the process' private data. Replace call
3230 to lynx_clear_inferiors by call to clear_inferiors.
3231
3232 2013-05-17 Yao Qi <yao@codesourcery.com>
3233
3234 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3235 the right place.
3236
3237 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3238
3239 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3240 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3241 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3242 PT_TEXT_END_ADDR guards. Update comments.
3243 (linux_target_op) <read_offsets>: Conditionally define to
3244 linux_read_offsets if the target is UCLIBC and if it defines
3245 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3246
3247 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3248 Andrew Jenner <andrew@codesourcery.com>
3249
3250 * Makefile.in (SFILES): Add linux-nios2-low.c.
3251 (clean): Add action to delete nios2-linux.c.
3252 (nios2-linux.c): New rule.
3253 * configure.srv: Add nios2*-*-linux*.
3254 * linux-nios2-low.c: New.
3255
3256 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3257
3258 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3259
3260 2013-04-25 Hui Zhu <hui@codesourcery.com>
3261
3262 PR gdb/15186
3263 * ax.c (ax_printf): Add fflush.
3264
3265 2013-04-22 Tom Tromey <tromey@redhat.com>
3266
3267 * Makefile.in (SFILES): Add filestuff.c.
3268 (OBS): Add filestuff.o.
3269 (filestuff.o): New target.
3270 * config.in, configure: Rebuild.
3271 * configure.ac: Check for fdwalk, pipe2.
3272
3273 2013-04-17 Pedro Alves <palves@redhat.com>
3274
3275 * configure.ac (USE_THREAD_DB): Delete variable.
3276 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3277 Don't AC_SUBST USE_THREAD_DB.
3278 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3279 * config.in, configure: Regenerate.
3280
3281 2013-04-16 Pedro Alves <palves@redhat.com>
3282
3283 * linux-low.h (struct lwp_info) <thread_known>: Move under
3284 the USE_THREAD_DB #ifdef.
3285
3286 2013-04-16 Pedro Alves <palves@redhat.com>
3287
3288 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3289 (linux-low.o): Delete rule.
3290 * linux-low.h: Always include "gdb_thread_db.h" instead of
3291 conditionally including thread_db.h.
3292 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3293 HAVE_THREAD_DB_H.
3294
3295 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3296
3297 * Makefile.in (install-only): Fix make install regression.
3298
3299 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3300
3301 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3302 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3303 installation.
3304 * gdbserver.1: Remove.
3305
3306 2013-03-22 Pedro Alves <palves@redhat.com>
3307
3308 * linux-low.c (handle_extended_wait): Don't call
3309 linux_enable_event_reporting.
3310
3311 2013-03-15 Tony Theodore <tonyt@logyst.com>
3312
3313 PR build/9098:
3314 * Makefile.in (SHELL): Use @SHELL@.
3315
3316 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3317
3318 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3319 compiler warning.
3320
3321 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3322
3323 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3324 Remove extraneous NULL element.
3325
3326 2013-03-13 Yao Qi <yao@codesourcery.com>
3327
3328 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3329 'V' block in trace frame.
3330
3331 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3332
3333 * target.h (struct target_ops): Add btrace ops.
3334 (target_supports_btrace): New macro.
3335 (target_enable_btrace): New macro.
3336 (target_disable_btrace): New macro.
3337 (target_read_btrace): New macro.
3338 * gdbthread.h (struct thread_info): Add btrace field.
3339 * server.c: Include btrace-common.h.
3340 (handle_btrace_general_set): New function.
3341 (handle_btrace_enable): New function.
3342 (handle_btrace_disable): New function.
3343 (handle_general_set): Call handle_btrace_general_set.
3344 (handle_qxfer_btrace): New function.
3345 (struct qxfer qxfer_packets[]): Add btrace entry.
3346 * inferiors.c (remove_thread): Disable btrace.
3347 * linux-low: Include linux-btrace.h.
3348 (linux_low_enable_btrace): New function.
3349 (linux_low_read_btrace): New function.
3350 (linux_target_ops): Add btrace ops.
3351 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3352 Add srv_linux_btrace=yes.
3353 (x86_64-*-linux*): Add linux-btrace.o.
3354 Add srv_linux_btrace=yes.
3355 * configure.ac: Define HAVE_LINUX_BTRACE.
3356 * config.in: Regenerated.
3357 * configure: Regenerated.
3358
3359 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3360
3361 * server.c (handle_qxfer): Preserve error message if -3 is
3362 returned.
3363 (qxfer): Document the -3 return value.
3364
3365 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3366
3367 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3368 (linux_btrace_h): New variable.
3369 (linux-btrace.o): New rule.
3370
3371 2013-03-08 Stan Shebs <stan@codesourcery.com>
3372 Hafiz Abid Qadeer <abidh@codesourcery.com>
3373
3374 * tracepoint.c (trace_buffer_size): New global.
3375 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3376 (init_trace_buffer): Change to one-argument function. Allocate
3377 trace buffer memory.
3378 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3379 handle QTBuffer:size packet.
3380 (cmd_bigqtbuffer_size): New function.
3381 (initialize_tracepoint): Call init_trace_buffer with
3382 DEFAULT_TRACE_BUFFER_SIZE.
3383 * server.c (handle_query): Add QTBuffer:size in the
3384 supported packets.
3385
3386 2013-03-07 Yao Qi <yao@codesourcery.com>
3387
3388 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3389 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3390 of -1.
3391 (cmd_qtsp): Adjust condition. Do post increment.
3392 Set cur_action and cur_step_action back to 0.
3393
3394 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3395
3396 PR server/15236
3397 * linux-low.c (linux_write_memory): Return early success if LEN is
3398 zero.
3399
3400 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3401
3402 * configure.srv: Add x86_64-*-cygwin* as target.
3403
3404 2013-02-28 Tom Tromey <tromey@redhat.com>
3405
3406 * configure.ac: Invoke AC_SYS_LARGEFILE.
3407 * configure, config.in: Rebuild.
3408
3409 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3410
3411 * win32-low.c: Throughout, fix format strings and casts of
3412 printf-like functions to avoid type related warnings on all
3413 platforms.
3414 (get_child_debug_event): Print dwDebugEventCode as hex since
3415 that's how it's usually documented.
3416
3417 2013-02-28 Yao Qi <yao@codesourcery.com>
3418
3419 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3420 pulongest.
3421
3422 2013-02-27 Jiong Wang <jiwang@tilera.com>
3423
3424 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3425 (reg-tilegx32.c): New rule.
3426 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3427 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3428 different register info initializer according to elf class.
3429 (init_registers_tilgx32): New function. The tilegx32 register info
3430 initializer.
3431 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3432 (tile_store_gregset): Likewise.
3433
3434 2013-02-27 Yao Qi <yao@codesourcery.com>
3435
3436 * server.c (process_point_options): Print debug message when
3437 debug_threads is true.
3438
3439 2013-02-26 Yao Qi <yao@codesourcery.com>
3440
3441 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3442
3443 2013-02-19 Pedro Alves <palves@redhat.com>
3444 Kai Tietz <ktietz@redhat.com>
3445
3446 PR gdb/15161
3447
3448 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3449 instead of strtoul to extract address from packet.
3450 (process_serial_event) <'z'>: Likewise.
3451
3452 2013-02-18 Yao Qi <yao@codesourcery.com>
3453
3454 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3455
3456 2013-02-14 Pedro Alves <palves@redhat.com>
3457
3458 Plug memory leak.
3459
3460 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3461 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3462
3463 2013-02-14 Pedro Alves <palves@redhat.com>
3464
3465 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3466
3467 2013-02-14 Pedro Alves <palves@redhat.com>
3468
3469 * tracepoint.c (save_string): Delete.
3470 (add_tracepoint_action): Use savestring instead of save_string.
3471
3472 2013-02-12 Pedro Alves <palves@redhat.com>
3473
3474 * linux-xtensa-low.c: Ditto.
3475 * xtensa-xtregs.c: Ditto.
3476
3477 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3478
3479 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3480 thread_db.
3481
3482 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3483
3484 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3485 aarch64_num_wp_regs and aarch64_num_bp_regs to
3486 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3487
3488 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3489
3490 * linux-aarch64-low.c (ps_get_thread_area): Replace
3491 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3492
3493 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3494 Marcus Shawcroft <marcus.shawcroft@arm.com>
3495 Nigel Stephens <nigel.stephens@arm.com>
3496 Yufeng Zhang <yufeng.zhang@arm.com>
3497
3498 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3499 (aarch64.c, aarch64-without-fpu.c): New targets.
3500 * configure.srv (aarch64*-*-linux*): New.
3501 * linux-aarch64-low.c: New file.
3502
3503 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3504
3505 * linux-low.c (handle_extended_wait, linux_create_inferior)
3506 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3507 (dequeue_one_deferred_signal, linux_resume_one_thread)
3508 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3509 (linux_tracefork_grandchild, linux_test_for_tracefork)
3510 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3511 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3512 where the argument is 0.
3513
3514 2013-01-25 Yao Qi <yao@codesourcery.com>
3515
3516 * event-loop.c: Include "queue.h".
3517 (gdb_event_p): New typedef.
3518 (struct gdb_event) <next_event>: Remove.
3519 (event_queue): Change to QUEUE(gdb_event_p).
3520 (async_queue_event): Remove.
3521 (gdb_event_xfree): New.
3522 (initialize_event_loop): New.
3523 (process_event): Use API from QUEUE.
3524 (wait_for_event): Likewise.
3525 * server.c (main): Call initialize_event_loop.
3526 * server.h (initialize_event_loop): Declare.
3527
3528 2013-01-18 Yao Qi <yao@codesourcery.com>
3529
3530 * ax.h (struct eval_agent_expr_context): New.
3531 (gdb_eval_agent_expr): Update declaration.
3532 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3533 TFRAME. Add new argument CTX.
3534 * server.h (struct eval_agent_expr_context): Declare.
3535 (agent_mem_read, agent_tsv_read): Update declaration.
3536 (agent_mem_read_string): Likewise.
3537 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3538 (add_traceframe_block): Add new argument TPOINT.
3539 Increase TPOINT->traceframe_usage.
3540 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3541 eval_tracepoint_agent_expr.
3542 (condition_true_at_tracepoint): Likewise.
3543 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3544 (agent_mem_read_string, agent_tsv_read): Likewise.
3545
3546 2013-01-16 Yao Qi <yao@codesourcery.com>
3547
3548 * linux-low.c (linux_resume_one_lwp): Don't check
3549 'lwp->bp_reinsert != 0'.
3550
3551 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3552 Pedro Alves <palves@redhat.com>
3553
3554 * lynx-low.c (ptrace_request_to_str): Define a temporary
3555 macro and use it to simplify this function's implementation.
3556
3557 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3558
3559 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3560 sets errno.
3561
3562 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3563
3564 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3565
3566 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3567
3568 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3569
3570 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3571
3572 * lynx-low.c (lynx_resume): Use the resume_info parameter
3573 to determine the ptid for the lynx_ptrace call, unless
3574 it is equal to minus_one_ptid, in which case we use the
3575 ptid of the current_inferior.
3576 (lynx_wait_1): After having received a thread create/exit
3577 event, resume the inferior's execution using the signaling
3578 thread's ptid, rather than the old ptid.
3579
3580 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3581
3582 * lynx-low.c (lynx_resume): Delete variable ret.
3583
3584 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3585
3586 * gdbreplay.c (gdbreplay_version): Update copyright year.
3587 * server.c (gdbserver_version): Likewise.
3588
3589 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3590
3591 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3592 new thread.
3593
3594 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3595
3596 * lynx-low.c (ptrace_request_to_str): Add handling for
3597 PTRACE_GETTRACESIG.
3598
3599 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3600
3601 * lynx-low.c (lynx_attach): Delete variable new_process.
3602
3603 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3604
3605 * lynx-low.c (lynx_create_inferior): Delete variable
3606 new_process.
3607
3608 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3609
3610 * lynx-low.c (ptrace_request_to_str): Do not handle
3611 PTRACE_GETTHREADLIST if this macro does not exist.
3612
3613 2012-12-15 Yao Qi <yao@codesourcery.com>
3614
3615 * Makefile.in (OBS): Add notif.o.
3616 * notif.c, notif.h: New.
3617 * server.c: Include "notif.h".
3618 (struct vstop_notif) <next>: Remove.
3619 <base>: New field.
3620 (queue_stop_reply): Update.
3621 (push_event, send_next_stop_reply): Remove.
3622 (discard_queued_stop_replies): Update.
3623 (notif_stop): New variable.
3624 (handle_v_stopped): Remove.
3625 (handle_v_requests): Don't call handle_v_stopped. Call
3626 handle_ack_notif instead.
3627 (queue_stop_reply_callback): Call notif_event_enque instead
3628 of queue_stop_reply.
3629 (handle_status): Don't call send_next_stop_reply, call
3630 notif_write_event instead.
3631 (kill_inferior_callback): Likewise.
3632 (detach_or_kill_inferior_callback): Likewise.
3633 (main): Call initialize_notif.
3634 (process_serial_event): Call QUEUE_is_empty.
3635 (handle_target_event): Call notif_push instead of push event.
3636 * server.h (push_event): Remove declaration.
3637
3638 2012-12-10 Tom Tromey <tromey@redhat.com>
3639
3640 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3641 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3642 macros.
3643 (.c.o): Rewrite.
3644 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3645 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3646 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3647 (amd64-linux-ipa.o, ax.o): Rewrite.
3648 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3649 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3650 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3651 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3652 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3653 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3654 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3655 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3656 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3657 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3658 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3659 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3660 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3661 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3662 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3663 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3664 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3665 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3666 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3667 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3668 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3669 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3670 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3671 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3672 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3673 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3674 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3675 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3676 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3677 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3678 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3679 (reg-tilegx.o): Remove.
3680 (all_object_files): New macro.
3681 Include .deps files.
3682 * aclocal.m4, configure: Rebuild.
3683 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3684 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3685 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3686
3687 2012-12-05 Tom Tromey <tromey@redhat.com>
3688
3689 PR gdb/14917:
3690 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3691
3692 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3693
3694 * configure.ac: Check for linux/perf_event.h.
3695 * config.in: Regenerated.
3696 * configure: Regenerated.
3697
3698 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3699
3700 * hostio.c (handle_readlink): Decrease buffer size
3701 parameter passed to readlink by one byte.
3702
3703 2012-11-26 Yao Qi <yao@codesourcery.com>
3704
3705 * configure.ac (build_warnings): Append '-Wempty-body'.
3706 * configure: Regenerated.
3707 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3708 body.
3709
3710 2012-11-15 Pierre Muller <muller@sourceware.org>
3711
3712 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3713 * config.in: Regenerate.
3714 * configure: Regenerate.
3715 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3716 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3717 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3718 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3719 header.
3720 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3721 instead of <sys/wait.h> header.
3722 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3723
3724 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3725
3726 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3727 (various make rules): Remove -DGDBSERVER
3728
3729 2012-11-09 Yao Qi <yao@codesourcery.com>
3730
3731 * spu-low.c (current_ptid): Move it to ..
3732 * gdbthread.h: ... here. New.
3733 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3734 * server.c (myresume, process_serial_event): Likewise.
3735 * thread-db.c (thread_db_find_new_threads): Likewise.
3736 * tracepoint.c (run_inferior_command): Likewise.
3737
3738 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3739
3740 * server.c (handle_search_memory_1): Include access length in
3741 warning message.
3742
3743 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3744
3745 * linux-crisv32-low.c: Fix compile errors.
3746
3747 2012-09-04 Yao Qi <yao@codesourcery.com>
3748
3749 * tracepoint.c (cmd_qtsv): Adjust debug message.
3750 Don't check CUR_TPOINT.
3751
3752 2012-08-28 Yao Qi <yao@codesourcery.com>
3753
3754 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3755 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3756 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3757 Remove declarations of xmalloc, xreallloc, xstrdup and
3758 freeargv.
3759 * Makefile.in (libiberty_h): New.
3760 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3761 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3762
3763 2012-08-23 Yao Qi <yao@codesourcery.com>
3764
3765 * server.h: Remove declaration of 'xsnprintf'.
3766
3767 2012-08-22 Keith Seitz <keiths@redhat.com>
3768
3769 * server.h: Include build-gnulib-gbserver/config.h.
3770 * gdbreplay.c: Likewise.
3771
3772 2012-08-08 Doug Evans <dje@google.com>
3773
3774 * Makefile.in (SFILES): Add gdb_vecs.c.
3775 (OBS): Add gdb_vecs.o.
3776 (gdb_vecs_h, host_defs_h): New variables.
3777 (thread-db.o): Add $(gdb_vecs_h) dependency.
3778 (gdb_vecs.o): New rule.
3779 * thread-db.c: #include "gdb_vecs.h".
3780 (thread_db_load_search): Use a vector to iterate over path elements.
3781 Handle text appearing after "$pdir".
3782
3783 * configure.ac: Add check for strstr.
3784 * config.in: Regenerate.
3785 * configure: Regenerate.
3786
3787 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3788
3789 * hostio.c (handle_pread): If pread fails, fall back to attempting
3790 lseek/read.
3791 (handle_pwrite): Likewise for pwrite.
3792
3793 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3794
3795 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3796 between unsupported TYPE and unimplementable ADDR/LEN combination.
3797 (arm_insert_point): Act on new return value.
3798
3799 2012-07-31 Pedro Alves <palves@redhat.com>
3800
3801 * server.c (process_point_options): Only skip tokens if we find
3802 one that is unrecognized. Don't treat 'X' specially while
3803 skipping unrecognized tokens.
3804
3805 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3806
3807 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3808 to 4-byte-align HW breakpoint addresses for Thumb.
3809
3810 2012-07-27 Yao Qi <yao@codesourcery.com>
3811
3812 PR remote/14161.
3813
3814 * server.h: Declare gdb_agent_about_to_close.
3815 * target.c (kill_inferior): Include "agent.h".
3816 New. Send command 'kill'.
3817 * target.h (kill_inferior): Removed macro.
3818 * tracepoint.c (gdb_agent_about_to_close): New.
3819 (gdb_agent_helper_thread): Handle command 'close'.
3820 Wait endlessly until the inferior stops.
3821 Install gdb_agent_remove_socket to atexit hook.
3822 (agent_socket_name): New static variable.
3823 (gdb_agent_socket_init): Replace local variable 'name' with
3824 'agent_socket_name'.
3825 (gdb_agent_remove_socket): New.
3826
3827 2012-07-27 Yao Qi <yao@codesourcery.com>
3828
3829 * server.c (process_point_options): Stop at 'X' when parsing.
3830
3831 2012-07-19 Michael Eager <eager@eagercon.com>
3832
3833 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3834 to hw_execute.
3835 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3836 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3837 hardware breakpoint.
3838
3839 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3840
3841 * gdbserver/linux-low.c (initialize_low): Call
3842 linux_ptrace_init_warnings.
3843
3844 2012-07-02 Doug Evans <dje@google.com>
3845
3846 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3847 pointer to int.
3848
3849 2012-07-02 Stan Shebs <stan@codesourcery.com>
3850
3851 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3852 (ax.o): Add it to build rule.
3853 (ax-ipa.o): Ditto.
3854 (OBS): Add format.o.
3855 (IPA_OBS): Add format.o.
3856 * server.c (handle_query): Claim support for breakpoint commands.
3857 (process_point_options): Add command case.
3858 (process_serial_event): Leave running if there are printfs in
3859 effect.
3860 * mem-break.h (any_persistent_commands): Declare.
3861 (add_breakpoint_commands): Declare.
3862 (gdb_no_commands_at_breakpoint): Declare.
3863 (run_breakpoint_commands): Declare.
3864 * mem-break.c (struct point_command_list): New struct.
3865 (struct breakpoint): New field command_list.
3866 (any_persistent_commands): New function.
3867 (add_commands_to_breakpoint): New function.
3868 (add_breakpoint_commands): New function.
3869 (gdb_no_commands_at_breakpoint): New function.
3870 (run_breakpoint_commands): New function.
3871 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3872 locally.
3873 * ax.c: Include format.h.
3874 (ax_printf): New function.
3875 (gdb_eval_agent_expr): Add printf opcode.
3876
3877 2012-06-13 Yao Qi <yao@codesourcery.com>
3878
3879 * server.c (start_inferior): Remove duplicated writes to fields
3880 'last_resume_kind' and 'last_status' of 'current_inferior'.
3881
3882 2012-06-12 Yao Qi <yao@codesourcery.com>
3883 Pedro Alves <palves@redhat.com>
3884
3885 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3886 comment.
3887 * server.c (handle_v_cont): Extend comment.
3888
3889 2012-06-11 Yao Qi <yao@codesourcery.com>
3890
3891 * linux-low.c (linux_attach): Add 'static'.
3892
3893 2012-06-06 Yao Qi <yao@codesourcery.com>
3894
3895 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3896
3897 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3898
3899 Fix gcc -flto compilation warning.
3900 * server.c (main): Make variable multi_mode and attach volatile.
3901
3902 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3903
3904 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3905 if the platform doesn't know about it.
3906
3907 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3908
3909 * Makefile.in (SFILES): Add linux-tile-low.c.
3910 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3911 * configure.srv: Handle tilegx-*-linux*.
3912 * linux-tile-low.c: New file.
3913
3914 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3915
3916 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3917
3918 2012-05-24 Pedro Alves <palves@redhat.com>
3919
3920 PR gdb/7205
3921
3922 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3923
3924 2012-05-24 Pedro Alves <palves@redhat.com>
3925
3926 PR gdb/7205
3927
3928 Replace target_signal with gdb_signal throughout.
3929
3930 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3931
3932 * linux-low.c (linux_store_registers): Avoid the copying sequence
3933 when no data has been retrieved by ptrace.
3934
3935 2012-05-22 Will Deacon <will.deacon@arm.com>
3936
3937 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3938 Include asm/ptrace.h.
3939 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3940 already defined.
3941
3942 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3943
3944 * linux-low.c (linux_store_registers): Don't re-retrieve data
3945 with ptrace that has already been obtained from /proc. Always
3946 copy any data retrieved with ptrace to the buffer supplied.
3947
3948 2012-05-11 Yao Qi <yao@codesourcery.com>
3949 Pedro Alves <palves@redhat.com>
3950
3951 * linux-low.c (enum stopping_threads_kind): New.
3952 (stopping_threads): Change type to `enum stopping_threads_kind'.
3953 (handle_extended_wait): If stopping and suspending threads, leave
3954 the new_lwp suspended too.
3955 (linux_wait_for_event): Adjust.
3956 (stop_all_lwps): Set `stopping_threads' to
3957 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3958 whether we're suspending threads or just stopping them. Assert no
3959 recursion happens.
3960
3961 2012-04-29 Yao Qi <yao@codesourcery.com>
3962
3963 * server.h: Move some code to ...
3964 * gdbthread.h: ... here. New.
3965 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3966 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3967 (nto-low.o, win32-low.o): Likewise.
3968 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3969 * regcache.c, remote-utils.c, server.c: Likewise.
3970 * target.c, tracepoint.c, win32-low.c: Likewise.
3971
3972 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3973
3974 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3975 (PTRACE_ARG4_TYPE): Likewise.
3976 (PTRACE_XFER_TYPE): Likewise.
3977 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3978 ptrace to PTRACE_ARG3_TYPE.
3979 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3980 (PTRACE_ARG4_TYPE): Likewise.
3981 (PTRACE_XFER_TYPE): Likewise.
3982 (linux_detach_one_lwp): Cast fourth argument of
3983 ptrace to long then PTRACE_ARG4_TYPE.
3984 (regsets_fetch_inferior_registers): Cast third argument of
3985 ptrace to long then PTRACE_ARG3_TYPE.
3986 (regsets_store_inferior_registers): Likewise.
3987
3988 2012-04-20 Pedro Alves <palves@redhat.com>
3989
3990 * configure: Regenerate.
3991
3992 2012-04-19 Pedro Alves <palves@redhat.com>
3993
3994 * Makefile.in (GNULIB_BUILDDIR): New.
3995 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3996 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3997 (all, install-only, uninstall, clean-info, all-lib, clean): No
3998 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3999 (maintainer-clean realclean distclean): Use subdir_do.
4000 (subdir_do): New.
4001 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
4002 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
4003 * acinclude.m4: Include acx_configure_dir.m4.
4004 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4005 calls. Call AC_PROG_RANLIB. Configure gnulib using
4006 ACX_CONFIGURE_DIR.
4007 (GNULIB): New.
4008 (GNULIB_STDINT_H): Adjust.
4009 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4010 * gdbreplay.c: Include build-gnulib/config.h.
4011 * server.h: Likewise.
4012 * aclocal.m4: Regenerate.
4013 * config.in: Regenerate.
4014 * configure: Regenerate.
4015
4016 2012-04-19 Pedro Alves <palves@redhat.com>
4017
4018 * Makefile.in (LIBGNU, INCGNU): Adjust.
4019 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4020 (all, install-only, uninstall, clean-info, all-lib, clean)
4021 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4022 * configure.ac: Adjust AC_OUTPUT output.
4023 * aclocal.m4: Regenerate.
4024 * configure: Regenerate.
4025
4026 2012-04-19 Pedro Alves <palves@redhat.com>
4027
4028 * Makefile.in (generated_files): New.
4029 (server_h): Remove the explicit dependency on config.h, and depend
4030 on $generated_files.
4031
4032 2012-04-19 Pedro Alves <palves@redhat.com>
4033
4034 * Makefile.in (INCGNU): Add -Ignulib.
4035
4036 2012-04-19 Pedro Alves <palves@redhat.com>
4037
4038 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4039 (INCGNU): ... this, and spell out -I here.
4040 (GNULIB_LIB): Rename to ...
4041 (LIBGNU): ... this.
4042 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4043
4044 2012-04-19 Pedro Alves <palves@redhat.com>
4045
4046 * config.in: Regenerate.
4047
4048 2012-04-19 Pedro Alves <palves@redhat.com>
4049
4050 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4051 * server.h (memmem): Remove declaration.
4052 * config.in: Regenerate.
4053 * configure: Regenerate.
4054
4055 2012-04-19 Yao Qi <yao@codesourcery.com>
4056
4057 * Makefile.in (SFILES): Add common/vec.c.
4058 (OBS): Add vec.o.
4059 (vec.o): New rule.
4060
4061 2012-04-19 Yao Qi <yao@codesourcery.com>
4062
4063 * remote-utils.c (prepare_resume_reply): Replace with macro
4064 target_core_of_thread.
4065 * server.c (handle_qxfer_threads_proper): Likewise.
4066 * target.h (traget_core_of_thread): New macro.
4067
4068 2012-04-18 Pedro Alves <palves@redhat.com>
4069
4070 * aclocal.m4: Regenerate.
4071 * configure: Regenerate.
4072
4073 2012-04-16 Yao Qi <yao@codesourcery.com>
4074
4075 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4076 duplicated on address.
4077
4078 2012-04-16 Yao Qi <yao@codesourcery.com>
4079
4080 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4081 (struct tracepoint_action_ops) <send>: New field.
4082 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4083 (agent_expr_send, x_tracepoint_action_send): New.
4084 (l_tracepoint_action_send): New.
4085 (cmd_qtdp): Download and install tracepoint
4086 according to `use_agent'.
4087 (run_inferior_command): Add one more parameter `len'.
4088 Update callers.
4089 (tracepoint_send_agent): New.
4090 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4091
4092 2012-04-16 Yao Qi <yao@codesourcery.com>
4093
4094 * tracepoint.c (download_tracepoints): Moved to ...
4095 (cmd_qtstart): ... here.
4096
4097 2012-04-14 Yao Qi <yao@codesourcery.com>
4098
4099 * tracepoint.c: Include inttypes.h.
4100 (struct collect_memory_action): Use sized types.
4101 (struct tracepoint): Likewise.
4102 (cmd_qtdp, stop_tracing): Update print specifiers.
4103 (cmd_qtp, response_tracepoint): Likewise.
4104 (collect_data_at_tracepoint): Likewise.
4105 (collect_data_at_step): Likewise.
4106
4107 2012-04-14 Yao Qi <yao@codesourcery.com>
4108
4109 Import gnulib module inttypes.
4110 * aclocal.m4, config.in, configure: Regenerated.
4111
4112 2012-04-14 Yao Qi <yao@codesourcery.com>
4113
4114 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4115 Makefile and config.status at last.
4116
4117 2012-04-13 Yao Qi <yao@codesourcery.com>
4118
4119 * tracepoint.c: Include stdint.h unconditionally.
4120
4121 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4122
4123 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4124 on BFD_HAVE_SYS_PROCFS_TYPE.
4125 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4126 * configure: Regenerate.
4127 * config.in: Likewise.
4128
4129 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4130
4131 * Makefile.in (clean): Also remove x32.c x32-linux.c
4132 x32-avx.c x32-avx-linux.c.
4133 (x32.o): New target.
4134 (x32.c): Likewise.
4135 (x32-linux.o): Likewise.
4136 (x32-linux.c): Likewise.
4137 (x32-avx.o): Likewise.
4138 (x32-avx.c): Likewise.
4139 (x32-avx-linux.o): Likewise.
4140 (x32-avx-linux.c): Likewise.
4141
4142 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4143 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4144 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4145 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4146 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4147 i386/x32-avx-linux.xml.
4148
4149 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4150 (init_registers_x32_avx_linux): Likwise.
4151 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4152 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4153
4154 2012-04-13 Pedro Alves <palves@redhat.com>
4155
4156 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4157 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4158 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4159 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4160 the sub-make.
4161
4162 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4163
4164 * linux-x86-low.c (compat_x32_clock_t): New.
4165 (compat_x32_siginfo_t): Likewise.
4166 (compat_x32_siginfo_from_siginfo): Likewise.
4167 (siginfo_from_compat_x32_siginfo): Likewise.
4168 (linux_is_elf64): Likewise.
4169 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4170 and siginfo_from_compat_x32_siginfo for x32.
4171 (x86_arch_setup): Set linux_is_elf64.
4172
4173 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4174
4175 PR gdb/13969
4176 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4177 e_machine field.
4178 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4179 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4180 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4181 compatible with process.
4182
4183 2012-04-12 Yao Qi <yao@codesourcery.com>
4184
4185 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4186 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4187 (install-only, install-info, clean): Handle sub dir gnulib.
4188 (all-lib, am--refresh): New targets.
4189 (memmem.o): Remove target.
4190 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4191 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4192 (AC_REPLACE_FUNCS): Remove memmem.
4193 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4194 (AC_OUTPUT): Generate Makefile in gnulib/.
4195 * aclocal.m4, config.in, configure: Regenerated.
4196
4197 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4198
4199 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4200
4201 2012-04-05 Pedro Alves <palves@redhat.com>
4202
4203 -Werror=strict-aliasing
4204
4205 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4206 pointer.
4207
4208 2012-04-04 Pedro Alves <palves@redhat.com>
4209
4210 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4211 (sparc_store_gregset_from_stack, sparc_store_gregset)
4212 (sparc_breakpoint_at): Fix formatting.
4213
4214 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4215
4216 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4217 are available.
4218 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4219 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4220 * config.in: Regenerate.
4221 * configure: Likewise.
4222
4223 2012-03-29 Pedro Alves <palves@redhat.com>
4224
4225 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4226 Correct ptrace arguments.
4227
4228 2012-03-28 Pedro Alves <palves@redhat.com>
4229
4230 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4231 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4232 (IA64_FR1_REGNUM): New defines.
4233 (ia64_fetch_register): New.
4234 (the_low_target): Install it.
4235 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4236 field.
4237 * linux-low.c (linux_fetch_registers): Try the
4238 the_low_target.fetch_register hook first.
4239
4240 * linux-arm-low.c (the_low_target): Adjust.
4241 * linux-bfin-low.c (the_low_target): Adjust.
4242 * linux-cris-low.c (the_low_target): Adjust.
4243 * linux-crisv32-low.c (the_low_target): Adjust.
4244 * linux-m32r-low.c (the_low_target): Adjust.
4245 * linux-m68k-low.c (the_low_target): Adjust.
4246 * linux-mips-low.c (the_low_target): Adjust.
4247 * linux-ppc-low.c (the_low_target): Adjust.
4248 * linux-s390-low.c (the_low_target): Adjust.
4249 * linux-sh-low.c (the_low_target): Adjust.
4250 * linux-sparc-low.c (the_low_target): Adjust.
4251 * linux-tic6x-low.c (the_low_target): Adjust.
4252 * linux-x86-low.c (the_low_target): Adjust.
4253 * linux-xtensa-low.c (the_low_target): Adjust.
4254
4255 2012-03-26 Pedro Alves <palves@redhat.com>
4256
4257 * server.c (handle_qxfer_libraries): Don't bail early if
4258 the_target->qxfer_libraries_svr4 is not NULL.
4259
4260 2012-03-26 Pedro Alves <palves@redhat.com>
4261
4262 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4263
4264 2012-03-23 Pedro Alves <palves@redhat.com>
4265
4266 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4267 "library-list-svr4" element's start tag when the the DSO list is
4268 empty.
4269
4270 2012-03-23 Pedro Alves <palves@redhat.com>
4271
4272 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4273 a variable whose type size is the same as the inferior's pointer
4274 size.
4275
4276 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4277
4278 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4279 struct siginfo.
4280 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4281 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4282 * linux-low.h: Include <signal.h>.
4283 (struct siginfo): Remove forward declaration.
4284 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4285 struct siginfo.
4286
4287 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4288
4289 * .gitignore: Ignore more files.
4290
4291 2012-03-19 Pedro Alves <palves@redhat.com>
4292 Jan Kratochvil <jan.kratochvil@redhat.com>
4293
4294 * server.c (cont_thread, general_thread): Add describing comments.
4295 (start_inferior): Clear `cont_thread'.
4296 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4297 of a process.
4298
4299 2012-03-15 Yao Qi <yao@codesourcery.com>
4300
4301 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4302 handling to ...
4303 (cmd_qtdp): ... here.
4304
4305 2012-03-15 Yao Qi <yao@codesourcery.com>
4306
4307 * tracepoint.c (struct tracepoint_action_ops): New.
4308 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4309 (m_tracepoint_action_download): New.
4310 (r_tracepoint_action_download): New.
4311 (x_tracepoint_action_download): New.
4312 (l_tracepoint_action_download): New.
4313 (add_tracepoint_action): Install `action->ops' according type.
4314 (download_tracepoint_1): Move code `download' function pointer
4315 of various tracepoint_action_ops.
4316
4317 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4318
4319 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4320 linux_ptrace_attach_warnings.
4321
4322 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4323
4324 * Makefile.in (linux-ptrace.o): New.
4325 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4326 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4327 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4328 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4329 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4330 of these targets.
4331 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4332
4333 2012-03-08 Yao Qi <yao@codesourcery.com>
4334 Pedro Alves <palves@redhat.com>
4335
4336 Fix PR server/13392.
4337 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4338 offset of JMP insn.
4339 * tracepoint.c (remove_tracepoint): New.
4340 (cmd_qtdp): Call remove_tracepoint when failed to install.
4341
4342 2012-03-07 Pedro Alves <palves@redhat.com>
4343
4344 * linux-low.c (get_detach_signal): New.
4345 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4346 Pass on pending signals to PTRACE_DETACH. Check the result of the
4347 ptrace call.
4348 * server.c (program_signals, program_signals_p): New.
4349 (handle_general_set): Handle QProgramSignals.
4350 * server.h (program_signals, program_signals_p): Declare.
4351
4352 2012-03-05 Pedro Alves <palves@redhat.com>
4353 Jan Kratochvil <jan.kratochvil@redhat.com>
4354
4355 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4356 New comment why.
4357
4358 2012-03-03 Yao Qi <yao@codesourcery.com>
4359
4360 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4361 agent_look_up_symbols.
4362
4363 2012-03-03 Yao Qi <yao@codesourcery.com>
4364
4365 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4366 (linux-x86-low.o): Likewise.
4367 * server.h: Remove in_process_agent_loaded.
4368 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4369 common/agent.c.
4370 Update callers.
4371
4372 2012-03-03 Yao Qi <yao@codesourcery.com>
4373
4374 * tracepoint.c (gdb_agent_capability): New global.
4375 (in_process_agent_loaded_ust): Renamed to
4376 `in_process_agent_supports_ust'.
4377 Update callers.
4378 (in_process_agent_supports_ust): Call agent_capability_check.
4379 (clear_installed_tracepoints): Assert that agent supports
4380 agent.
4381
4382 2012-03-03 Yao Qi <yao@codesourcery.com>
4383
4384 * linux-low.c (linux_supports_agent): New.
4385 (linux_target_ops): Initialize field `supports_agent' with
4386 linux_supports_agent.
4387 * target.h (struct target_ops) <supports_agent>: New.
4388 (target_supports_agent): New macro.
4389 * server.c (handle_general_set): Handle packet 'QAgent'.
4390 (handle_query): Send `QAgent+'.
4391 * Makefile.in (server.o): Depends on agent.h.
4392
4393 2012-03-03 Yao Qi <yao@codesourcery.com>
4394
4395 * Makefile.in (OBS): Add agent.o.
4396 Add new rule for agent.o.
4397 Track dependence of tracepoint.c on agent.h.
4398 * tracepoint.c (run_inferior_command_1):
4399 (run_inferior_command): Call agent_run_command.
4400 (gdb_ust_connect_sync_socket): Deleted. Move it to
4401 common/agent.c.
4402 (resume_thread, stop_thread): Likewise.
4403 (gdb_ust_socket_init): Renamed to ...
4404 (gdb_agent_socket_init): ... New.
4405 (gdb_ust_thread): Renamed to ...
4406 (gdb_agent_helper_thread): ... New.
4407 (gdb_ust_init): Move some code to ...
4408 (gdb_agent_init): ... here. New.
4409 [HAVE_UST]: Call gdb_ust_init.
4410 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4411 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4412 * config.in, configure: Regenerated.
4413
4414 2012-03-02 Pedro Alves <palves@redhat.com>
4415
4416 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4417 * linux-low.c (struct simple_pid_list): New.
4418 (stopped_pids): New a struct simple_pid_list pointer.
4419 (add_to_pid_list, pull_pid_from_list): New.
4420 (handle_extended_wait): Don't assume the first signal new children
4421 report is SIGSTOP. Adjust call to pull_pid_from_list.
4422 (linux_wait_for_lwp): Adjust.
4423
4424 2012-03-02 Yao Qi <yao@codesourcery.com>
4425
4426 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4427 debug log.
4428
4429 2012-03-02 Yao Qi <yao@codesourcery.com>
4430
4431 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4432 `stop_pc' and `tpoint'. Update caller.
4433
4434 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4435
4436 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4437 * linux-low.c (use_linux_regsets): New macro.
4438 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4439 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4440 (linux_register_in_regsets): New function.
4441 (usr_fetch_inferior_registers): Skip registers covered by
4442 regsets.
4443 (usr_store_inferior_registers): Likewise.
4444 (usr_fetch_inferior_registers): New macro.
4445 (usr_store_inferior_registers): Likewise.
4446 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4447 (linux_store_registers): Likewise.
4448 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4449 prototype.
4450 (init_registers_mips64_dsp_linux): Likewise.
4451 (init_registers_mips_linux): New macro.
4452 (init_registers_mips_dsp_linux): Likewise.
4453 (mips_dsp_num_regs): Likewise.
4454 (DSP_BASE, DSP_CONTROL): New fallback macros.
4455 (mips_base_regs): New macro.
4456 (mips_regmap): Use it. Fix the size.
4457 (mips_dsp_regmap): New variable.
4458 (mips_dsp_regset_bitmap): Likewise.
4459 (mips_arch_setup): New function.
4460 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4461 than mips_regmap.
4462 (mips_cannot_store_register): Likewise.
4463 (the_low_target): Update .arch_setup, .num_regs and .regmap
4464 initializers. Add .regset_bitmap initializer.
4465 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4466 initializer.
4467 * linux-bfin-low.c (the_low_target): Likewise.
4468 * linux-cris-low.c (the_low_target): Likewise.
4469 * linux-crisv32-low.c (the_low_target): Likewise.
4470 * linux-ia64-low.c (the_low_target): Likewise.
4471 * linux-m32r-low.c (the_low_target): Likewise.
4472 * linux-m68k-low.c (the_low_target): Likewise.
4473 * linux-ppc-low.c (the_low_target): Likewise.
4474 * linux-s390-low.c (the_low_target): Likewise.
4475 * linux-sh-low.c (the_low_target): Likewise.
4476 * linux-sparc-low.c (the_low_target): Likewise.
4477 * linux-tic6x-low.c (the_low_target): Likewise.
4478 * linux-x86-low.c (the_low_target): Likewise.
4479 * linux-xtensa-low.c (the_low_target): Likewise.
4480 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4481 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4482 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4483 srv_xmlfiles.
4484 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4485 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4486
4487 2012-02-29 Yao Qi <yao@codesourcery.com>
4488 Pedro Alves <palves@redhat.com>
4489
4490 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4491 `step_over_finished' is true.
4492
4493 2012-02-27 Pedro Alves <palves@redhat.com>
4494
4495 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4496 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4497
4498 2012-02-27 Pedro Alves <palves@redhat.com>
4499
4500 PR server/9684
4501 * linux-low.c (pid_is_stopped): New.
4502 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4503
4504 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4505
4506 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4507 of conditions.
4508
4509 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4510
4511 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4512
4513 2012-02-24 Luis Machado <lgustavo@codesourcery>
4514
4515 * server.c (handle_query): Advertise support for target-side
4516 breakpoint condition evaluation.
4517 (process_point_options): New function.
4518 (process_serial_event): When inserting a breakpoint, check for
4519 a target-side condition that should be evaluated.
4520
4521 * mem-break.c: Include regcache.h and ax.h.
4522 (point_cond_list_t): New data structure.
4523 (breakpoint) <cond_list>: New field.
4524 (find_gdb_breakpoint_at): Make non-static.
4525 (delete_gdb_breakpoint_at): Clear any target-side
4526 conditions.
4527 (clear_gdb_breakpoint_conditions): New function.
4528 (add_condition_to_breakpoint): Likewise.
4529 (add_breakpoint_condition): Likewise.
4530 (gdb_condition_true_at_breakpoint): Likewise.
4531 (gdb_breakpoint_here): Return result directly instead
4532 of going through a local variable.
4533
4534 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4535 (clear_gdb_breakpoint_conditions): Likewise.
4536 (add_breakpoint_condition): Likewise.
4537 (gdb_condition_true_at_breakpoint): Likewise.
4538
4539 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4540 (need_step_over_p): Take target-side breakpoint condition into
4541 consideration.
4542
4543 2012-02-24 Luis Machado <lgustavo@codesourcery>
4544
4545 * server.h: Include tracepoint.h.
4546 (agent_mem_read, agent_get_trace_state_variable_value,
4547 agent_set_trace_state_variable_value,
4548 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4549 get_set_tsv_func_addr): New prototypes.
4550
4551 * ax.h: New include file.
4552 * ax.c: New source file.
4553
4554 * tracepoint.c: Include ax.h.
4555 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4556 agent_expr, eval_result_type): Move to ax.h.
4557 (parse_agent_expr): Rename to ...
4558 (gdb_parse_agent_expr): ... this, make it non-static and move
4559 to ax.h.
4560 (unparse_agent_expr) Rename to ...
4561 (gdb_unparse_agent_expr): ... this, make it non-static and move
4562 to ax.h.
4563 (eval_agent_expr): Rename to ...
4564 (eval_tracepoint_agent_expr): ... this.
4565 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4566 forward declarations.
4567 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4568 (agent_get_trace_state_variable_value): New function.
4569 (agent_set_trace_state_variable_value): New function.
4570 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4571 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4572 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4573 (condition_true_at_tracepoint): Likewise.
4574 (parse_agent_expr): Rename to ...
4575 (gdb_parse_agent_expr): ... this and move to ax.c.
4576 (unparse_agent_expr): Rename to ...
4577 (gdb_unparse_agent_expr): ... this and move to ax.c.
4578 (gdb_agent_op_name): Move to ax.c.
4579 (eval_agent_expr): Rename to ...
4580 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4581 and move to ax.c.
4582 (eval_tracepoint_agent_expr): New function.
4583 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4584 non-static.
4585 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4586 ax.c.
4587 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4588 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4589 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4590 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4591 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4592 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4593 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4594 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4595 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4596 (compile_bytecodes): Remove forward declaration.
4597 (is_goto_target): Move to ax.c.
4598 (compile_bytecodes): Move to ax.c and call
4599 agent_get_trace_state_variable_value (...) and
4600 agent_set_trace_state_variable_value (...).
4601
4602 * Makefile.in: Update ax.c and IPA dependencies.
4603
4604 2012-02-24 Pedro Alves <palves@redhat.com>
4605
4606 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4607 (cmd_bigqtbuffer_circular): ... this. Only handle
4608 'QTBuffer:circular:'.
4609 (handle_tracepoint_general_set): Adjust.
4610
4611 2012-02-16 Yao Qi <yao@codesourcery.com>
4612
4613 * inferiors.c: Move code to ...
4614 * dll.c: .... here. New.
4615 * server.h: Declare clear_dlls.
4616 * Makefile.in (SFILES): Add dll.c.
4617 (OBS): Add dll.o
4618 (dll.o): New rule.
4619
4620 2012-02-11 Yao Qi <yao@codesourcery.com>
4621
4622 * server.c: (handle_monitor_command): Add a new parameter
4623 `own_buf'.
4624 (handle_query): Update caller.
4625
4626 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4627
4628 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4629 * configure, config.in: Regenerate.
4630 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4631 is not defined.
4632
4633 2012-02-02 Pedro Alves <palves@redhat.com>
4634
4635 Try SIGKILL first, then PTRACE_KILL.
4636 * linux-low.c (linux_kill_one_lwp): New.
4637 (linux_kill_one_lwp): Rename to ...
4638 (kill_one_lwp_callback): ... this. Use the new
4639 linux_kill_one_lwp.
4640
4641 2012-02-02 Pedro Alves <palves@redhat.com>
4642
4643 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4644 inferior.
4645
4646 2012-01-27 Pedro Alves <palves@redhat.com>
4647
4648 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4649 (elf_64_file_p): Make static.
4650 (linux_pid_exe_is_elf_64_file): New.
4651 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4652 Delete declarations.
4653 (linux_pid_exe_is_elf_64_file): Declare.
4654 * linux-x86-low.c (x86_arch_setup): Use
4655 linux_pid_exe_is_elf_64_file.
4656
4657 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4658
4659 * linux-low.c (linux_wait_for_event_1): Rename to ...
4660 (linux_wait_for_event): ... here and merge it with former
4661 linux_wait_for_event - new variable wait_ptid, use it.
4662 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4663
4664 2012-01-23 Pedro Alves <palves@redhat.com>
4665
4666 * server.c (main): Avoid yet another case of infinite loop while
4667 detaching/killing after a longjmp.
4668
4669 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4670
4671 Code cleanup.
4672 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4673
4674 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4675
4676 * hostio.c (handle_readlink): New function.
4677 (handle_vFile): Call it to handle "vFile:readlink" packets.
4678
4679 2012-01-20 Pedro Alves <palves@redhat.com>
4680 Ulrich Weigand <ulrich.weigand@linaro.org>
4681
4682 * server.c (handle_v_requests): Only support vAttach and vRun to
4683 start multiple processes when in extended protocol mode.
4684
4685 2012-01-17 Pedro Alves <palves@redhat.com>
4686
4687 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4688 memalign plus mprotect to allocate the scratch buffer.
4689
4690 2012-01-13 Pedro Alves <palves@redhat.com>
4691
4692 * server.c (attach_inferior): Clear `cont_thread'.
4693
4694 2012-01-13 Pedro Alves <palves@redhat.com>
4695
4696 * server.c (main): Avoid infinite loop while detaching/killing
4697 after a longjmp.
4698
4699 2012-01-09 Doug Evans <dje@google.com>
4700
4701 * server.c (start_inferior): Set last_ptid in --wrapper case.
4702
4703 2012-01-06 Yao Qi <yao@codesourcery.com>
4704
4705 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4706 defined.
4707 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4708
4709 2012-01-04 Yao Qi <yao@codesourcery.com>
4710
4711 * tracepoint.c (cmd_qtdp): Print debug message
4712 for static tracepoint.
4713
4714 2012-01-04 Yao Qi <yao@codesourcery.com>
4715
4716 * tracepoint.c (trace_vdebug): Differentiate debug message
4717 between gdbserver and IPA.
4718
4719 2012-01-03 Yao Qi <yao@codesourcery.com>
4720
4721 * tracepoint.c (tracepoint_was_hit): Don't collect for
4722 static tracepoint.
4723
4724 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4725
4726 * terminal.h: Reformat copyright header.
4727
4728 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4729
4730 * server.c (gdbserver_version): Update copyright year.
4731 * gdbreplay.c (gdbreplay_version): Likewise.
4732
4733 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4734
4735 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4736
4737 Revert:
4738 2011-12-18 Hui Zhu <teawater@gmail.com>
4739 * linux-low.c (linux_create_inferior): Save return value to ret.
4740
4741 2011-12-18 Hui Zhu <teawater@gmail.com>
4742
4743 * linux-low.c (linux_create_inferior): Save return value to ret.
4744
4745 2011-12-16 Doug Evans <dje@google.com>
4746
4747 * linux-low.c (linux_create_inferior): If stdio connection,
4748 redirect stdin from /dev/null, stdout to stderr.
4749 * remote-utils.c (remote_is_stdio): New static global.
4750 (remote_connection_is_stdio): New function.
4751 (remote_prepare): Handle stdio connection.
4752 (remote_open): Ditto.
4753 (remote_close): Don't close stdin for stdio connections.
4754 (read_prim,write_prim): New functions. Replace all calls to
4755 read/write to these.
4756 * server.c (main): Watch for "-" argument. Move call to
4757 remote_prepare before start_inferior.
4758 * server.h (STDIO_CONNECTION_NAME): New macro.
4759 (remote_connection_is_stdio): Declare.
4760
4761 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4762 in debugging output.
4763
4764 2011-12-15 Yao Qi <yao@codesourcery.com>
4765
4766 * tracepoint.c: Include sys/syscall.h.
4767 (gdb_ust_thread): Remove preprocessor conditional.
4768
4769 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4770
4771 * linux-low.c (linux_detach_one_lwp): Call
4772 the_low_target.prepare_to_resume before detaching.
4773
4774 2011-12-14 Yao Qi <yao@codesourcery.com>
4775
4776 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4777 of write.
4778
4779 2011-12-14 Yao Qi <yao@codesourcery.com>
4780
4781 * i386-low.c (i386_low_stopped_data_address): Initialize local
4782 variable `control'.
4783
4784 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4785
4786 PR remote/13492
4787
4788 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4789 DR_CONTROL unless necessary. Extend comments.
4790 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4791 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4792
4793 2011-12-13 Yao Qi <yao@codesourcery.com>
4794
4795 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4796 macros.
4797 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4798
4799 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4800
4801 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4802 Print new debug message for such case.
4803
4804 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4805
4806 Fix overlapping memcpy.
4807 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4808 the read_inferior_memory transfer.
4809 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4810 write_inferior_memory transfer.
4811 (set_fast_tracepoint_jump): New variable buf. Use it for the
4812 read_inferior_memory and write_inferior_memory transfers.
4813 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4814 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4815 Use it for the write_inferior_memory transfer.
4816 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4817 buffers.
4818
4819 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4820
4821 * linux-low.c (fetch_register, store_register): Make code
4822 consistent, fix formatting.
4823
4824 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4825
4826 * linux-low.c (usr_store_inferior_registers): Factor out code
4827 to handle individual registers into...
4828 (store_register): ... this new function.
4829
4830 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4831
4832 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4833 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4834 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4835 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4836 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4837 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4838 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4839 (srv_xmlfiles): Add new XML files.
4840
4841 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4842 and <sys/uio.h>.
4843 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4844 (init_registers_s390_linux32v1): Add prototype.
4845 (init_registers_s390_linux32v2): Likewise.
4846 (init_registers_s390_linux64v1): Likewise.
4847 (init_registers_s390_linux64v2): Likewise.
4848 (init_registers_s390x_linux64v1): Likewise.
4849 (init_registers_s390x_linux64v2): Likewise.
4850 (s390_num_regs): Increment to 52.
4851 (s390_regmap): Add orig_r2 register.
4852 (s390_num_regs_3264): Increment to 68.
4853 (s390_regmap_3264): Add orig_r2 register.
4854 (s390_collect_ptrace_register): Handle orig_r2 register.
4855 (s390_supply_ptrace_register): Likewise.
4856 (s390_fill_last_break): New function.
4857 (s390_store_last_break): Likewise.
4858 (s390_fill_system_call): New function.
4859 (s390_store_system_call): Likewise.
4860 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4861 register sets.
4862 (s390_check_regset): New function.
4863 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4864 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4865 Update target_regsets for available register sets.
4866
4867 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4868 Jan Kratochvil <jan.kratochvil@redhat.com>
4869
4870 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4871 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4872 New.
4873 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4874 * linux-low.h (struct process_info_private): New member r_debug.
4875 * server.c (handle_qxfer_libraries): Call
4876 the_target->qxfer_libraries_svr4.
4877 (handle_qxfer_libraries_svr4): New function.
4878 (qxfer_packets): New entry "libraries-svr4".
4879 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4880 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4881 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4882 PACKET_qXfer_libraries_svr4.
4883
4884 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4885
4886 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4887 PSW address/mask between 8-byte and 16-byte formats.
4888 (s390_supply_ptrace_register): Likewise.
4889 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4890 basic addressing mode bit.
4891
4892 2011-11-24 Stan Shebs <stan@codesourcery.com>
4893
4894 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4895
4896 2011-11-17 Stan Shebs <stan@codesourcery.com>
4897
4898 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4899 (tracing_start_time): New global.
4900 (tracing_stop_time): New global.
4901 (tracing_user_name): New global.
4902 (tracing_notes): New global.
4903 (tracing_stop_note): New global.
4904 (cmd_qtstart): Set traceframe_usage, start_time.
4905 (stop_tracing): Set stop_time.
4906 (cmd_qtstatus): Report additional status.
4907 (cmd_qtp): New function.
4908 (handle_tracepoint_query): Call it.
4909 (cmd_qtnotes): New function.
4910 (handle_tracepoint_general_set): Call it.
4911 (get_timestamp): Rename from tsv_get_timestamp.
4912
4913 2011-11-14 Stan Shebs <stan@codesourcery.com>
4914 Kwok Cheung Yeung <kcy@codesourcery.com>
4915
4916 * linux-x86-low.c (small_jump_insn): New.
4917 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4918 trampoline and error message, build a trampoline and issue a small
4919 jump instruction to it.
4920 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4921 trampoline and error message.
4922 (x86_get_min_fast_tracepoint_insn_len): New.
4923 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4924 * linux-low.h (struct linux_target_ops): Add arguments to
4925 install_fast_tracepoint_jump_pad operation, add new operation.
4926 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4927 arguments.
4928 (linux_get_min_fast_tracepoint_insn_len): New function.
4929 (linux_target_op): Add new operation.
4930 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4931 (gdb_trampoline_buffer_end): Ditto.
4932 (gdb_trampoline_buffer_error): Ditto.
4933 (struct ipa_sym_addresses): Add fields for new IPA variables.
4934 (symbol_list): Add entries for new IPA variables.
4935 (struct tracepoint): Add fields to hold the address range of the
4936 trampoline used by the tracepoint.
4937 (trampoline_buffer_head): New static variable.
4938 (trampoline_buffer_tail): Ditto.
4939 (claim_trampoline_space): New function.
4940 (have_fast_tracepoint_trampoline_buffer): New function.
4941 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4942 structure.
4943 (install_fast_tracepoint): Ditto, also add error buffer argument.
4944 (cmd_qtminftpilen): New function.
4945 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4946 (fast_tracepoint_from_trampoline_address): New function.
4947 (fast_tracepoint_collecting): Handle trampoline as part of jump
4948 pad space.
4949 (set_trampoline_buffer_space): New function.
4950 (initialize_tracepoint): Initialize new IPA variables.
4951 * target.h (struct target_ops): Add arguments to
4952 install_fast_tracepoint_jump_pad operation, add new
4953 get_min_fast_tracepoint_insn_len operation.
4954 (target_get_min_fast_tracepoint_insn_len): New.
4955 (install_fast_tracepoint_jump_pad): Add arguments.
4956 * server.h (IPA_BUFSIZ): Define.
4957 * linux-i386-ipa.c: Include extra header files.
4958 (initialize_fast_tracepoint_trampoline_buffer): New function.
4959 (initialize_low_tracepoint): Call it.
4960 * server.h (set_trampoline_buffer_space): Declare.
4961 (claim_trampoline_space): Ditto.
4962 (have_fast_tracepoint_trampoline_buffer): Ditto.
4963
4964 2011-11-14 Yao Qi <yao@codesourcery.com>
4965
4966 * server.c (handle_query): Handle InstallInTrace for qSupported.
4967 * tracepoint.c (add_tracepoint): Sort list.
4968 (install_tracepoint, download_tracepoint): New.
4969 (cmd_qtdp): Call them to install and download tracepoints.
4970 (sort_tracepoints): Removed.
4971 (cmd_qtstart): Update.
4972
4973 2011-11-14 Yao Qi <yao@codesourcery.com>
4974
4975 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4976 * mem-break.h: Declare.
4977 * tracepoint.c (cmd_qtstart): Move some code to ...
4978 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4979 New.
4980 (download_tracepoints): Move some code to ...
4981 (download_tracepoint_1): ... here. New.
4982
4983 2011-11-08 Yao Qi <yao@codesourcery.com>
4984
4985 * remote-utils.c (relocate_instruction): A comment fix.
4986
4987 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4988
4989 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4990 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4991 dr_status_mirror and dr_control_mirror from debug_reg_state.
4992 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4993 (i386_initial_stuff): Remove use of deleted globals.
4994 (i386_get_thread_context, i386_set_thread_context,
4995 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4996 from debug_reg_state.
4997
4998 2011-11-05 Yao Qi <yao@codesourcery.com>
4999
5000 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5001 address as TPOINT's.
5002
5003 2011-11-02 Stan Shebs <stan@codesourcery.com>
5004
5005 * tracepoint.c (agent_mem_read_string): New function.
5006 (eval_agent_expr): Call it for tracenz.
5007 * server.c (handle_query): Report support for tracenz.
5008
5009 2011-11-02 Yao Qi <yao@codesourcery.com>
5010
5011 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5012
5013 2011-11-02 Yao Qi <yao@codesourcery.com>
5014
5015 * target.h: Fix a typo in comment.
5016
5017 2011-10-31 Pedro Alves <pedro@codesourcery.com>
5018
5019 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5020 clobber the breakpoints' shadows with fast tracepoint jumps.
5021 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5022 * target.c (write_inferior_memory): Also pass MYADDR down to
5023 check_mem_write.
5024
5025 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5026
5027 * configure.ac: Check support for personality routine.
5028 * configure: Regenerate.
5029 * config.in: Likewise.
5030 * linux-low.c: Include <sys/personality.h>.
5031 Define ADDR_NO_RANDOMIZE if necessary.
5032 (linux_create_inferior): Disable address space randomization when
5033 forking inferior, if requested.
5034 (linux_supports_disable_randomization): New function.
5035 (linux_target_ops): Install it.
5036 * server.h (disable_randomization): Declare.
5037 * server.c (disable_randomization): New global variable.
5038 (handle_general_set): Handle QDisableRandomization.
5039 (handle_query): Likewise for qSupported.
5040 (main): Support --disable-randomization and --no-disable-randomization
5041 command line arguments.
5042 * target.h (struct target_ops): Add supports_disable_randomization.
5043 (target_supports_disable_randomization): New macro.
5044
5045 2011-09-29 Mike Frysinger <vapier@gentoo.org>
5046
5047 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5048 ifdef check.
5049 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5050 [!PT_GETDSBT] (target_loadmap): New definition.
5051 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5052 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5053 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5054 and PT_GETDSBT to LINUX_LOADMAP.
5055 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5056 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5057
5058 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5059
5060 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5061 (arm_linux_hwbp_cap): New static variable.
5062 (arm_linux_get_hwbp_cap): Replace by ...
5063 (arm_linux_init_hwbp_cap): ... this new function.
5064 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5065 (arm_linux_get_hw_watchpoint_count): Likewise.
5066 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5067 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5068 (arm_prepare_to_resume): Use perror_with_name instead of error.
5069
5070 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
5071
5072 * linux-arm-low.c: Include <signal.h>.
5073 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5074 (struct arm_linux_hwbp_cap): New data type.
5075 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5076 (struct arm_linux_hw_breakpoint): New data type.
5077 (MAX_BPTS, MAX_WPTS): Define.
5078 (struct arch_process_info, struct arch_lwp_info): New data types.
5079 (arm_linux_get_hwbp_cap): New function.
5080 (arm_linux_get_hw_breakpoint_count): Likewise.
5081 (arm_linux_get_hw_watchpoint_count): Likewise.
5082 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5083 (arm_hwbp_control_initialize): Likewise.
5084 (arm_hwbp_control_is_enabled): Likewise.
5085 (arm_hwbp_control_is_initialized): Likewise.
5086 (arm_hwbp_control_disable): Likewise.
5087 (arm_linux_hw_breakpoint_equal): Likewise.
5088 (arm_linux_hw_point_initialize): Likewise.
5089 (struct update_registers_data): New data structure.
5090 (update_registers_callback: New function.
5091 (arm_insert_point): Likewise.
5092 (arm_remove_point): Likewise.
5093 (arm_stopped_by_watchpoint): Likewise.
5094 (arm_stopped_data_address): Likewise.
5095 (arm_new_process): Likewise.
5096 (arm_new_thread): Likewise.
5097 (arm_prepare_to_resume): Likewise.
5098 (the_low_target): Register arm_insert_point, arm_remove_point,
5099 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5100 arm_new_thread, and arm_prepare_to_resume.
5101
5102 2011-09-15 Stan Shebs <stan@codesourcery.com>
5103
5104 * server.h (struct emit_ops): Add compare-goto fields.
5105 * tracepoint.c (gdb_agent_op_sizes): New table.
5106 (emit_eq_goto): New function.
5107 (emit_ne_goto): New function.
5108 (emit_lt_goto): New function.
5109 (emit_le_goto): New function.
5110 (emit_gt_goto): New function.
5111 (emit_ge_goto): New function.
5112 (is_goto_target): New function.
5113 (compile_bytecodes): Recognize special cases of compare-goto
5114 combinations and call specialized emitters for them.
5115 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5116 (amd64_emit_ne_goto): New function.
5117 (amd64_emit_lt_goto): New function.
5118 (amd64_emit_le_goto): New function.
5119 (amd64_emit_gt_goto): New function.
5120 (amd64_emit_ge_goto): New function.
5121 (amd64_emit_ops): Add the new functions.
5122 (i386_emit_eq_goto): New function.
5123 (i386_emit_ne_goto): New function.
5124 (i386_emit_lt_goto): New function.
5125 (i386_emit_le_goto): New function.
5126 (i386_emit_gt_goto): New function.
5127 (i386_emit_ge_goto): New function.
5128 (i386_emit_ops): Add the new functions.
5129
5130 2011-09-08 Stan Shebs <stan@codesourcery.com>
5131
5132 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5133 (i386_emit_epilogue): Restore %ebx.
5134
5135 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5136
5137 * server.c (step_thread): Remove definition.
5138 (process_serial_event): Don't handle Hs.
5139 * server.h (step_thread): Remove declaration.
5140 * target.c (set_desired_inferior): Remove use of step_thread.
5141
5142 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5143
5144 * linux-low.c: Include linux-procfs.h.
5145 (linux_attach_lwp_1): Update comments.
5146 (linux_attach): Scan for existing threads when attaching to a
5147 process that is the tgid.
5148 * Makefile.in: Update dependencies.
5149
5150 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5151
5152 * configure.srv: Add linux-procfs.o dependencies.
5153
5154 2011-08-14 Yao Qi <yao@codesourcery.com>
5155
5156 * target.h (struct target_ops): Fix indent.
5157 * win32-low.c (win32_target_ops): Fix comment.
5158
5159 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5160 Yao Qi <yao@codesourcery.com>
5161
5162 * Makefile.in (clean): Remove tic6x-*.c files.
5163 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5164 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5165 (tic6x-c64xp-linux.c): Likewise.
5166 * configure.srv: Add support for tic6x-*-uclinux.
5167 * linux-tic6x-low.c: New.
5168 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5169
5170 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5171 Yao Qi <yao@codesourcery.com>
5172
5173 * target.h (struct target_ops): Add read_loadmap.
5174 * linux-low.c (struct target_loadseg): New type.
5175 (struct target_loadmap): New type.
5176 (linux_read_loadmap): New function.
5177 (linux_target_ops): Add linux_read_loadmap.
5178 * server.c (handle_query): Support qXfer:fdpic:read packet.
5179 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5180 to NULL.
5181
5182 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5183
5184 * win32-low.c: Include <stdint.h>.
5185
5186 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5187
5188 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5189 to the inferior here.
5190 (i386_remove_aligned_watchpoint): Ditto.
5191 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5192 fit part of the watchpoint in the debug registers.
5193 (i386_update_inferior_debug_regs): New.
5194 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5195 registers, and only update the inferior on success.
5196 (i386_low_remove_watchpoint): Ditto.
5197
5198 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5199
5200 * linux-low.c (compare_ints, unique, list_threads, show_process,
5201 linux_core_of_thread): Delete.
5202 (linux_target_ops): Change linux_core_of_thread to
5203 linux_common_core_of_thread.
5204 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5205 * utils.c (malloc_failure): Change type of argument.
5206 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5207 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5208 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5209 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5210 (IPA_OBJS): Add common-utils-ipa.o.
5211 (ptid_h, linux_osdata_h): New macros.
5212 (server_h): Add common/common-utils.h, common/xml-utils.h,
5213 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5214 common/ptid.h.
5215 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5216 ptid.o, buffer.o): New rules.
5217 (linux-low.o): Add common/linux-osdata.h as a dependency.
5218 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5219 * configure.ac: Add AC_HEADER_DIRENT check.
5220 * config.in: Regenerate.
5221 * configure: Regenerate.
5222 * remote-utils.c (xml_escape_text): Delete.
5223 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5224 buffer_xml_printf): Move to common/buffer.c.
5225 * server.c (main): Remove call to initialize_inferiors.
5226 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5227 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5228 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5229 internal_error, gdb_assert, gdb_assert_fail): Delete.
5230 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5231 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5232 common/buffer.h.
5233 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5234 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5235 initialize_inferiors): Delete.
5236
5237 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5238
5239 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5240 symbol error.
5241
5242 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5243
5244 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5245 assertion.
5246 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5247
5248 2011-05-26 Yao Qi <yao@codesourcery.com>
5249
5250 * Makefile.in (thread-db.o): Track dependence to
5251 common/gdb_thread_db.h.
5252 * thread-db.c: include gdb_thread_db.h from right place.
5253
5254 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5255
5256 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5257 __FILE__ and __LINE__ to internal_error.
5258
5259 2011-05-13 Doug Evans <dje@google.com>
5260
5261 * thread-db.c (try_thread_db_load_from_sdir): New function.
5262 (try_thread_db_load_from_dir): New function.
5263 (thread_db_load_search): Handle $sdir, ignore $pdir.
5264 Remove trying of system directories if search of
5265 libthread-db-search-path fails, that is now done via $sdir.
5266
5267 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5268
5269 * server.c (handle_query): Add EnableDisableTracepoints to the list
5270 of supported features.
5271 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5272 tracepoints.
5273 (cmd_qtenable_disable): New.
5274 (cmd_qtstart): Install tracepoints even if disabled.
5275 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5276 receiving a QTEnable or QTDisable packet.
5277 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5278 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5279 tracepoints.
5280 (gdb_probe): Skip data collection if static tracepoint is disabled.
5281
5282 2011-05-10 Doug Evans <dje@google.com>
5283
5284 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5285
5286 2011-05-04 Doug Evans <dje@google.com>
5287
5288 * linux-low.c (linux_join): Skip process lookup.
5289 * spu-low.c (spu_join): Ditto.
5290 * server.c (join_inferiors_callback): Delete.
5291 (process_serial_event): For 'D' packet (detach) call join_inferior
5292 directly.
5293
5294 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5295
5296 * README: Don't mention xscale*-*-linux*.
5297 * configure.srv (xscale*-*-linux*): Don't handle target.
5298
5299 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5300
5301 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5302 casting pointers.
5303 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5304 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5305 (i386_emit_void_call_2): Likewise.
5306
5307 2011-04-26 Yao Qi <yao@codesourcery.com>
5308
5309 * linux-low.c: Move common macros to linux-ptrace.h.
5310 Include linux-ptrace.h.
5311 * Makefile.in (linux_ptrace_h): New.
5312 (linux-low.o): Depends on linux-ptrace.h.
5313
5314 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5315
5316 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5317 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5318 (remote_prepare): New function with most of the TCP code from ...
5319 (remote_open): ... here. Detect PORT here unconditionally. Move also
5320 setting transport_is_reliable.
5321 * server.c (run_once): New variable.
5322 (gdbserver_usage): Document it.
5323 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5324 the first run if RUN_ONCE.
5325 * server.h (run_once, remote_prepare): New declarations.
5326
5327 2011-04-19 Tom Tromey <tromey@redhat.com>
5328
5329 * win32-low.c (handle_load_dll): Remove duplicate "the".
5330
5331 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5332
5333 Remove support for old Cygwin 1.5 versions.
5334 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5335 function to avoid warning.
5336 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5337 warning.
5338
5339 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5340
5341 * gdbserver/server.h (Macro _): Define it if not available.
5342
5343 2011-03-14 Michael Snyder <msnyder@vmware.com>
5344
5345 * hostio.c (handle_close): Remove unnecessary null test.
5346
5347 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5348
5349 * Makefile.in (maintainer-clean realclean distclean): Remove
5350 "make ... subdir_do" command.
5351
5352 2011-03-10 Michael Snyder <msnyder@vmware.com>
5353
5354 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5355
5356 * server.c (handle_v_run): Free alloced buffer on early return.
5357
5358 2011-03-09 Yao Qi <yao@codesourcery.com>
5359
5360 Revert:
5361 2011-03-04 Yao Qi <yao@codesourcery.com>
5362
5363 * Makefile.in: Remove GNU make feature --directory.
5364
5365 2011-03-05 Yao Qi <yao@codesourcery.com>
5366
5367 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5368 (subdir_do): New make target. Copied from gdb/Makefile.
5369 (maintainer-clean, realclean, distclean, clean): Call corresponding
5370 make targets in common/Makefile.
5371
5372 2011-02-11 Yao Qi <yao@codesourcery.com>
5373
5374 * configure.ac: Call AC_PROG_RANLIB.
5375 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5376 * configure: Regenerate.
5377
5378 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5379
5380 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5381
5382 2011-03-06 Yao Qi <yao@codesourcery.com>
5383
5384 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5385
5386 2011-03-05 Yao Qi <yao@codesourcery.com>
5387
5388 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5389 (subdir_do): New make target. Copied from gdb/Makefile.
5390 (maintainer-clean, realclean, distclean, clean): Call corresponding
5391 make targets in common/Makefile.
5392
5393 2011-03-04 Yao Qi <yao@codesourcery.com>
5394
5395 * Makefile.in: Remove GNU make feature --directory.
5396
5397 2011-03-04 Michael Snyder <msnyder@vmware.com>
5398
5399 * server.c (queue_stop_reply): Call xmalloc not malloc.
5400
5401 2011-03-02 Michael Snyder <msnyder@vmware.com>
5402
5403 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5404
5405 2011-02-28 Michael Snyder <msnyder@vmware.com>
5406
5407 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5408 (cmd_qtframe): Ditto.
5409 (cmd_qtbuffer): Ditto.
5410 (cmd_bigqtbuffer): Ditto.
5411
5412 * utils.c (decimal2str): Initialize 'width' to nine, then
5413 don't mess with it.
5414
5415 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5416
5417 * hostio.c (require_data): Free *data, not data.
5418
5419 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5420
5421 * hostio.c (require_data): Use free, not xfree.
5422
5423 2011-02-27 Michael Snyder <msnyder@vmware.com>
5424
5425 * server.c (handle_query): Discard unused value.
5426
5427 * hostio.c (require_data): Free malloc memory before returning
5428 error.
5429
5430 2011-02-26 Michael Snyder <msnyder@vmware.com>
5431
5432 * linux-low.c (list_threads): Call closedir for dirent.
5433
5434 2011-02-27 Michael Snyder <msnyder@vmware.com>
5435
5436 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5437 a case statement falls through.
5438
5439 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5440
5441 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5442 in comparison.
5443
5444 2011-02-26 Michael Snyder <msnyder@vmware.com>
5445
5446 * utils.c (decimal2str): Eliminate dead code and dead param.
5447 (pulongest): Drop dead param from call to decimal2str.
5448 (plongest): Ditto.
5449
5450 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5451
5452 Revert the following patch (not approved yet):
5453 2011-02-21 Hui Zhu <teawater@gmail.com>
5454 * tracepoint.c (tp_printf): New function.
5455 (eval_agent_expr): Handle gdb_agent_op_printf.
5456
5457 2011-02-21 Hui Zhu <teawater@gmail.com>
5458
5459 * tracepoint.c (tp_printf): New function.
5460 (eval_agent_expr): Handle gdb_agent_op_printf.
5461
5462 2011-02-18 Tom Tromey <tromey@redhat.com>
5463
5464 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5465 (tracepoint.o): Likewise.
5466 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5467 (gdb_agent_op_names): Likewise.
5468
5469 2011-02-18 Tom Tromey <tromey@redhat.com>
5470
5471 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5472 gdb_agent_op_rot>: New constants.
5473 (gdb_agent_op_names): Add pick and roll.
5474 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5475 cases.
5476
5477 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5478
5479 * aclocal.m4: Regenerated with aclocal-1.11.1.
5480
5481 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5482
5483 * server.c (handle_qxfer_traceframe_info): New.
5484 (qxfer_packets): Register "traceframe-info".
5485 (handle_query): Report support for qXfer:traceframe-info:read+.
5486 * tracepoint.c (match_blocktype): New.
5487 (traceframe_find_block_type): Rename to ...
5488 (traceframe_walk_blocks): ... this. Add callback filter argument,
5489 and use it.
5490 (traceframe_find_block_type): New, reimplemented on top of
5491 traceframe_walk_blocks.
5492 (build_traceframe_info_xml): New.
5493 (traceframe_read_info): New.
5494 * server.h (traceframe_read_info): Declare.
5495
5496 2011-02-11 Yao Qi <yao@codesourcery.com>
5497
5498 * configure.ac: Call AC_PROG_RANLIB.
5499 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5500 * configure: Regenerate.
5501
5502 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5503
5504 * server.c (gdb_read_memory): Change return semantics to allow
5505 partial transfers.
5506 (handle_search_memory_1): Adjust.
5507 (process_serial_event) <'m' packet>: Handle partial transfers.
5508 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5509
5510 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5511
5512 * regcache.c (init_register_cache): Initialize
5513 regcache->register_status.
5514 (free_register_cache): Release regcache->register_status.
5515 (regcache_cpy): Copy register_status.
5516 (registers_to_string): Print 'x's for unavailable registers.
5517 (supply_register): Mark the register's status valid or
5518 unavailable, depending on whether a buffer was passed in or not.
5519 (supply_register_zeroed): New.
5520 (supply_regblock): Mark the registers' status valid or
5521 unavailable, depending on whether a buffer was passed in or not.
5522 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5523 (struct regcache): New `register_status' field.
5524 (supply_register_zeroed): Declare.
5525 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5526 supply_register_zeroed, rather than passing a NULL buffer to
5527 supply_register.
5528 * tracepoint.c (fetch_traceframe_registers): Update comment.
5529
5530 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5531
5532 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5533 buffer explicit.
5534
5535 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5536
5537 * server.h (decode_xfer_write): Change prototype.
5538 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5539 and don't extract the annex here.
5540 * server.c (decode_xfer_read): Remove `annex' parameter,
5541 and don't extract the annex here.
5542 (decode_xfer): New.
5543 (struct qxfer): New.
5544 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5545 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5546 (handle_qxfer_statictrace): New functions, abstracted out from
5547 handle_query, and made to use the struct qxfer interface.
5548 (handle_threads_qxfer_proper): Rename to ...
5549 (handle_qxfer_threads_proper): ... this.
5550 (handle_threads_qxfer): Rename to ...
5551 (handle_qxfer_threads): ... this. Adjust.
5552 (qxfer_packets): New array.
5553 (handle_qxfer): New function.
5554 (handle_query): Use handle_qxfer.
5555
5556 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5557
5558 * gdbreplay.c: Shorten lines of >= 80 columns.
5559 * linux-low.c: Ditto.
5560 * linux-ppc-low.c: Ditto.
5561 * linux-s390-low.c: Ditto.
5562 * linux-sparc-low.c: Ditto.
5563 * linux-x86-low.c: Ditto.
5564 * linux-xtensa-low.c: Ditto.
5565 * mem-break.c: Ditto.
5566 * nto-low.c: Ditto.
5567 * regcache.h: Ditto.
5568 * remote-utils.c: Ditto.
5569 * server.c: Ditto.
5570 * server.h: Ditto.
5571 * thread-db.c: Ditto.
5572 * tracepoint.c: Ditto.
5573 * utils.c: Ditto.
5574 * win32-low.h: Ditto.
5575
5576 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5577
5578 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5579 update.
5580
5581 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5582
5583 * server.c (gdbserver_version): Update copyright year in version
5584 output.
5585 * gdbreplay.c (gdbreplay_version): Ditto.
5586
5587 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5588
5589 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5590 * linux-bfin-low.c: New file.
5591 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5592 PT_DATA_ADDR for BFIN targets.
5593 * Makefile.in (SFILES): Add linux-bfin-low.c.
5594 (clean): Remove reg-bfin.c.
5595 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5596 * README: Mention supported Blackfin targets.
5597
5598 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5599
5600 * .gitignore: New file.
5601
5602 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5603
5604 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5605
5606 2010-10-22 Jie Zhang <jie@codesourcery.com>
5607
5608 * Makefile.in: Add FLAGS_TO_PASS variable.
5609 (install): Remove dependency of install-only and recursively
5610 invoke make for install-only.
5611
5612 2010-10-04 Doug Evans <dje@google.com>
5613
5614 * Makefile.in (uninstall): Use $(DESTDIR).
5615
5616 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5617
5618 PR gdb/11842
5619
5620 * linux-x86-low.c (compat_siginfo_from_siginfo)
5621 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5622 si_code is < 0. Check for si_code == SI_TIMER before checking for
5623 si_code < 0.
5624
5625 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5626
5627 * lynx-i386-low.c: New file.
5628 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5629
5630 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5631
5632 * lynx-low.c (ptrace_request_to_str): Remove handling for
5633 request values that have been removed in LynxOS 5.x.
5634
5635 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5636
5637 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5638 <ptrace.h>
5639
5640 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5641
5642 * configure.ac: Add --enable-inprocess-agent option.
5643 * configure: Rebuilt.
5644
5645 2010-09-06 Yao Qi <yao@codesourcery.com>
5646
5647 * linux-low.c (linux_kill): Remove unused variable.
5648 (linux_stabilize_threads): Likewise.
5649 * server.c (start_inferior): Likewise.
5650 (queue_stop_reply_callback): Likewise.
5651 * tracepoint.c (do_action_at_tracepoint): Likewise.
5652
5653 2010-09-06 Yao Qi <yao@codesourcery.com>
5654
5655 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5656 on return.
5657
5658 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5659
5660 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5661
5662 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5663
5664 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5665 "$(IPA_DEPFILES)".
5666
5667 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5668
5669 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5670 gdbserver/lynx-ppc-low.c: New files.
5671 * Makefile.in (lynx_low_h): New variable.
5672 (lynx-low.o, lynx-ppc-low.o): New rules.
5673 * configure.ac: On LynxOS, link with -lnetinet.
5674 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5675 * configure: regenerate.
5676
5677 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5678
5679 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5680 * configure.ac: Add check for vasprintf and vsnprintf.
5681 * configure, config.in: Regenerate.
5682 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5683
5684 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5685
5686 * gdbreplay.c: Move include of alloca.h up, next to include of
5687 malloc.h.
5688 * server.h: Add include of malloc.h.
5689 * mem-break.c: Remove include of malloc.h.
5690 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5691
5692 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5693
5694 * Makefile.in (memmem.o): Build with -Wno-error.
5695
5696 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5697
5698 * utils.c (xsnprintf): Make non-static.
5699 * server.h: Add xsnprintf declaration.
5700 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5701 replace calls to snprintf by calls to xsnprintf throughout.
5702
5703 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5704
5705 * configure.ac: Add configure check for alloca.
5706 * configure, config.in: Regenerate.
5707 * server.h: Include alloca.h if it exists.
5708 * gdbreplay.c: Include alloca.h if it exists.
5709
5710 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5711
5712 * linux-low.c (__SIGRTMIN): Define if not already defined.
5713 (linux_create_inferior): Check for __ANDROID__ rather than
5714 __SIGRTMIN.
5715 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5716 are already deferred.
5717 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5718 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5719 stopped and already has a pending signal to report.
5720 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5721 a pending signal to report or is moving out of a jump pad.
5722 (linux_init_signals): Check for __ANDROID__ rather than
5723 __SIGRTMIN.
5724
5725 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5726
5727 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5728 debug_threads check. Avoid a linear search when not doing debug
5729 output.
5730
5731 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5732
5733 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5734 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5735 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5736 (process_event): Change local fd's type to gdb_fildes_t.
5737 (create_file_handler): Adjust prototype.
5738 (delete_file_handler): Adjust prototype.
5739 (handle_file_event): Adjust prototype. Use pfildes.
5740 (create_file_event): Adjsut prototype.
5741 * remote-utils.c (remote_desc, listen_desc): Change type to
5742 gdb_fildes_t.
5743 * server.h: New gdb_fildes_t typedef.
5744 [USE_WIN32API]: Include winsock2.h.
5745 (delete_file_handler, add_file_handler): Adjust prototypes.
5746 (pfildes): Declare.
5747 * utils.c (pfildes): New.
5748
5749 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5750
5751 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5752 * configure: Regenerate.
5753
5754 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5755
5756 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5757 (linux_done_accessing_memory): ... this.
5758 (linux_target_ops): Adjust.
5759 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5760 * nto-low.c (nto_target_ops): Adjust comment.
5761 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5762 * spu-low.c (spu_target_ops): Adjust comment.
5763 * target.h (target_ops): Rename unprepare_to_access_memory field
5764 to done_accessing_memory.
5765 (unprepare_to_access_memory): Rename to ...
5766 (done_accessing_memory): ... this.
5767
5768 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5769
5770 * linux-low.c (linux_prepare_to_access_memory): New.
5771 (linux_unprepare_to_access_memory): New.
5772 (linux_target_ops): Install them.
5773 * server.c (read_memory): Rename to ...
5774 (gdb_read_memory): ... this. Use
5775 prepare_to_access_memory/prepare_to_access_memory.
5776 (write_memory): Rename to ...
5777 (gdb_write_memory): ... this. Use
5778 prepare_to_access_memory/prepare_to_access_memory.
5779 (handle_search_memory_1): Adjust.
5780 (process_serial_event): Adjust.
5781 * target.h (struct target_ops): New fields
5782 prepare_to_access_memory and unprepare_to_access_memory.
5783 (prepare_to_access_memory, unprepare_to_access_memory): New.
5784 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5785 prepare_to_access_memory/prepare_to_access_memory.
5786 * nto-low.c (nto_target_ops): Adjust.
5787 * spu-low.c (spu_target_ops): Adjust.
5788 * win32-low.c (win32_target_ops): Adjust.
5789
5790 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5791
5792 * Makefile.in (WARN_CFLAGS): Get it from configure.
5793 (WERROR_CFLAGS): New.
5794 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5795 * configure.ac: Introduce --enable-werror, which adds -Werror to
5796 the compiler command line. Enabled by default. Disable with
5797 --disable-werror. Add -Wdeclaration-after-statement
5798 Wpointer-arith and -Wformat-nonliteral to warning flags.
5799 * configure: Regenerate.
5800
5801 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5802
5803 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5804
5805 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5806
5807 * gdbreplay.c (remote_error): New.
5808 (gdbchar): New.
5809 (expect): Use gdbchar. Check for error reading from GDB.
5810 Clarify sync error output.
5811 (play): Check for errors writing to GDB.
5812 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5813 * remote-utils.c (getpkt): Check for errors writing to the remote
5814 descriptor.
5815
5816 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5817
5818 * linux-low.c (linux_wait_1): Move non-debugging code out of
5819 `debug_threads' control.
5820
5821 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5822
5823 * linux-low.c (linux_wait_1): Don't set last_status here.
5824 * server.c (push_event, queue_stop_reply_callback): Assert we're
5825 not pushing a TARGET_WAITKIND_IGNORE event.
5826 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5827 (myresume, handle_target_event): Set the thread's last_resume_kind
5828 and last_status from the target returned status.
5829
5830 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5831
5832 PR threads/10729
5833
5834 * linux-x86-low.c (update_debug_registers_callback): New.
5835 (i386_dr_low_set_addr): Use it.
5836 (i386_dr_low_get_addr): New.
5837 (i386_dr_low_set_control): Use update_debug_registers_callback.
5838 (i386_dr_low_get_control): New.
5839 (i386_dr_low_get_status): Adjust.
5840 * linux-low.c (linux_stop_lwp): New.
5841 * linux-low.h (linux_stop_lwp): Declare.
5842
5843 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5844 argument instead of a i386_debug_reg_state.
5845 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5846 a i386_debug_reg_state.
5847 (i386_insert_aligned_watchpoint): Adjust.
5848 (i386_remove_aligned_watchpoint): Adjust.
5849 (i386_low_stopped_data_address): Read the debug registers from the
5850 inferior instead of from the mirrors.
5851 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5852 (i386_dr_low_get_addr): Declare.
5853 (i386_dr_low_get_control): Declare.
5854 (i386_dr_low_get_status): Change prototype.
5855
5856 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5857 (i386_dr_low_get_addr): New.
5858 (i386_dr_low_get_control): New.
5859 (i386_dr_low_get_status): Adjust prototype. Return
5860 dr_status_mirror.
5861 (i386_initial_stuff): Clear dr_status_mirror and
5862 dr_control_mirror.
5863 (i386_get_thread_context): Adjust.
5864 (i386_set_thread_context): Adjust.
5865 (i386_thread_added): Adjust.
5866
5867 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5868
5869 * linux-low.h (linux_thread_area): Delete declaration.
5870
5871 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5872
5873 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5874 after its termination.
5875
5876 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5877
5878 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5879 (gdb_wants_all_stopped): Delete.
5880 (linux_wait_1): Don't call them.
5881 * server.c (handle_v_cont): Tag all threads as want-stopped.
5882 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5883 stopped as "client-wants-stopped".
5884
5885 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5886
5887 * Makefile.in (signals_h): New.
5888 (server_h): Depend on it.
5889 (server.o): Don't depend on $(signals_def).
5890 (signals.o): Depend on $(signals_def).
5891
5892 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5893
5894 * Makefile.in (signals_def): New.
5895 (server_h): Append include/gdb/signals.h and signals_def.
5896 (server.o): Append signals_def.
5897
5898 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5899
5900 * server.c (handle_target_event): Use target_signal_to_host for
5901 resume_info.sig initialization.
5902 * target.h (struct thread_resume) <sig>: New comment.
5903
5904 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5905
5906 * server.c (handle_query): strcpy() the returned string from paddress()
5907 instead of sprintf().
5908 * utils.c (paddress): Return phex_nz().
5909
5910 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5911
5912 * server.c (handle_v_cont): Call mourn_inferior if process
5913 just exited.
5914 (myresume): Likewise.
5915
5916 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5917
5918 Static tracepoints, and integration with UST.
5919
5920 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5921 * mem-break.c (uninsert_all_breakpoints)
5922 (reinsert_all_breakpoints): New.
5923 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5924 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5925 (gdb_agent_ust_loaded, helper_thread_id)
5926 (gdb_agent_helper_thread_id): New macros.
5927 (struct ipa_sym_addresses): Add addr_ust_loaded,
5928 addr_helper_thread_id, addr_cmd_buf.
5929 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5930 (in_process_agent_loaded_ust): New.
5931 (write_e_ust_not_loaded): New.
5932 (maybe_write_ipa_ust_not_loaded): New.
5933 (struct collect_static_trace_data_action): New.
5934 (enum tracepoint_type) <static_tracepoint>: New.
5935 (struct tracepoint) <handle>: Mention static tracepoints.
5936 (struct static_tracepoint_ctx): New.
5937 (CMD_BUF_SIZE): New.
5938 (add_tracepoint_action): Handle static tracepoint actions.
5939 (unprobe_marker_at): New.
5940 (clear_installed_tracepoints): Handle static tracepoints.
5941 (cmd_qtdp): Handle static tracepoints.
5942 (probe_marker_at): New.
5943 (cmd_qtstart): Handle static tracepoints.
5944 (response_tracepoint): Handle static tracepoints.
5945 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5946 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5947 (get_context_regcache): Handle static tracepoints.
5948 (do_action_at_tracepoint): Handle static tracepoint actions.
5949 (traceframe_find_block_type): Handle static trace data blocks.
5950 (traceframe_read_sdata): New.
5951 (download_tracepoints): Download static tracepoint actions.
5952 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5953 (GDB_PROBE_NAME): New.
5954 (ust_ops): New.
5955 (GET_UST_SYM): New.
5956 (USTF): New.
5957 (dlsym_ust): New.
5958 (ust_marker_to_static_tracepoint): New.
5959 (gdb_probe): New.
5960 (collect_ust_data_at_tracepoint): New.
5961 (gdb_ust_probe): New.
5962 (UNIX_PATH_MAX, SOCK_DIR): New.
5963 (gdb_ust_connect_sync_socket): New.
5964 (resume_thread, stop_thread): New.
5965 (run_inferior_command): New.
5966 (init_named_socket): New.
5967 (gdb_ust_socket_init): New.
5968 (cstr_to_hexstr): New.
5969 (next_st): New.
5970 (first_marker, next_marker): New.
5971 (response_ust_marker): New.
5972 (cmd_qtfstm, cmd_qtsstm): New.
5973 (unprobe_marker_at, probe_marker_at): New.
5974 (cmd_qtstmat, gdb_ust_thread): New.
5975 (gdb_ust_init): New.
5976 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5977 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5978 (ST_REGENTRY): New.
5979 (x86_64_st_collect_regmap): New.
5980 (X86_64_NUM_ST_COLLECT_GREGS): New.
5981 (AMD64_RIP_REGNUM): New.
5982 (supply_static_tracepoint_registers): New.
5983 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5984 (ST_REGENTRY): New.
5985 (i386_st_collect_regmap): New.
5986 (i386_NUM_ST_COLLECT_GREGS): New.
5987 (supply_static_tracepoint_registers): New.
5988 * server.c (handle_query): Handle qXfer:statictrace:read.
5989 <qSupported>: Report support for StaticTracepoints, and
5990 qXfer:statictrace:read features.
5991 * server.h (traceframe_read_sdata)
5992 (supply_static_tracepoint_registers): Declare.
5993 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5994 (unpack_varlen_hex): Include in IPA build.
5995 * Makefile.in (ustlibs, ustinc): New.
5996 (IPA_OBJS): Add remote-utils-ipa.o.
5997 ($(IPA_LIB)): Link -ldl and -lpthread.
5998 (UST_CFLAGS): New.
5999 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6000 * config.in, configure: Regenerate.
6001
6002 2010-06-20 Ian Lance Taylor <iant@google.com>
6003 Pedro Alves <pedro@codesourcery.com>
6004
6005 * linux-x86-low.c (always_true): Delete.
6006 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6007 trying to fool the compiler with always_true.
6008
6009 2010-06-20 Pedro Alves <pedro@codesourcery.com>
6010
6011 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6012 conditions in gdbserver.
6013
6014 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6015
6016 * spu-low.c (spu_read_memory): Wrap around local store limit.
6017 (spu_write_memory): Likewise.
6018
6019 2010-06-15 Pedro Alves <pedro@codesourcery.com>
6020
6021 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6022 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6023 LONGEST uses.
6024 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6025 uses.
6026 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6027 uses with LONGEST uses.
6028
6029 2010-06-14 Stan Shebs <stan@codesourcery.com>
6030 Pedro Alves <pedro@codesourcery.com>
6031
6032 Bytecode compiler.
6033
6034 * linux-x86-low.c: Include limits.h.
6035 (add_insns): New.
6036 (always_true): New.
6037 (EMIT_ASM): New.
6038 (EMIT_ASM32): New.
6039 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6040 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6041 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6042 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6043 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6044 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6045 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6046 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6047 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6048 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6049 (amd64_emit_void_call_2): New.
6050 (amd64_emit_ops): New.
6051 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6052 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6053 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6054 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6055 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6056 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6057 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6058 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6059 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6060 (i386_emit_stack_adjust, i386_emit_int_call_1)
6061 (i386_emit_void_call_2): New.
6062 (i386_emit_ops): New.
6063 (x86_emit_ops): New.
6064 (the_low_target): Install x86_emit_ops.
6065 * server.h (struct emit_ops): New.
6066 (get_raw_reg_func_addr): Declare.
6067 (current_insn_ptr, emit_error): Declare.
6068 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6069 (set_trace_state_variable_value): New defines.
6070 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6071 addr_get_trace_state_variable_value and
6072 addr_set_trace_state_variable_value.
6073 (symbol_list): New fields for get_raw_reg,
6074 get_trace_state_variable_value and set_trace_state_variable_value.
6075 (condfn): New typedef.
6076 (struct tracepoint): New field `compiled_cond'.
6077 (do_action_at_tracepoint): Clear compiled_cond.
6078 (get_trace_state_variable_value, set_trace_state_variable_value):
6079 Export in the IPA.
6080 (condition_true_at_tracepoint): If there's a compiled condition,
6081 run that.
6082 (current_insn_ptr, emit_error): New globals.
6083 (struct bytecode_address): New.
6084 (get_raw_reg_func_addr): New.
6085 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6086 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6087 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6088 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6089 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6090 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6091 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6092 (compile_tracepoint_condition, compile_bytecodes): New.
6093 * target.h (emit_ops): Forward declare.
6094 (struct target_ops): New field emit_ops.
6095 (target_emit_ops): New.
6096 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6097 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6098 * linux-low.c (linux_emit_ops): New.
6099 (linux_target_ops): Install it.
6100 * linux-low.h (struct linux_target_ops): New field emit_ops.
6101
6102 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6103
6104 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6105 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6106
6107 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6108 Stan Shebs <stan@codesourcery.com>
6109
6110 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6111 (all): Depend on $(extra_libraries).
6112 (install-only): Install the IPA.
6113 (IPA_OBJS, IPA_LIB): New.
6114 (clean): Remove the IPA lib.
6115 (IPAGENT_CFLAGS): New.
6116 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6117 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6118 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6119 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6120 * configure.ac: Check for atomic builtins support in the compiler.
6121 (IPA_DEPFILES, extra_libraries): Define.
6122 * configure.srv (ipa_obj): Add description.
6123 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6124 (i[34567]86-*-linux*): Set ipa_obj.
6125 (x86_64-*-linux*): Set ipa_obj.
6126 * linux-low.c (stabilizing_threads): New.
6127 (supports_fast_tracepoints): New.
6128 (linux_detach): Stabilize threads before detaching.
6129 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6130 the lwp is either not stabilizing, or is moving out of a jump pad.
6131 (linux_fast_tracepoint_collecting): New.
6132 (maybe_move_out_of_jump_pad): New.
6133 (enqueue_one_deferred_signal): New.
6134 (dequeue_one_deferred_signal): New.
6135 (linux_wait_for_event_1): If moving out of a jump pad, defer
6136 pending signals to later.
6137 (linux_stabilize_threads): New.
6138 (linux_wait_1): Check if threads need moving out of jump pads, and
6139 do it if so.
6140 (stuck_in_jump_pad_callback): New.
6141 (move_out_of_jump_pad_callback): New.
6142 (lwp_running): New.
6143 (linux_resume_one_lwp): Handle moving out of jump pads.
6144 (linux_set_resume_request): Dequeue deferred signals.
6145 (need_step_over_p): Also step over fast tracepoint jumps.
6146 (start_step_over): Also uninsert fast tracepoint jumps.
6147 (finish_step_over): Also reinsert fast tracepoint jumps.
6148 (linux_install_fast_tracepoint_jump): New.
6149 (linux_target_ops): Install linux_stabilize_threads and
6150 linux_install_fast_tracepoint_jump_pad.
6151 * linux-low.h (linux_target_ops) <get_thread_area,
6152 install_fast_tracepoint_jump_pad>: New fields.
6153 (struct lwp_info) <collecting_fast_tracepoint,
6154 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6155 (linux_get_thread_area): Declare.
6156 * linux-x86-low.c (jump_insn): New.
6157 (x86_get_thread_area): New.
6158 (append_insns): New.
6159 (push_opcode): New.
6160 (amd64_install_fast_tracepoint_jump_pad): New.
6161 (i386_install_fast_tracepoint_jump_pad): New.
6162 (x86_install_fast_tracepoint_jump_pad): New.
6163 (the_low_target): Install x86_get_thread_area and
6164 x86_install_fast_tracepoint_jump_pad.
6165 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6166 (struct fast_tracepoint_jump): New.
6167 (fast_tracepoint_jump_insn): New.
6168 (fast_tracepoint_jump_shadow): New.
6169 (find_fast_tracepoint_jump_at): New.
6170 (fast_tracepoint_jump_here): New.
6171 (delete_fast_tracepoint_jump): New.
6172 (set_fast_tracepoint_jump): New.
6173 (uninsert_fast_tracepoint_jumps_at): New.
6174 (reinsert_fast_tracepoint_jumps_at): New.
6175 (set_breakpoint_at): Use write_inferior_memory.
6176 (uninsert_raw_breakpoint): Use write_inferior_memory.
6177 (check_mem_read): Mask out fast tracepoint jumps.
6178 (check_mem_write): Mask out fast tracepoint jumps.
6179 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6180 (set_fast_tracepoint_jump): Declare.
6181 (delete_fast_tracepoint_jump)
6182 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6183 (reinsert_fast_tracepoint_jumps_at): Declare.
6184 * regcache.c: Don't compile many functions when building the
6185 in-process agent library.
6186 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6187 the register buffer in the heap.
6188 (free_register_cache): If the register buffer isn't owned by the
6189 regcache, don't free it.
6190 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6191 pre-existing register caches.
6192 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6193 type.
6194 (convert_ascii_to_int): : Constify `from' parameter type.
6195 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6196 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6197 the needed buffer in-place.
6198 (relocate_instruction): New.
6199 * server.c (handle_query) <qSymbols>: If the target supports
6200 tracepoints, give it a chance of looking up symbols. Report
6201 support for fast tracepoints.
6202 (handle_status): Stabilize threads.
6203 (process_serial_event): Adjust.
6204 * server.h (struct fast_tracepoint_jump): Forward declare.
6205 (struct process_info) <fast_tracepoint_jumps>: New field.
6206 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6207 (decode_X_packet, decode_M_packet): Adjust.
6208 (relocate_instruction): Declare.
6209 (in_process_agent_loaded): Declare.
6210 (tracepoint_look_up_symbols): Declare.
6211 (struct fast_tpoint_collect_status): Declare.
6212 (fast_tracepoint_collecting): Declare.
6213 (force_unlock_trace_buffer): Declare.
6214 (handle_tracepoint_bkpts): Declare.
6215 (initialize_low_tracepoint)
6216 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6217 * target.h (struct target_ops) <stabilize_threads,
6218 install_fast_tracepoint_jump_pad>: New fields.
6219 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6220 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6221 [HAVE_STDINT_H]: Include stdint.h.
6222 (trace_debug_1): Rename to ...
6223 (trace_vdebug): ... this.
6224 (trace_debug): Rename to ...
6225 (trace_debug_1): ... this. Add `level' parameter.
6226 (trace_debug): New.
6227 (ATTR_USED, ATTR_NOINLINE): New.
6228 (IP_AGENT_EXPORT): New.
6229 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6230 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6231 (about_to_request_buffer_space, trace_buffer_is_full)
6232 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6233 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6234 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6235 (traceframe_write_count, traceframes_created)
6236 (trace_state_variables)
6237 New renaming defines.
6238 (struct ipa_sym_addresses): New.
6239 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6240 (symbol_list): New.
6241 (ipa_sym_addrs): New.
6242 (all_tracepoint_symbols_looked_up): New.
6243 (in_process_agent_loaded): New.
6244 (write_e_ipa_not_loaded): New.
6245 (maybe_write_ipa_not_loaded): New.
6246 (tracepoint_look_up_symbols): New.
6247 (debug_threads) [IN_PROCESS_AGENT]: New.
6248 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6249 (UNKNOWN_SIDE_EFFECTS): New.
6250 (stop_tracing): New.
6251 (flush_trace_buffer): New.
6252 (stop_tracing_bkpt): New.
6253 (flush_trace_buffer_bkpt): New.
6254 (read_inferior_integer): New.
6255 (read_inferior_uinteger): New.
6256 (read_inferior_data_pointer): New.
6257 (write_inferior_data_pointer): New.
6258 (write_inferior_integer): New.
6259 (write_inferior_uinteger): New.
6260 (struct collect_static_trace_data_action): Delete.
6261 (enum tracepoint_type): New.
6262 (struct tracepoint) <type>: New field `type'.
6263 <actions_str, step_actions, step_actions_str>: Only include in
6264 GDBserver.
6265 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6266 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6267 (tracepoints): Use IP_AGENT_EXPORT.
6268 (last_tracepoint): Don't include in the IPA.
6269 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6270 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6271 (alloced_trace_state_variables): New.
6272 (trace_state_variables): Use IP_AGENT_EXPORT.
6273 (traceframe_t): Delete unused variable.
6274 (circular_trace_buffer): Don't include in the IPA.
6275 (trace_buffer_start): Delete.
6276 (struct trace_buffer_control): New.
6277 (trace_buffer_free): Delete.
6278 (struct ipa_trace_buffer_control): New.
6279 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6280 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6281 New.
6282 (trace_buffer_ctrl): New.
6283 (TRACE_BUFFER_CTRL_CURR): New.
6284 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6285 Reimplement as macros.
6286 (trace_buffer_wrap): Delete.
6287 (traceframe_write_count, traceframe_read_count)
6288 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6289 (struct tracepoint_hit_ctx) <type>: New field.
6290 (struct fast_tracepoint_ctx): New.
6291 (memory_barrier): New.
6292 (cmpxchg): New.
6293 (record_tracepoint_error): Update atomically in the IPA.
6294 (clear_inferior_trace_buffer): New.
6295 (about_to_request_buffer_space): New.
6296 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6297 updating the same buffer.
6298 (add_tracepoint): Default the tracepoint's type to trap
6299 tracepoint, and orig_size to -1.
6300 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6301 internal variables.
6302 (create_trace_state_variable): New parameter `gdb'. Handle it.
6303 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6304 (cmd_qtdp): Handle fast tracepoints.
6305 (cmd_qtdv): Adjust.
6306 (max_jump_pad_size): New.
6307 (gdb_jump_pad_head): New.
6308 (get_jump_space_head): New.
6309 (claim_jump_space): New.
6310 (sort_tracepoints): New.
6311 (MAX_JUMP_SIZE): New.
6312 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6313 IPA.
6314 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6315 support. Upload fast traceframes, and delete internal IPA
6316 breakpoints.
6317 (stop_tracing_handler): New.
6318 (flush_trace_buffer_handler): New.
6319 (cmd_qtstop): Upload fast tracepoints.
6320 (response_tracepoint): Handle fast tracepoints.
6321 (tracepoint_finished_step): Upload fast traceframes. Set the
6322 tracepoint hit context's tracepoint type.
6323 (handle_tracepoint_bkpts): New.
6324 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6325 type. Add comment about fast tracepoints.
6326 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6327 non-existing action_str field.
6328 (get_context_regcache): Handle fast tracepoints.
6329 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6330 to the regcache.
6331 (fast_tracepoint_from_jump_pad_address): New.
6332 (fast_tracepoint_from_ipa_tpoint_address): New.
6333 (collecting_t): New.
6334 (force_unlock_trace_buffer): New.
6335 (fast_tracepoint_collecting): New.
6336 (collecting): New.
6337 (gdb_collect): New.
6338 (write_inferior_data_ptr): New.
6339 (target_tp_heap): New.
6340 (target_malloc): New.
6341 (download_agent_expr): New.
6342 (UALIGN): New.
6343 (download_tracepoints): New.
6344 (download_trace_state_variables): New.
6345 (upload_fast_traceframes): New.
6346 (IPA_FIRST_TRACEFRAME): New.
6347 (IPA_NEXT_TRACEFRAME_1): New.
6348 (IPA_NEXT_TRACEFRAME): New.
6349 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6350 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6351 (gdb_jump_pad_buffer_end): New.
6352 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6353 (initialize_tracepoint): Adjust.
6354 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6355 buffer. Initialize the low module.
6356 * utils.c (PREFIX, TOOLNAME): New.
6357 (malloc_failure): Use PREFIX.
6358 (error): In the IPA, an error causes an exit.
6359 (fatal, warning): Use PREFIX.
6360 (internal_error): Use TOOLNAME.
6361 (NUMCELLS): Increase to 10.
6362 * configure, config.in: Regenerate.
6363
6364 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6365
6366 * server.c (handle_query) <qSupported>: Do two passes over the
6367 qSupported string to avoid nesting strtok.
6368
6369 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6370
6371 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6372 (CDEPS): New.
6373 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6374 -Wl,--dynamic-list.
6375 * configure: Regenerate.
6376 * proc-service.list: New.
6377
6378 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6379
6380 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6381 New comment.
6382
6383 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6384
6385 * gdbreplay.c (remote_open): Check error return from socket() call by
6386 its equality to -1 not by it being negative.
6387 * remote-utils.c (remote_open): Likewise.
6388
6389 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6390
6391 * config.h: Regenerate.
6392
6393 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6394
6395 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6396 doesn't provide PTRACE_GET_THREAD_AREA.
6397
6398 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6399
6400 * linux-m68k-low.c: Include <asm/ptrace.h>
6401 (ps_get_thread_area): Implement.
6402
6403 2010-05-03 Doug Evans <dje@google.com>
6404
6405 * event-loop.c (struct callback_event): New struct.
6406 (callback_list): New global.
6407 (append_callback_event, delete_callback_event): New functions.
6408 (process_callback): New function.
6409 (start_event_loop): Call it.
6410 * remote-utils.c (NOT_SCHEDULED): Define.
6411 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6412 moved out of readchar.
6413 (readchar): Rewrite. Call reschedule before returning.
6414 (reset_readchar): New function.
6415 (remote_close): Call it.
6416 (process_remaining, reschedule): New functions.
6417 * server.h (callback_handler_func): New typedef.
6418 (append_callback_event, delete_callback_event): Declare.
6419
6420 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6421
6422 * proc-service.c (ps_pglobal_lookup): Use
6423 thread_db_look_up_one_symbol.
6424 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6425 parameter. Use it instead of all_symbols_looked_up.
6426 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6427 field.
6428 (all_symbols_looked_up): Don't declare.
6429 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6430 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6431 field.
6432 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6433 Set all_symbols_looked_up here.
6434 (thread_db_look_up_one_symbol): New.
6435 (thread_db_get_tls_address): Adjust.
6436 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6437 thread_db object on the heap, and tentatively set it in the
6438 process structure.
6439 (thread_db_init): Don't set all_symbols_looked_up here.
6440 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6441
6442 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6443
6444 * linux-low.c (linux_kill, linux_detach): Adjust.
6445 (status_pending_p_callback): Remove redundant statement. Check
6446 for !TARGET_WAITIKIND_IGNORE, instead of
6447 TARGET_WAITKIND_STOPPED.
6448 (handle_tracepoints): Make sure LWP is locked. Adjust.
6449 (linux_wait_for_event_1): Adjust.
6450 (linux_cancel_breakpoints): New.
6451 (unsuspend_one_lwp): New.
6452 (unsuspend_all_lwps): New.
6453 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6454 (send_sigstop_callback): Change return type to int, add new
6455 `except' parameter and handle it.
6456 (suspend_and_send_sigstop_callback): New.
6457 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6458 pass them down. If SUSPEND, also increment the lwp's suspend
6459 count.
6460 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6461 (need_step_over_p): Don't consider suspended LWPs.
6462 (start_step_over): Adjust.
6463 (proceed_one_lwp): Change return type to int, add new `except'
6464 parameter and handle it.
6465 (unsuspend_and_proceed_one_lwp): New.
6466 (proceed_all_lwps): Use find_inferior instead of
6467 for_each_inferior.
6468 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6469 also decrement the suspend count of LWPs. Pass `except' down,
6470 instead of hacking its suspend count.
6471 (linux_pause_all): Add `freeze' parameter. Adjust.
6472 (linux_unpause_all): New.
6473 (linux_target_ops): Install linux_unpause_all.
6474 * server.c (handle_status): Adjust.
6475 * target.h (struct target_ops): New fields `unpause_all' and
6476 `cancel_breakpoints'. Add new parameter to `pause_all'.
6477 (pause_all): Add new `freeze' parameter.
6478 (unpause_all): New.
6479 (cancel_breakpoints): New.
6480 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6481 cancel breakpoints.
6482 (cmd_qtstart): Pause threads.
6483 (stop_tracing): Pause threads, and cancel breakpoints.
6484 * win32-low.c (win32_target_ops): Adjust.
6485
6486 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6487
6488 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6489 the inferior right away from here...
6490 (linux_wait_1): ... to here, and adjust to check the thread's
6491 last_resume_kind instead of the lwp's step or stop_expected flags.
6492
6493 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6494
6495 * README: Use consistent `GDB' and `GDBserver' spellings.
6496
6497 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6498
6499 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6500 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6501 (linux_detach_one_lwp): Assume the lwp is stopped.
6502 (any_thread_of): Delete.
6503 (linux_detach): Stop all lwps here. Don't blindly delete all
6504 breakpoints.
6505 (delete_lwp_callback): New.
6506 (linux_mourn): Delete all lwps of the process that is gone.
6507 (linux_wait_1): Don't delete the last lwp of the process here.
6508 * mem-break.h (mark_breakpoints_out): Declare.
6509 * mem-break.c (mark_breakpoints_out): New.
6510 (free_all_breakpoints): Use it.
6511 * server.c (handle_target_event): If the process is gone, mark
6512 breakpoints out.
6513 * thread-db.c (struct thread_db) <create_bp>: New field.
6514 (thread_db_enable_reporting): Fix prototype. Store a thread event
6515 breakpoint reference in the thread_db struct.
6516 (thread_db_load_search): Clear the thread_db object.
6517 (try_thread_db_load_1): Ditto.
6518 (switch_to_process): New.
6519 (disable_thread_event_reporting): Use it.
6520 (remove_thread_event_breakpoints): New.
6521 (thread_db_detach, thread_db_mourn): Use it.
6522
6523 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6524
6525 * linux-low.c (linux_enable_event_reporting): New.
6526 (linux_wait_for_event_1, handle_extended_wait): Use it.
6527
6528 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6529
6530 * linux-low.c (linux_kill_one_lwp, linux_kill)
6531 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6532 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6533 SIGSTOP even if the LWP is stopped.
6534 (send_sigstop_callback): New.
6535 (stop_all_lwps): Use send_sigstop_callback instead.
6536 (linux_resume_one_thread): Adjust.
6537 (proceed_one_lwp): Still proceed an LWP that the client has
6538 requested to stop, if we haven't reported it as stopped yet. Make
6539 sure that LWPs the client want stopped, have a pending SIGSTOP.
6540
6541 2010-04-26 Doug Evans <dje@google.com>
6542
6543 * server.c (handle_general_set): Make static.
6544
6545 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6546 Print received char after testing for error/eof instead of before.
6547 (input_interrupt): Tweak comment.
6548
6549 2010-04-23 Doug Evans <dje@google.com>
6550
6551 * server.c (start_inferior): Print inferior argv if --debug.
6552
6553 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6554
6555 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6556 * nto-x86-low.c: Include server.h
6557
6558 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6559
6560 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6561 be consistent with other sources of this directory.
6562 (init_registers_amd64): Correct name of source file of this function
6563 in the comment.
6564
6565 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6566
6567 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6568 64-bit executables.
6569
6570 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6571
6572 * win32-i386-low.c: Add 64-bit support.
6573 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6574 (init_registers_amd64): Declare.
6575 (mappings): Add 64-bit version of array.
6576 (init_windows_x86): New function.
6577 (the_low_target): Change init_arch field to init_windows_x86.
6578
6579 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6580
6581 * win32-low.c: Adapt to support also 64-bit architecture.
6582 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6583 (get_image_name): Use SIZE_T type for local variable `done'.
6584 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6585 (toolhelp_get_dll_name): Idem.
6586 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6587 Use uintptr_t typecast to avoid warning.
6588 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6589 (handle_exception): Use phex_nz to avoid warning.
6590 (win32_wait): Remove unused local variable `process'.
6591
6592 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6593
6594 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6595 `amd64-avx.o'.
6596
6597 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6598
6599 * configure.ac: Use `ws2_32' library for srv_mingw.
6600 * configure: Regenerate.
6601 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6602 * remote-utils.c: Likewise.
6603
6604 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6605
6606 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6607 if __x86_64__ is defined.
6608
6609 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6610
6611 * configure: Regenerate.
6612
6613 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6614
6615 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6616 * target.h (target_ops): New get_tib_address field.
6617 * win32-low.h (win32_thread_info): Add thread_local_base field.
6618 * win32-low.c (child_add_thread): Add tlb argument.
6619 Set thread_local_base field to TLB.
6620 (get_child_debug_event): Adapt to child_add_thread change.
6621 (win32_get_tib_address): New function.
6622 (win32_target_ops): Set get_tib_address field to
6623 win32_get_tib_address.
6624 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6625
6626 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6627
6628 * linux-low.c (linux_mourn): Also remove the process.
6629 * server.c (handle_target_event): Don't remove the process here.
6630 * nto-low.c (nto_mourn): New.
6631 (nto_target_ops): Install it.
6632 * spu-low.c (spu_mourn): New.
6633 (spu_target_ops): Install it.
6634 * win32-low.c (win32_mourn): New.
6635 (win32_target_ops): Install it.
6636
6637 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6638
6639 * server.h (buffer_xml_printf): Remove redundant `;'.
6640
6641 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6642
6643 * regcache.c (set_register_cache): Invalidate regcaches before
6644 changing the register cache layout.
6645 (regcache_invalidate_one): Allow a NULL regcache.
6646 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6647 regcaches before changing the register cache layout or the target
6648 regsets.
6649
6650 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6651
6652 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6653 variable warning on Linux/x86-64.
6654
6655 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6656
6657 GDBserver disconnected tracing support.
6658
6659 * linux-low.c (linux_remove_process): Delete.
6660 (add_lwp): Don't set last_resume_kind here.
6661 (linux_kill): Use `mourn'.
6662 (linux_detach): Use `thread_db_detach', and `mourn'.
6663 (linux_mourn): New.
6664 (linux_attach_lwp_1): Adjust comment.
6665 (linux_attach): last_resume_kind moved the thread_info; adjust.
6666 (status_pending_p_callback): Adjust.
6667 (linux_wait_for_event_1): Adjust.
6668 (count_events_callback, select_singlestep_lwp_callback)
6669 (select_event_lwp_callback, cancel_breakpoints_callback)
6670 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6671 (proceed_one_lwp): Adjust.
6672 (linux_async): Add debug output.
6673 (linux_thread_stopped): New.
6674 (linux_pause_all): New.
6675 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6676 linux_pause_all.
6677 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6678 (thread_db_free): Delete declaration.
6679 (thread_db_detach, thread_db_mourn): Declare.
6680 * thread-db.c (thread_db_init): Use thread_db_mourn.
6681 (thread_db_free): Delete, split in two.
6682 (disable_thread_event_reporting): New.
6683 (thread_db_detach): New.
6684 (thread_db_mourn): New.
6685
6686 * server.h (struct thread_info) <last_resume_kind>: New field.
6687 <attached>: Add comment.
6688 <gdb_detached>: New field.
6689 (handler_func): Change return type to int.
6690 (handle_serial_event, handle_target_event): Ditto.
6691 (gdb_connected): Declare.
6692 (tracing): Delete.
6693 (disconnected_tracing): Declare.
6694 (stop_tracing): Declare.
6695
6696 * server.c (handle_query) <qSupported>: Report support for
6697 disconnected tracing.
6698 (queue_stop_reply_callback): Account for running threads.
6699 (gdb_wants_thread_stopped): New.
6700 (gdb_wants_all_threads_stopped): New.
6701 (gdb_reattached_process): New.
6702 (handle_status): Clear the `gdb_detached' flag of all processes.
6703 In all-stop, stop all threads.
6704 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6705 (process_serial_event): If the remote connection breaks, or if an
6706 exit was forced with "monitor exit", force an event loop exit.
6707 Handle disconnected tracing on detach.
6708 (handle_serial_event): Adjust.
6709 (handle_target_event): If GDB isn't connected, forward events back
6710 to the inferior, unless the last process exited, in which case,
6711 exit gdbserver. Adjust interface.
6712
6713 * remote-utils.c (remote_open): Don't block in accept. Instead
6714 register an event loop source on the listen socket file
6715 descriptor. Refactor bits into ...
6716 (listen_desc): ... this new global.
6717 (gdb_connected): ... this new function.
6718 (enable_async_notification): ... this new function.
6719 (handle_accept_event): ... this new function.
6720 (remote_close): Clear remote_desc.
6721
6722 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6723
6724 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6725 New fields.
6726 (mourn_inferior): Define.
6727 (target_process_qsupported): Avoid the dangling else problem.
6728 (thread_stopped): Define.
6729 (pause_all): Define.
6730 (target_waitstatus_to_string): Declare.
6731 * target.c (target_waitstatus_to_string): New.
6732
6733 * tracepoint.c (tracing): Make extern.
6734 (disconnected_tracing): New.
6735 (stop_tracing): Make extern. Handle tracing stops due to GDB
6736 disconnecting.
6737 (cmd_qtdisconnected): New.
6738 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6739 (handle_tracepoint_general_set): Handle QTDisconnected.
6740
6741 * event-loop.c (event_handler_func): Change return type to int.
6742 (process_event): Bail out if the event handler wants the event
6743 loop to stop.
6744 (handle_file_event): Ditto.
6745 (start_event_loop): Bail out if the event handler wants the event
6746 loop to stop.
6747
6748 * nto-low.c (nto_target_ops): Adjust.
6749 * spu-low.c (spu_wait): Don't remove the process here.
6750 (spu_target_ops): Adjust.
6751 * win32-low.c (win32_wait): Don't remove the process here.
6752 (win32_target_ops): Adjust.
6753
6754 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6755
6756 * regcache.c (realloc_register_cache): Invalidate inferior's
6757 regcache before recreating it.
6758
6759 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6760
6761 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6762
6763 2010-04-09 Stan Shebs <stan@codesourcery.com>
6764 Pedro Alves <pedro@codesourcery.com>
6765
6766 * server.h (LONGEST): New.
6767 (struct thread_info) <while_stepping>: New field.
6768 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6769 Declare.
6770 (initialize_tracepoint, handle_tracepoint_general_set)
6771 (handle_tracepoint_query, tracepoint_finished_step)
6772 (tracepoint_was_hit, release_while_stepping_state_list):
6773 (current_traceframe): Declare.
6774 * server.c (handle_general_set): Handle tracepoint packets.
6775 (read_memory): New.
6776 (write_memory): New.
6777 (handle_search_memory_1): Use read_memory.
6778 (handle_query): Report support for conditional tracepoints, trace
6779 state variables, and tracepoint sources. Handle tracepoint
6780 queries.
6781 (main): Initialize the tracepoints module.
6782 (process_serial_event): Handle traceframe reads/writes.
6783
6784 * linux-low.c (handle_tracepoints): New.
6785 (linux_wait_1): Call it.
6786 (linux_resume_one_lwp): Handle while-stepping.
6787 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6788 (linux_target_ops): Install them.
6789 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6790 New field.
6791 * linux-x86-low.c (x86_supports_tracepoints): New.
6792 (the_low_target). Install it.
6793
6794 * mem-break.h (delete_breakpoint): Declare.
6795 * mem-break.c (delete_breakpoint): Make external.
6796
6797 * target.h (struct target_ops): Add `supports_tracepoints',
6798 `read_pc', and `write_pc' fields.
6799 (target_supports_tracepoints): Define.
6800 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6801 (phex_nz): New.
6802
6803 * regcache.h (struct regcache) <registers_owned>: New field.
6804 (init_register_cache, regcache_cpy): Declare.
6805 (regcache_read_pc, regcache_write_pc): Declare.
6806 (register_cache_size): Declare.
6807 (supply_regblock): Declare.
6808 * regcache.c (init_register_cache): New.
6809 (new_register_cache): Use it.
6810 (regcache_cpy): New.
6811 (register_cache_size): New.
6812 (supply_regblock): New.
6813 (regcache_read_pc, regcache_write_pc): New.
6814
6815 * tracepoint.c: New.
6816
6817 * Makefile.in (OBS): Add tracepoint.o.
6818 (tracepoint.o): New rule.
6819
6820 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6821
6822 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6823 (i386-mmx.o): New.
6824 (i386-mmx.c): Likewise.
6825 (i386-mmx-linux.o): Likewise.
6826 (i386-mmx-linux.c): Likewise.
6827
6828 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6829 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6830 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6831 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6832
6833 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6834 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6835 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6836
6837 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6838
6839 * Makefile.in (clean): Updated.
6840 (i386-avx.o): New.
6841 (i386-avx.c): Likewise.
6842 (i386-avx-linux.o): Likewise.
6843 (i386-avx-linux.c): Likewise.
6844 (amd64-avx.o): Likewise.
6845 (amd64-avx.c): Likewise.
6846 (amd64-avx-linux.o): Likewise.
6847 (amd64-avx-linux.c): Likewise.
6848
6849 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6850 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6851 (srv_amd64_regobj): Add amd64-avx.o.
6852 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6853 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6854 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6855 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6856 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6857 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6858 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6859
6860 * i387-fp.c: Include "i386-xstate.h".
6861 (i387_xsave): New.
6862 (i387_cache_to_xsave): Likewise.
6863 (i387_xsave_to_cache): Likewise.
6864 (x86_xcr0): Likewise.
6865
6866 * i387-fp.h (i387_cache_to_xsave): Likewise.
6867 (i387_xsave_to_cache): Likewise.
6868 (x86_xcr0): Likewise.
6869
6870 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6871 * linux-crisv32-low.c (target_regsets): Likewise.
6872 * linux-m68k-low.c (target_regsets): Likewise.
6873 * linux-mips-low.c (target_regsets): Likewise.
6874 * linux-ppc-low.c (target_regsets): Likewise.
6875 * linux-s390-low.c (target_regsets): Likewise.
6876 * linux-sh-low.c (target_regsets): Likewise.
6877 * linux-sparc-low.c (target_regsets): Likewise.
6878 * linux-xtensa-low.c (target_regsets): Likewise.
6879
6880 * linux-low.c: Include <sys/uio.h>.
6881 (regsets_fetch_inferior_registers): Support nt_type.
6882 (regsets_store_inferior_registers): Likewise.
6883 (linux_process_qsupported): New.
6884 (linux_target_ops): Add linux_process_qsupported.
6885
6886 * linux-low.h (regset_info): Add nt_type.
6887 (linux_target_ops): Add process_qsupported.
6888
6889 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6890 and <sys/uio.h>.
6891 (init_registers_i386_avx_linux): New.
6892 (init_registers_amd64_avx_linux): Likewise.
6893 (xmltarget_i386_linux_no_xml): Likewise.
6894 (xmltarget_amd64_linux_no_xml): Likewise.
6895 (PTRACE_GETREGSET): Likewise.
6896 (PTRACE_SETREGSET): Likewise.
6897 (x86_fill_xstateregset): Likewise.
6898 (x86_store_xstateregset): Likewise.
6899 (use_xml): Likewise.
6900 (x86_linux_update_xmltarget): Likewise.
6901 (x86_linux_process_qsupported): Likewise.
6902 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6903 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6904 init_registers_i386_linux here. Call
6905 x86_linux_update_xmltarget.
6906 (the_low_target): Add x86_linux_process_qsupported.
6907
6908 * server.c (handle_query): Call target_process_qsupported.
6909
6910 * target.h (target_ops): Add process_qsupported.
6911 (target_process_qsupported): New.
6912
6913 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6914
6915 * inferiors.c (add_thread): Set last_status kind to
6916 TARGET_WAITKIND_IGNORE.
6917 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6918 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6919 (linux_wait_1): Move `thread' local definition to block that uses
6920 it. Don't NULL initialize `event_child'.
6921 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6922 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6923 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6924
6925 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6926
6927 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6928 an extended waitstatus, or by a watchpoint.
6929 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6930 thread was stepping or has been stopped by a watchpoint.
6931
6932 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6933
6934 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6935 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6936 of another, then delete the previous, and validate all
6937 breakpoints.
6938 (validate_inserted_breakpoint): New.
6939 (delete_disabled_breakpoints): New.
6940 (validate_breakpoints): New.
6941 (check_mem_read): Validate breakpoints before trusting their
6942 shadow. Delete disabled breakpoints.
6943 (check_mem_write): Validate breakpoints before trusting they
6944 should be inserted. Delete disabled breakpoints.
6945 * mem-break.h (validate_breakpoints):
6946 * server.c (handle_query): Validate breakpoints when we see a
6947 qSymbol query.
6948
6949 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6950
6951 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6952 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6953 if we could tell there's a GDB breakpoint at stop_pc.
6954 (need_step_over_p): Don't do a step over if we find a GDB
6955 breakpoint at the resume PC.
6956
6957 * mem-break.c (struct raw_breakpoint): New.
6958 (enum bkpt_type): New type `gdb_breakpoint'.
6959 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6960 fields. New field `raw'.
6961 (find_raw_breakpoint_at): New.
6962 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6963 breakpoint instead.
6964 (set_breakpoint_at): Adjust.
6965 (delete_raw_breakpoint): New.
6966 (release_breakpoint): New.
6967 (delete_breakpoint): Rename to...
6968 (delete_breakpoint_1): ... this. Add proc parameter. Use
6969 release_breakpoint. Return ENOENT.
6970 (delete_breakpoint): Reimplement.
6971 (find_breakpoint_at): Delete.
6972 (find_gdb_breakpoint_at): New.
6973 (delete_breakpoint_at): Delete.
6974 (set_gdb_breakpoint_at): New.
6975 (delete_gdb_breakpoint_at): New.
6976 (gdb_breakpoint_here): New.
6977 (set_reinsert_breakpoint): Use release_breakpoint.
6978 (uninsert_breakpoint): Rename to ...
6979 (uninsert_raw_breakpoint): ... this.
6980 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6981 (reinsert_raw_breakpoint): Change parameter type to
6982 raw_breakpoint.
6983 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6984 instead.
6985 (check_breakpoints): Adjust. Use release_breakpoint.
6986 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6987 (breakpoint_inserted_here): Ditto.
6988 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6989 Don't trust the breakpoint's shadow if it is not inserted.
6990 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6991 (delete_all_breakpoints): Adjust.
6992 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6993 use delete_breakpoint_1.
6994
6995 * mem-break.h (breakpoints_supported): Delete declaration.
6996 (set_gdb_breakpoint_at): Declare.
6997 (gdb_breakpoint_here): Declare.
6998 (delete_breakpoint_at): Delete.
6999 (delete_gdb_breakpoint_at): Declare.
7000
7001 * server.h (struct raw_breakpoint): Forward declare.
7002 (struct process_info): New field `raw_breakpoints'.
7003
7004 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7005 breakpoints.
7006
7007 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7008
7009 * linux-low.c (status_pending_p_callback): Fix comment.
7010 (linux_wait_for_event_1): Move most of the internal breakpoint
7011 handling from here...
7012 (linux_wait_1): ... to here.
7013 (count_events_callback): New.
7014 (select_singlestep_lwp_callback): New.
7015 (select_event_lwp_callback): New.
7016 (cancel_breakpoints_callback): New.
7017 (select_event_lwp): New.
7018 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7019 priority to all LWPs that have had events that should be reported
7020 to the client. Cancel breakpoints when about to reporting the
7021 event to the client, not while stopping lwps. No longer cancel
7022 finished single-steps here.
7023 (cancel_finished_single_step): Delete.
7024 (cancel_finished_single_steps): Delete.
7025
7026 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7027
7028 * mem-break.c (enum bkpt_type): New.
7029 (struct breakpoint): New field `type'.
7030 (set_breakpoint_at): Change return type to struct breakpoint
7031 pointer. Set type to `other_breakpoint' by default.
7032 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7033 in the breakpoint list.
7034 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7035 (reinsert_breakpoint): Rename to ...
7036 (reinsert_raw_breakpoint): ... this.
7037 (reinsert_breakpoints_at): Adjust.
7038 * mem-break.h (struct breakpoint): Declare.
7039 (set_breakpoint_at): Change return type to struct breakpoint
7040 pointer.
7041
7042 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7043
7044 * server.c (handle_query): Assign, not compare.
7045
7046 2010-03-24 Pedro Alves <pedro@codesourcery.com>
7047
7048 Teach linux gdbserver to step-over-breakpoints.
7049
7050 * linux-low.c (can_hardware_single_step): New.
7051 (supports_breakpoints): New.
7052 (handle_extended_wait): If stopping threads, read the stop pc of
7053 the new cloned LWP.
7054 (get_pc): New.
7055 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7056 low target doesn't support retrieving the PC.
7057 (add_lwp): Set last_resume_kind to resume_continue.
7058 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7059 (linux_attach): Don't clear stop_expected. Set the lwp's
7060 last_resume_kind to resume_stop.
7061 (linux_detach_one_lwp): Don't check for removed breakpoints.
7062 (check_removed_breakpoint): Delete.
7063 (status_pending_p): Rename to ...
7064 (status_pending_p_callback): ... this. Don't check for removed
7065 breakpoints. Don't consider threads that are stopped from GDB's
7066 perspective.
7067 (linux_wait_for_lwp): Always read the stop_pc here.
7068 (cancel_breakpoint): New.
7069 (step_over_bkpt): New global.
7070 (linux_wait_for_event_1): Implement stepping over breakpoints.
7071 (gdb_wants_lwp_stopped): New.
7072 (gdb_wants_all_stopped): New.
7073 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7074 single-step traps here. Store the thread's last reported target
7075 wait status.
7076 (send_sigstop): Don't clear stop_expected. Always set it,
7077 instead.
7078 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7079 (cancel_finished_single_step): New.
7080 (cancel_finished_single_steps): New.
7081 (wait_for_sigstop): Don't cancel finished single-step traps here.
7082 (linux_resume_one_lwp): Don't check for removed breakpoints.
7083 Don't set `step' on non-hardware step archs.
7084 (linux_set_resume_request): Ignore resume_stop requests if already
7085 stopping or stopped. Set the lwp's last_resume_kind.
7086 (resume_status_pending_p): Don't check for removed breakpoints.
7087 (need_step_over_p): New.
7088 (start_step_over): New.
7089 (finish_step_over): New.
7090 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7091 requests. Clear the thread's last reported target waitstatus.
7092 Don't use the `suspended' flag. Don't consider pending breakpoints.
7093 (linux_resume): Start a step-over if necessary.
7094 (proceed_one_lwp): New.
7095 (proceed_all_lwps): New.
7096 (unstop_all_lwps): New.
7097 * linux-low.h (struct lwp_info): Rewrite comment for the
7098 `suspended' flag. Add the `stop_pc' field. Delete the
7099 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7100 Add `'last_resume_kind' and `need_step_over' fields.
7101 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7102 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7103 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7104 (set_raw_breakpoint_at): New.
7105 (set_breakpoint_at): Rewrite to use it.
7106 (reinsert_breakpoint_handler): Delete.
7107 (set_reinsert_breakpoint): New.
7108 (reinsert_breakpoint_by_bp): Delete.
7109 (delete_reinsert_breakpoints): New.
7110 (uninsert_breakpoint): Rewrite.
7111 (uninsert_breakpoints_at): New.
7112 (reinsert_breakpoint): Rewrite.
7113 (reinsert_breakpoints_at): New.
7114 (check_breakpoints): Rewrite.
7115 (breakpoint_here): New.
7116 (breakpoint_inserted_here): New.
7117 (check_mem_read): Adjust.
7118 * mem-break.h (breakpoints_supported, breakpoint_here)
7119 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7120 (reinsert_breakpoint_by_bp): Delete declaration.
7121 (delete_reinsert_breakpoints): Declare.
7122 (reinsert_breakpoint): Delete declaration.
7123 (reinsert_breakpoints_at): Declare.
7124 (uninsert_breakpoint): Delete declaration.
7125 (uninsert_breakpoints_at): Declare.
7126 (check_breakpoints): Adjust prototype.
7127 * server.h: Adjust include order.
7128 (struct thread_info): Declare here. Add a `last_status' field.
7129
7130 2010-03-23 Michael Snyder <msnyder@vmware.com>
7131
7132 * server.c (crc32): New function.
7133 (handle_query): Add handling for 'qCRC:' request.
7134
7135 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7136
7137 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7138 lwp had been stopped by a watchpoint.
7139
7140 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7141
7142 * server.h (internal_error): Declare.
7143 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7144 * utils.c (internal_error): New function.
7145
7146 2010-03-15 Andreas Schwab <schwab@redhat.com>
7147
7148 * configure.srv: Fix typo setting srv_regobj.
7149
7150 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7151
7152 * linux-low.c (fetch_register): Avoid passing a non string literal
7153 format to `error'.
7154 (usr_store_inferior_registers): Ditto.
7155
7156 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7157
7158 * linux-low.c (linux_write_memory): Bail out early if peeking
7159 memory failed.
7160
7161 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7162
7163 * linux-low.h (struct lwp_info): New fields
7164 `stopped_by_watchpoint' and `stopped_data_address'.
7165 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7166 here, and cache them in the lwp object.
7167 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7168 directly.
7169 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7170 field.
7171 (linux_stopped_by_watchpoint): Rewrite.
7172 (linux_stopped_data_address): Rewrite.
7173
7174 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7175
7176 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7177 switching the current inferior, not before.
7178
7179 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7180
7181 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7182 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7183 i386-linux.c and amd64-linux.c.
7184 (reg-i386.o): Removed.
7185 (reg-i386.c): Likewise.
7186 (reg-i386-linux.o): Likewise.
7187 (reg-i386-linux.c): Likewise.
7188 (reg-x86-64.o): Likewise.
7189 (reg-x86-64.c): Likewise.
7190 (reg-x86-64-linux.o): Likewise.
7191 (reg-x86-64-linux.c): Likewise.
7192 (i386.o): New.
7193 (i386.c): Likewise.
7194 (i386-linux.o): Likewise.
7195 (i386-linux.c): Likewise.
7196 (amd64.o): Likewise.
7197 (amd64.c): Likewise.
7198 (amd64-linux.o): Likewise.
7199 (amd64-linux.c): Likewise.
7200
7201 * configure.srv (srv_i386_regobj): New.
7202 (srv_i386_linux_regobj): Likewise.
7203 (srv_amd64_regobj): Likewise.
7204 (srv_amd64_linux_regobj): Likewise.
7205 (srv_i386_32bit_xmlfiles): Likewise.
7206 (srv_i386_64bit_xmlfiles): Likewise.
7207 (srv_i386_xmlfiles): Likewise.
7208 (srv_amd64_xmlfiles): Likewise.
7209 (srv_i386_linux_xmlfiles): Likewise.
7210 (srv_amd64_linux_xmlfiles): Likewise.
7211 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7212 srv_xmlfiles to $srv_i386_xmlfiles.
7213 (i[34567]86-*-mingw32ce*): Likewise.
7214 (i[34567]86-*-mingw*): Likewise.
7215 (i[34567]86-*-nto*): Likewise.
7216 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7217 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7218 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7219 (x86_64-*-linux*): Likewise.
7220
7221 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7222 (init_registers_amd64_linux): New.
7223 (x86_arch_setup): Replace init_registers_x86_64_linux with
7224 init_registers_amd64_linux.
7225
7226 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7227
7228 * configure.ac: Check for libdl. If it is not available link against
7229 static libthread_db.
7230 * configure: Regenerate.
7231
7232 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7233
7234 PR9605
7235
7236 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7237 handing a read watchpoint.
7238 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7239
7240 2010-02-12 Doug Evans <dje@google.com>
7241
7242 * linux-low.c (linux_supports_tracefork_flag): Document.
7243 (linux_look_up_symbols): Add comment.
7244
7245 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7246
7247 * regcache.c (supply_register): Clear regcache if buf is NULL.
7248
7249 2010-02-02 Nicolas Roche <roche@sourceware.org>
7250 Joel Brobecker <brobecker@adacore.com>
7251
7252 * inferiors.c (find_inferior): Add function documentation.
7253 (unloaded_dll): Handle the case where the unloaded dll has not
7254 been previously registered in the dll list.
7255
7256 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7257
7258 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7259 (thumb2_breakpoint): New.
7260 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7261
7262 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7263
7264 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7265 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7266 breakpoints.
7267
7268 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7269
7270 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7271
7272 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7273
7274 * linux-s390-low.c (s390_collect_ptrace_register)
7275 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7276
7277 2010-01-21 Doug Evans <dje@google.com>
7278
7279 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7280 (PTRACE_ARG4_TYPE): New macro.
7281 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7282 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7283 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7284 (usr_store_inferior_registers): Ditto.
7285 (linux_read_memory, linux_write_memory): Ditto.
7286 (linux_test_for_tracefork): Ditto.
7287
7288 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7289 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7290
7291 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7292
7293 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7294 target.
7295
7296 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7297
7298 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7299 prototype to take a regcache. Adjust.
7300
7301 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7302
7303 * regcache.h (struct thread_info): Forward declare.
7304 (struct regcache): New.
7305 (new_register_cache): Adjust prototype.
7306 (get_thread_regcache): Declare.
7307 (free_register_cache): Adjust prototype.
7308 (registers_to_string, registers_from_string): Ditto.
7309 (supply_register, supply_register_by_name, collect_register)
7310 (collect_register_as_string, collect_register_by_name): Ditto.
7311 * regcache.c (struct inferior_regcache_data): Delete.
7312 (get_regcache): Rename to ...
7313 (get_thread_regcache): ... this. Adjust. Switch inferior before
7314 fetching registers.
7315 (regcache_invalidate_one): Adjust.
7316 (regcache_invalidate): Fix prototype.
7317 (new_register_cache): Return the new register cache.
7318 (free_register_cache): Change prototype.
7319 (realloc_register_cache): Adjust.
7320 (registers_to_string): Change prototype to take a regcache. Adjust.
7321 (registers_from_string): Ditto.
7322 (register_data): Ditto.
7323 (supply_register): Ditto.
7324 (supply_register_by_name): Ditto.
7325 (collect_register): Ditto.
7326 (collect_register_as_string): Ditto.
7327 (collect_register_by_name): Ditto.
7328 * server.c (process_serial_event): Adjust.
7329 * linux-low.h (regset_fill_func, regset_store_func): Change
7330 prototype.
7331 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7332 Change prototype.
7333 * linux-low.c (get_stop_pc): Adjust.
7334 (check_removed_breakpoint): Adjust.
7335 (linux_wait_for_event): Adjust.
7336 (linux_resume_one_lwp): Adjust.
7337 (fetch_register): Add regcache parameter. Adjust.
7338 (usr_store_inferior_registers): Ditto.
7339 (regsets_fetch_inferior_registers): Ditto.
7340 (regsets_store_inferior_registers): Ditto.
7341 (linux_fetch_registers, linux_store_registers): Ditto.
7342 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7343 regcache. Adjust.
7344 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7345 Ditto.
7346 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7347 prototype to take a regcache.
7348 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7349 * remote-utils.c (convert_ascii_to_int, outreg)
7350 (prepare_resume_reply): Change prototype to take a regcache.
7351 Adjust.
7352 * target.h (struct target_ops) <fetch_registers, store_registers>:
7353 Change prototype to take a regcache.
7354 (fetch_inferior_registers, store_inferior_registers): Change
7355 prototype to take a regcache. Adjust.
7356 * proc-service.c (ps_lgetregs): Adjust.
7357 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7358 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7359 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7360 take a regcache. Adjust.
7361 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7362 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7363 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7364 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7365 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7366 (cris_cannot_fetch_register):
7367 (cris_breakpoint_at): Change prototype to take a regcache.
7368 Adjust.
7369 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7370 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7371 to take a regcache. Adjust.
7372 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7373 Adjust.
7374 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7375 take a regcache. Adjust.
7376 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7377 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7378 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7379 * linux-mips-low.c (mips_get_pc):
7380 (mips_set_pc): Change prototype to take a regcache. Adjust.
7381 (mips_reinsert_addr): Adjust.
7382 (mips_collect_register): Change prototype to take a regcache.
7383 Adjust.
7384 (mips_supply_register):
7385 (mips_collect_register_32bit, mips_supply_register_32bit)
7386 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7387 (mips_store_fpregset): Ditto.
7388 * linux-ppc-low.c (ppc_supply_ptrace_register)
7389 (ppc_supply_ptrace_register): Ditto.
7390 (parse_spufs_run): Adjust.
7391 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7392 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7393 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7394 take a regcache. Adjust.
7395 * linux-s390-low.c (s390_collect_ptrace_register)
7396 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7397 (s390_set_pc): Change prototype to take a regcache. Adjust.
7398 (s390_arch_setup): Adjust.
7399 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7400 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7401 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7402 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7403 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7404 regcache. Adjust.
7405 (sparc_breakpoint_at): Adjust.
7406 * linux-xtensa-low.c (xtensa_fill_gregset):
7407 (xtensa_store_gregset):
7408 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7409 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7410 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7411 prototype to take a regcache. Adjust.
7412 * win32-arm-low.c (arm_fetch_inferior_register)
7413 (arm_store_inferior_register): Change prototype to take a
7414 regcache. Adjust.
7415 * win32-i386-low.c (i386_fetch_inferior_register)
7416 (i386_store_inferior_register): Change prototype to take a
7417 regcache. Adjust.
7418 * win32-low.c (child_fetch_inferior_registers)
7419 (child_store_inferior_registers): Change prototype to take a
7420 regcache. Adjust.
7421 (win32_wait): Adjust.
7422 (win32_fetch_inferior_registers): Change prototype to take a
7423 regcache. Adjust.
7424 (win32_store_inferior_registers): Adjust.
7425 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7426 store_inferior_register>: Change prototype to take a regcache.
7427
7428 2010-01-20 Doug Evans <dje@google.com>
7429
7430 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7431 #ifdef.
7432 (linux_wait_for_event1, linux_init_signals): Ditto.
7433 (W_STOPCODE): Provide definition if missing.
7434
7435 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7436
7437 * linux-low.c (linux_core_of_thread): New.
7438 (compare_ints, show_process, list_threads): New.
7439 (linux_qxfer_osdata): Report threads and cores.
7440 (linux_target_op): Register linux_core_of_thread.
7441 * remote-utils.c (prepare_resume_reply): Report the core.
7442 (buffer_xml_printf): Support %d specifier.
7443 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7444 New.
7445 (handle_query): Handle qXfer:threads. Announce availability
7446 thereof.
7447 * target.h (struct target_ops): New field core_of_thread.
7448
7449 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7450
7451 * Makefile.in (clean): Remove new generated files.
7452 (reg-s390.o, reg-s390.c): Remove rules.
7453 (reg-s390x.o, reg-s390x.c): Likewise.
7454 (s390-linux32.o, s390-linux32.c): Add rules.
7455 (s390-linux64.o, s390-linux64.c): Likewise.
7456 (s390x-linux64.o, s390x-linux64.c): Likewise.
7457 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7458 * linux-s390-low.c: Include <elf.h>.
7459 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7460 (init_registers_s390): Remove prototype.
7461 (init_registers_s390x): Likewise.
7462 (init_registers_s390_linux32): Add prototype.
7463 (init_registers_s390_linux64): Likewise.
7464 (init_registers_s390x_linux64): Likewise.
7465 (s390_num_regs_3264): New define.
7466 (s390_regmap_3264): New global variable.
7467 (s390_cannot_fetch_register): Remove obsolete check.
7468 (s390_cannot_store_register): Likewise.
7469 (s390_collect_ptrace_register): Handle upper/lower register halves.
7470 (s390_supply_ptrace_register): Likewise.
7471 (s390_fill_gregset): Update to register number changes.
7472 (s390_get_hwcap): New routine.
7473 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7474 Install appropriate regmap and register set.
7475
7476 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7477
7478 * server.c (gdbserver_version): Update copyright year to 2010.
7479 * gdbreplay.c (gdbreplay_version): Likewise.
7480
7481 2009-12-28 Doug Evans <dje@google.com>
7482
7483 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7484 elf/external.h. Include <elf.h> instead but only if necessary.
7485
7486 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7487
7488 * linux-low.c (linux_remove_process): Remove `detaching'
7489 parameter. Don't release/detach from thread_db here.
7490 (linux_kill): Release/detach from thread_db here, ...
7491 (linux_detach): ... and here, before actually detaching.
7492 (linux_wait_1): ... and here, when a process exits.
7493 * thread-db.c (any_thread_of): New.
7494 (thread_db_free): Switch the current inferior to a thread of the
7495 passed in process.
7496
7497 2009-12-21 Doug Evans <dje@google.com>
7498
7499 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7500
7501 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7502 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7503 warning ifndef __NR_tkill. Move setting of errno there too.
7504 Delete unnecessary resetting of errno after syscall.
7505 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7506
7507 * configure.ac: Check for dladdr.
7508 * config.in: Regenerate.
7509 * configure: Regenerate.
7510 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7511 (try_thread_db_load): Update.
7512
7513 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7514
7515 2009-12-18 Doug Evans <dje@google.com>
7516
7517 * event-loop.c: Include unistd.h if it exists.
7518
7519 * linux-low.c (my_waitpid): Move definition away from being in
7520 between linux_tracefork_child/linux_test_for_tracefork.
7521
7522 * gdb_proc_service.h (psaddr_t): Fix type.
7523 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7524 signature to match glibc.
7525
7526 2009-12-16 Doug Evans <dje@google.com>
7527
7528 * linux-low.c (linux_read_memory): Fix argument to read.
7529
7530 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7531
7532 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7533 events, don't leave current_inferior pointing at null.
7534
7535 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7536
7537 * win32-low.c (LOG): Delete.
7538 (OUTMSG): Output to stderr.
7539 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7540 on compile time LOG macro.
7541 (win32_wait): Fix debug output.
7542
7543 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7544
7545 * win32-low.c (win32_add_one_solib): If the dll name is
7546 "ntdll.dll", prepend the system directory to the dll path.
7547
7548 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7549
7550 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7551
7552 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7553 Vladimir Prus <vladimir@codesourcery.com>
7554
7555 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7556 * configure.ac: Check for __mcoldfire__ and set
7557 gdb_cv_m68k_is_coldfire.
7558 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7559 reg-cf.o and reg-m68k.o.
7560 * configure: Regenerated.
7561
7562 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7563
7564 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7565 Pass it to thread_db_free.
7566 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7567 proper `detaching' argument to linux_remove_process.
7568 * linux-low.h (thread_db_free): Add `detaching' parameter.
7569 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7570 to thread_db_free.
7571 (thread_db_free): Add `detaching' parameter. Only
7572 call td_ta_clear_event if detaching from process.
7573
7574 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7575
7576 * thread-db.c (thread_db_free): Fix typo.
7577
7578 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7579
7580 PR gdb/10838
7581 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7582
7583 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7584
7585 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7586 with an i686 compiler.
7587 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7588 needed.
7589 * configure: Rebuilt.
7590
7591 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7592
7593 PR gdb/10783
7594
7595 * server.c (handle_search_memory_1): Correct read_addr initialization
7596 in loop for searching subsequent chunks.
7597
7598 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7599
7600 * configure.ac: New --with-libthread-db option.
7601 * thread-db.c: Allow direct dependence on libthread_db.
7602 (thread_db_free): Adjust.
7603 * config.in: Regenerate.
7604 * configure: Likewise.
7605
7606 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7607
7608 PR gdb/10757
7609 * thread-db.c (attach_thread): New function.
7610 (maybe_attach_thread): Return success/failure.
7611 (find_new_threads_callback): Adjust.
7612 (thread_db_find_new_threads): Loop until no new threads.
7613
7614 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7615
7616 * proc-service.c (ps_lgetregs): Formatting.
7617
7618 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7619
7620 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7621 * configure.ac: Adjust.
7622 * linux-low.h (struct process_info_private): Move members to struct
7623 thread_db.
7624 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7625 * linux-low.c (linux_remove_process): Adjust.
7626 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7627 * server.c (handle_query): Move code ...
7628 (handle_monitor_command): ... here. New function.
7629 * target.h (struct target_ops): New member.
7630 * thread-db.c (struct thread_db): New.
7631 (libthread_db_search_path): New variable.
7632 (thread_db_create_event, thread_db_enable_reporting)
7633 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7634 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7635 (try_thread_db_load_1, dladdr_to_soname): New functions.
7636 (try_thread_db_load, thread_db_load_search): New functions.
7637 (thread_db_init): Search for libthread_db.
7638 (thread_db_free): New function.
7639 (thread_db_handle_monitor_command): Likewise.
7640 * config.in: Regenerate.
7641 * configure: Regenerate.
7642
7643 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7644
7645 * spu-low.c (spu_kill): Wait for inferior to terminate.
7646 Call clear_inferiors.
7647 (spu_detach): Call clear_inferiors.
7648
7649 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7650
7651 * aclocal.m4: Regenerate.
7652 * config.in: Likewise.
7653 * configure: Likewise.
7654
7655 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7656
7657 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7658 (parse_spufs_run): New function.
7659 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7660 (ppc_breakpoint_at): Handle SPU breakpoints.
7661
7662 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7663
7664 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7665 (SPUFS_MAGIC): Define.
7666 (spu_enumerate_spu_ids): New function.
7667 (linux_qxfer_spu): New function.
7668 (linux_target_ops): Install linux_qxfer_spu.
7669
7670 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7671
7672 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7673 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7674 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7675 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7676 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7677 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7678 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7679 (init_registers_powerpc_cell32l): Add prototype.
7680 (init_registers_powerpc_cell64l): Likewise.
7681 (ppc_arch_setup): Detect Cell/B.E. architecture.
7682
7683 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7684
7685 * Makefile.in (datarootdir): New variable.
7686
7687 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7688
7689 * linux-low.c (linux_write_memory): Update debugging output.
7690 * Makefile.in (clean): Add new descriptions.
7691 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7692 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7693 * configure.srv: Add new files for arm*-*-linux*.
7694 * linux-arm-low.c: Add new declarations.
7695 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7696 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7697 (HWCAP_VFPv3D16): New.
7698 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7699 instead of __IWMMXT__.
7700 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7701 (arm_arch_setup): New.
7702 (target_regsets): Remove #ifdef. Add VFP regset.
7703 (the_low_target): Use arm_arch_setup.
7704
7705 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7706
7707 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7708 the main thread again.
7709
7710 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7711
7712 Adding Neutrino gdbserver.
7713 * configure: Regenerated.
7714 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7715 * configure.srv (i[34567]86-*-nto*): New target.
7716 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7717 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7718 (nto_comctrl) [__QNX__]: New function.
7719 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7720
7721 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7722
7723 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7724 srv_tgtobj.
7725
7726 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7727 Pedro Alves <pedro@codesourcery.com>
7728
7729 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7730 don't support CONTEXT_EXTENDED_REGISTERS.
7731 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7732 (the_low_target): Install them.
7733 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7734 failing with ERROR_PIPE_NOT_CONNECTED.
7735
7736 2009-06-30 Doug Evans <dje@google.com>
7737 Pierre Muller <muller@ics.u-strasbg.fr>
7738
7739 Add h/w watchpoint support to x86-linux, win32-i386.
7740 * Makefile.in (SFILES): Add i386-low.c
7741 (i386_low_h): Define.
7742 (i386-low.o): Add dependencies.
7743 (linux-x86-low.o): Add i386-low.h dependency.
7744 (win32-i386-low.o): Ditto.
7745 * i386-low.c: New file.
7746 * i386-low.h: New file.
7747 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7748 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7749 * linux-low.c (linux_add_process): Initialize arch_private.
7750 (linux_remove_process): Free arch_private.
7751 (add_lwp): Initialize arch_private.
7752 (delete_lwp): Free arch_private.
7753 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7754 provided.
7755 * linux-low.h (process_info_private): New member arch_private.
7756 (lwp_info): New member arch_private.
7757 (linux_target_ops): New members new_process, new_thread,
7758 prepare_to_resume.
7759 (ptid_of): New macro.
7760 * linux-x86-low.c: Include stddef.h, i386-low.h.
7761 (arch_process_info): New struct.
7762 (arch_lwp_info): New struct.
7763 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7764 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7765 (i386_dr_low_get_status): New function.
7766 (x86_insert_point, x86_remove_point): New functions.
7767 (x86_stopped_by_watchpoint): New function.
7768 (x86_stopped_data_address): New function.
7769 (x86_linux_new_process, x86_linux_new_thread): New functions.
7770 (x86_linux_prepare_to_resume): New function.
7771 (the_low_target): Add entries for insert_point, remove_point,
7772 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7773 prepare_to_resume.
7774 * server.c (debug_hw_points): New global.
7775 (monitor_show_help): Document set debug-hw-points.
7776 (handle_query): Process "set debug-hw-points".
7777 * server.h (debug_hw_points): Declare.
7778 (paddress): Declare.
7779 * utils.c (NUMCELLS, CELLSIZE): New macros.
7780 (get_sell, xsnprintf, paddress): New functions.
7781 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7782 remove_point, stopped_by_watchpoint, stopped_data_address.
7783 * win32-i386-low.c: Include i386-low.h.
7784 (debug_reg_state): Replaces dr.
7785 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7786 (i386_dr_low_get_status): New function.
7787 (i386_insert_point, i386_remove_point): New functions.
7788 (i386_stopped_by_watchpoint): New function.
7789 (i386_stopped_data_address): New function.
7790 (i386_initial_stuff): Update.
7791 (get_thread_context,set_thread_context,i386_thread_added): Update.
7792 (the_low_target): Add entries for insert_point,
7793 remove_point, stopped_by_watchpoint, stopped_data_address.
7794 * win32-low.c (win32_insert_watchpoint): New function.
7795 (win32_remove_watchpoint): New function.
7796 (win32_stopped_by_watchpoint): New function.
7797 (win32_stopped_data_address): New function.
7798 (win32_target_ops): Add entries for insert_watchpoint,
7799 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7800 * win32-low.h (win32_target_ops): New members insert_point,
7801 remove_point, stopped_by_watchpoint, stopped_data_address.
7802
7803 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7804
7805 * server.c (process_serial_event): Re-return unsupported, not
7806 error, if the type isn't recognized. Re-allow supporting only
7807 insert or remove packets. Also call require_running for
7808 breakpoints. Add missing break statement to default case. Tidy.
7809 * target.h (struct target_ops): Rename insert_watchpoint to
7810 insert_point, and remove_watchpoint to remove_point.
7811
7812 * linux-low.h (struct linux_target_ops): Likewise.
7813 * linux-low.c (linux_insert_watchpoint): Rename to ...
7814 (linux_insert_point): ... this. Adjust.
7815 (linux_remove_watchpoint): Rename to ...
7816 (linux_remove_point): ... this. Adjust.
7817 (linux_target_ops): Adjust.
7818 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7819 (cris_insert_point): ... this.
7820 (cris_remove_watchpoint): Rename to ...
7821 (cris_remove_point): ... this.
7822 (the_low_target): Adjust.
7823
7824 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7825
7826 * server.c (handle_v_kill): Pass signal_pid to
7827 kill_inferior if multi_process is zero.
7828
7829 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7830
7831 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7832 * target.h (target_ops): Comment for *_watchpoint to make it clear
7833 the functions can get types '0' and '1'.
7834
7835 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7836
7837 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7838 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7839 * regcache.c (get_regcache): Likewise.
7840 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7841 * win32-low.c (child_fetch_inferior_registers): Remove check for
7842 regno 0.
7843
7844 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7845 Pedro Alves <pedro@codesourcery.com>
7846
7847 * target.h (struct target_ops) <supports_multi_process>: New
7848 callback.
7849 (target_supports_multi_process): New.
7850 * server.c (handle_query): Even if GDB reports support, only
7851 enable multi-process if the target also supports it. Report
7852 multi-process support only if the target backend supports it.
7853 * linux-low.c (linux_supports_multi_process): New function.
7854 (linux_target_ops): Install it as target_supports_multi_process
7855 callback.
7856
7857 2009-05-24 Doug Evans <dje@google.com>
7858
7859 Global renaming of find_thread_pid to find_thread_ptid.
7860 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7861 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7862 All callers updated.
7863
7864 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7865 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7866 directly.
7867
7868 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7869 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7870 (linux_resume_one_lwp): Ditto.
7871
7872 2009-05-23 Doug Evans <dje@google.com>
7873
7874 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7875 from struct inferior_list_entry * to struct lwp_info *.
7876 All callers updated.
7877
7878 2009-05-13 Doug Evans <dje@google.com>
7879
7880 * linux-x86-low.c: Don't include assert.h.
7881 (x86_siginfo_fixup): Use fatal, not assert.
7882 (x86_arch_setup): Fix comment.
7883
7884 2009-05-12 Doug Evans <dje@google.com>
7885
7886 Biarch support for i386/amd64 gdbserver.
7887 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7888 Add linux-x86-low.c.
7889 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7890 (linux-x86-low.o): Add.
7891 * linux-x86-64-low.c: Delete.
7892 * linux-i386-low.c: Delete.
7893 * linux-x86-low.c: New file.
7894 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7895 linux-x86-low.o.
7896 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7897 linux-x86-low.o.
7898 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7899 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7900 (linux_child_pid_to_exec_file): New function.
7901 (elf_64_header_p, elf_64_file_p): New functions.
7902 (siginfo_fixup): New function.
7903 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7904 give target a chance to convert layout.
7905 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7906 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7907
7908 2009-05-07 Doug Evans <dje@google.com>
7909
7910 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7911 (regsets_store_inferior_registers): Ditto.
7912
7913 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7914
7915 PR server/10048
7916
7917 * linux-low.c (must_set_ptrace_flags): Delete.
7918 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7919 of the global.
7920 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7921 `lwp->must_set_ptrace_flags' instead.
7922 (linux_wait_for_event_1): Set ptrace options here.
7923 (linux_wait_1): ... not here.
7924
7925 2009-04-30 Doug Evans <dje@google.com>
7926
7927 * inferiors.c (started_inferior_callback): New function.
7928 (attached_inferior_callback): New function.
7929 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7930 * server.c (print_started_pid, print_attached_pid): New functions.
7931 (detach_or_kill_for_exit): New function.
7932 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7933 * server.h (have_started_inferiors_p): Declare.
7934 (have_attached_inferiors_p): Declare.
7935
7936 * inferiors.c (remove_process): Fix memory leak, free process.
7937 * linux-low.c (linux_remove_process): New function.
7938 (linux_kill): Call it instead of remove_process.
7939 (linux_detach, linux_wait_1): Ditto.
7940
7941 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7942
7943 * configure.srv: Add x86 Windows CE target.
7944
7945 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7946
7947 * inferiors.c (get_thread_process): Make global.
7948 * server.h (get_thread_process): Add prototype.
7949 * thread-db.c (find_one_thread): Use get_thread_process
7950 instead of current_process.
7951 (thread_db_get_tls_address): Do not crash if called when
7952 thread layer is not yet initialized.
7953
7954 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7955
7956 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7957 * spu-low.c (current_tid): Rename to ...
7958 (current_ptid): ... this.
7959 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7960 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7961 ptid_get_lwp (current_ptid) instead of current_tid.
7962 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7963 instead of current_tid. Use find_process_pid to verify pid
7964 argument is valid. Pass proper argument to remove_process.
7965 (spu_thread_alive): Compare current_ptid instead of current_tid.
7966 (spu_resume): Likewise.
7967
7968 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7969
7970 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7971 variable.
7972
7973 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7974
7975 Implement the multiprocess extensions, and add linux multiprocess
7976 support.
7977
7978 * server.h (ULONGEST): Declare.
7979 (struct ptid, ptid_t): New.
7980 (minus_one_ptid, null_ptid): Declare.
7981 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7982 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7983 (struct inferior_list_entry): Change `id' type from unsigned from
7984 to ptid_t.
7985 (struct sym_cache, struct breakpoint, struct
7986 process_info_private): Forward declare.
7987 (struct process_info): Declare.
7988 (current_process): Declare.
7989 (all_processes): Declare.
7990 (initialize_inferiors): Declare.
7991 (add_thread): Adjust to use ptid_t.
7992 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7993 (add_process, remove_process, find_thread_pid): Declare.
7994 (find_inferior_id): Adjust to use ptid_t.
7995 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7996 (multi_process): Declare.
7997 (push_event): Adjust to use ptid_t.
7998 (read_ptid, write_ptid): Declare.
7999 (prepare_resume_reply): Adjust to use ptid_t.
8000 (clear_symbol_cache): Declare.
8001 * inferiors.c (all_processes): New.
8002 (null_ptid, minus_one_ptid): New.
8003 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8004 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8005 (add_thread): Change unsigned long to ptid. Remove gdb_id
8006 parameter. Adjust.
8007 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8008 (gdb_id_to_thread): Rename to ...
8009 (find_thread_pid): ... this. Change unsigned long to ptid.
8010 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8011 (loaded_dll, pull_pid_from_list): Adjust.
8012 (add_process, remove_process, find_process_pid)
8013 (get_thread_process, current_process, initialize_inferiors): New.
8014 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8015 (struct target_waitstatus) <related_pid>: Ditto.
8016 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8017 return type to int.
8018 (struct target_ops) <join>: Add `pid' argument.
8019 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8020 (struct target_ops) <wait>: Add `ptid' field. Change return type
8021 to ptid.
8022 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8023 (mywait): Add `ptid' argument. Change return type to ptid_t.
8024 (target_pid_to_str): Declare.
8025 * target.c (set_desired_inferior): Adjust to use ptids.
8026 (mywait): Add new `ptid' argument. Adjust.
8027 (target_pid_to_str): New.
8028 * mem-break.h (free_all_breakpoints): Declare.
8029 * mem-break.c (breakpoints): Delelete.
8030 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8031 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8032 to use per-process breakpoint list.
8033 (free_all_breakpoints): New.
8034 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8035 (symbol_cache, all_symbols_looked_up): Delete.
8036 (hexchars): New.
8037 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8038 read_ptid): New.
8039 (prepare_resume_reply): Change ptid argument's type from unsigned
8040 long to ptid_t. Adjust. Implement W;process and X;process.
8041 (free_sym_cache, clear_symbol_cache): New.
8042 (look_up_one_symbol): Adjust to per-process symbol cache. *
8043 * server.c (cont_thread, general_thread, step_thread): Change type
8044 to ptid_t.
8045 (attached): Delete.
8046 (multi_process): New.
8047 (last_ptid): Change type to ptid_t.
8048 (struct vstop_notif) <ptid>: Change type to ptid_t.
8049 (queue_stop_reply, push_event): Change `ptid' argument's type to
8050 ptid_t.
8051 (discard_queued_stop_replies): Add `pid' argument.
8052 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8053 changes. Don't reference the `attached' global.
8054 (attach_inferior): Adjust to mywait interface changes.
8055 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8056 features. Handle and report "multiprocess+". Handle
8057 "qAttached:PID".
8058 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8059 changes.
8060 (handle_v_kill): New.
8061 (handle_v_stopped): Adjust to use target_pid_to_str.
8062 (handle_v_requests): Allow multiple attaches and runs when
8063 multiprocess extensions are in effect. Handle "vKill".
8064 (myresume): Adjust to use ptids.
8065 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8066 (handle_status): Adjust to discard_queued_stop_replies interface
8067 change.
8068 (first_thread_of, kill_inferior_callback)
8069 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8070 (main): Call initialize_inferiors. Adjust to use ptids, killing
8071 and detaching from all inferiors. Handle multiprocess packet
8072 variants.
8073 * linux-low.h: Include gdb_proc_service.h.
8074 (struct process_info_private): New.
8075 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8076 <lwpid_of>: Use ptid_get_lwp.
8077 (get_lwp_thread): Adjust.
8078 (struct lwp_info): Add `dead' member.
8079 (find_lwp_pid): Declare.
8080 * linux-low.c (thread_db_active): Delete.
8081 (new_inferior): Adjust comment.
8082 (inferior_pid): Delete.
8083 (linux_add_process): New.
8084 (handle_extended_wait): Adjust.
8085 (add_lwp): Change unsigned long to ptid.
8086 (linux_create_inferior): Add process to processes table. Adjust
8087 to use ptids. Don't set new_inferior here.
8088 (linux_attach_lwp): Rename to ...
8089 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8090 it. Adjust to use ptids.
8091 (linux_attach_lwp): New.
8092 (linux_attach): Add process to processes table. Don't set
8093 new_inferior here.
8094 (struct counter): New.
8095 (second_thread_of_pid_p, last_thread_of_process_p): New.
8096 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8097 multiple processes.
8098 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8099 processes. Remove process from process table.
8100 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8101 to multiple processes.
8102 (any_thread_of): New.
8103 (linux_detach): Add `pid' argument, and handle it. Remove process
8104 from processes table.
8105 (linux_join): Add `pid' argument. Handle it.
8106 (linux_thread_alive): Change unsighed long argument to ptid_t.
8107 Consider dead lwps as not being alive.
8108 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8109 threads we're not interested in.
8110 (same_lwp, find_lwp_pid): New.
8111 (linux_wait_for_lwp): Change `pid' argument's type from int to
8112 ptid_t. Adjust.
8113 (linux_wait_for_event): Rename to ...
8114 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8115 from int to ptid_t. Adjust.
8116 (linux_wait_for_event): New.
8117 (linux_wait_1): Add `ptid' argument. Change return type to
8118 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8119 that exit from the process table.
8120 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8121 Adjust.
8122 (mark_lwp_dead): New.
8123 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8124 stopping all threads, mark its main lwp as dead.
8125 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8126 ptids.
8127 (fetch_register, usr_store_inferior_registers)
8128 (regsets_fetch_inferior_registers)
8129 (regsets_store_inferior_registers, linux_read_memory)
8130 (linux_write_memory): Inline `inferior_pid'.
8131 (linux_look_up_symbols): Adjust to use per-process
8132 `thread_db_active'.
8133 (linux_request_interrupt): Adjust to use ptids.
8134 (linux_read_auxv): Inline `inferior_pid'.
8135 (initialize_low): Don't reference thread_db_active.
8136 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8137 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8138 (ps_getpid): Return the pid of the current inferior.
8139 * thread-db.c (proc_handle, thread_agent): Delete.
8140 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8141 per-process data.
8142 (find_one_thread): Change argument type to ptid_t. Adjust to
8143 per-process data.
8144 (maybe_attach_thread): Adjust to per-process data and ptids.
8145 (thread_db_find_new_threads): Ditto.
8146 (thread_db_init): Ditto.
8147 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8148 processes table. Adjust to use ptids.
8149 (spu_kill, spu_detach): Adjust interface. Remove process from
8150 processes table.
8151 (spu_join, spu_thread_alive): Adjust interface.
8152 (spu_wait): Adjust interface. Remove process from processes
8153 table. Adjust to use ptids.
8154 * win32-low.c (current_inferior_tid): Delete.
8155 (current_inferior_ptid): New.
8156 (debug_event_ptid): New.
8157 (thread_rec): Take a ptid. Adjust.
8158 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8159 (child_delete_thread): Ditto.
8160 (do_initial_child_stuff): Add `attached' argument. Add process to
8161 processes table.
8162 (child_fetch_inferior_registers, child_store_inferior_registers):
8163 Adjust.
8164 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8165 (win32_attach): Pass 1 to do_initial_child_stuff.
8166 (win32_kill): Adjust interface. Remove process from processes
8167 table.
8168 (win32_detach): Ditto.
8169 (win32_join): Adjust interface.
8170 (win32_thread_alive): Take a ptid.
8171 (win32_resume): Adjust to use ptids.
8172 (get_child_debug_event): Ditto.
8173 (win32_wait): Adjust interface. Remove exiting process from
8174 processes table.
8175
8176 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8177
8178 Non-stop mode support.
8179
8180 * server.h (non_stop): Declare.
8181 (gdb_client_data, handler_func): Declare.
8182 (delete_file_handler, add_file_handler, start_event_loop):
8183 Declare.
8184 (handle_serial_event, handle_target_event, push_event)
8185 (putpkt_notif): Declare.
8186 * target.h (enum resume_kind): New.
8187 (struct thread_resume): Replace `step' field by `kind' field.
8188 (TARGET_WNOHANG): Define.
8189 (struct target_ops) <wait>: Add `options' argument.
8190 <supports_non_stop, async, start_non_stop>: New fields.
8191 (target_supports_non_stop, target_async): New.
8192 (start_non_stop): Declare.
8193 (mywait): Add `options' argument.
8194 * target.c (mywait): Add `options' argument. Print child exit
8195 notifications here.
8196 (start_non_stop): New.
8197 * server.c (non_stop, own_buf, mem_buf): New globals.
8198 (struct vstop_notif): New.
8199 (notif_queue): New global.
8200 (queue_stop_reply, push_event, discard_queued_stop_replies)
8201 (send_next_stop_reply): New.
8202 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8203 interface changes.
8204 (attach_inferior): In non-stop mode, don't wait for the target
8205 here.
8206 (handle_general_set): Handle QNonStop.
8207 (handle_query): When handling qC, return the current general
8208 thread, instead of the first thread of the list.
8209 (handle_query): If the backend supports non-stop mode, include
8210 QNonStop+ in the qSupported query response.
8211 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8212 and non-stop mode.
8213 (handle_v_attach, handle_v_run): Handle non-stop mode.
8214 (handle_v_stopped): New.
8215 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8216 (myresume): Adjust to use resume_kind. Handle non-stop.
8217 (queue_stop_reply_callback): New.
8218 (handle_status): Handle non-stop mode.
8219 (main): Clear non_stop flag on reconnection. Use the event-loop.
8220 Refactor serial protocol handling from here ...
8221 (process_serial_event): ... to this new function. When GDB
8222 selects any thread, select one here. In non-stop mode, wait until
8223 GDB acks all pending events before exiting.
8224 (handle_serial_event, handle_target_event): New.
8225 * remote-utils.c (remote_open): Install remote_desc in the event
8226 loop.
8227 (remote_close): Remove remote_desc from the event loop.
8228 (putpkt_binary): Rename to...
8229 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8230 (putpkt_binary): New as wrapper around putpkt_binary_1.
8231 (putpkt_notif): New.
8232 (prepare_resume_reply): In non-stop mode, don't change the
8233 general_thread.
8234 * event-loop.c: New.
8235 * Makefile.in (OBJ): Add event-loop.o.
8236 (event-loop.o): New rule.
8237
8238 * linux-low.h (pid_of): Moved here.
8239 (lwpid_of): New.
8240 (get_lwp_thread): Use lwpid_of.
8241 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8242 * linux-low.c (pid_of): Delete.
8243 (inferior_pid): Use lwpid_of.
8244 (linux_event_pipe): New.
8245 (target_is_async_p): New.
8246 (delete_lwp): New.
8247 (handle_extended_wait): Use lwpid_of.
8248 (add_lwp): Don't set lwpid field.
8249 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8250 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8251 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8252 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8253 first. Adjust to linux_wait_for_event interface changes. Use
8254 lwpid_of.
8255 (linux_detach): Don't delete the main lwp here.
8256 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8257 (status_pending_p): Don't consider explicitly suspended lwps.
8258 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8259 pointer. Add OPTIONS argument. Change return type to int. Use
8260 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8261 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8262 pointer. Add status pointer argument. Return a pid instead of a
8263 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8264 changes. In non-stop mode, don't switch to a random thread.
8265 (linux_wait): Rename to...
8266 (linux_wait_1): ... this. Add target_options argument, and handle
8267 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8268 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8269 clean exit and signal exit code. Don't stop all threads in
8270 non-stop mode. In all-stop mode, only stop all threads when
8271 reporting a stop to GDB. Handle explicit thread stop requests.
8272 (async_file_flush, async_file_mark): New.
8273 (linux_wait): New.
8274 (send_sigstop): Use lwpid_of.
8275 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8276 interface changes. In non-stop mode, don't switch to a random
8277 thread.
8278 (linux_resume_one_lwp): Use lwpid_of.
8279 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8280 (linux_resume_one_thread): ... this. Handle resume_stop. In
8281 non-stop mode, don't look for pending flag in all threads.
8282 (resume_status_pending_p): Don't consider explicitly suspended
8283 threads.
8284 (my_waitpid): Reimplement. Emulate __WALL.
8285 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8286 Use lwpid_of.
8287 (sigchld_handler, linux_supports_non_stop, linux_async)
8288 (linux_start_non_stop): New.
8289 (linux_target_ops): Register linux_supports_non_stop, linux_async
8290 and linux_start_non_stop.
8291 (initialize_low): Install SIGCHLD handler.
8292 * thread-db.c (thread_db_create_event, find_one_thread)
8293 (thread_db_get_tls_address): Use lwpid_of.
8294 * win32-low.c (win32_detach): Adjust to use resume_kind.
8295 (win32_wait): Add `options' argument.
8296 * spu-low.c (spu_resume): Adjust to use resume_kind.
8297 (spu_wait): Add `options' argument.
8298
8299 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8300
8301 Decouple target code from remote protocol.
8302
8303 * target.h (enum target_waitkind): New.
8304 (struct target_waitstatus): New.
8305 (struct target_ops) <wait>: Return an unsigned long. Take a
8306 target_waitstatus pointer instead of a char pointer.
8307 (mywait): Likewise.
8308 * target.c (mywait): Change prototype to return an unsigned long.
8309 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8310 * server.h (thread_from_wait, old_thread_from_wait): Delete
8311 declarations.
8312 (prepare_resume_reply): Change prototype to take a
8313 target_waitstatus.
8314 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8315 (last_status, last_ptid): New.
8316 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8317 pid instead of a signal.
8318 (attach_inferior): Remove "status" and "signal" parameters.
8319 Adjust.
8320 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8321 not as an address.
8322 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8323 (handle_v_requests, myresume): Remove "status" and "signal"
8324 parameters. Adjust.
8325 (handle_status): New.
8326 (main): Delete local `status'. Adjust.
8327 * remote-utils.c: Include target.h.
8328 (prepare_resume_reply): Change prototype to take a
8329 target_waitstatus. Adjust.
8330
8331 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8332 interface.
8333 * spu-low.c (spu_wait): Adjust.
8334 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8335 Delete.
8336 (win32_wait): Adjust.
8337
8338 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8339
8340 * target.h (struct thread_resume): Delete leave_stopped member.
8341 (struct target_ops): Add a `n' argument to the `resume' callback.
8342 * server.c (start_inferior): Adjust.
8343 (handle_v_cont, myresume): Adjust.
8344 * linux-low.c (check_removed_breakpoint): Adjust to resume
8345 interface change, and to removed leave_stopped field.
8346 (resume_ptr): Delete.
8347 (struct thread_resume_array): New.
8348 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8349 resume interface change.
8350 (linux_continue_one_thread, linux_queue_one_thread)
8351 (resume_status_pending_p): Check if the resume field is NULL
8352 instead of checking the leave_stopped member.
8353 (linux_resume): Adjust to the target resume interface change.
8354 * spu-low.c (spu_resume): Adjust to the target resume interface
8355 change.
8356 * win32-low.c (win32_detach, win32_resume): Ditto.
8357
8358 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8359
8360 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8361 flag.
8362 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8363 pending.
8364 (linux_continue_one_thread): Only preserve the stepping flag if
8365 there's a pending breakpoint.
8366
8367 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8368
8369 * server.c (main): After the inferior having exited, call
8370 remote_close before exiting gdbserver.
8371
8372 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8373
8374 Fix size of FPSCR in Power 7 processors.
8375 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8376 (PPC_FEATURE_HAS_DFP): New #define.
8377 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8378 size of the FPSCR.
8379
8380 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8381
8382 * server.c (handle_query) Whitespace and formatting.
8383
8384 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8385
8386 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8387 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8388 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8389 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8390 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8391 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8392 Makefile.in, configure.ac: Fix whitespace throughout.
8393 * configure: Regenerate.
8394
8395 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8396
8397 * inferiors.c (find_inferior): Make it safe for the callback
8398 function to delete the currently iterated inferior.
8399
8400 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8401
8402 * Makefile.in (linuw_low_h): Move higher.
8403 (thread-db.o): Depend on $(linux_low_h).
8404
8405 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8406
8407 Rename "process" to "lwp" throughout.
8408
8409 * linux-low.c (all_processes): Rename to...
8410 (all_lwps): ... this.
8411 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8412 (add_process): Rename to ...
8413 (add_lwp): ... this. Adjust.
8414 (linux_create_inferior): Adjust.
8415 (linux_attach_lwp): Adjust.
8416 (linux_attach): Adjust.
8417 (linux_kill_one_process): Rename to ...
8418 (linux_kill_one_lwp): ... this. Adjust.
8419 (linux_kill): Adjust.
8420 (linux_detach_one_process): Rename to ...
8421 (linux_detach_one_lwp): ... this. Adjust.
8422 (linux_detach): Adjust.
8423 (check_removed_breakpoint): Adjust.
8424 (status_pending_p): Adjust.
8425 (linux_wait_for_process): Rename to ...
8426 (linux_wait_for_lwp): ... this. Adjust.
8427 (linux_wait_for_event): Adjust.
8428 (send_sigstop): Adjust.
8429 (wait_for_sigstop): Adjust.
8430 (stop_all_processes): Rename to ...
8431 (stop_all_lwps): ... this.
8432 (linux_resume_one_process): Rename to ...
8433 (linux_resume_one_lwp): ... this. Adjust.
8434 (linux_set_resume_request, linux_continue_one_thread)
8435 (linux_queue_one_thread, resume_status_pending_p)
8436 (usr_store_inferior_registers, regsets_store_inferior_registers)
8437 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8438 Adjust.
8439 * linux-low.h (get_process): Rename to ...
8440 (get_lwp): ... this. Adjust.
8441 (get_thread_process): Rename to ...
8442 (get_thread_lwp): ... this. Adjust.
8443 (get_process_thread): Rename to ...
8444 (get_lwp_thread): ... this. Adjust.
8445 (struct process_info): Rename to ...
8446 (struct lwp_info): ... this.
8447 (all_processes): Rename to ...
8448 (all_lwps): ... this.
8449 * proc-service.c (ps_lgetregs): Adjust.
8450 * thread-db.c (thread_db_create_event, find_one_thread)
8451 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8452
8453 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8454
8455 * server.c (handle_query): Handle "qAttached".
8456
8457 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8458
8459 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8460 GPLv3, update license URL.
8461
8462 2009-03-01 Doug Evans <dje@google.com>
8463
8464 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8465 (server_h): Add gdb_signals.h.
8466 (signals.o): Update.
8467 * server.h (target_signal_from_host,target_signal_to_host_p)
8468 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8469
8470 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8471
8472 * remote-utils.c (getpkt): Also generate remote-debug
8473 information if noack_mode is set.
8474
8475 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8476
8477 * server.c (handle_query): Report qXfer:siginfo:read and
8478 qXfer:siginfo:write as supported and handle them.
8479 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8480 * linux-low.c (linux_xfer_siginfo): New.
8481 (linux_target_ops): Set it.
8482
8483 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8484
8485 * server.c (gdbserver_usage): Mention --remote-debug.
8486 (main): Accept '--remote-debug' switch.
8487
8488 2009-01-18 Doug Evans <dje@google.com>
8489
8490 * regcache.c (new_register_cache): No need to check result of xcalloc.
8491 * server.c (handle_search_memory): Back out calls to xmalloc,
8492 result is checked and error is returned to user upon failure.
8493 (handle_query): Ditto. Add more checks for result of malloc.
8494 (handle_v_cont): Check result of malloc, report error back to
8495 user upon failure.
8496 (handle_v_run): Ditto. Call freeargv.
8497 * server.h (freeargv): Declare.
8498 * utils.c (freeargv): New fn.
8499
8500 2009-01-15 Doug Evans <dje@google.com>
8501
8502 * gdbreplay.c (perror_with_name): Make arg const char *.
8503 * server.h (target_signal_to_name): Make return type const char *.
8504 * thread-db.c (thread_db_err_str): Make return type const char *.
8505 * utils.c (perror_with_name): Make arg const char *.
8506
8507 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8508
8509 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8510 when handling a EXIT_PROCESS_DEBUG_EVENT.
8511
8512 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8513
8514 * gdbreplay.c (gdbreplay_version): Update copyright year.
8515 * server.c (gdbserver_version): Likewise.
8516
8517 2009-01-05 Doug Evans <dje@google.com>
8518
8519 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8520 (handle_extended_wait): Improve comment.
8521
8522 2008-12-13 Doug Evans <dje@google.com>
8523
8524 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8525 * server.h (ATTR_MALLOC): New macro.
8526 (xmalloc,xcalloc,xstrdup): Declare.
8527 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8528 * inferiors.c: Ditto.
8529 * linux-low.c: Ditto.
8530 * mem-break.c: Ditto.
8531 * regcache.c: Ditto.
8532 * remote-utils.c: Ditto.
8533 * server.c: Ditto.
8534 * target.c: Ditto.
8535 * win32-low.c: Ditto.
8536
8537 2008-12-12 Doug Evans <dje@google.com>
8538
8539 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8540 in debugging printf.
8541
8542 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8543
8544 2008-12-09 Doug Evans <dje@google.com>
8545
8546 * linux-low.h (struct process_info): Delete member tid, unused.
8547 * thread-db.c (find_one_thread): Update.
8548 (maybe_attach_thread): Update.
8549
8550 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8551
8552 * target.h (struct target_ops): Add qxfer_osdata member.
8553 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8554 and dirent.h.
8555 (linux_qxfer_osdata): New functions.
8556 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8557 callback.
8558 * server.c (handle_query): Handle "qXfer:osdata:read:".
8559 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8560 (buffer_xml_printf): New functions.
8561 * server.h (struct buffer): New.
8562 (buffer_grow_str, buffer_grow_str0): New macros.
8563 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8564 (buffer_xml_printf): Declare.
8565
8566 2008-11-24 Doug Evans <dje@google.com>
8567
8568 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8569
8570 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8571
8572 * server.c (handle_v_run): Always use the supplied argument list.
8573
8574 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8575
8576 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8577 (xtensa_regmap_table): Add entry for scompare1.
8578
8579 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8580
8581 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8582 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8583 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8584 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8585 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8586 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8587 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8588 XML target descriptions.
8589 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8590 when inferior is running on an ISA 2.05 or later processor. Add
8591 special case to return offset for full 64-bit slot of FPSCR when
8592 in 32-bits.
8593
8594 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8595
8596 * Makefile.in (SFILES, clean): Added sparc64 files.
8597 (reg-sparc64.o, reg-sparc64.c): New.
8598 * configure.srv (sparc*-*-linux*): New configuration.
8599 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8600 syscall arguments for SPARC.
8601 (regsets_store_inferior_registers): Likewise.
8602 * linux-sparc-low.c: New file.
8603
8604 2008-10-21 Doug Evans <dje@google.com>
8605
8606 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8607 (READLINE_DIR,READLINE_DEP): Delete.
8608 (INTERNAL_CFLAGS): Update.
8609 (LINTFLAGS): Update.
8610
8611 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8612
8613 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8614 whole argv from the last run, not just argv[0].
8615
8616 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8617
8618 * regcache.c (new_register_cache): Return NULL if the register
8619 cache size isn't known yet.
8620 (free_register_cache): Avoid dereferencing a NULL regcache.
8621
8622 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8623
8624 * configure.srv: Merge MIPS and MIPS64.
8625
8626 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8627
8628 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8629
8630 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8631
8632 * Makefile.in: Add required vsx dependencies.
8633
8634 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8635 Declare init_registers_powerpc_vsx32l.
8636 Declare init_registers_powerpc_vsx64l.
8637 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8638 (ppc_arch_setup): Check for VSX in hwcap.
8639 (ppc_fill_vsxregset): New function.
8640 (ppc_store_vsxregset): New function.
8641 Add new VSX entry in regset_info target_regsets.
8642
8643 * configure.srv: Add new VSX dependencies.
8644
8645 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8646
8647 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8648 (remote_open): Set or clear transport_is_reliable.
8649 (putpkt_binary): Don't expect acks in noack mode.
8650 (getpkt): Don't send ack/nac in noack mode.
8651 * server.c (handle_general_set): Handle QStartNoAckMode.
8652 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8653 qSupported.
8654 (main): Reset noack_mode on every connection.
8655 * server.h (noack_mode): Declare.
8656
8657 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8658
8659 * Makefile.in (GDBREPLAY_OBS): New variable.
8660 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8661
8662 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8663 Daniel Jacobowitz <dan@codesourcery.com>
8664
8665 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8666 (usr_store_inferior_registers): Likewise.
8667 (regsets_store_inferior_registers): Likewise.
8668
8669 2008-07-31 Rolf Jansen <rj@surtec.com>
8670 Pedro Alves <pedro@codesourcery.com>
8671
8672 * configure.ac: Check for memmem declaration.
8673 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8674 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8675 (disable_packet_qfThreadInfo): Unconditionally compile.
8676 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8677 * configure, config.in: Regenerate.
8678
8679 2008-07-28 Doug Kwan <dougkwan@google.com>
8680
8681 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8682 (linux_write_memory): Remove declaration of errno.
8683
8684 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8685
8686 * linux-low.c (handle_extended_wait): Do not use "status"
8687 variable uninitialized.
8688
8689 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8690
8691 * server.c (handle_v_attach): Inhibit reporting dll changes.
8692
8693 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8694
8695 * remote-utils.c (prepare_resume_reply): If requested, don't
8696 output "thread:TID" in the T stop reply.
8697
8698 * server.c (disable_packet_vCont, disable_packet_Tthread)
8699 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8700 (handle_query): If requested, disable support for qC, qfThreadInfo
8701 and qsThreadInfo.
8702 (handle_v_requests): If requested, disable support for vCont.
8703 (gdbserver_show_disableable): New.
8704 (main): Handle --disable-packet and --disable-packet=LIST.
8705
8706 * server.h (disable_packet_vCont, disable_packet_Tthread)
8707 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8708
8709 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8710
8711 * server.c (gdbserver_usage): Mention --version.
8712
8713 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8714
8715 * Makefile.in (gdbreplay.o): New rule.
8716
8717 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8718
8719 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8720 message, not gdbserver.
8721
8722 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8723 Nathan Sidwell <nathan@codesourcery.com>
8724 Joseph Myers <joseph@codesourcery.com>
8725
8726 * acinclude.m4: Include ../../config/acx.m4.
8727 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8728 * configure, config.in: Regenerate.
8729 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8730 * server.c (gdbserver_version): Print PKGVERSION.
8731 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8732 (main): Adjust gdbserver_usage calls.
8733 * gdbreplay.c (version, host_name): Add declarations.
8734 (gdbreplay_version, gdbreplay_usage): New.
8735 (main): Accept --version and --help options.
8736
8737 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8738
8739 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8740 (arm_breakpoint_at): Handle Thumb.
8741 (the_low_target): Add comment.
8742
8743 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8744
8745 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8746
8747 2008-05-09 Doug Evans <dje@google.com>
8748
8749 * server.h (decode_search_memory_packet): Declare.
8750 * remote-utils.c (decode_search_memory_packet): New fn.
8751 * server.c (handle_search_memory_1): New fn.
8752 (handle_search_memory): New fn.
8753 (handle_query): Process qSearch:memory packets.
8754
8755 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8756
8757 * regcache.c (registers_length): Remove.
8758 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8759 full register packet.
8760 * regcache.h (registers_length): Remove prototype.
8761 * server.h (PBUFSIZ): Define to 16384.
8762
8763 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8764
8765 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8766 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8767 powerpc-64l.o, and powerpc-altivec64l.o.
8768 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8769 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8770 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8771 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8772 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8773 to srv_xmlfiles.
8774
8775 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8776 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8777 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8778 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8779 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8780 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8781 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8782 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8783 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8784 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8785 (clean): Update.
8786
8787 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8788 (init_registers_powerpc_32l): ... this new prototype.
8789 (init_registers_powerpc_32): Remove, replace by ...
8790 (init_registers_powerpc_altivec32l): ... this new prototype.
8791 (init_registers_powerpc_e500): Remove, replace by ...
8792 (init_registers_powerpc_e500l): ... this new prototype.
8793 (init_registers_ppc64): Remove, replace by ...
8794 (init_registers_powerpc_64l): ... this new prototype.
8795 (init_registers_powerpc_64): Remove, replace by ...
8796 (init_registers_powerpc_altivec64l): ... this new prototype.
8797 (ppc_num_regs): Set to 73.
8798 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8799 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8800 (ppc_cannot_store_register): Handle orig_r3 and trap.
8801 (ppc_arch_setup): Update init_registers_... calls.
8802 (ppc_fill_gregset): Handle orig_r3 and trap.
8803
8804 * inferiors.c (clear_inferiors): Reset current_inferior.
8805
8806 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8807
8808 * acinclude.m4: Add override.m4.
8809 * configure: Regenerate.
8810
8811 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8812
8813 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8814 initial call to init_register_ppc64.
8815
8816 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8817
8818 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8819 single powerpc*-*-linux* case.
8820 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8821
8822 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8823
8824 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8825 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8826 from reg_xmlfiles.
8827 * linux-ppc-low.c: Include <elf.h>.
8828 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8829 (ppc_hwcap): New global variable.
8830 (ppc_regmap): Remove __SPE__ #ifdef sections.
8831 (ppc_regmap_e500): New global variable.
8832 (ppc_cannot_store_register): Update __SPE__ special case.
8833 (ppc_get_hwcap): New function.
8834 (ppc_arch_setup): Use it to determine whether inferior supports
8835 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8836 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8837 Do not access registers if target does not support AltiVec.
8838 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8839 Do not access registers if target does not support SPE.
8840 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8841
8842 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8843
8844 * linux-low.c (disabled_regsets, num_regsets): New.
8845 (use_regsets_p): Delete.
8846 (linux_wait_for_process): Clear disabled_regsets.
8847 (regsets_fetch_inferior_registers): Check and set it.
8848 (regsets_store_inferior_registers): Likewise.
8849 (linux_fetch_registers, linux_store_registers): Do not use
8850 use_regsets_p.
8851 (initialize_low): Allocate disabled_regsets.
8852
8853 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8854
8855 * Makefile.in (LIBOBJS): New.
8856 (OBS): Use LIBOBJS.
8857 (memmem.o): New rule.
8858 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8859 * configure: Regenerated.
8860
8861 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8862
8863 * server.c (handle_query): Never return "unsupported" for
8864 qXfer:features:read queries.
8865
8866 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8867
8868 * server.c (get_features_xml): Fix inverted condition.
8869 (handle_query): Always support qXfer:feature:read.
8870
8871 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8872
8873 * server.c (wrapper_argv): New.
8874 (start_inferior): Handle wrapper_argv. If set, expect an extra
8875 trap.
8876 (gdbserver_usage): Document --wrapper.
8877 (main): Parse --wrapper.
8878
8879 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8880
8881 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8882 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8883 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8884 (ppc_set_pc): Likewise.
8885 (ppc_arch_setup): New function.
8886 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8887 of collect_register.
8888 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8889
8890 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8891
8892 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8893 instead of linux-ppc64-low.o.
8894 * linux-ppc64-low.c: Remove file.
8895 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8896 (linux-ppc64-low.o): Remove rule.
8897
8898 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8899 (init_registers_powerpc_64): Likewise.
8900 (ppc_regmap): Conditionally define depending on __powerpc64__.
8901 (ppc_cannot_store_register): Do not special-case "fpscr" when
8902 compiled on __powerpc64__.
8903 (ppc_collect_ptrace_register): New function.
8904 (ppc_supply_ptrace_register): New function.
8905 (ppc_breakpoint): Change type to "unsigned int".
8906 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8907 (the_low_target): Conditionally provide initializers for the
8908 arch_setup member depending on __powerpc64__. Install
8909 collect_ptrace_register and supply_ptrace_register members.
8910
8911 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8912
8913 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8914 * server.c (gdbserver_xmltarget): Define.
8915 (get_features_xml): Use it to replace "target.xml" and arch_string.
8916
8917 * configure.srv: Remove srv_xmltarget. Add XML files that were
8918 mentioned there to srv_xmlfiles instead. Remove conditional tests
8919 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8920 srv_xmlfiles and srv_regobj to include all possible choices.
8921 * configure.ac (srv_xmltarget): Remove.
8922 (srv_xmlfiles): Do not add "target.xml".
8923 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8924 checks for supplementary target information.
8925 * configure: Regenerate.
8926 * Makefile.in (XML_TARGET): Remove.
8927 (target.xml): Remove rule.
8928 (clean): Do not clean up target.xml.
8929 (.PRECIOUS): Do not mention target.xml.
8930
8931 * target.h (struct target_ops): Remove arch_string member.
8932 * linux-low.c (linux_arch_string): Remove.
8933 (linux_target_ops): Remove arch_string initializer.
8934 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8935 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8936 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8937 * spu-low.c (spu_arch_string): Remove.
8938 (spu_target_ops): Remove arch_string initializer.
8939 * win32-low.c (win32_arch_string): Remove.
8940 (win32_target_ops): Remove arch_string initializer.
8941 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8942 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8943 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8944
8945 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8946
8947 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8948 by collect_ptrace_register and supply_ptrace_register hooks.
8949 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8950 instead of checking for the_low_target.left_pad_xfer.
8951 (usr_store_inferior_registers): Use collect_ptrace_register callback
8952 instead of checking for the_low_target.left_pad_xfer.
8953
8954 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8955 (s390_supply_ptrace_register): Likewise.
8956 (s390_fill_gregset): Call s390_collect_ptrace_register.
8957 (the_low_target): Update.
8958
8959 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8960 (ppc_supply_ptrace_register): Likewise.
8961 (the_low_target): Update.
8962
8963 * linux-i386-low.c (the_low_target): Update.
8964 * linux-x86-64-low.c (the_low_target): Update.
8965
8966 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8967
8968 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8969 reg-s390.o and reg-s390x.o.
8970
8971 * linux-low.c (new_inferior): New global variable.
8972 (linux_create_inferior, linux_attach): Set it.
8973 (linux_wait_for_process): Call the_low_target.arch_setup after the
8974 target has stopped for the first time.
8975 (initialize_low): Do not call the_low_target.arch_setup.
8976
8977 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8978 (s390_set_pc): Likewise.
8979 (s390_arch_setup): New function.
8980 (the_low_target): Use s390_arch_setup as arch_setup routine.
8981
8982 * regcache.c (realloc_register_cache): New function.
8983 (set_register_cache): Call it for each existing regcache.
8984
8985 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8986
8987 * server.h (init_registers): Remove prototype.
8988
8989 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8990 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8991 instead of init_registers ().
8992 * linux-arm-low.c (init_registers_arm): Add prototype.
8993 (init_registers_arm_with_iwmmxt): Likewise.
8994 (the_low_target): Add initializer for arch_setup field.
8995 * linux-cris-low.c (init_registers_cris): Add prototype.
8996 (the_low_target): Add initializer for arch_setup field.
8997 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8998 (the_low_target): Add initializer for arch_setup field.
8999 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9000 (the_low_target): Add initializer for arch_setup field.
9001 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9002 (the_low_target): Add initializer for arch_setup field.
9003 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9004 (the_low_target): Add initializer for arch_setup field.
9005 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9006 (the_low_target): Add initializer for arch_setup field.
9007 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9008 (init_registers_mips64_linux): Likewise.
9009 (the_low_target): Add initializer for arch_setup field.
9010 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9011 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9012 (the_low_target): Add initializer for arch_setup field.
9013 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9014 (init_registers_powerpc_64): Likewise.
9015 (the_low_target): Add initializer for arch_setup field.
9016 * linux-s390-low.c (init_registers_s390): Add prototype.
9017 (init_registers_s390x): Likewise.
9018 (the_low_target): Add initializer for arch_setup field.
9019 * linux-sh-low.c (init_registers_sh): Add prototype.
9020 (the_low_target): Add initializer for arch_setup field.
9021 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9022 (the_low_target): Add initializer for arch_setup field.
9023 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9024 (the_low_target): Add initializer for arch_setup field.
9025
9026 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9027 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9028 instead of init_registers ().
9029 * win32-arm-low.c (init_registers_arm): Add prototype.
9030 (the_low_target): Add initializer for arch_setup field.
9031 * win32-i386-low.c (init_registers_i386): Add prototype.
9032 (the_low_target): Add initializer for arch_setup field.
9033
9034 * spu-low.c (init_registers_spu): Add prototype.
9035 (initialize_low): Call initialie_registers_spu () instead of
9036 initialize_registers ().
9037
9038 2008-02-19 Pedro Alves <pedro@codesourcery.com>
9039
9040 * server.c (handle_v_requests): When handling the vRun and vAttach
9041 packets, if already debugging a process, don't kill it. Return an
9042 error instead.
9043
9044 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9045
9046 * server.c (handle_query): Correct length check.
9047
9048 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9049
9050 * win32-low.c (do_initial_child_stuff): Add process handle
9051 parameter. Set current_process_handle and current_process_id from the
9052 parameters. Clear globals.
9053 (win32_create_inferior): Don't set current_process_handle and
9054 current_process_id here. Instead pass them on the call to
9055 do_initial_child_stuff.
9056 (win32_attach): Likewise.
9057 (win32_clear_inferiors): New.
9058 (win32_kill): Don't close the current process handle or the
9059 current thread handle here. Instead call win32_clear_inferiors.
9060 (win32_detach): Don't open a new handle to the process. Call
9061 win32_clear_inferiors.
9062 (win32_join): Don't rely on current_process_handle; open a new
9063 handle using the process id.
9064 (win32_wait): Call win32_clear_inferiors when the inferior process
9065 has exited.
9066
9067 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9068
9069 * server.c (monitor_show_help): Add "exit".
9070
9071 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9072
9073 * Makefile.in (SFILES): Add linux-xtensa-low.c.
9074 (clean): Add reg-xtensa.c.
9075 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9076 * configure.srv (xtensa*-*-linux*) New target.
9077 * linux-xtensa-low.c: New.
9078 * xtensa-xtregs.c: New.
9079
9080 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9081
9082 * hostio.c: Don't include errno.h.
9083 (errno_to_fileio_errno): Move to hostio-errno.
9084 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9085 error number outputting to the target->hostio_last_error callback.
9086 (hostio_packet_error): Use FILEIO_EINVAL directly.
9087 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9088 calls to hostio_error.
9089 * hostio-errno.c: New.
9090 * server.h (hostio_last_error_from_errno): Declare.
9091 * target.h (target_ops): Add hostio_last_error member.
9092 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9093 as hostio_last_error handler.
9094 * spu-low.c (spu_target_ops): Likewise.
9095 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9096 (wince_hostio_last_error): New functions.
9097 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9098 as hostio_last_error handler.
9099 (win32_target_ops) [!_WIN32_WCE]: Register
9100 hostio_last_error_from_errno as hostio_last_error handler.
9101 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9102 (hostio-errno.o): New rule.
9103 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9104 * configure.srv (srv_hostio_err_objs): New variable. Default to
9105 hostio-errno.o.
9106 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9107 * configure: Regenerate.
9108
9109 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9110
9111 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9112 (linux_kill, linux_detach): Clean up the process list.
9113 * remote-utils.c (remote_open): Improve port number parsing.
9114 (putpkt_binary, input_interrupt): Only send interrupts if the target
9115 is running.
9116 * server.c (extended_protocol): Make static.
9117 (attached): Define earlier.
9118 (exit_requested, response_needed, program_argv): New variables.
9119 (target_running): New.
9120 (start_inferior): Clear attached here.
9121 (attach_inferior): Set attached here.
9122 (require_running): Define.
9123 (handle_query): Use require_running and target_running. Implement
9124 "monitor exit".
9125 (handle_v_attach, handle_v_run): New.
9126 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9127 (gdbserver_usage): Update.
9128 (main): Redo argument parsing. Handle --debug and --multi. Handle
9129 --attach along with other options or after the port. Save
9130 program_argv. Support no initial program. Resynchronize
9131 communication with GDB after an error. Handle "monitor exit".
9132 Use require_running and target_running. Always allow the extended
9133 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9134 restart in extended mode.
9135 * README: Refer to the GDB manual. Update --attach usage.
9136
9137 2007-12-20 Andreas Schwab <schwab@suse.de>
9138
9139 * linux-low.c (STACK_SIZE): Define.
9140 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9141 (linux_test_for_tracefork): Likewise.
9142
9143 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9144
9145 * linux-low.c (linux_wait_for_event): Update messages. Do not
9146 reinsert auto-delete breakpoints.
9147 * mem-break.c (struct breakpoint): Change return type of handler to
9148 int.
9149 (set_breakpoint_at): Update handler type.
9150 (reinsert_breakpoint_handler): Return 1 instead of calling
9151 delete_breakpoint.
9152 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9153 setting a new one.
9154 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9155 * mem-break.h (set_breakpoint_at): Update handler type.
9156 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9157 * win32-low.c (auto_delete_breakpoint): New.
9158 (get_child_debug_event): Use it.
9159
9160 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9161
9162 * configure.ac: Check for pread and pwrite.
9163 * hostio.c (handle_pread): Fall back to lseek and read.
9164 (handle_pwrite): Fall back to lseek and write.
9165 * config.in, configure: Regenerated.
9166
9167 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9168
9169 * server.c (myresume): Add own_buf argument.
9170 (main): Update calls.
9171
9172 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9173
9174 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9175 * remote-utils.c (remote_open): Do not call disable_async_io.
9176 (block_async_io): Delete.
9177 (unblock_async_io): Make static.
9178 (initialize_async_io): New.
9179 * server.c (handle_v_cont): Handle async I/O here.
9180 (myresume): Likewise. Move other common resume tasks here...
9181 (main): ... from here. Call initialize_async_io. Disable async
9182 I/O before the main loop.
9183 * server.h (initialize_async_io): Declare.
9184 (block_async_io, unblock_async_io): Delete prototypes.
9185 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9186
9187 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9188
9189 * remote-utils.c (readchar): Allow binary data in received messages.
9190
9191 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9192
9193 * win32-low.c (attaching): New global.
9194 (win32_create_inferior): Clear the `attaching' global.
9195 (win32_attach): Set the `attaching' global.
9196 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9197 attaching. Only set a breakpoint at the entry point if not
9198 attaching.
9199
9200 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9201
9202 * server.c (main): Don't report dll events on the initial
9203 connection on attaches.
9204
9205 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9206
9207 * server.c (main): Relax numerical bases supported for the pid of
9208 the --attach command line argument.
9209
9210 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9211
9212 * win32-low.c (win32_attach): Call OpenProcess before
9213 DebugActiveProcess, not after. Add last error output to error
9214 call.
9215
9216 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9217
9218 * win32-low.c (win32_get_thread_context)
9219 (win32_set_thread_context): New functions.
9220 (thread_rec): Use win32_get_thread_context.
9221 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9222 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9223 field.
9224
9225 2007-12-03 Leo Zayas
9226 Pedro Alves <pedro_alves@portugalmail.pt>
9227
9228 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9229 global variables.
9230 (child_add_thread): Minor cleanup.
9231 (child_continue): Resume artificially suspended threads before
9232 calling ContinueDebugEvent.
9233 (suspend_one_thread): New.
9234 (fake_breakpoint_event): New.
9235 (get_child_debug_event): Change return type to int. Check here if
9236 gdb sent an interrupt request. If a soft interrupt was requested,
9237 fake a breakpoint event. Return 0 if there is no event to handle,
9238 and 1 otherwise.
9239 (win32_wait): Don't check here if gdb sent an interrupt request.
9240 Ensure there is a valid event to handle.
9241 (win32_request_interrupt): Add soft interruption method as last
9242 resort.
9243
9244 2007-12-03 Leo Zayas
9245 Pedro Alves <pedro_alves@portugalmail.pt>
9246
9247 * win32-low.h (win32_thread_info): Add descriptions to the
9248 structure members. Replace `suspend_count' counter by a
9249 `suspended' flag.
9250 * win32-low.c (thread_rec): Update condition of when to get the
9251 context from the inferior. Rely on ContextFlags being set if it
9252 has already been retrieved. Only suspend the inferior thread if
9253 we haven't already. Warn if that fails.
9254 (continue_one_thread): s/suspend_count/suspended/. Only call
9255 ResumeThread once. Warn if that fails.
9256
9257 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9258
9259 * win32-low.c (win32_wait): Don't read from the inferior when it
9260 has already exited.
9261
9262 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9263
9264 * Makefile.in (win32_low_h): New variable.
9265 (win32-low.o): Add dependency on $(win32_low_h).
9266 (win32-arm-low.o, win32-i386-low.o): New rules.
9267
9268 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9269
9270 * hostio.c: Correct copyright year.
9271
9272 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9273
9274 * Makefile.in (OBS): Add hostio.o.
9275 (hostio.o): New rule.
9276 * server.h (handle_vFile): Declare.
9277 * hostio.c: New file.
9278 * server.c (handle_v_requests): Take packet_len and new_packet_len
9279 for binary packets. Call handle_vFile.
9280 (main): Update call to handle_v_requests.
9281
9282 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9283
9284 * linux-low.c: Include <sched.h>.
9285
9286 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9287
9288 * linux-low.c (linux_tracefork_grandchild): New.
9289 (linux_tracefork_child): Use clone.
9290 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9291
9292 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9293
9294 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9295
9296 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9297
9298 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9299
9300 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9301
9302 * inferiors.c (change_inferior_id): Delete.
9303 (add_pid_to_list, pull_pid_from_list): New.
9304 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9305 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9306 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9307 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9308 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9309 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9310 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9311 (using_threads): Always set to 1.
9312 (handle_extended_wait): New.
9313 (add_process): Do not set TID.
9314 (linux_create_inferior): Set must_set_ptrace_flags.
9315 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9316 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9317 (linux_thread_alive): Rename TID argument to LWPID.
9318 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9319 (linux_wait_for_event): Do not use TID or check using_threads. Update
9320 call to dead_thread_notify. Call handle_extended_wait.
9321 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9322 (send_sigstop): Delete sigstop_sent.
9323 (wait_for_sigstop): Avoid TID.
9324 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9325 (linux_test_for_tracefork): New.
9326 (linux_lookup_signals): Use thread_db_active and
9327 linux_supports_tracefork_flag.
9328 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9329 * linux-low.h (get_process_thread): Avoid TID.
9330 (struct process_ifo): Move thread_known and tid to the end. Remove
9331 sigstop_sent.
9332 (linux_attach_lwp, thread_db_init): Update prototypes.
9333 * server.h (change_inferior_id): Delete prototype.
9334 (add_pid_to_list, pull_pid_from_list): New prototypes.
9335 * thread-db.c (thread_db_use_events): New.
9336 (find_first_thread): Rename to...
9337 (find_one_thread): ...this. Update callers and messages. Do not
9338 call fatal. Check thread_db_use_events. Do not call
9339 change_inferior_id or new_thread_notify.
9340 (maybe_attach_thread): Update. Do not call new_thread_notify.
9341 (thread_db_init): Set thread_db_use_events. Check use_events.
9342 * utils.c (fatal, warning): Correct message prefix.
9343
9344 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * Makefile.in (clean): Remove new files.
9347 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9348 (powerpc-64.o, powerpc-64.c): New rules.
9349 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9350 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9351 with SPE.
9352 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9353 SPE targets.
9354 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9355 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9356 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9357 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9358 (target_regsets): Add AltiVec and SPE register sets.
9359 * configure.ac: Check for AltiVec and SPE.
9360 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9361 (ppc_fill_vrregset, ppc_store_vrregset): New.
9362 (target_regsets): Add AltiVec register set.
9363 * configure: Regenerated.
9364
9365 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9366
9367 * linux-low.c (O_LARGEFILE): Define.
9368 (linux_read_memory): Use /proc/PID/mem.
9369 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9370 * configure, config.in: Regenerated.
9371
9372 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9373
9374 * linux-low.c (linux_wait_for_event): Do not pass signals while
9375 single-stepping.
9376
9377 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9378
9379 * win32-low.c (create_process): New.
9380 (win32_create_inferior): Use create_process instead of
9381 CreateProcess. If create_process failed retry appending an ".exe"
9382 suffix. Store the GetLastError result immediatelly after
9383 create_process calls and use it on the call to error.
9384
9385 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9386
9387 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9388
9389 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9390
9391 * configure.ac: Switch license to GPLv3.
9392
9393 2007-08-01 Michael Snyder <msnyder@access-company.com>
9394
9395 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9396
9397 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9398
9399 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9400 typedef.
9401 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9402 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9403 CloseToolhelp32Snapshot.
9404 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9405 CloseToolhelp32Snapshot.
9406
9407 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9408
9409 * server.c (main): Check for inferior exit before main loop.
9410
9411 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9412
9413 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9414 instead of on tmp_desc.
9415
9416 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9417 Daniel Jacobowitz <dan@codesourcery.com>
9418
9419 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9420 (add_thread): Minor cleanups.
9421 (clear_inferiors): Move lower in the file. Clear the DLL
9422 list.
9423 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9424 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9425 (xml_escape_text): New.
9426 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9427 for qSupported.
9428 (handle_v_cont): Report errors.
9429 (gdbserver_version): Update.
9430 (main): Correct size of own_buf. Do not report initial DLL events.
9431 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9432 (unloaded_dll, xml_escape_text): New.
9433 * win32-low.c (enum target_waitkind): Update comments.
9434 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9435 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9436 (win32_EnumProcessModules, win32_GetModuleInformation)
9437 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9438 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9439 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9440 (win32_Module32First, win32_Module32Next, load_toolhelp)
9441 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9442 (get_child_debug_event): Handle DLL events.
9443 (win32_wait): Likewise.
9444
9445 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9448 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9449
9450 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9451
9452 * win32-low.c (handle_output_debug_string): Ignore event if not
9453 waiting.
9454
9455 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9456
9457 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9458
9459 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9460
9461 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9462
9463 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9464
9465 * inferiors.c (change_inferior_id): Add comment.
9466 * linux-low.c (check_removed_breakpoint): Add an early
9467 prototype. Improve debug output.
9468 (linux_attach): Doc update.
9469 (linux_detach_one_process, linux_detach): Clean up before releasing
9470 each process.
9471 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9472 * linux-low.h (struct process_info): Doc improvement.
9473 * mem-break.c (delete_all_breakpoints): New.
9474 * mem-break.h (delete_all_breakpoints): New prototype.
9475 * thread-db.c (find_first_thread): New.
9476 (thread_db_create_event): Call it instead of
9477 thread_db_find_new_threads. Clean up unused variables.
9478 (maybe_attach_thread): Remove first thread handling.
9479 (thread_db_find_new_threads): Use find_first_thread.
9480 (thread_db_get_tls_address): Likewise.
9481
9482 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9483
9484 * thread-db.c (thread_db_find_new_threads): Add prototype.
9485 (thread_db_create_event): Check for the main thread before adding
9486 a new thread.
9487 (maybe_attach_thread): Only enable event reporting if TID == 0.
9488 (thread_db_get_tls_address): Check for new threads.
9489
9490 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9491
9492 * linux-low.c (linux_create_inferior): Try execv before execvp.
9493 * spu-low.c (spu_create_inferior): Likewise.
9494
9495 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9496
9497 * linux-low.c (linux_create_inferior): Change execv to execvp.
9498 * spu-low.c (spu_create_inferior): Likewies.
9499
9500 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9501
9502 * Makefile.in (clean): Clean new files instead of deleted ones.
9503 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9504 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9505 rules.
9506 * configure.srv: Specify XML files and new regformats for MIPS and
9507 MIPS64 GNU/Linux.
9508 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9509 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9510 an entry for the restart register.
9511 (mips_cannot_fetch_register, mips_cannot_store_register)
9512 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9513 register names to match the XML descriptions.
9514 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9515 restart register instead of $0.
9516
9517 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9518 Markus Deuling <deuling@de.ibm.com>
9519
9520 * remote-utils.c (decode_xfer_write): New function.
9521 * server.h (decode_xfer_write): Add prototype.
9522 * server.c (handle_query): Add PACKET_LEN argument. Support
9523 qXfer:spu:read and qXfer:spu:write packets.
9524 (main): Pass packet_len to handle_query.
9525 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9526 * target.h (target_ops): Add qxfer_spu.
9527
9528 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9529
9530 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9531 accessing non-seekable spufs files.
9532
9533 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9534
9535 * server.c (handle_query): Add reply for qC packet.
9536
9537 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9538 Leo Zayas <lerele@champenstudios@com>
9539
9540 * server.h (check_remote_input_interrupt_request): New function.
9541 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9542 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9543 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9544 (check_remote_input_interrupt_request): New function.
9545 * server.h (check_remote_input_interrupt_request): Declare.
9546 * win32-low.c (winapi_DebugBreakProcess,
9547 winapi_GenerateConsoleCtrlEvent): New typedefs.
9548 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9549 to 250 ms.
9550 (win32_wait): Check for remote interrupt request
9551 with check_remote_input_interrupt_request.
9552 (win32_request_interrupt): New function.
9553 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9554
9555 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9556
9557 * win32-low.c (debug_registers_changed,
9558 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9559 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9560 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9561 (thread_rec): Get context using the low target.
9562 (child_add_thread): Call thread_added on the low target,
9563 which does the same thing.
9564 (regptr): Delete.
9565 (do_initial_child_stuff): Remove debug registers references.
9566 Set context using the low target. Resume threads after
9567 setting the contexts.
9568 (child_continue): Remove dead variable. Remove debug
9569 registers references.
9570 (child_fetch_inferior_registers): Go through the low target.
9571 (do_child_store_inferior_registers): Remove.
9572 (child_store_inferior_registers): Go through the low target.
9573 (win32_resume): Remove debug registers references.
9574 Set context using the low target.
9575 (handle_exception): Change return type to void. Don't record
9576 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9577 first chance exception.
9578 (get_child_debug_event): Change return type to void. Remove
9579 goto loop. Always return after waiting for debug event.
9580 (win32_wait): Convert to switch statement. Handle spurious
9581 events.
9582
9583 * win32-i386-low.c (debug_registers_changed,
9584 debug_registers_used): New.
9585 (initial_stuff): Rename to ...
9586 (i386_initial_stuff): ... this. Clear debug registers
9587 state variables.
9588 (store_debug_registers): Delete.
9589 (i386_get_thread_context): New.
9590 (load_debug_registers): Delete.
9591 (i386_set_thread_context): New.
9592 (i386_thread_added): New.
9593 (single_step): Rename to ...
9594 (i386_single_step): ... this.
9595 (do_fetch_inferior_registers): Rename to ...
9596 (i386_fetch_inferior_register): ... this.
9597 (i386_store_inferior_register): New.
9598 (the_low_target): Adapt to new interface.
9599
9600 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9601 (arm_get_thread_context): New.
9602 (arm_set_thread_context): New.
9603 (regptr): New.
9604 (do_fetch_inferior_registers): Rename to ...
9605 (arm_fetch_inferior_register): ... this.
9606 (arm_store_inferior_register): New.
9607 (arm_wince_breakpoint): Reimplement as unsigned long.
9608 (arm_wince_breakpoint_len): Define.
9609 (the_low_target): Adapt to new interface.
9610
9611 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9612 load_debug_registers. Add get_thread_context, set_thread_context,
9613 thread_added and store_inferior_register. Rename
9614 fetch_inferior_registers to fetch_inferior_register.
9615 (regptr): Remove declaration.
9616
9617 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9618
9619 * linux-low.c (linux_detach): Change return type to int. Return 0.
9620 * spu-low.c (spu_detach): Likewise.
9621
9622 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9623
9624 * target.h (target_ops): Change return type of detach to int.
9625 Add join.
9626 (join_inferior): New.
9627 * server.c (main): Don't skip detach support on mingw32.
9628 If the inferior doesn't support detaching return error.
9629 Call join_inferior instead of using waitpid.
9630 * linux-low.c (linux_join): New.
9631 (linux_target_op): Add linux_join.
9632 * spu-low.c (spu_join): New.
9633 (spu_target_ops): Add spu_join.
9634 * win32-low.c (win32_detach): Adapt to new interface.
9635 Reopen current_process_handle before detaching. Issue a child
9636 resume before detaching.
9637 (win32_join): New.
9638 (win32_target_op): Add win32_join.
9639
9640 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9641
9642 * win32-low.c (win32-attach): Fix return value.
9643 * target.h (target_ops): Describe ATTACH return values.
9644
9645 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9646
9647 * win32-low.c (GETPROCADDRESS): Define.
9648 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9649 (winapi_DebugSetProcessKillOnExit): Likewise.
9650 (win32_create_inferior): Force usage of ansi CreateProcessA.
9651 (win32_attach): Use GETPROCADDRESS.
9652 (win32_detach): Likewise.
9653
9654 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9655
9656 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9657
9658 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9659
9660 * win32-low.c: Commit leftover changes from 2007-03-29.
9661
9662 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9663
9664 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9665 fields short instead of int. Add explicit padding.
9666 (i387_cache_to_fsave): Remove unnecessary casts.
9667 (i387_fsave_to_cache): Doc fix.
9668 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9669
9670 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9671
9672 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9673 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9674
9675 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9676
9677 * configure.srv (arm*-*-mingw32ce*): Move near the other
9678 arm targets.
9679
9680 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9681
9682 * configure.ac: Add errno checking.
9683 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9684 sys/file.h and malloc.h.
9685 (AC_CHECK_DECLS): Add perror.
9686 (srv_mingwce): Handle.
9687 * configure.srv (i[34567]86-*-cygwin*): Add
9688 win32-i386-low.o to srv_tgtobj.
9689 (i[34567]86-*-mingw*): Likewise.
9690 (arm*-*-mingw32ce*): Add case.
9691 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9692 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9693 [__MINGW32CE__] (strerror): New function.
9694 [__MINGW32CE__] (errno): Define to GetLastError.
9695 [__MINGW32CE__] (COUNTOF): New macro.
9696 (remote_open): Remove extra close call.
9697 * mem-break.c (delete_breakpoint_at): New function.
9698 * mem-break.h (delete_breakpoint_at): Declare.
9699 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9700 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9701 [USE_WIN32API] (read, write): Add char* casts.
9702 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9703 * server.h: Include wincecompat.h on Windows CE.
9704 [HAVE_ERRNO_H]: Check.
9705 (perror): Declare if not declared.
9706 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9707 (perror_with_name): Remove errno declaration.
9708 * wincecompat.h: New.
9709 * wincecompat.c: New.
9710 * win32-low.h: New.
9711 * win32-arm-low.c: New.
9712 * win32-i386-low.c: New.
9713 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9714 (OUTMSG2): Make it safe.
9715 (_T): New macro.
9716 (COUNTOF): New macro.
9717 (NUM_REGS): Get it from the low target.
9718 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9719 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9720 (thread_rec): Let low target handle debug registers.
9721 (child_add_thread): Likewise.
9722 (child_init_thread_list): Likewise.
9723 (continue_one_thread): Likewise.
9724 (regptr): New.
9725 (do_child_fetch_inferior_registers): Move to ...
9726 * win32-i386-low.c: ... here, and rename to ...
9727 (do_fetch_inferior_registers): ... this.
9728 * win32-low.c (child_fetch_inferior_registers):
9729 Go through the low target.
9730 (do_child_store_inferior_registers): Use regptr.
9731 (strwinerror): New function.
9732 (win32_create_inferior): Handle Windows CE.
9733 Use strwinerror instead of strerror on Windows error
9734 codes. Add program to the error output.
9735 Don't close the main thread handle on Windows CE.
9736 (win32_attach): Use coredll.dll on Windows CE.
9737 (win32_kill): Close current process and current
9738 thread handles.
9739 (win32_detach): Use coredll.dll on Windows CE.
9740 (win32_resume): Let low target handle debug registers, and
9741 step request.
9742 (handle_exception): Add/Remove initial breakpoint. Avoid
9743 non-existant WSTOPSIG on Windows CE.
9744 (win32_read_inferior_memory): Cast to remove warning.
9745 (win32_arch_string): Go through the low target.
9746 (initialize_low): Call set_breakpoint_data with the low
9747 target's breakpoint.
9748 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9749 FOP_REGNUM, mappings): Move to ...
9750 * win32-i386-low.c: ... here.
9751 * win32-low.c (win32_thread_info): Move to ...
9752 * win32-low.h: ... here.
9753 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9754 win32-arm-low.c and wincecompat.c.
9755 (all:): Add $EXEEXT.
9756 (install-only:): Likewise.
9757 (gdbserver:): Likewise.
9758 (gdbreplay:): Likewise.
9759 * config.in: Regenerate.
9760 * configure: Regenerate.
9761
9762 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9763
9764 * win32-low.c: Rename typedef thread_info to
9765 win32_thread_info throughout.
9766
9767 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9768
9769 * win32-i386-low.c: Rename to ...
9770 * win32-low.c: ... this.
9771 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9772 * Makefile.in: Likewise.
9773
9774 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9775
9776 * remote-utils.c (monitor_output): Constify msg parameter.
9777 * server.h (monitor_output): Likewise.
9778 * win32-i386-low.c (handle_output_debug_string): New.
9779 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9780 handle_output_debug_string.
9781 (get_child_debug_event): Likewise.
9782
9783 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9784
9785 * server.c (main): Correct strtoul check.
9786
9787 2007-03-27 Jon Ringle <jon@ringle.org>
9788
9789 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9790
9791 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9792
9793 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9794
9795 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9796
9797 * terminal.h: Check HAVE_SGTTY_H.
9798
9799 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9800
9801 * remote-utils.c (remote_open): Print out the assigned port number.
9802
9803 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9804
9805 * remote-utils.c (monitor_output): New function.
9806 * server.c (debug_threads): Define here.
9807 (monitor_show_help): New function.
9808 (handle_query): Handle qRcmd.
9809 (main): Do not handle 'd' packet.
9810 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9811 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9812 of debug_threads.
9813
9814 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9815
9816 * Makefile.in (EXEEXT): New.
9817 (clean): Use $(EXEEXT).
9818
9819 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9820
9821 * target.h (target_ops): Rename send_signal to request_interrupt,
9822 and remove enum target_signal parameter.
9823 * linux-low.c (linux_request_interrupt): Rename from
9824 linux_send_signal, and always send SIGINT.
9825 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9826 and always send SIGINT.
9827 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9828 of send_signal.
9829 (input_interrupt): Likewise.
9830
9831 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9832
9833 * server.c (get_features_xml): Check if target implemented
9834 arch_string.
9835 * win32-i386-low.c (win32_arch_string): New.
9836 (win32_target_ops): Add win32_arch_string as arch_string member.
9837
9838 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9839
9840 * spu-low.c (spu_arch_string): New.
9841 (spu_target_ops): Add spu_arch_string.
9842
9843 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9846 * configure.ac: Do not check for terminal.h.
9847 * configure, config.in: Regenerated.
9848
9849 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9850
9851 * Makefile.in (OBS): Add $(XML_BUILTIN).
9852 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9853 (clean): Update.
9854 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9855 (arm-with-iwmmxt.c): New.
9856 * config.in, configure: Regenerate.
9857 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9858 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9859 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9860 (arm*-*-linux*): Add iWMMXt and regset support.
9861 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9862 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9863 (arm_store_wmmxregset, target_regsets): New.
9864 * server.c (get_features_xml): Take annex argument. Check builtin
9865 XML documents.
9866 (handle_query): Handle multiple annexes.
9867
9868 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9869
9870 * remote-utils.c [USE_WIN32API] (read, write): Define.
9871 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9872 write.
9873
9874 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9875
9876 * linux-i386-low.c (the_low_target): Set arch_string.
9877 * linux-x86-64-low.c (the_low_target): Likewise.
9878 * linux-low.c (linux_arch_string): New.
9879 (linux_target_ops): Add it.
9880 * linux-low.h (struct linux_target_ops): Add arch_string.
9881 * server.c (write_qxfer_response): Use const void * for DATA.
9882 (get_features_xml): New.
9883 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9884 * target.h (struct target_ops): Add arch_string method.
9885
9886 2007-01-03 Denis Pilat <denis.pilat@st.com>
9887 Daniel Jacobowitz <dan@codesourcery.com>
9888
9889 * linux-low.c (linux_kill): Handle being called with no threads.
9890 * win32-i386-low.c (win32_kill): Likewise.
9891 (get_child_debug_event): Clear current_process_handle.
9892
9893 2006-12-30 Denis PILAT <denis.pilat@st.com>
9894 Daniel Jacobowitz <dan@codesourcery.com>
9895
9896 * remote-utils.c (remote_open): Check the type of specified
9897 serial port devices before opening them.
9898 * server.c (main): Kill the inferior if an error occurs during
9899 the first remote_open.
9900
9901 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9902
9903 * README: Update supported targets.
9904
9905 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9906
9907 * Makefile.in (clean): Remove reg-mips64.c.
9908 (reg-mips64.c, reg-mips64.o): New rules.
9909 * configure.srv: Handle mips64. Include regset support for mips.
9910 * linux-mips-low.c (union mips_register): New.
9911 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9912 (mips_breakpoint, mips_breakpoint_at): Use int.
9913 (mips_collect_register, mips_supply_register)
9914 (mips_collect_register_32bit, mips_supply_register_32bit)
9915 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9916 (mips_store_fpregset, target_regsets): New.
9917 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9918
9919 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9920
9921 * configure.srv: Add target "spu*-*-*".
9922 * Makefile.in (clean): Remove reg-spu.c.
9923 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9924 * spu-low.c: New file.
9925
9926 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9927
9928 * configure.ac: Correct td_thr_tls_get_addr test.
9929 * configure: Regenerated.
9930
9931 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9932
9933 * linux-low.c (linux_wait_for_event): Reformat. Use the
9934 pass_signals array.
9935 * remote-utils.c (decode_address_to_semicolon): New.
9936 * server.c (pass_signals, handle_general_set): New.
9937 (handle_query): Mention QPassSignals for qSupported.
9938 (main): Call handle_general_set.
9939 * server.h (pass_signals, decode_address_to_semicolon): New.
9940
9941 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9942
9943 * server.c (handle_query): Correct error handling for read_auxv.
9944
9945 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9946
9947 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9948 and srv_linux_thread_db to yes.
9949 * linux-s390-low.c (s390_fill_gregset): New function.
9950 (target_regsets): Define data structure.
9951
9952 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9953
9954 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9955 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9956 * config.in, configure: Regenerated.
9957 * inferiors.c (gdb_id_to_thread): New function.
9958 (gdb_id_to_thread_id): Use it.
9959 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9960 * linux-low.h (struct process_info): Add th member.
9961 (thread_db_get_tls_address): New prototype.
9962 * remote-utils.c (decode_address): Make non-static.
9963 * server.c (handle_query): Handle qGetTLSAddr.
9964 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9965 * target.h (struct target_ops): Add get_tls_address.
9966 * thread-db.c (maybe_attach_thread): Save the thread handle.
9967 (thread_db_get_tls_address): New.
9968
9969 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9970
9971 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9972 (linux_resume_one_process): Take a siginfo_t *. Update all
9973 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9974 (struct pending_signals): Add a siginfo_t.
9975 (linux_wait_for_process): Always set last_status.
9976 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9977 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9978 * linux-low.h (struct process_info): Add last_status.
9979
9980 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9981
9982 * remote-utils.c (try_rle): New function.
9983 (putpkt_binary): Use it.
9984
9985 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9986
9987 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9988 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9989 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9990 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9991 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9992 point registers.
9993
9994 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9995
9996 * server.c (terminal_fd): New variable.
9997 (old_foreground_pgrp): Likewise.
9998 (restore_old_foreground_pgrp): New function.
9999 (start_inferior): Record the terminal file descriptor in terminal_fd
10000 and its original foreground group in old_foreground_pgrp. Register
10001 restore_old_foreground_pgrp with atexit().
10002
10003 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10004
10005 * server.c (handle_query): Correct qPart to qXfer.
10006
10007 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10008
10009 * configure.ac: Check for more headers which are missing on
10010 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10011 * configure.srv: Add Cygwin and mingw32.
10012 * remote-utils.c: Don't include headers unconditionally which
10013 are missing on mingw32. Include <winsock.h> for mingw32.
10014 (remote_open): Adjust for mingw32 support. Flush
10015 standard error after writing to it.
10016 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10017 (unblock_async_io, enable_async_io, disable_async_io)
10018 (readchar, getpkt): Update for Winsock support.
10019 (prepare_resume_reply): Expect a protocol signal number.
10020 * server.c: Disable <sys/wait.h> on mingw32.
10021 (start_inferior): Adjust for mingw32 support. Flush
10022 standard error after writing to it.
10023 (attach_inferior): Likewise. Use protocol signal
10024 numbers.
10025 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10026 and names.
10027 * win32-i386-low.c: New file.
10028 * Makefile.in (XM_CLIBS): Set.
10029 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10030 (win32-i386-low.o): New dependency rule.
10031 * linux-low.c (linux_wait): Use target signal numbers.
10032 * target.h (struct target_ops): Doc fix.
10033 * server.h (target_signal_to_name): New prototype.
10034 * gdbreplay.c: Don't include headers unconditionally which
10035 are missing on mingw32. Include <winsock.h> for mingw32.
10036 (remote_close, remote_open): Adjust for Winsock support.
10037 * configure, config.in: Regenerated.
10038
10039 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10040
10041 * server.c (decode_xfer_read, write_qxfer_response): New.
10042 (handle_query): Take a packet length argument. Handle
10043 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10044 the qSupported response.
10045 (main): Update call to handle_query.
10046
10047 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10050 (putpkt_binary): Renamed from putpkt and adjusted for binary
10051 data.
10052 (putpkt): New wrapper for putpkt_binary.
10053 (readchar): Don't mask off the high bit.
10054 (decode_X_packet): New function.
10055 * server.c (main): Call putpkt_binary if a handler sets the packet
10056 length. Save the length of the incoming packet. Handle 'X'.
10057 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10058
10059 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10060
10061 * server.c (handle_query): Handle qSupported.
10062
10063 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10064
10065 * remote-utils.c (all_symbols_looked_up): New variable.
10066 (look_up_one_symbol): Check it.
10067 * server.h (look_up_one_symbol): New declaration.
10068 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10069
10070 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10071
10072 * Makefile.in (linux-arm-low.o): Update dependencies.
10073 * linux-arm-low.c: Include "gdb_proc_service.h".
10074 (PTRACE_GET_THREAD_AREA): Define.
10075 (ps_get_thread_area): New function.
10076
10077 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10078
10079 * configure.srv (m68k*-*-uclinux*): New target.
10080 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10081 (linux_resume_one_process): Remove extraneous cast.
10082 (linux_read_offsets): New.
10083 (linux_target_op): Add linux_read_offsets on mmuless systems.
10084 * server.c (handle_query): Add qOffsets logic.
10085 * target.h (struct target_ops): Add read_offsets.
10086
10087 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10088
10089 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10090 (PTRACE_GET_THREAD_AREA): Define.
10091 (ps_get_thread_area): New function.
10092 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10093 (linux-x86-64-low.o): Update.
10094
10095 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10096
10097 * configure.ac: Remove checks for prfpregset_t.
10098 * gdb_proc_service.h: New file.
10099 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10100 new "gdb_proc_service.h".
10101 * proc-service.c: Likewise.
10102 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10103 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10104 * Makefile.in (gdb_proc_service_h): Updated.
10105 * configure, config.in: Regenerated.
10106
10107 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10108
10109 * remote-utils.c (prepare_resume_reply): Move declaration
10110 of gdb_id_from_wait to the top of the block.
10111
10112 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * linux-low.c (regsets_store_inferior_registers): Read the regset
10115 from the target before filling it.
10116
10117 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10118
10119 * server.c (attach_inferior): Return SIGTRAP for a successful
10120 attach.
10121
10122 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10123
10124 * Makefile.in (OBS): Add version.o.
10125 (STAGESTUFF): Delete.
10126 (version.o): Add dependencies.
10127 (version.c): Replace rule.
10128 (clean): Remove version.c.
10129 * server.c (gdbserver_version): New.
10130 (gdbserver_usage): Use printf.
10131 (main): Handle --version and --help.
10132 * server.h (version, host_name): Add declarations.
10133
10134 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10135
10136 * linux-arm-low.c:
10137 * linux-arm-low.c:
10138 * inferiors.c:
10139 * i387-fp.h:
10140 * i387-fp.c:
10141 * gdbreplay.c:
10142 * regcache.c:
10143 * proc-service.c:
10144 * mem-break.h:
10145 * mem-break.c:
10146 * linux-x86-64-low.c:
10147 * linux-sh-low.c:
10148 * linux-s390-low.c:
10149 * linux-ppc64-low.c:
10150 * linux-ppc-low.c:
10151 * linux-mips-low.c:
10152 * linux-m68k-low.c:
10153 * linux-m32r-low.c:
10154 * linux-low.h:
10155 * linux-low.c:
10156 * linux-ia64-low.c:
10157 * linux-i386-low.c:
10158 * linux-crisv32-low.c:
10159 * thread-db.c:
10160 * terminal.h:
10161 * target.h:
10162 * target.c:
10163 * server.h:
10164 * server.c:
10165 * remote-utils.c:
10166 * regcache.h:
10167 * utils.c:
10168 * Makefile.in:
10169 * configure.ac:
10170 * gdbserver.1: Add (C) after Copyright. Update the FSF
10171 address.
10172
10173 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10174
10175 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10176 (arm_breakpoint_at): Recognize both breakpoints.
10177 (the_low_target): Use the correct breakpoint instruction.
10178
10179 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10180
10181 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10182 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10183 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10184 (the_low_target): Update.
10185
10186 2005-10-25 Andreas Schwab <schwab@suse.de>
10187
10188 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10189
10190 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10191 (ia64_num_regs): Reduce to 462.
10192
10193 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * acinclude.m4: Correct quoting.
10196 * aclocal.m4: Regenerated.
10197
10198 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10199 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10200 (thread_db_init): Call thread_db_err_str.
10201 * configure.ac: Check for TD_VERSION.
10202 * config.in, configure: Regenerated.
10203
10204 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10205
10206 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10207
10208 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10209
10210 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10211 is not available. Define HAVE_PTRACE_GETREGS if it is.
10212 * config.in, configure: Regenerated.
10213 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10214 * linux-i386-low.c, linux-m68k-low.c: Update to use
10215 HAVE_PTRACE_GETREGS.
10216 * linux-low.c (regsets_fetch_inferior_registers)
10217 (regsets_store_inferior_registers): Only return 0 if we processed
10218 GENERAL_REGS.
10219 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10220 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10221
10222 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * inferiors.c (struct thread_info): Add gdb_id.
10225 (add_thread): Add gdb_id argument.
10226 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10227 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10228 calls to add_thread.
10229 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10230 * server.c (handle_query): Use thread_to_gdb_id.
10231 (handle_v_cont, main): Use gdb_id_to_thread_id.
10232 * server.h (add_thread): Update prototype.
10233 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10234 prototypes.
10235
10236 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10237
10238 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10239 left-padded registers.
10240 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10241 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10242
10243 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10244
10245 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10246 * configure: Regenerate.
10247 * config.in: Regenerate.
10248 * server.h (NEED_DECLARATION_STRERROR):
10249 Replace with !HAVE_DECL_STRERROR.
10250
10251 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10252
10253 * linux-low.c (linux_wait, linux_send_signal): Don't test
10254 an unsigned long variable for > 0 if it could be MAX_ULONG.
10255 * server.c (myresume): Likewise.
10256 * target.c (set_desired_inferior): Likewise.
10257
10258 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10259
10260 * configure.ac: Simplify and improve check for socklen_t.
10261 * configure, config.in: Regenerate.
10262
10263 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * acconfig.h: Remove.
10266 * configure.ac: Add a test for socklen_t. Use three-argument
10267 AC_DEFINE throughout.
10268 * config.in: Regenerated using autoheader 2.59.
10269 * configure: Regenerated.
10270
10271 * gdbreplay.c (socklen_t): Provide a default.
10272 (remote_open): Use socklen_t.
10273 * remote-utils.c (socklen_t): Provide a default.
10274 (remote_open): Use socklen_t.
10275 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10276 unsigned char.
10277
10278 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10279 char for buffers.
10280 * linux-low.c (linux_read_memory, linux_write_memory)
10281 (linux_read_auxv): Likewise.
10282 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10283 (check_mem_write): Likewise.
10284 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10285 Likewise.
10286 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10287 (registers_from_string, register_data): Likewise.
10288 * server.c (handle_query, main): Likewise.
10289 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10290 (decode_M_packet): Likewise.
10291 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10292 * target.h (struct target_ops): Update read_memory, write_memory,
10293 and read_auxv.
10294 (read_inferior_memory, write_inferior_memory): Update.
10295 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10296 to unsigned char *.
10297 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10298 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10299 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10300 linux-s390-low.c, linux-sh-low.c: Update for changes in
10301 read_inferior_memory and the_low_target->breakpoint.
10302
10303 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10304
10305 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10306 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10307 * configure.srv: Add powerpc64-*-linux*.
10308 * linux-ppc64-low.c: New file.
10309
10310 2005-05-23 Orjan Friberg <orjanf@axis.com>
10311
10312 * linux-cris-low.c: New file with support for CRIS.
10313 * linux-crisv32-low.c: Ditto for CRISv32.
10314 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10315 (clean): Add reg-cris.c and reg-crisv32.c.
10316 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10317 reg-crisv32.o, and reg-crisv32.c to make rules.
10318 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10319 recognized targets.
10320
10321 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10322
10323 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10324 of sizeof (PTRACE_XFER_TYPE).
10325 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10326
10327 2005-05-12 Orjan Friberg <orjanf@axis.com>
10328
10329 * target.h (struct target_ops): Add insert_watchpoint,
10330 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10331 pointers for hardware watchpoint support.
10332 * linux-low.h (struct linux_target_ops): Ditto.
10333 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10334 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10335 to linux_target_ops.
10336 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10337 reply packet.
10338 * server.c (main): Recognize 'Z' and 'z' packets.
10339
10340 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10341
10342 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10343 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10344 (the_low_target): Add new members.
10345
10346 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10347
10348 * proc-service.c (ps_lgetregs): Search all_processes instead of
10349 all_threads.
10350
10351 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10352
10353 * server.c (start_inferior): Change return type to int.
10354 (attach_inferior): Change sigptr to int *.
10355 (handle_v_cont, handle_v_requests): Change signal to int *.
10356 (main): Change signal to int.
10357
10358 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10359
10360 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10361 * configure.srv: Add m32r*-*-linux*.
10362 * linux-m32r-low.c: New file.
10363
10364 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10365
10366 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10367
10368 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10369
10370 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10371 Take unsigned long arguments for PIDs.
10372 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10373 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10374 (wait_for_sigstop, linux_resume_one_process)
10375 (regsets_fetch_inferior_registers, linux_send_signal)
10376 (linux_read_auxv): Likewise. Update the types of variables holding
10377 PIDs. Update format string specifiers.
10378 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10379 * remote-utils.c (prepare_resume_reply): Likewise.
10380 * server.c (cont_thread, general_thread, step_thread)
10381 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10382 unsigned long.
10383 (handle_query): Update format specifiers.
10384 (handle_v_cont, main): Use strtoul for thread IDs.
10385 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10386 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10387 (general_thread, step_thread, thread_from_wait)
10388 (old_thread_from_wait): Update.
10389 * target.h (struct thread_resume): Use unsigned long for THREAD.
10390 (struct target_ops): Use unsigned long for arguments to attach and
10391 thread_alive.
10392
10393 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10394
10395 * acinclude.m4: Include bfd/bfd.m4 directly.
10396 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10397 <agriffis@toolchain.org>.
10398 * aclocal.m4, configure: Regenerated.
10399
10400 2005-01-07 Andrew Cagney <cagney@gnu.org>
10401
10402 * configure.ac: Rename configure.in, require autoconf 2.59.
10403 * configure: Re-generate.
10404
10405 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10406
10407 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10408 LIBS when finished.
10409 * aclocal.m4: Regenerated.
10410 * configure: Regenerated.
10411
10412 2004-11-21 Andreas Schwab <schwab@suse.de>
10413
10414 * linux-m68k-low.c (m68k_num_gregs): Define.
10415 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10416 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10417 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10418 (m68k_breakpoint_at): New. Add to the_low_target.
10419
10420 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10421 srv_linux_thread_db to yes.
10422
10423 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10424
10425 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10426 (ARCH_SET_FS): Likewise.
10427 (ARCH_GET_FS): Likewise.
10428 (ARCH_GET_GS): Likewise.
10429
10430 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10431
10432 * linux-i386-low.c (ps_get_thread_area): New.
10433 * linux-x86-64-low.c (ps_get_thread_area): New.
10434 * linux-low.c: Include <sys/syscall.h>.
10435 (linux_kill_one_process): Don't kill the first thread here.
10436 (linux_kill): Kill the first thread here.
10437 (kill_lwp): New function.
10438 (send_sigstop, linux_send_signal): Use it.
10439 * proc-service.c: Clean up #ifdefs.
10440 (fpregset_info): Delete.
10441 (ps_lgetregs): Update and enable implementation.
10442 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10443 implementations.
10444 * remote-utils.c (struct sym_cache, symbol_cache): New.
10445 (input_interrupt): Print a clearer message.
10446 (async_io_enabled): New variable.
10447 (enable_async_io, disable_async_io): Use it. Update comments.
10448 (look_up_one_symbol): Use the symbol cache.
10449 * thread-db.c (thread_db_look_up_symbols): New function.
10450 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10451
10452 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10453
10454 * configure.in: Test for -rdynamic.
10455 * configure: Regenerated.
10456 * Makefile (INTERNAL_LDFLAGS): New.
10457 (gdbserver, gdbreplay): Use it.
10458
10459 2004-09-02 Andrew Cagney <cagney@gnu.org>
10460
10461 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10462
10463 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10464
10465 * linux-low.c (linux_wait): Clear all_processes list also.
10466
10467 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10468
10469 * linux-low.c: Include <errno.h>. Remove extern declaration of
10470 errno.
10471
10472 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10473
10474 * gdbreplay.c, server.h, utils.c: Update copyright years.
10475
10476 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10477
10478 * server.c (main): Print child status or termination signal from
10479 variable 'signal', not 'sig'.
10480
10481 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10482
10483 * linux-low.c (linux_read_memory): Change return type to
10484 int. Check for and return error from ptrace().
10485 * target.c (read_inferior_memory): Change return type to int. Pass
10486 back return status from the_target->read_memory().
10487 * target.h (struct target_ops): Adapt *read_memory() prototype.
10488 Update comment.
10489 (read_inferior_memory): Adapt prototype.
10490 * server.c (main): Return an error packet if
10491 read_inferior_memory() returns an error.
10492
10493 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10494
10495 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10496 Unify with other clean targets.
10497
10498 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10499
10500 * server.c (handle_v_cont): Call set_desired_inferior.
10501
10502 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10503
10504 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10505
10506 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10507
10508 * linux-low.c (linux_wait): Unblock async I/O.
10509 (linux_resume): Block and enable async I/O.
10510 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10511 * server.h (block_async_io, unblock_async_io): Add prototypes.
10512
10513 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10514
10515 * remote-utils.c (remote_open): Print a status notice after
10516 opening a TCP port.
10517 * server.c (attach_inferior): Print a status notice after
10518 attaching.
10519
10520 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10521
10522 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10523
10524 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10525
10526 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10527 error packet.
10528 * server.c, target.h: Update copyright years.
10529
10530 2004-02-25 Roland McGrath <roland@redhat.com>
10531
10532 * target.h (struct target_ops): New member `read_auxv'.
10533 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10534 * linux-low.c (linux_read_auxv): New function.
10535 (linux_target_ops): Initialize `read_auxv' member to that.
10536
10537 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10538
10539 Committed by Jim Blandy <jimb@redhat.com>.
10540
10541 * linux-s390-low.c (s390_num_regs): Update.
10542 (s390_regmap): Remove control registers. Use __s390x__ predefine
10543 instead of GPR_SIZE to distiguish s390 and s390x targets.
10544
10545 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10546
10547 * linux-low.c: Update copyright year.
10548 (check_removed_breakpoint): Clear pending_is_breakpoint.
10549 (linux_set_resume_request, linux_queue_one_thread)
10550 (resume_status_pending_p): New functions.
10551 (linux_continue_one_thread): Use process->resume.
10552 (linux_resume): Only resume threads if there are no pending events.
10553 * linux-low.h (struct process_info): Add resume request
10554 pointer.
10555
10556 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10557
10558 * regcache.c (new_register_cache): Clear the allocated register
10559 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10560
10561 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10562
10563 * linux-low.c (linux_resume): Take a struct thread_resume *
10564 argument.
10565 (linux_wait): Update call.
10566 (resume_ptr): New static variable.
10567 (linux_continue_one_thread): Renamed from
10568 linux_continue_one_process. Use resume_ptr.
10569 (linux_resume): Use linux_continue_one_thread.
10570 * server.c (handle_v_cont, handle_v_requests): New functions.
10571 (myresume): New function.
10572 (main): Handle 'v' case.
10573 * target.h (struct thread_resume): New type.
10574 (struct target_ops): Change argument of "resume" to struct
10575 thread_resume *.
10576 (myresume): Delete macro.
10577
10578 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10579
10580 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10581 (uninstall): Support DESTDIR.
10582
10583 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10584
10585 * configure.srv: Add xscale*linux copy of arm*linux entry.
10586
10587 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10588
10589 * linux-arm-low.c (arm_reinsert_addr): New function.
10590 (the_low_target): Add arm_reinsert_addr.
10591
10592 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10593
10594 * mem-break.c: Remove whitespace at end of file.
10595
10596 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10597
10598 * configure.in: Check whether we need to prototype strerror.
10599 * server.h: Optionally prototype strerror.
10600 * gdbreplay.c (perror_with_name): Use strerror.
10601 * linux-low.c (linux_attach_lwp): Use strerror.
10602 * utils.c (perror_with_name): Use strerror.
10603 * config.in, configure: Regenerated.
10604
10605 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10606
10607 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10608 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10609
10610 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10611
10612 * Makefile.in (SFILES): Update.
10613 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10614 low-sun3.c: Remove files.
10615
10616 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10617
10618 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10619 (linux_detach_one_process, linux_detach): New functions.
10620 (linux_target_ops): Add linux_detach.
10621 * server.c (main): Handle 'D' packet.
10622 * target.h (struct target_ops): Add "detach" member.
10623 (detach_inferior): Define.
10624
10625 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10626
10627 From Kelley Cook <kelleycook@wideopenwest.com>:
10628 * configure.srv: Accept i[34567]86 variants.
10629
10630 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10631
10632 * linux-low.c (linux_wait_for_event): Correct comment typos.
10633 (linux_resume_one_process): Call check_removed_breakpoint.
10634 (linux_send_signal): New function.
10635 (linux_target_ops): Add linux_send_signal.
10636 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10637 of kill.
10638 * target.h (struct target_ops): Add send_signal.
10639
10640 2003-05-29 Jim Blandy <jimb@redhat.com>
10641
10642 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10643 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10644 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10645 away part of the register's value.
10646
10647 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10648
10649 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10650 (linux_wait_for_event, linux_init_signals): Likewise.
10651
10652 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10653
10654 * configure.in: Check for stdlib.h.
10655 * configure: Regenerated.
10656 * config.in: Regenerated.
10657
10658 2003-01-04 Andreas Schwab <schwab@suse.de>
10659
10660 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10661
10662 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10663
10664 * Makefile.in: Remove obsolete code.
10665
10666 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10667
10668 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10669 defined(PT_FPR0_HI).
10670
10671 2002-11-17 Stuart Hughes <seh@zee2.com>
10672
10673 * linux-arm-low.c (arm_num_regs): Increase.
10674 (arm_regmap): Include status register.
10675
10676 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10677
10678 * linux-low.c (register_addr): Remove incorrect -1 check.
10679
10680 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10681
10682 * linux-low.c (linux_create_inferior): Call setpgid. Return
10683 the new PID.
10684 (unstopped_p, linux_signal_pid): Remove.
10685 (linux_target_ops): Remove linux_signal_pid.
10686 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10687 global instead of target method.
10688 * target.h (struct target_ops): Remove signal_pid. Update comment
10689 for create_inferior.
10690 * server.c (signal_pid): New variable.
10691 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10692 gdbserver. Set the child to be the foreground process group.
10693 (attach_inferior): Set signal_pid.
10694
10695 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10696
10697 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10698
10699 2002-08-20 Jim Blandy <jimb@redhat.com>
10700
10701 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10702 default for this.
10703
10704 2002-08-01 Andrew Cagney <cagney@redhat.com>
10705
10706 * Makefile.in: Make chill references obsolete.
10707
10708 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10709
10710 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10711 * configure: Regenerate.
10712 * config.in: Regenerate.
10713
10714 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10715
10716 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10717 (perror_with_name, remote_close, remote_open, expect, play): Static.
10718
10719 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10720
10721 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10722 byte offsets instead of an array of indexes.
10723 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10724
10725 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10726
10727 * regcache.c: Add comment.
10728
10729 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10730
10731 * thread-db.c: New file.
10732 * proc-service.c: New file.
10733 * acinclude.m4: New file.
10734 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10735 proc-service.o, and thread-db.o.
10736 (linux-low.o): Add USE_THREAD_DB.
10737 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10738 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10739 * aclocal.m4: Regenerated.
10740 * config.in: Regenerated.
10741 * configure: Regenerated.
10742 * configure.in: Check for proc_service.h, sys/procfs.h,
10743 thread_db.h, and linux/elf.h headrs.
10744 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10745 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10746 Check for -lthread_db and thread support.
10747 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10748 PowerPC, and SuperH.
10749 * i387-fp.c: Constify arguments.
10750 * i387-fp.h: Likewise.
10751 * inferiors.c: (struct thread_info): Renamed from
10752 `struct inferior_info'. Remove PID member. Use generic inferior
10753 list header. All uses updated.
10754 (inferiors, signal_pid): Removed.
10755 (all_threads): New variable.
10756 (get_thread): Define.
10757 (add_inferior_to_list): New function.
10758 (for_each_inferior): New function.
10759 (change_inferior_id): New function.
10760 (add_inferior): Removed.
10761 (remove_inferior): New function.
10762 (add_thread): New function.
10763 (free_one_thread): New function.
10764 (remove_thread): New function.
10765 (clear_inferiors): Use for_each_inferior and free_one_thread.
10766 (find_inferior): New function.
10767 (find_inferior_id): New function.
10768 (inferior_target_data): Update argument type.
10769 (set_inferior_target_data): Likewise.
10770 (inferior_regcache_data): Likewise.
10771 (set_inferior_regcache_data): Likewise.
10772 * linux-low.c (linux_bp_reinsert): Remove.
10773 (all_processes, stopping_threads, using_thrads)
10774 (struct pending_signals, debug_threads, pid_of): New.
10775 (inferior_pid): Replace with macro.
10776 (struct inferior_linux_data): Remove.
10777 (get_stop_pc, add_process): New functions.
10778 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10779 Use add_process and add_thread.
10780 (linux_attach_lwp): New function, based on old linux_attach. Use
10781 add_process and add_thread. Set stop_expected for new threads.
10782 (linux_attach): New function.
10783 (linux_kill_one_process): New function.
10784 (linux_kill): Kill all LWPs.
10785 (linux_thread_alive): Use find_inferior_id.
10786 (check_removed_breakpoints, status_pending_p): New functions.
10787 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10788 Update. Use WNOHANG. Wait for cloned processes also. Update process
10789 struct for the found process.
10790 (linux_wait_for_event): New function.
10791 (linux_wait): Use it. Support LWPs.
10792 (send_sigstop, wait_for_sigstop, stop_all_processes)
10793 (linux_resume_one_process, linux_continue_one_process): New functions.
10794 (linux_resume): Support LWPs.
10795 (REGISTER_RAW_SIZE): Remove.
10796 (fetch_register): Use register_size instead. Call supply_register.
10797 (usr_store_inferior_registers): Likewise. Call collect_register.
10798 Fix recursive case.
10799 (regsets_fetch_inferior_registers): Improve error message.
10800 (regsets_store_inferior_registers): Add debugging.
10801 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10802 (unstopped_p, linux_signal_pid): New functions.
10803 (linux_target_ops): Add linux_signal_pid.
10804 (linux_init_signals): New function.
10805 (initialize_low): Call it. Initialize using_threads.
10806 * regcache.c (inferior_regcache_data): Add valid
10807 flag.
10808 (get_regcache): Fetch registers lazily. Add fetch argument
10809 and update all callers.
10810 (regcache_invalidate_one, regcache_invalidate): New
10811 functions.
10812 (new_register_cache): Renamed from create_register_cache.
10813 Return the new regcache.
10814 (free_register_cache): Change argument to a void *.
10815 (registers_to_string, registers_from_string): Call get_regcache
10816 with fetch flag set.
10817 (register_data): Make static. Pass fetch flag to get_regcache.
10818 (supply_register): Call get_regcache with fetch flag clear.
10819 (collect_register): Call get_regcache with fetch flag set.
10820 (collect_register_as_string): New function.
10821 * regcache.h: Update.
10822 * remote-utils.c (putpkt): Flush after debug output and use
10823 stderr.
10824 Handle input interrupts while waiting for an ACK.
10825 (input_interrupt): Use signal_pid method.
10826 (getpkt): Flush after debug output and use stderr.
10827 (outreg): Use collect_register_as_string.
10828 (new_thread_notify, dead_thread_notify): New functions.
10829 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10830 and general_thread.
10831 (look_up_one_symbol): Flush after debug output.
10832 * server.c (step_thread, server_waiting): New variables.
10833 (start_inferior): Don't use signal_pid. Update call to mywait.
10834 (attach_inferior): Update call to mywait.
10835 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10836 (main): Don't fetch/store registers explicitly. Use
10837 set_desired_inferior. Support proposed ``Hs'' packet. Update
10838 calls to mywait.
10839 * server.h: Update.
10840 (struct inferior_list, struct_inferior_list_entry): New.
10841 * target.c (set_desired_inferior): New.
10842 (write_inferior_memory): Constify.
10843 (mywait): New function.
10844 * target.h: Update.
10845 (struct target_ops): New signal_pid method.
10846 (mywait): Removed macro, added prototype.
10847
10848 * linux-low.h (regset_func): Removed.
10849 (regset_fill_func, regset_store_func): New.
10850 (enum regset_type): New.
10851 (struct regset_info): Add type field. Use new operation types.
10852 (struct linux_target_ops): stop_pc renamed to get_pc.
10853 Add decr_pc_after_break and breakpoint_at.
10854 (get_process, get_thread_proess, get_process_thread)
10855 (strut process_info, all_processes, linux_attach_lwp)
10856 (thread_db_init): New.
10857
10858 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10859 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10860 (the_low_target): Add new members.
10861 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10862 (i386_store_fpxregset): Constify.
10863 (target_regsets): Add new kind identifier.
10864 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10865 (i386_set_pc): Add debugging.
10866 (i386_breakpoint_at): New function.
10867 (the_low_target): Add new members.
10868 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10869 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10870 (mips_breakpoint_at): New.
10871 (the_low_target): Add new members.
10872 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10873 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10874 (the_low_target): Add new members.
10875 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10876 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10877 (the_low_target): Add new members.
10878 * linux-x86-64-low.c (target_regsets): Add new kind
10879 identifier.
10880
10881 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10882
10883 From Martin Pool <mbp@samba.org>:
10884 * server.c (gdbserver_usage): New function.
10885 (main): Call it.
10886
10887 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10888
10889 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10890 stop_at -> stop_pc.
10891
10892 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10893
10894 * Makefile.in: Remove obsolete code.
10895
10896 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10897
10898 * linux-low.c (regsets_fetch_inferior_registers),
10899 (regsets_store_inferior_registers): Removed cast to int from
10900 ptrace() calls.
10901 * regcache.h: Added declaration of struct inferior_info.
10902
10903 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10904
10905 * inferiors.c (struct inferior_info): Add regcache_data.
10906 (add_inferior): Call create_register_cache.
10907 (clear_inferiors): Call free_register_cache.
10908 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10909 * regcache.c (struct inferior_regcache_data): New.
10910 (registers): Remove.
10911 (get_regcache): New function.
10912 (create_register_cache, free_register_cache): New functions.
10913 (set_register_cache): Don't initialize the register cache here.
10914 (registers_to_string, registers_from_string, register_data): Call
10915 get_regcache.
10916 * regcache.h: Add prototypes.
10917 * server.h: Likewise.
10918
10919 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10920
10921 * mem-break.c: New file.
10922 * mem-break.h: New file.
10923 * Makefile.in: Add mem-break.o rule; update server.h
10924 dependencies.
10925 * inferiors.c (struct inferior_info): Add target_data
10926 member.
10927 (clear_inferiors): Free target_data member if set.
10928 (inferior_target_data, set_inferior_target_data): New functions.
10929 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10930 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10931 * linux-low.c (linux_bp_reinsert): New variable.
10932 (struct inferior_linux_data): New.
10933 (linux_create_inferior): Use set_inferior_target_data.
10934 (linux_attach): Likewise. Call add_inferior.
10935 (linux_wait_for_one_inferior): New function.
10936 (linux_wait): Call it.
10937 (linux_write_memory): Add const.
10938 (initialize_low): Call set_breakpoint_data.
10939 * linux-low.h (struct linux_target_ops): Add breakpoint
10940 handling members.
10941 * server.c (attach_inferior): Remove extra add_inferior
10942 call.
10943 * server.h: Include mem-break.h. Update inferior.c
10944 prototypes.
10945 * target.c (read_inferior_memory)
10946 (write_inferior_memory): New functions.
10947 * target.h (read_inferior_memory)
10948 (write_inferior_memory): Change macros to prototypes.
10949 (struct target_ops): Update comments. Add const to write_memory
10950 definition.
10951
10952 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10953
10954 * linux-low.c (usr_store_inferior_registers): Support
10955 registers which are allowed to fail to store.
10956 * linux-low.h (linux_target_ops): Likewise.
10957 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10958 (ppc_cannot_store_register): FPSCR may not be storable.
10959
10960 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10961
10962 * server.h: Include <string.h> if HAVE_STRING_H.
10963 * ChangeLog: Correct paths in last ChangeLog entry.
10964
10965 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10966
10967 * linux-low.h: Remove obsolete prototypes.
10968 (struct linux_target_ops): New.
10969 (extern the_low_target): New.
10970 * linux-low.c (num_regs, regmap): Remove declarations.
10971 (register_addr): Use the_low_target explicitly.
10972 (fetch_register): Likewise.
10973 (usr_fetch_inferior_registers): Likewise.
10974 (usr_store_inferior_registers): Likewise.
10975 * linux-arm-low.c (num_regs): Remove.
10976 (arm_num_regs): Define.
10977 (arm_regmap): Renamed from regmap, made static.
10978 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10979 made static.
10980 (arm_cannot_store_register): Renamed from cannot_store_register,
10981 made static.
10982 (the_low_target): New.
10983 * linux-i386-low.c (num_regs): Remove.
10984 (i386_num_regs): Define.
10985 (i386_regmap): Renamed from regmap, made static.
10986 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10987 made static.
10988 (i386_cannot_store_register): Renamed from cannot_store_register,
10989 made static.
10990 (the_low_target): New.
10991 * linux-ia64-low.c (num_regs): Remove.
10992 (ia64_num_regs): Define.
10993 (ia64_regmap): Renamed from regmap, made static.
10994 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10995 made static.
10996 (ia64_cannot_store_register): Renamed from cannot_store_register,
10997 made static.
10998 (the_low_target): New.
10999 * linux-m68k-low.c (num_regs): Remove.
11000 (m68k_num_regs): Define.
11001 (m68k_regmap): Renamed from regmap, made static.
11002 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11003 made static.
11004 (m68k_cannot_store_register): Renamed from cannot_store_register,
11005 made static.
11006 (the_low_target): New.
11007 * linux-mips-low.c (num_regs): Remove.
11008 (mips_num_regs): Define.
11009 (mips_regmap): Renamed from regmap, made static.
11010 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11011 made static.
11012 (mips_cannot_store_register): Renamed from cannot_store_register,
11013 made static.
11014 (the_low_target): New.
11015 * linux-ppc-low.c (num_regs): Remove.
11016 (ppc_num_regs): Define.
11017 (ppc_regmap): Renamed from regmap, made static.
11018 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11019 made static.
11020 (ppc_cannot_store_register): Renamed from cannot_store_register,
11021 made static.
11022 (the_low_target): New.
11023 * linux-s390-low.c (num_regs): Remove.
11024 (s390_num_regs): Define.
11025 (s390_regmap): Renamed from regmap, made static.
11026 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11027 made static.
11028 (s390_cannot_store_register): Renamed from cannot_store_register,
11029 made static.
11030 (the_low_target): New.
11031 * linux-sh-low.c (num_regs): Remove.
11032 (sh_num_regs): Define.
11033 (sh_regmap): Renamed from regmap, made static.
11034 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11035 made static.
11036 (sh_cannot_store_register): Renamed from cannot_store_register,
11037 made static.
11038 (the_low_target): New.
11039 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11040 (the_low_target): New.
11041
11042 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11043
11044 * Makefile.in: Add stamp-h target.
11045 * configure.in: Create stamp-h.
11046 * configure: Regenerated.
11047
11048 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11049
11050 * inferiors.c: New file.
11051 * target.c: New file.
11052 * target.h: New file.
11053 * Makefile.in: Add target.o and inferiors.o. Update
11054 dependencies.
11055 * linux-low.c (inferior_pid): New static variable,
11056 moved from server.c.
11057 (linux_create_inferior): Renamed from create_inferior.
11058 Call add_inferior. Return 0 on success instead of a PID.
11059 (linux_attach): Renamed from myattach.
11060 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11061 (linux_thread_alive): Renamed from mythread_alive.
11062 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11063 child dies.
11064 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11065 (regsets_store_inferior_registers): Correct error message.
11066 Add missing ``return 0''.
11067 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11068 (linux_store_registers): Renamed from store_inferior_registers.
11069 (linux_read_memory): Renamed from read_inferior_memory.
11070 (linux_write_memory): Renamed from write_inferior_memory.
11071 (linux_target_ops): New structure.
11072 (initialize_low): Call set_target_ops ().
11073 * remote-utils.c (unhexify): New function.
11074 (hexify): New function.
11075 (input_interrupt): Send signals to ``signal_pid''.
11076 * server.c (inferior_pid): Remove.
11077 (start_inferior): Update create_inferior call.
11078 (attach_inferior): Call add_inferior.
11079 (handle_query): New function.
11080 (main): Call handle_query for `q' packets.
11081 * server.h: Include "target.h". Remove obsolete prototypes.
11082 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11083
11084 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11085
11086 * Makefile.in: Add WARN_CFLAGS. Update configury
11087 dependencies.
11088 * configure.in: Check for <string.h>
11089 * configure: Regenerate.
11090 * config.in: Regenerate.
11091 * gdbreplay.c: Include needed system headers.
11092 (remote_open): Remove strchr prototype.
11093 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11094 * regcache.c (supply_register): Change buf argument to const void *.
11095 (supply_register_by_name): Likewise.
11096 (collect_register): Change buf argument to void *.
11097 (collect_register_by_name): Likewise.
11098 * regcache.h: Add missing prototypes.
11099 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11100 * server.c (handle_query): New function.
11101 (attached): New static variable, moved out of main.
11102 (main): Quiet longjmp clobber warnings.
11103 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11104 * utils.c (error): Remove NORETURN.
11105 (fatal): Likewise.
This page took 0.308967 seconds and 4 git commands to generate.