Change signature of linux_target_ops.new_thread
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4 * linux-arm-low.c (arm_new_thread): Likewise.
5 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
9
10 2015-03-24 Gary Benson <gbenson@redhat.com>
11
12 * linux-low.c (ptid_of_lwp): New function.
13 (lwp_is_stopped): Likewise.
14 (lwp_stop_reason): Likewise.
15 * linux-x86-low.c (update_debug_registers_callback):
16 Use lwp_is_stopped.
17 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
18 lwp_stop_reason.
19
20 2015-03-24 Gary Benson <gbenson@redhat.com>
21
22 * linux-low.h (linux_stop_lwp): Remove declaration.
23
24 2015-03-24 Gary Benson <gbenson@redhat.com>
25
26 * linux-low.h: Include nat/linux-nat.h.
27 * linux-low.c (iterate_over_lwps_args): New structure.
28 (iterate_over_lwps_filter): New function.
29 (iterate_over_lwps): Likewise.
30 * linux-x86-low.c (update_debug_registers_callback):
31 Update signature to what iterate_over_lwps expects.
32 Remove PID check that iterate_over_lwps now performs.
33 (x86_dr_low_set_addr): Use iterate_over_lwps.
34 (x86_dr_low_set_control): Likewise.
35
36 2015-03-24 Gary Benson <gbenson@redhat.com>
37
38 * linux-x86-low.c (x86_debug_reg_state): New function.
39 (x86_linux_prepare_to_resume): Use the above.
40
41 2015-03-24 Gary Benson <gbenson@redhat.com>
42
43 * linux-low.c (current_lwp_ptid): New function.
44 * linux-x86-low.c: Include nat/linux-nat.h.
45 (x86_dr_low_get_addr): Use current_lwp_ptid.
46 (x86_dr_low_get_control): Likewise.
47 (x86_dr_low_get_status): Likewise.
48
49 2015-03-20 Pedro Alves <palves@redhat.com>
50
51 * tracepoint.c (cmd_qtstatus): Make "str" const.
52
53 2015-03-20 Pedro Alves <palves@redhat.com>
54
55 * server.c (handle_general_set): Make "req_str" const.
56
57 2015-03-19 Pedro Alves <palves@redhat.com>
58
59 * linux-low.c (linux_resume_one_lwp): Rename to ...
60 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
61 instead call perror_with_name.
62 (check_ptrace_stopped_lwp_gone): New function.
63 (linux_resume_one_lwp): Reimplement as wrapper around
64 linux_resume_one_lwp_throw that swallows errors if the LWP is
65 gone.
66
67 2015-03-19 Pedro Alves <palves@redhat.com>
68
69 * linux-low.c (count_events_callback, select_event_lwp_callback):
70 No longer check whether the thread has resume_stop as last resume
71 kind.
72
73 2015-03-19 Pedro Alves <palves@redhat.com>
74
75 * linux-low.c (count_events_callback, select_event_lwp_callback):
76 Use the lwp's status_pending_p field, not the thread's.
77
78 2015-03-19 Pedro Alves <palves@redhat.com>
79
80 * linux-low.c (select_event_lwp_callback): Update comments to
81 no longer mention SIGTRAP.
82
83 2015-03-18 Gary Benson <gbenson@redhat.com>
84
85 * server.c (handle_query): Do not report vFile:fstat as supported.
86
87 2015-03-11 Gary Benson <gbenson@redhat.com>
88
89 * hostio.c (sys/types.h): New include.
90 (sys/stat.h): Likewise.
91 (common-remote-fileio.h): Likewise.
92 (handle_fstat): New function.
93 (handle_vFile): Handle vFile:fstat packets.
94
95 2015-03-11 Gary Benson <gbenson@redhat.com>
96
97 * configure.ac (AC_CHECK_MEMBERS): Add checks for
98 struct stat.st_blocks and struct stat.st_blksize.
99 * configure: Regenerate.
100 * config.in: Likewise.
101 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
102 (OBS): Add common-remote-fileio.o.
103 (common-remote-fileio.o): New rule.
104
105 2015-03-09 Pedro Alves <palves@redhat.com>
106
107 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
108 'struct sockaddr' pointer in 'accept' call.
109
110 2015-03-09 Pedro Alves <palves@redhat.com>
111
112 Revert:
113 2015-03-07 Pedro Alves <palves@redhat.com>
114 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
115 or <winsock2.h> here. Instead include "gdb_socket.h".
116 (remote_open): Use union gdb_sockaddr_u.
117 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
118 or <winsock2.h> here. Instead include "gdb_socket.h".
119 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
120 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
121 or <sys/un.h>.
122 (init_named_socket, gdb_agent_helper_thread): Use union
123 gdb_sockaddr_u.
124
125 2015-03-07 Pedro Alves <palves@redhat.com>
126
127 * configure.ac (build_warnings): Move
128 -Wdeclaration-after-statement to the C-specific set.
129 * configure: Regenerate.
130
131 2015-03-07 Pedro Alves <palves@redhat.com>
132
133 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
134 or <winsock2.h> here. Instead include "gdb_socket.h".
135 (remote_open): Use union gdb_sockaddr_u.
136 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
137 or <winsock2.h> here. Instead include "gdb_socket.h".
138 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
139 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
140 or <sys/un.h>.
141 (init_named_socket, gdb_agent_helper_thread): Use union
142 gdb_sockaddr_u.
143
144 2015-03-07 Pedro Alves <palves@redhat.com>
145
146 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
147 instead.
148
149 2015-03-06 Yao Qi <yao.qi@linaro.org>
150
151 * linux-aarch64-low.c (aarch64_insert_point): Use
152 show_debug_regs as a boolean.
153 (aarch64_remove_point): Likewise.
154
155 2015-03-05 Pedro Alves <palves@redhat.com>
156
157 * lynx-low.c (lynx_target_ops): Install NULL hooks for
158 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
159 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
160 * nto-low.c (nto_target_ops): Likewise.
161 * spu-low.c (spu_target_ops): Likewise.
162 * win32-low.c (win32_target_ops): Likewise.
163
164 2015-03-04 Pedro Alves <palves@redhat.com>
165
166 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
167 Decide whether a breakpoint triggered based on the SIGTRAP's
168 siginfo.si_code.
169 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
170 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
171 (linux_low_filter_event): Check for breakpoints before checking
172 watchpoints.
173 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
174 siginfo.si_code.
175 (linux_stopped_by_sw_breakpoint)
176 (linux_supports_stopped_by_sw_breakpoint)
177 (linux_stopped_by_hw_breakpoint)
178 (linux_supports_stopped_by_hw_breakpoint): New functions.
179 (linux_target_ops): Install new target methods.
180
181 2015-03-04 Pedro Alves <palves@redhat.com>
182
183 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
184 * server.c (swbreak_feature, hwbreak_feature): New globals.
185 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
186 (captured_main): Clear swbreak_feature and hwbreak_feature.
187 * server.h (swbreak_feature, hwbreak_feature): Declare.
188 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
189 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
190 supports_stopped_by_hw_breakpoint>: New fields.
191 (target_supports_stopped_by_sw_breakpoint)
192 (target_stopped_by_sw_breakpoint)
193 (target_supports_stopped_by_hw_breakpoint)
194 (target_stopped_by_hw_breakpoint): Declare.
195
196 2015-03-04 Pedro Alves <palves@redhat.com>
197
198 enum lwp_stop_reason -> enum target_stop_reason
199 * linux-low.c (check_stopped_by_breakpoint): Adjust.
200 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
201 (linux_wait_1, stuck_in_jump_pad_callback)
202 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
203 (linux_stopped_by_watchpoint):
204 * linux-low.h (enum lwp_stop_reason): Delete.
205 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
206 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
207
208 2015-03-04 Yao Qi <yao.qi@linaro.org>
209
210 * Makefile.in (SFILES): Add linux-aarch64-low.c.
211
212 2015-03-03 Gary Benson <gbenson@redhat.com>
213
214 * hostio.c (handle_vFile): Fix prefix lengths.
215
216 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
217
218 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
219 ptr_bits.
220
221 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
222
223 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
224 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
225 (clean): Add "rm -f" for above C files.
226 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
227 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
228 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
229 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
230 * linux-s390-low.c (HWCAP_S390_VX): New macro.
231 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
232 (init_registers_s390x_vx_linux64)
233 (init_registers_s390x_tevx_linux64)
234 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
235 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
236 declarations.
237 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
238 (s390_store_vxrs_high): New functions.
239 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
240 NT_S390_VXRS_HIGH.
241 (s390_arch_setup): Add logic for selecting one of the new target
242 descriptions. Activate the new vector regsets if applicable.
243 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
244 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
245 and init_registers_s390x_tevx_linux64.
246
247 2015-03-01 Pedro Alves <palves@redhat.com>
248
249 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
250 parameter.
251
252 2015-02-27 Pedro Alves <palves@redhat.com>
253
254 * linux-x86-low.c (u_debugreg_offset): New function.
255 (x86_linux_dr_get, x86_linux_dr_set): Use it.
256
257 2015-02-27 Pedro Alves <palves@redhat.com>
258
259 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
260 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
261 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
262 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
263 (ps_lsetfpregs, ps_getpid)
264 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
265 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
266 (ps_lsetxregs, ps_plog): Declare.
267
268 2015-02-27 Pedro Alves <palves@redhat.com>
269
270 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
271 IP_AGENT_EXPORT_FUNC.
272 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
273 IP_AGENT_EXPORT_FUNC.
274 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
275 (IP_AGENT_EXPORT): Delete.
276 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
277 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
278 (gdb_trampoline_buffer_error, collecting, gdb_collect)
279 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
280 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
281 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
282 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
283 (traceframe_read_count, traceframe_write_count)
284 (traceframes_created, trace_state_variables, get_raw_reg)
285 (get_trace_state_variable_value, set_trace_state_variable_value)
286 (ust_loaded, helper_thread_id, cmd_buf): Use
287 IPA_SYM_EXPORTED_NAME.
288 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
289 (tracepoints) Use IP_AGENT_EXPORT_VAR.
290 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
291 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
292 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
293 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
294 EXTERN_C_PUSH/EXTERN_C_POP.
295 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
296 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
297 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
298 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
299 (traceframe_write_count, traceframe_read_count)
300 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
301 (about_to_request_buffer_space, get_trace_state_variable_value)
302 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
303 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
304 EXTERN_C_PUSH/EXTERN_C_POP.
305 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
306 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
307 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
308 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
309 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
310 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
311 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
312 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
313 Define.
314 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
315 (IP_AGENT_EXPORT_VAR_DECL): Define.
316 (tracing): Declare.
317 (gdb_agent_get_raw_reg): Declare.
318
319 2015-02-27 Tom Tromey <tromey@redhat.com>
320 Pedro Alves <palves@redhat.com>
321
322 Rename symbols whose names are reserved C++ keywords throughout.
323
324 2015-02-27 Pedro Alves <palves@redhat.com>
325
326 * Makefile.in (COMPILER): New, get it from autoconf.
327 (CXX): Get from autoconf instead.
328 (COMPILE.pre): Use COMPILER.
329 (CC-LD): Rename to ...
330 (CC_LD): ... this. Use COMPILER.
331 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
332 (CXX_FOR_TARGET): Default to g++ instead of gcc.
333 * acinclude.m4: Include build-with-cxx.m4.
334 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
335 Disable -Werror by default if building in C++ mode.
336 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
337 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
338 the C++ compiler. Save/restore CXXFLAGS too.
339 * configure: Regenerate.
340
341 2015-02-27 Pedro Alves <palves@redhat.com>
342
343 * acinclude.m4: Include libiberty.m4.
344 * configure.ac: Call libiberty_INIT.
345 * config.in, configure: Regenerate.
346
347 2015-02-26 Pedro Alves <palves@redhat.com>
348
349 * linux-low.c (linux_wait_1): When incrementing the PC past a
350 program breakpoint always use the_low_target.breakpoint_len as
351 increment, rather than the maximum between that and
352 the_low_target.decr_pc_after_break.
353
354 2015-02-23 Pedro Alves <palves@redhat.com>
355
356 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
357 thread was doing a step-over; always adjust the PC if
358 we stepped over a permanent breakpoint.
359 (linux_wait_1): If we stepped over breakpoint that was on top of a
360 permanent breakpoint, manually advance the PC past it.
361
362 2015-02-23 Pedro Alves <palves@redhat.com>
363
364 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
365 modes.
366 (x86_fill_gregset, x86_store_gregset): Use it when handling
367 $orig_eax.
368
369 2015-02-20 Pedro Alves <palves@redhat.com>
370
371 * thread-db.c: Include "nat/linux-procfs.h".
372 (thread_db_init): Skip listing new threads if the kernel supports
373 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
374
375 2015-02-20 Pedro Alves <palves@redhat.com>
376
377 * linux-low.c (status_pending_p_callback): Use ptid_match.
378
379 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
380
381 PR breakpoints/16812
382 * linux-low.c (wstatus_maybe_breakpoint): Remove.
383 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
384 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
385
386 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
387
388 PR breakpoints/15956
389 * tracepoint.c (cmd_qtinit): Add check for current_thread.
390
391 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
392
393 * linux-low.c (linux_low_btrace_conf): Print size.
394 * server.c (handle_btrace_conf_general_set): New.
395 (hanle_general_set): Call handle_btrace_conf_general_set.
396 (handle_query): Report Qbtrace-conf:bts:size as supported.
397
398 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
399
400 * linux-low.c (linux_low_enable_btrace): Update parameters.
401 (linux_low_btrace_conf): New.
402 (linux_target_ops)<to_btrace_conf>: Initialize.
403 * server.c (current_btrace_conf): New.
404 (handle_btrace_enable): Rename to ...
405 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
406 to target_enable_btrace. Update comment. Update users.
407 (handle_qxfer_btrace_conf): New.
408 (qxfer_packets): Add btrace-conf entry.
409 (handle_query): Report qXfer:btrace-conf:read as supported packet.
410 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
411 (target_ops)<read_btrace_conf>: New.
412 (target_enable_btrace): Update parameters.
413 (target_read_btrace_conf): New.
414
415 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
416
417 * server.c (handle_btrace_general_set): Remove call to
418 target_supports_btrace.
419 (supported_btrace_packets): New.
420 (handle_query): Call supported_btrace_packets.
421 * target.h: include btrace-common.h.
422 (btrace_target_info): Removed.
423 (supports_btrace, target_supports_btrace): Update parameters.
424
425 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
426
427 * Makefile.in (SFILES): Add common/btrace-common.c.
428 (OBS): Add common/btrace-common.o.
429 (btrace-common.o): Add build rules.
430 * linux-low: Include btrace-common.h.
431 (linux_low_read_btrace): Use struct btrace_data. Call
432 btrace_data_init and btrace_data_fini.
433
434 2015-02-06 Pedro Alves <palves@redhat.com>
435
436 * thread-db.c (find_new_threads_callback): Add debug output.
437
438 2015-02-04 Pedro Alves <palves@redhat.com>
439
440 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
441 (resume_stopped_resumed_lwps): New function.
442 (linux_wait_for_event_filtered): Use it.
443
444 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
445
446 * Makefile.in (SFILES): Add linux-personality.c.
447 (linux-personality.o): New rule.
448 * configure.srv (srv_linux_obj): Add linux-personality.o to the
449 list of objects to be built.
450 * linux-low.c: Include nat/linux-personality.h.
451 (linux_create_inferior): Remove code to disable address space
452 randomization (moved to ../nat/linux-personality.c). Create
453 cleanup to disable address space randomization.
454
455 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
456
457 * Makefile.in (posix-strerror.o): New rule.
458 (mingw-strerror.o): Likewise.
459 * configure: Regenerated.
460 * configure.ac: Source file ../common/common.host. Initialize new
461 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
462
463 2015-01-14 Yao Qi <yao@codesourcery.com>
464
465 * Makefile.in (SFILES): Add nat/ppc-linux.c.
466 (ppc-linux.o): New rule.
467 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
468 * configure.ac: AC_CHECK_FUNCS(getauxval).
469 * config.in: Re-generated.
470 * configure: Re-generated.
471 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
472 ppc64_64bit_inferior_p
473
474 2015-01-14 Yao Qi <yao@codesourcery.com>
475
476 * linux-ppc-low.c: Include "nat/ppc-linux.h".
477 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
478 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
479 (PT_ORIG_R3, PT_TRAP): Likewise.
480 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
481 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
482 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
483
484 2015-01-10 Joel Brobecker <brobecker@adacore.com>
485
486 * i387-fp.c (i387_cache_to_xsave): In look over
487 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
488 zmmh_low_space field by use of zmmh_high_space.
489
490 2015-01-09 Pedro Alves <palves@redhat.com>
491
492 * linux-low.c (step_over_bkpt): Move higher up in the file.
493 (handle_extended_wait): Don't store the stop_pc here.
494 (get_stop_pc): Adjust comments and rename to ...
495 (check_stopped_by_breakpoint): ... this. Record whether the LWP
496 stopped for a software breakpoint or hardware breakpoint.
497 (thread_still_has_status_pending_p): New function.
498 (status_pending_p_callback): Use
499 thread_still_has_status_pending_p. If the event is no longer
500 interesting, resume the LWP.
501 (handle_tracepoints): Add assert.
502 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
503 (wstatus_maybe_breakpoint): New function.
504 (cancel_breakpoint): Delete function.
505 (check_stopped_by_watchpoint): New function, factored out from
506 linux_low_filter_event.
507 (lp_status_maybe_breakpoint): Delete function.
508 (linux_low_filter_event): Remove filter_ptid argument.
509 Leave thread group exits pending here. Store the LWP's stop PC.
510 Always leave events pending.
511 (linux_wait_for_event_filtered): Pull all events out of the
512 kernel, and leave them all pending.
513 (count_events_callback, select_event_lwp_callback): Consider all
514 events.
515 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
516 (select_event_lwp): Only give preference to the stepping LWP in
517 all-stop mode. Adjust comments.
518 (ignore_event): New function.
519 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
520 references to cancel_breakpoints. Adjust to renames. Also give
521 equal priority to all LWPs that have had events in non-stop mode.
522 If reporting a software breakpoint event, unadjust the LWP's PC.
523 (linux_wait): If linux_wait_1 returned an ignored event, retry.
524 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
525 Adjust.
526 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
527 (resume_status_pending_p): Use thread_still_has_status_pending_p.
528 (linux_stopped_by_watchpoint): Adjust.
529 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
530 * linux-low.h (enum lwp_stop_reason): New.
531 (struct lwp_info) <stop_pc>: Adjust comment.
532 <stopped_by_watchpoint>: Delete field.
533 <stop_reason>: New field.
534 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
535 * mem-break.c (software_breakpoint_inserted_here)
536 (hardware_breakpoint_inserted_here): New function.
537 * mem-break.h (software_breakpoint_inserted_here)
538 (hardware_breakpoint_inserted_here): Declare.
539 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
540 (cancel_breakpoints): Delete.
541 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
542 (upload_fast_traceframes): Remove references to
543 cancel_breakpoints.
544
545 2015-01-09 Pedro Alves <palves@redhat.com>
546
547 * thread-db.c (find_new_threads_callback): Ignore thread if the
548 kernel thread ID is -1.
549
550 2015-01-09 Pedro Alves <palves@redhat.com>
551
552 * linux-low.c (linux_attach_fail_reason_string): Move to
553 nat/linux-ptrace.c, and rename.
554 (linux_attach_lwp): Update comment.
555 (attach_proc_task_lwp_callback): New function.
556 (linux_attach): Adjust to rename and use
557 linux_proc_attach_tgid_threads.
558 (linux_attach_fail_reason_string): Delete declaration.
559
560 2015-01-01 Joel Brobecker <brobecker@adacore.com>
561
562 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
563 * server.c (gdbserver_version): Likewise.
564
565 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
566
567 * remote-utils.c: Include ctype.h.
568 (input_interrupt): Explicitly handle the case when the char
569 received is the NUL byte. Improve the printing of non-ASCII
570 characters.
571
572 2014-12-16 Joel Brobecker <brobecker@adacore.com>
573
574 * linux-low.c (linux_low_filter_event): Update call to
575 linux_enable_event_reporting following the addition of
576 a new parameter to that function.
577
578 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
579
580 PR server/17457
581 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
582 (AARCH64_FPCR_REGNO): Likewise.
583 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
584 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
585 (aarch64_store_fpregset): Likewise.
586
587 2014-12-15 Joel Brobecker <brobecker@adacore.com>
588
589 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
590 Remove FIXME comment about assumption about N.
591
592 2014-12-13 Joel Brobecker <brobecker@adacore.com>
593
594 * configure.ac: If large-file support is disabled in GDBserver,
595 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
596 * configure: Regenerate.
597
598 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
599
600 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
601 warning upon ENODATA from ptrace.
602 * linux-s390-low.c (s390_store_tdb): New.
603 (s390_regsets): Add regset for NT_S390_TDB.
604
605 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
606
607 * linux-low.c (regsets_store_inferior_registers): Skip regsets
608 without a fill_function.
609 * linux-s390-low.c (s390_fill_last_break): Remove.
610 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
611 (s390_arch_setup): Use regset's size instead of fill_function for
612 loop end condition.
613
614 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
615
616 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
617 the regset's store function when ptrace returned an error.
618 * regcache.c (get_thread_regcache): Invalidate register cache
619 before fetching inferior's registers.
620
621 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
622
623 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
624 while-loop as for-loop.
625 (regsets_store_inferior_registers): Likewise.
626
627 2014-11-28 Yao Qi <yao@codesourcery.com>
628
629 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
630 * config.in, configure: Re-generate.
631 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
632 is defined.
633
634 2014-11-21 Yao Qi <yao@codesourcery.com>
635
636 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
637 (AC_CHECK_HEADERS): Remove malloc.h.
638 * configure: Re-generated.
639 * config.in: Re-generated.
640 * server.h: Don't include alloca.h and malloc.h.
641 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
642 Don't include malloc.h.
643
644 2014-11-17 Joel Brobecker <brobecker@adacore.com>
645
646 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
647 corresponding ERRNO check in same block.
648
649 2014-11-12 Pedro Alves <palves@redhat.com>
650
651 * server.c (cont_thread): Update comment.
652 (start_inferior, attach_inferior): No longer clear cont_thread.
653 (handle_v_cont): No longer set cont_thread.
654 (captured_main): Clear cont_thread each time a GDB connects.
655
656 2014-11-12 Pedro Alves <palves@redhat.com>
657
658 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
659 thread, and don't resume all threads if the Hc thread has exited.
660
661 2014-11-12 Pedro Alves <palves@redhat.com>
662
663 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
664 the process group instead of to a specific LWP.
665
666 2014-10-15 Pedro Alves <palves@redhat.com>
667
668 PR server/17487
669 * win32-arm-low.c (arm_set_thread_context): Remove current_event
670 parameter.
671 (arm_set_thread_context): Delete.
672 (the_low_target): Adjust.
673 * win32-i386-low.c (debug_registers_changed)
674 (debug_registers_used): Delete.
675 (update_debug_registers_callback): New function.
676 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
677 needing to update their debug registers.
678 (win32_get_current_dr): New function.
679 (x86_dr_low_get_addr, x86_dr_low_get_control)
680 (x86_dr_low_get_status): Fetch the debug register from the thread
681 record's context.
682 (i386_initial_stuff): Adjust.
683 (i386_get_thread_context): Remove current_event parameter. Don't
684 clear debug_registers_changed nor copy DR values to
685 debug_reg_state.
686 (i386_set_thread_context): Delete.
687 (i386_prepare_to_resume): New function.
688 (i386_thread_added): Mark the thread as needing to update irs
689 debug registers.
690 (the_low_target): Remove i386_set_thread_context and install
691 i386_prepare_to_resume.
692 * win32-low.c (win32_get_thread_context): Adjust.
693 (win32_set_thread_context): Use SetThreadContext
694 directly.
695 (win32_prepare_to_resume): New function.
696 (win32_require_context): New function, factored out from ...
697 (thread_rec): ... this.
698 (continue_one_thread): Call win32_prepare_to_resume on each thread
699 we're about to continue.
700 (win32_resume): Call win32_prepare_to_resume on the event thread.
701 * win32-low.h (struct win32_thread_info)
702 <debug_registers_changed>: New field.
703 (struct win32_target_ops): Change prototype of set_thread_context,
704 delete set_thread_context and add prepare_to_resume.
705 (win32_require_context): New declaration.
706
707 2014-10-08 Gary Benson <gbenson@redhat.com>
708
709 * server.h: Do not include common-exceptions.h.
710
711 2014-10-08 Gary Benson <gbenson@redhat.com>
712
713 * server.h: Do not include cleanups.h.
714
715 2014-09-30 James Hogan <james.hogan@imgtec.com>
716
717 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
718 mips64-dsp-linux.c.
719
720 2014-09-23 Yao Qi <yao@codesourcery.com>
721
722 * linux-low.c (lp_status_maybe_breakpoint): New function.
723 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
724 (count_events_callback): Likewise.
725 (select_event_lwp_callback): Likewise.
726 (cancel_breakpoints_callback): Likewise.
727
728 2014-09-19 Don Breazeal <donb@codesourcery.com>
729
730 * linux-low.c (handle_extended_wait): Call
731 linux_ptrace_get_extended_event.
732 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
733 linux_is_extended_waitstatus.
734
735 2014-09-16 Joel Brobecker <brobecker@adacore.com>
736
737 * Makefile.in (CPPFLAGS): Define.
738 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
739 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
740
741 2014-09-16 Gary Benson <gbenson@redhat.com>
742
743 * inferiors.h (current_inferior): Renamed as...
744 (current_thread): New variable. All uses updated.
745 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
746 (maybe_move_out_of_jump_pad): Likewise.
747 (cancel_breakpoint): Likewise.
748 (linux_low_filter_event): Likewise.
749 (wait_for_sigstop): Likewise.
750 (linux_resume_one_lwp): Likewise.
751 (need_step_over_p): Likewise.
752 (start_step_over): Likewise.
753 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
754 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
755 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
756 and save_inferior as saved_thread.
757 * regcache.c (get_thread_regcache): Renamed saved_inferior as
758 saved_thread.
759 (regcache_invalidate_thread): Likewise.
760 * remote-utils.c (prepare_resume_reply): Likewise.
761 * thread-db.c (thread_db_get_tls_address): Likewise.
762 (disable_thread_event_reporting): Likewise.
763 (remove_thread_event_breakpoints): Likewise.
764 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
765 as saved_thread.
766 * target.h (set_desired_inferior): Renamed as...
767 (set_desired_thread): New declaration. All uses updated.
768 * server.c (myresume): Updated comment to reference thread instead
769 of inferior.
770 (handle_serial_event): Likewise.
771 (handle_target_event): Likewise.
772
773 2014-09-12 Tom Tromey <tromey@redhat.com>
774 Gary Benson <gbenson@redhat.com>
775
776 * regcache.h: Include common-regcache.h.
777 (regcache_read_pc): Don't declare.
778 * regcache.c (get_thread_regcache_for_ptid): New function.
779
780 2014-09-11 Tom Tromey <tromey@redhat.com>
781 Gary Benson <gbenson@redhat.com>
782
783 * symbol.c: New file.
784 * Makefile.in (SFILES): Add symbol.c.
785 (OBS): Add symbol.o.
786
787 2014-09-11 Gary Benson <gbenson@redhat.com>
788
789 * target.c (target_stop_ptid, target_continue_ptid): New
790 functions.
791
792 2014-09-11 Tom Tromey <tromey@redhat.com>
793 Gary Benson <gbenson@redhat.com>
794
795 * target.h: Include target/target.h.
796 * target.c (target_read_memory, target_read_uint32)
797 (target_write_memory): New functions.
798
799 2014-09-11 Gary Benson <gbenson@redhat.com>
800
801 * server.h (debug_hw_points): Don't declare.
802 * server.c (debug_hw_points): Don't define. Replace all uses
803 with show_debug_regs.
804 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
805 all uses with show_debug_regs.
806
807 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
808
809 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
810 endianness into account.
811 (ppc_supply_ptrace_register): Likewise.
812
813 2014-09-03 James Hogan <james.hogan@imgtec.com>
814
815 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
816 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
817
818 2014-09-03 Gary Benson <gbenson@redhat.com>
819
820 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
821 ALL_DEBUG_ADDRESS_REGISTERS.
822
823 2014-09-02 Gary Benson <gbenson@redhat.com>
824
825 * i386-low.h: Renamed as...
826 * x86-low.h: New file. All type, function and variable name
827 prefixes changed from "i386_" to "x86_". All references updated.
828 * i386-low.c: Renamed as...
829 * x86-low.c: New file. All type, function and variable name
830 prefixes changed from "i386_" to "x86_". All references updated.
831
832 2014-09-02 Gary Benson <gbenson@redhat.com>
833
834 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
835 (x86_linux_new_thread): Likewise.
836
837 2014-08-29 Gary Benson <gbenson@redhat.com>
838
839 * server.h (setjmp.h): Do not include.
840 (toplevel): Do not declare.
841 (common-exceptions.h): Include.
842 (cleanups.h): Likewise.
843 * server.c (toplevel): Do not define.
844 (exit_code): New static global.
845 (detach_or_kill_for_exit_cleanup): New function.
846 (main): New function. Original main renamed to...
847 (captured_main): New function.
848 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
849
850 2014-08-29 Gary Benson <gbenson@redhat.com>
851
852 * Makefile.in (SFILES): Add common/common-exceptions.c.
853 (OBS): Add common-exceptions.o.
854 (common-exceptions.o): New rule.
855 * utils.c (prepare_to_throw_exception): New function.
856
857 2014-08-29 Gary Benson <gbenson@redhat.com>
858
859 * config.in: Regenerate.
860 * configure: Likewise.
861
862 2014-08-29 Gary Benson <gbenson@redhat.com>
863
864 * Makefile.in (SFILES): Add common/cleanups.c.
865 (OBS): cleanups.o.
866 (cleanups.o): New rule.
867
868 2014-08-29 Gary Benson <gbenson@redhat.com>
869
870 * utils.c (internal_vwarning): New function.
871
872 2014-08-28 Gary Benson <gbenson@redhat.com>
873
874 * utils.h (fatal): Remove declaration.
875 * utils.c (fatal): Remove function.
876
877 2014-08-28 Gary Benson <gbenson@redhat.com>
878
879 * tracepoint.c (gdb_agent_init): Replace fatal with
880 perror_with_name.
881 (initialize_tracepoint): Likewise.
882
883 2014-08-28 Gary Benson <gbenson@redhat.com>
884
885 * remote-utils.c (remote_prepare): Replace fatal with error.
886
887 2014-08-28 Gary Benson <gbenson@redhat.com>
888
889 * linux-low.c (linux_async): Replace fatal with warning.
890 Tidy up and return.
891 (linux_start_non_stop): Return -1 if linux_async failed.
892
893 2014-08-28 Gary Benson <gbenson@redhat.com>
894
895 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
896 gdb_assert.
897 (i386_dr_low_get_addr): Remove vague comment.
898 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
899 gdb_assert.
900
901 2014-08-28 Gary Benson <gbenson@redhat.com>
902
903 * inferiors.c (get_thread_process): Replace check with gdb_assert.
904 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
905 internal_error.
906 (linux_resume_one_lwp): Likewise.
907 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
908 gdb_assert.
909 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
910 with internal_error.
911 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
912 (init_register_cache): Replace fatal with gdb_assert_not_reached.
913 (find_register_by_name): Replace fatal with internal_error.
914 (find_regno): Likewise.
915 * tdesc.c (init_target_desc): Replace check with gdb_assert.
916 * thread-db.c (thread_db_create_event): Likewise.
917 (thread_db_load_search): Likewise.
918 (try_thread_db_load_1): Likewise.
919 * tracepoint.c (get_jump_space_head): Replace fatal with
920 internal_error.
921 (claim_trampoline_space): Likewise.
922 (have_fast_tracepoint_trampoline_buffer): Likewise.
923 (cmd_qtstart): Likewise.
924 (stop_tracing): Likewise.
925 (fast_tracepoint_collecting): Likewise.
926 (target_malloc): Likewise.
927 (download_tracepoint): Likewise.
928 (download_trace_state_variables): Replace check with gdb_assert.
929 (upload_fast_traceframes): Replace fatal with internal_error.
930
931 2014-08-19 Tom Tromey <tromey@redhat.com>
932 Gary Benson <gbenson@redhat.com>
933
934 * Makefile.in (SFILES): Add common/common-debug.c.
935 (OBS): Add common-debug.o.
936 (common-debug.o): New rule.
937 * debug.h (debug_printf): Don't declare.
938 * debug.c (debug_printf): Renamed and rewritten as...
939 (debug_vprintf): New function.
940
941 2014-08-19 Gary Benson <gbenson@redhat.com>
942
943 * utils.h: Do not include print-utils.h.
944
945 2014-08-19 Tom Tromey <tromey@redhat.com>
946 Gary Benson <gbenson@redhat.com>
947
948 * server.h: Add static assertion.
949 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
950
951 2014-08-19 Tom Tromey <tromey@redhat.com>
952 Gary Benson <gbenson@redhat.com>
953
954 * Makefile.in (SFILES): Add common/errors.c.
955 (OBS): Add errors.o.
956 (IPA_OBS): Add errors-ipa.o.
957 (errors.o): New rule.
958 (errors-ipa.o): Likewise.
959 * utils.h (perror_with_name, error, warning): Don't declare.
960 * utils.c (warning): Renamed and rewritten as...
961 (vwarning): New function.
962 (error): Renamed and rewritten as...
963 (verror): New function.
964 (internal_error): Renamed and rewritten as...
965 (internal_verror): New function.
966
967 2014-08-07 Gary Benson <gbenson@redhat.com>
968
969 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
970 * configure: Regenerate.
971 * config.in: Likewise.
972 * server.h: Do not include errno.h.
973 * event-loop.c: Likewise.
974 * hostio-errno.c: Likewise.
975 * linux-low.c: Likewise.
976 * remote-utils.c: Likewise.
977 * spu-low.c: Likewise.
978 * utils.c: Likewise.
979 * gdbreplay.c: Unconditionally include errno.h.
980
981 2014-08-07 Gary Benson <gbenson@redhat.com>
982
983 * server.h: Do not include string.h.
984 * event-loop.c: Likewise.
985 * linux-low.c: Likewise.
986 * regcache.c: Likewise.
987 * remote-utils.c: Likewise.
988 * spu-low.c: Likewise.
989 * utils.c: Likewise.
990
991 2014-08-07 Gary Benson <gbenson@redhat.com>
992
993 * server.h: Do not include gdb_assert.h.
994
995 2014-08-07 Gary Benson <gbenson@redhat.com>
996
997 * server.h: Do not include common-utils.h.
998
999 2014-08-07 Gary Benson <gbenson@redhat.com>
1000
1001 * server.h: Do not include ptid.h.
1002 * notif.h: Likewise.
1003
1004 2014-08-07 Gary Benson <gbenson@redhat.com>
1005
1006 * server.h: Do not include gdb_locale.h.
1007
1008 2014-08-07 Gary Benson <gbenson@redhat.com>
1009
1010 * server.h: Do not include gdb/signals.h.
1011 * win32-low.c: Likewise.
1012
1013 2014-08-07 Gary Benson <gbenson@redhat.com>
1014
1015 * server.h: Do not include pathmax.h.
1016
1017 2014-08-07 Gary Benson <gbenson@redhat.com>
1018
1019 * server.h: Do not include libiberty.h.
1020 * linux-bfin-low.c: Likewise.
1021
1022 2014-08-07 Gary Benson <gbenson@redhat.com>
1023
1024 * server.h: Do not include ansidecl.h.
1025
1026 2014-08-07 Gary Benson <gbenson@redhat.com>
1027
1028 * linux-x86-low.c: Do not include stddef.h.
1029 * lynx-ppc-low.c: Likewise.
1030 * tracepoint.c: Likewise.
1031
1032 2014-08-07 Gary Benson <gbenson@redhat.com>
1033
1034 * server.h: Do not include stdarg.h.
1035 * nto-low.c: Likewise.
1036
1037 2014-08-07 Gary Benson <gbenson@redhat.com>
1038
1039 * server.h: Do not include stdlib.h.
1040 * inferiors.c: Likewise.
1041 * linux-low.c: Likewise.
1042 * regcache.c: Likewise.
1043 * spu-low.c: Likewise.
1044 * tracepoint.c: Likewise.
1045 * utils.c: Likewise.
1046
1047 2014-08-07 Gary Benson <gbenson@redhat.com>
1048
1049 * server.h: Do not include stdio.h.
1050 * linux-low.c: Likewise.
1051 * remote-utils.c: Likewise.
1052 * spu-low.c: Likewise.
1053 * utils.c: Likewise.
1054 * wincecompat.c: Likewise.
1055
1056 2014-08-06 Gary Benson <gbenson@redhat.com>
1057
1058 * regcache.c (init_register_cache): Move conditionals inside if.
1059
1060 2014-08-06 Gary Benson <gbenson@redhat.com>
1061
1062 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1063
1064 2014-07-31 Gary Benson <gbenson@redhat.com>
1065
1066 * ax.h: Do not include server.h.
1067 * gdbthread.h: Likewise.
1068 * lynx-low.h: Likewise.
1069 * notif.h: Likewise.
1070
1071 2014-07-30 Gary Benson <gbenson@redhat.com>
1072
1073 * server.h: Include common-defs.h.
1074 Do not include config.h or build-gnulib-gdbserver/config.h.
1075
1076 2014-07-30 Gary Benson <gbenson@redhat.com>
1077
1078 * hostio-errno.c: Move server.h to top of includes list.
1079 * inferiors.c: Likewise.
1080 * linux-x86-low.c: Likewise.
1081 * notif.c: Include server.h.
1082
1083 2014-07-24 Tom Tromey <tromey@redhat.com>
1084 Gary Benson <gbenson@redhat.com>
1085
1086 * server.h (CORE_ADDR): Now unsigned.
1087
1088 2014-07-16 Pedro Alves <palves@redhat.com>
1089
1090 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1091
1092 2014-07-15 Pedro Alves <palves@redhat.com>
1093
1094 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1095 copy.
1096
1097 2014-07-11 Pedro Alves <palves@redhat.com>
1098
1099 * linux-low.c (kill_wait_lwp): New function, based on
1100 kill_one_lwp_callback, but use my_waitpid directly.
1101 (kill_one_lwp_callback, linux_kill): Use it.
1102
1103 2014-06-23 Pedro Alves <palves@redhat.com>
1104
1105 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1106 before setting DR0..DR3.
1107
1108 2014-06-20 Gary Benson <gbenson@redhat.com>
1109
1110 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1111 * configure: Regenerated.
1112 * config.in: Likewise.
1113
1114 2014-06-20 Gary Benson <gbenson@redhat.com>
1115
1116 * Makefile.in (SFILES): Update locations for files moved
1117 from common to nat.
1118 (object file files): Reordered.
1119
1120 2014-06-20 Gary Benson <gbenson@redhat.com>
1121
1122 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1123 (i386_dr_low_set_addr): Likewise.
1124 (i386_dr_low_get_addr): Likewise.
1125 (i386_dr_low_can_set_control): Likewise.
1126 (i386_dr_low_set_control): Likewise.
1127 (i386_dr_low_get_control): Likewise.
1128 (i386_dr_low_get_status): Likewise.
1129 (i386_get_debug_register_length): Likewise.
1130 * linux-x86-low.c (i386_dr_low_set_addr):
1131 Changed signature. Made static.
1132 (i386_dr_low_get_addr): Likewise.
1133 (i386_dr_low_set_control): Likewise.
1134 (i386_dr_low_get_control): Likewise.
1135 (i386_dr_low_get_status): Likewise.
1136 (i386_dr_low): New global variable.
1137 * win32-i386-low.c (i386_dr_low_set_addr):
1138 Changed signature. Made static.
1139 (i386_dr_low_get_addr): Likewise.
1140 (i386_dr_low_set_control): Likewise.
1141 (i386_dr_low_get_control): Likewise.
1142 (i386_dr_low_get_status): Likewise.
1143 (i386_dr_low): New global variable.
1144
1145 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1146
1147 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1148 * Makefile.in (AR, AR_FLAGS): Define.
1149 * configure: Regenerate.
1150
1151 2014-06-19 Gary Benson <gbenson@redhat.com>
1152
1153 * Makefile.in (i386-dregs.o): New rule.
1154 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1155 * i386-low.c (target.h): Remove include.
1156 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1157 (DR_CONTROL_SHIFT): Likewise.
1158 (DR_CONTROL_SIZE): Likewise.
1159 (DR_RW_EXECUTE): Likewise.
1160 (DR_RW_WRITE): Likewise.
1161 (DR_RW_READ): Likewise.
1162 (DR_RW_IORW): Likewise.
1163 (DR_LEN_1): Likewise.
1164 (DR_LEN_2): Likewise.
1165 (DR_LEN_4): Likewise.
1166 (DR_LEN_8): Likewise.
1167 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1168 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1169 (DR_ENABLE_SIZE): Likewise.
1170 (DR_LOCAL_SLOWDOWN): Likewise.
1171 (DR_GLOBAL_SLOWDOWN): Likewise.
1172 (DR_CONTROL_RESERVED): Likewise.
1173 (I386_DR_CONTROL_MASK): Likewise.
1174 (I386_DR_VACANT): Likewise.
1175 (I386_DR_LOCAL_ENABLE): Likewise.
1176 (I386_DR_GLOBAL_ENABLE): Likewise.
1177 (I386_DR_DISABLE): Likewise.
1178 (I386_DR_SET_RW_LEN): Likewise.
1179 (I386_DR_GET_RW_LEN): Likewise.
1180 (I386_DR_WATCH_HIT): Likewise.
1181 (i386_wp_op_t): Likewise.
1182 (i386_show_dr): Likewise.
1183 (i386_length_and_rw_bits): Likewise.
1184 (i386_insert_aligned_watchpoint): Likewise.
1185 (i386_remove_aligned_watchpoint): Likewise.
1186 (i386_handle_nonaligned_watchpoint): Likewise.
1187 i386_update_inferior_debug_regs(): Likewise.
1188 (i386_dr_insert_watchpoint): Likewise.
1189 (i386_dr_remove_watchpoint): Likewise.
1190 (i386_dr_region_ok_for_watchpoint): Likewise.
1191 (i386_dr_stopped_data_address): Likewise.
1192 (i386_dr_stopped_by_watchpoint): Likewise.
1193
1194 2014-06-19 Gary Benson <gbenson@redhat.com>
1195
1196 * i386-low.c (i386_dr_show): Renamed to
1197 i386_show_dr and made static. All uses updated.
1198 (i386_dr_length_and_rw_bits): Renamed to
1199 i386_length_and_rw_bits and made static.
1200 All uses updated.
1201 (i386_dr_insert_aligned_watchpoint): Renamed to
1202 i386_insert_aligned_watchpoint and made static.
1203 All uses updated.
1204 (i386_dr_remove_aligned_watchpoint): Renamed to
1205 i386_remove_aligned_watchpoint and made static.
1206 All uses updated.
1207 (i386_dr_update_inferior_debug_regs): Renamed to
1208 i386_update_inferior_debug_regs and made static.
1209 All uses updated.
1210
1211 2014-06-18 Gary Benson <gbenson@redhat.com>
1212
1213 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1214 (i386_dr_low_can_set_control): Likewise.
1215 (i386_get_debug_register_length): Likewise.
1216 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1217 (i386_dr_low_can_set_control): Likewise.
1218 (i386_get_debug_register_length): Likewise.
1219
1220 2014-06-17 Gary Benson <gbenson@redhat.com>
1221
1222 * i386-low.h (i386-dregs.h): New include.
1223 (DR_FIRSTADDR): Now in i386-dregs.h.
1224 (DR_LASTADDR): Likewise.
1225 (DR_NADDR): Likewise.
1226 (DR_STATUS): Likewise.
1227 (DR_CONTROL): Likewise.
1228 (i386_debug_reg_state): Likewise.
1229 (i386_dr_insert_watchpoint): Likewise.
1230 (i386_dr_remove_watchpoint): Likewise.
1231 (i386_dr_region_ok_for_watchpoint): Likewise.
1232 (i386_dr_stopped_data_address): Likewise.
1233 (i386_dr_stopped_by_watchpoint): Likewise.
1234 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1235
1236 2014-06-18 Gary Benson <gbenson@redhat.com>
1237
1238 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1239 i386_dr_insert_watchpoint.
1240 (i386_low_remove_watchpoint): Renamed to
1241 i386_dr_remove_watchpoint.
1242 (i386_low_region_ok_for_watchpoint): Renamed to
1243 i386_dr_region_ok_for_watchpoint.
1244 (i386_low_stopped_data_address): Renamed to
1245 i386_dr_stopped_data_address.
1246 (i386_low_stopped_by_watchpoint): Renamed to
1247 i386_dr_stopped_by_watchpoint.
1248 * i386-low.c (i386_show_dr): Renamed to
1249 i386_dr_show and made nonstatic. All uses updated.
1250 (i386_length_and_rw_bits): Renamed to
1251 i386_dr_length_and_rw_bits and made nonstatic.
1252 All uses updated.
1253 (i386_insert_aligned_watchpoint): Renamed to
1254 i386_dr_insert_aligned_watchpoint and made nonstatic.
1255 All uses updated.
1256 (i386_remove_aligned_watchpoint): Renamed to
1257 i386_dr_remove_aligned_watchpoint and made nonstatic.
1258 All uses updated.
1259 (i386_update_inferior_debug_regs): Renamed to
1260 i386_dr_update_inferior_debug_regs and made nonstatic.
1261 All uses updated.
1262 (i386_low_insert_watchpoint): Renamed to
1263 i386_dr_insert_watchpoint. All uses updated.
1264 (i386_low_remove_watchpoint): Renamed to
1265 i386_dr_remove_watchpoint. All uses updated.
1266 (i386_low_region_ok_for_watchpoint): Renamed to
1267 i386_dr_region_ok_for_watchpoint. All uses updated.
1268 (i386_low_stopped_data_address): Renamed to
1269 i386_dr_stopped_data_address. All uses updated.
1270 (i386_low_stopped_by_watchpoint): Renamed to
1271 i386_dr_stopped_by_watchpoint. All uses updated.
1272
1273 2014-06-18 Gary Benson <gbenson@redhat.com>
1274
1275 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1276 (i386_dr_low_can_set_control): Likewise.
1277 (i386_insert_aligned_watchpoint): New check.
1278
1279 2014-06-18 Gary Benson <gbenson@redhat.com>
1280
1281 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1282 Renamed to state.
1283
1284 2014-06-18 Gary Benson <gbenson@redhat.com>
1285
1286 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1287 instead of fatal and error.
1288 (i386_handle_nonaligned_watchpoint): Likewise.
1289
1290 2014-06-18 Gary Benson <gbenson@redhat.com>
1291
1292 * i386-low.c (i386_get_debug_register_length): New macro.
1293 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1294 (i386_show_dr): Use debug_printf instead of fprintf. Use
1295 phex to format values.
1296
1297 2014-06-18 Gary Benson <gbenson@redhat.com>
1298
1299 * i386-low.h: Comment changes.
1300 * i386-low.c: Likewise.
1301
1302 2014-06-18 Gary Benson <gbenson@redhat.com>
1303
1304 * i386-low.c: Whitespace changes.
1305
1306 2014-06-12 Tom Tromey <tromey@redhat.com>
1307
1308 * utils.c (freeargv): Remove.
1309
1310 2014-06-12 Tom Tromey <tromey@redhat.com>
1311
1312 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1313 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1314 (parse_debug_format_options): Likewise.
1315 (gdbserver_usage): Likewise.
1316 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1317 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1318 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1319 against libiberty.
1320 ($(LIBGNU)): Depend on libiberty.
1321 (all-lib): Recurse into all subdirs.
1322 (install-only): Invoke "install" target in subdirs.
1323 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1324 targets.
1325 * configure: Rebuild.
1326 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1327 for vasprintf, vsnprintf, or gettimeofday.
1328 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1329 srv_tgtobj.
1330
1331 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1332
1333 * development.sh: Delete.
1334 * Makefile.in (config.status): Adjust dependency on development.sh.
1335 * configure.ac: Adjust development.sh source call.
1336 * configure: Regenerate.
1337
1338 2014-06-02 Pedro Alves <palves@redhat.com>
1339
1340 * ax.c (gdb_free_agent_expr): New function.
1341 * ax.h (gdb_free_agent_expr): New declaration.
1342 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1343 list.
1344 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1345 static.
1346 (clear_breakpoint_conditions_and_commands): New function.
1347 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1348 (clear_breakpoint_conditions_and_commands): New declaration.
1349
1350 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1351
1352 * linux-aarch64-low.c (asm/ptrace.h): Include.
1353
1354 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1355
1356 Fix TLS access for -static -pthread.
1357 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1358 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1359 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1360
1361 2014-05-20 Pedro Alves <palves@redhat.com>
1362
1363 * linux-aarch64-low.c (aarch64_insert_point)
1364 (aarch64_remove_point): No longer check whether the type is
1365 supported here. Adjust to new interface.
1366 (the_low_target): Install aarch64_supports_z_point_type as
1367 supports_z_point_type method.
1368 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1369 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1370 instead of a Z packet char. Adjust.
1371 (arm_supports_z_point_type): New function.
1372 (arm_insert_point, arm_remove_point): Adjust to new interface.
1373 (the_low_target): Install arm_supports_z_point_type.
1374 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1375 (cris_insert_point, cris_remove_point): Adjust to new interface.
1376 Don't check whether the type is supported here.
1377 (the_low_target): Install cris_supports_z_point_type.
1378 * linux-low.c (linux_supports_z_point_type): New function.
1379 (linux_insert_point, linux_remove_point): Adjust to new interface.
1380 * linux-low.h (struct linux_target_ops) <insert_point,
1381 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1382 raw_breakpoint pointer parameter.
1383 <supports_z_point_type>: New method.
1384 * linux-mips-low.c (mips_supports_z_point_type): New function.
1385 (mips_insert_point, mips_remove_point): Adjust to new interface.
1386 Use mips_supports_z_point_type.
1387 (the_low_target): Install mips_supports_z_point_type.
1388 * linux-ppc-low.c (the_low_target): Install NULL as
1389 supports_z_point_type method.
1390 * linux-s390-low.c (the_low_target): Install NULL as
1391 supports_z_point_type method.
1392 * linux-sparc-low.c (the_low_target): Install NULL as
1393 supports_z_point_type method.
1394 * linux-x86-low.c (x86_supports_z_point_type): New function.
1395 (x86_insert_point): Adjust to new insert_point interface. Use
1396 insert_memory_breakpoint. Adjust to new
1397 i386_low_insert_watchpoint interface.
1398 (x86_remove_point): Adjust to remove_point interface. Use
1399 remove_memory_breakpoint. Adjust to new
1400 i386_low_remove_watchpoint interface.
1401 (the_low_target): Install x86_supports_z_point_type.
1402 * lynx-low.c (lynx_target_ops): Install NULL as
1403 supports_z_point_type callback.
1404 * nto-low.c (nto_supports_z_point_type): New.
1405 (nto_insert_point, nto_remove_point): Adjust to new interface.
1406 (nto_target_ops): Install nto_supports_z_point_type.
1407 * mem-break.c: Adjust intro comment.
1408 (struct raw_breakpoint) <raw_type, size>: New fields.
1409 <inserted>: Update comment.
1410 <shlib_disabled>: Delete field.
1411 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1412 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1413 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1414 (raw_bkpt_type_to_target_hw_bp_type): New function.
1415 (find_enabled_raw_code_breakpoint_at): New function.
1416 (find_raw_breakpoint_at): New type and size parameters. Use them.
1417 (insert_memory_breakpoint): New function, based off
1418 set_raw_breakpoint_at.
1419 (remove_memory_breakpoint): New function.
1420 (set_raw_breakpoint_at): Reimplement.
1421 (set_breakpoint): New, based on set_breakpoint_at.
1422 (set_breakpoint_at): Reimplement.
1423 (delete_raw_breakpoint): Go through the_target->remove_point
1424 instead of assuming memory breakpoints.
1425 (find_gdb_breakpoint_at): Delete.
1426 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1427 (find_gdb_breakpoint): New function.
1428 (set_gdb_breakpoint_at): Delete.
1429 (z_type_supported): New function.
1430 (set_gdb_breakpoint_1): New function, loosely based off
1431 set_gdb_breakpoint_at.
1432 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1433 (delete_gdb_breakpoint_at): Delete.
1434 (delete_gdb_breakpoint_1): New function, loosely based off
1435 delete_gdb_breakpoint_at.
1436 (delete_gdb_breakpoint): New function.
1437 (clear_gdb_breakpoint_conditions): Rename to ...
1438 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1439 breakpoint.
1440 (add_condition_to_breakpoint): Make static.
1441 (add_breakpoint_condition): Take a struct breakpoint pointer
1442 instead of an address. Adjust.
1443 (gdb_condition_true_at_breakpoint): Rename to ...
1444 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1445 z_type parameter.
1446 (gdb_condition_true_at_breakpoint): Reimplement.
1447 (add_breakpoint_commands): Take a struct breakpoint pointer
1448 instead of an address. Adjust.
1449 (gdb_no_commands_at_breakpoint): Rename to ...
1450 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1451 parameter. Return true if no breakpoint was found. Change debug
1452 output.
1453 (gdb_no_commands_at_breakpoint): Reimplement.
1454 (run_breakpoint_commands): Rename to ...
1455 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1456 and change return type to boolean.
1457 (run_breakpoint_commands): New function.
1458 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1459 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1460 breakpoint. Go through the_target->remove_point instead of
1461 assuming memory breakpoint.
1462 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1463 software and hardware breakpoints.
1464 (reinsert_raw_breakpoint): Go through the_target->insert_point
1465 instead of assuming memory breakpoint.
1466 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1467 software and hardware breakpoints.
1468 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1469 Check both software and hardware breakpoints.
1470 (validate_inserted_breakpoint): Assert the breakpoint is a
1471 software breakpoint. Set the inserted flag to -1 instead of
1472 setting shlib_disabled.
1473 (delete_disabled_breakpoints): Adjust.
1474 (validate_breakpoints): Only validate software breakpoints.
1475 Adjust to inserted flag change.
1476 (check_mem_read, check_mem_write): Skip breakpoint types other
1477 than software breakpoints. Adjust to inserted flag change.
1478 * mem-break.h (enum raw_bkpt_type): New enum.
1479 (raw_breakpoint, struct process_info): Forward declare.
1480 (Z_packet_to_target_hw_bp_type): Delete declaration.
1481 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1482 (set_gdb_breakpoint, delete_gdb_breakpoint)
1483 (clear_breakpoint_conditions): New declarations.
1484 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1485 (breakpoint_inserted_here): Update comment.
1486 (add_breakpoint_condition, add_breakpoint_commands): Replace
1487 address parameter with a breakpoint pointer parameter.
1488 (gdb_breakpoint_here): Update comment.
1489 (delete_gdb_breakpoint_at): Delete.
1490 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1491 * server.c (process_point_options): Take a struct breakpoint
1492 pointer instead of an address. Adjust.
1493 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1494 delete_gdb_breakpoint.
1495 * spu-low.c (spu_target_ops): Install NULL as
1496 supports_z_point_type method.
1497 * target.h: Include mem-break.h.
1498 (struct target_ops) <prepare_to_access_memory>: Update comment.
1499 <supports_z_point_type>: New field.
1500 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1501 instead of a char. Also take a raw breakpoint pointer.
1502 * win32-arm-low.c (the_low_target): Install NULL as
1503 supports_z_point_type.
1504 * win32-i386-low.c (i386_supports_z_point_type): New function.
1505 (i386_insert_point, i386_remove_point): Adjust to new interface.
1506 (the_low_target): Install i386_supports_z_point_type.
1507 * win32-low.c (win32_supports_z_point_type): New function.
1508 (win32_insert_point, win32_remove_point): Adjust to new interface.
1509 (win32_target_ops): Install win32_supports_z_point_type.
1510 * win32-low.h (struct win32_target_ops):
1511 <supports_z_point_type>: New method.
1512 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1513 instead of a char. Also take a raw breakpoint pointer.
1514
1515 2014-05-20 Pedro Alves <palves@redhat.com>
1516
1517 * mem-break.h: Include break-common.h.
1518 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1519 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1520 (Z_packet_to_target_hw_bp_type): New declaration.
1521 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1522 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1523 (Z_PACKET_ACCESS_WP): Delete macros.
1524 (Z_packet_to_hw_type): Delete function.
1525 * i386-low.h: Don't include break-common.h here.
1526 (Z_packet_to_hw_type): Delete declaration.
1527 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1528 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1529 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1530 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1531 * linux-aarch64-low.c: Don't include break-common.h here.
1532 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1533 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1534 (Z_packet_to_target_hw_bp_type): Delete function.
1535 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1536 function.
1537 (mips_insert_point, mips_remove_point): Use
1538 Z_packet_to_target_hw_bp_type.
1539
1540 2014-05-20 Pedro Alves <palves@redhat.com>
1541
1542 * linux-aarch64-low.c: Include break-common.h.
1543 (enum target_point_type): Delete.
1544 (Z_packet_to_point_type): Rename to ...
1545 (Z_packet_to_target_hw_bp_type): ... this, and return a
1546 target_hw_bp_type instead.
1547 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1548 instead of an enum target_point_type.
1549 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1550 breakpoint type.
1551 (aarch64_dr_state_insert_one_point)
1552 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1553 (aarch64_handle_aligned_watchpoint)
1554 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1555 Take an enum target_hw_bp_type instead of an enum
1556 target_point_type.
1557 (aarch64_supports_z_point_type): New function.
1558 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1559 use Z_packet_to_target_hw_bp_type.
1560
1561 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1562
1563 * configure.ac: Only use -Werror by default when DEVELOPMENT
1564 is true.
1565 * configure: Regenerate.
1566
1567 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1568
1569 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1570 * linux-x86-low.c (X86_64_USER_REGS): New.
1571 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1572
1573 2014-04-28 Yao Qi <yao@codesourcery.com>
1574
1575 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1576 name.
1577
1578 2014-04-25 Pedro Alves <palves@redhat.com>
1579
1580 PR server/16255
1581 * linux-low.c (linux_attach_fail_reason_string): New function.
1582 (linux_attach_lwp): Delete.
1583 (linux_attach_lwp_1): Rename to ...
1584 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1585 argument. Remove "initial" parameter. Return int instead of
1586 void. Don't error or warn here.
1587 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1588 failure to attach to the tgid. Call warning when failing to
1589 attach to an lwp.
1590 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1591 argument. Remove "initial" parameter. Return int instead of
1592 void. Don't error or warn here.
1593 (linux_attach_fail_reason_string): New declaration.
1594 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1595 interface change. Use linux_attach_fail_reason_string.
1596
1597 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1598 Walfred Tedeschi <walfred.tedeschi@intel.com>
1599
1600 * Makefile.in: Added rules to handle new files
1601 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1602 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1603 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1604 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1605 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1606 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1607 x32-avx512-linux.o.
1608 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1609 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1610 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1611 i386/x32-avx512.xml.
1612 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1613 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1614 i386/x32-avx512-linux.xml.
1615 * i387-fp.c (num_avx512_k_registers): New constant for number
1616 of K registers.
1617 (num_avx512_zmmh_low_registers): New constant for number of
1618 lower ZMM registers (0-15).
1619 (num_avx512_zmmh_high_registers): New constant for number of
1620 higher ZMM registers (16-31).
1621 (num_avx512_ymmh_registers): New contant for number of higher
1622 YMM registers (ymm16-31 added by avx521 on x86_64).
1623 (num_avx512_xmm_registers): New constant for number of higher
1624 XMM registers (xmm16-31 added by AVX512 on x86_64).
1625 (struct i387_xsave): Add space for AVX512 registers.
1626 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1627 Add code to handle AVX512 registers.
1628 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1629 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1630 prototypei from generated file.
1631 (tdesc_amd64_avx512_linux): Likewise.
1632 (init_registers_x32_avx512_linux): Likewise.
1633 (tdesc_x32_avx512_linux): Likewise.
1634 (init_registers_i386_avx512_linux): Likewise.
1635 (tdesc_i386_avx512_linux): Likewise.
1636 (x86_64_regmap): Add AVX512 registers.
1637 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1638 mask.
1639 (initialize_low_arch): Add code to initialize AVX512 registers.
1640
1641 2014-04-23 Pedro Alves <palves@redhat.com>
1642
1643 * mem-break.c (find_gdb_breakpoint_at): Make static.
1644 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1645
1646 2014-04-23 Pedro Alves <palves@redhat.com>
1647
1648 * i386-low.c: Don't include break-common.h here.
1649 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1650 prototype to take target_hw_bp_type as argument instead of a Z
1651 packet char.
1652 * i386-low.h: Include break-common.h here.
1653 (Z_packet_to_hw_type): Declare.
1654 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1655 prototypes.
1656 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1657 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1658 (x86_remove_point): Convert the packet number to a
1659 target_hw_bp_type before calling i386_low_remove_watchpoint.
1660 * win32-i386-low.c (i386_insert_point): Convert the packet number
1661 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1662 (i386_remove_point): Convert the packet number to a
1663 target_hw_bp_type before calling i386_low_remove_watchpoint.
1664
1665 2014-04-23 Pedro Alves <palves@redhat.com>
1666
1667 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1668
1669 2014-04-10 Pedro Alves <palves@redhat.com>
1670
1671 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1672 Check if the condition or command is NULL before checking if the
1673 breakpoint is known. On success, return true.
1674 * mem-break.h (add_breakpoint_condition): Document return.
1675 (add_breakpoint_commands): Add describing comment.
1676 * server.c (skip_to_semicolon): New function.
1677 (process_point_options): Use it.
1678
1679 2014-04-09 Pedro Alves <palves@redhat.com>
1680
1681 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1682 to lwpid_of.
1683
1684 2014-02-27 Pedro Alves <palves@redhat.com>
1685
1686 PR 12702
1687 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1688 macros.
1689 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1690 output.
1691 (last_thread_of_process_p): Take a PID argument instead of a
1692 thread pointer.
1693 (linux_wait_for_lwp): Delete.
1694 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1695 functions.
1696 (linux_low_filter_event): New function, party factored out from
1697 linux_wait_for_event.
1698 (linux_wait_for_event): Rename to ...
1699 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1700 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1701 sigsuspend. Check for zombie leaders.
1702 (linux_wait_for_event): Reimplement as wrapper around
1703 linux_wait_for_event_filtered.
1704 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1705 a normal or signal exit is seen, it's the whole process exiting.
1706 (wait_for_sigstop): No longer a for_each_inferior callback.
1707 Rewrite on top of linux_wait_for_event_filtered.
1708 (stop_all_lwps): Call wait_for_sigstop directly.
1709 * server.c (resume, handle_target_event): Handle
1710 TARGET_WAITKIND_NO_RESUMED.
1711
1712 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1713
1714 * win32-low.c (psapi_get_dll_name,
1715 * win32_CreateToolhelp32Snapshot): Delete.
1716 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1717 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1718 Delete.
1719 (handle_load_dll): Add function description.
1720 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1721
1722 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1723
1724 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1725 Add comment.
1726 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1727 base address when calling win32_add_one_solib.
1728 (handle_load_dll): Delete local variable load_addr.
1729 Remove 0x1000 offset applied to DLL base address when calling
1730 win32_add_one_solib.
1731 (handle_unload_dll): Add comment.
1732
1733 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1734
1735 * win32-low.c (win32_add_all_dlls): Renames
1736 win32_ensure_ntdll_loaded. Rewrite function documentation.
1737 Adjust implementation to always load all DLLs.
1738 Add 0x1000 offset to DLL base address when calling
1739 win32_add_one_solib.
1740 (child_initialization_done): New static global.
1741 (do_initial_child_stuff): Set child_initialization_done to
1742 zero during child initialization, and 1 after. Replace call
1743 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1744 Add comment.
1745 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1746 (handle_unload_dll): Add function documentation.
1747 (get_child_debug_event): Ignore load and unload DLL events
1748 during child initialization.
1749
1750 2014-02-20 Doug Evans <dje@google.com>
1751
1752 Remove global all_lwps.
1753 * inferiors.h (ptid_of): Move here from linux-low.h.
1754 (pid_of, lwpid_of): Ditto.
1755 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1756 parameter is a struct thread_info * now.
1757 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1758 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1759 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1760 directly.
1761 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1762 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1763 * linux-arm-low.c (update_registers_callback): Update, "entry"
1764 parameter is a struct thread_info * now.
1765 Fetch lwpid from current_inferior directly.
1766 (arm_insert_point): Pass &all_threads to find_inferior instead of
1767 &all_lwps.
1768 (arm_remove_point): Ditto.
1769 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1770 (arm_prepare_to_resume): Fetch pid from thread.
1771 (arm_read_description): Fetch lwpid from current_inferior directly.
1772 * linux-low.c (all_lwps): Delete.
1773 (delete_lwp): Delete call to remove_inferior.
1774 (handle_extended_wait): Fetch lwpid from thread.
1775 (add_lwp): Don't set lwp->entry.id. Remove call to
1776 add_inferior_to_list.
1777 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1778 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1779 (kill_one_lwp_callback): Ditto.
1780 (linux_kill): Don't dereference NULL pointer.
1781 Fetch ptid,lwpid from thread.
1782 (get_detach_signal): Fetch ptid from thread.
1783 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1784 Simplify call to regcache_invalidate_thread.
1785 (delete_lwp_callback): Update, "entry" parameter is a
1786 struct thread_info * now. Fetch pid from thread.
1787 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1788 (status_pending_p_callback): Update, "entry" parameter is a
1789 struct thread_info * now. Fetch ptid from thread.
1790 (find_lwp_pid): Update, "entry" parameter is a
1791 struct thread_info * now.
1792 (linux_wait_for_lwp): Fetch pid from thread.
1793 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1794 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1795 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1796 (dequeue_one_deferred_signal): Ditto.
1797 (cancel_breakpoint): Fetch ptid from current_inferior.
1798 (linux_wait_for_event): Pass &all_threads to find_inferior,
1799 not &all_lwps. Fetch ptid, lwpid from thread.
1800 (count_events_callback): Update, "entry" parameter is a
1801 struct thread_info * now.
1802 (select_singlestep_lwp_callback): Ditto.
1803 (select_event_lwp_callback): Ditto.
1804 (cancel_breakpoints_callback): Ditto.
1805 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1806 not &all_lwps.
1807 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1808 (unsuspend_one_lwp): Update, "entry" parameter is a
1809 struct thread_info * now.
1810 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1811 not &all_lwps.
1812 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1813 Fetch lwpid from thread, not lwp.
1814 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1815 Pass &all_threads to find_inferior, not &all_lwps.
1816 (send_sigstop): Fetch lwpid from thread, not lwp.
1817 (send_sigstop_callback): Update, "entry" parameter is a
1818 struct thread_info * now.
1819 (suspend_and_send_sigstop_callback): Ditto.
1820 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1821 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1822 struct thread_info * now.
1823 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1824 from thread, lwp.
1825 (lwp_running): Update, "entry" parameter is a
1826 struct thread_info * now.
1827 (stop_all_lwps): Fetch ptid from thread.
1828 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1829 (linux_resume_one_lwp): Fetch lwpid from thread.
1830 (linux_set_resume_request): Update, "entry" parameter is a
1831 struct thread_info * now. Fetch pid, lwpid from thread.
1832 (resume_status_pending_p): Update, "entry" parameter is a
1833 struct thread_info * now.
1834 (need_step_over_p): Ditto. Fetch lwpid from thread.
1835 (start_step_over): Fetch lwpid from thread.
1836 (linux_resume_one_thread): Update, "entry" parameter is a
1837 struct thread_info * now. Fetch lwpid from thread.
1838 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1839 (proceed_one_lwp): Update, "entry" parameter is a
1840 struct thread_info * now. Fetch lwpid from thread.
1841 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1842 struct thread_info * now.
1843 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1844 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1845 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1846 directly.
1847 (regsets_store_inferior_registers): Ditto.
1848 (fetch_register, store_register): Ditto.
1849 (linux_read_memory, linux_write_memory): Ditto.
1850 (linux_request_interrupt): Ditto.
1851 (linux_read_auxv): Ditto.
1852 (linux_xfer_siginfo): Ditto.
1853 (linux_qxfer_spu): Ditto.
1854 (linux_qxfer_libraries_svr4): Ditto.
1855 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1856 moved to inferiors.h.
1857 (get_lwp): Delete.
1858 (get_thread_lwp): Update.
1859 (struct lwp_info): Delete member "entry". Simplify comment for
1860 member "thread".
1861 (all_lwps): Delete.
1862 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1863 current_inferior directly.
1864 (update_watch_registers_callback): Update, "entry" parameter is a
1865 struct thread_info * now. Fetch pid from thread.
1866 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1867 (mips_insert_point): Fetch lwpid from current_inferior.
1868 Pass &all_threads to find_inferior, not &all_lwps.
1869 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1870 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1871 directly.
1872 (mips_stopped_data_address): Ditto.
1873 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1874 directly.
1875 * linux-tile-low.c (tile_arch_setup): Ditto.
1876 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1877 (update_debug_registers_callback): Update, "entry" parameter is a
1878 struct thread_info * now. Fetch pid from thread.
1879 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1880 Pass &all_threads to find_inferior, not &all_lwps.
1881 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1882 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1883 Pass &all_threads to find_inferior, not &all_lwps.
1884 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1885 (i386_dr_low_get_status): Ditto.
1886 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1887 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1888 (x86_linux_read_description): Ditto.
1889 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1890
1891 2014-02-20 Doug Evans <dje@google.com>
1892
1893 * inferiors.c (get_first_inferior): Fix buglet.
1894
1895 2014-02-19 Doug Evans <dje@google.com>
1896
1897 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1898 * inferiors.c (add_thread): Change result type to struct thread_info *.
1899 All callers updated.
1900 (add_lwp): Call add_thread here instead of in callers.
1901 All callers updated.
1902 * linux-low.h (get_lwp_thread): Rewrite.
1903 (struct lwp_info): New member "thread".
1904
1905 2014-02-19 Doug Evans <dje@google.com>
1906
1907 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1908 All callers updated.
1909
1910 2014-02-19 Doug Evans <dje@google.com>
1911
1912 * inferiors.c (add_thread): Fix whitespace.
1913
1914 2014-02-19 Doug Evans <dje@google.com>
1915
1916 * dll.c (clear_dlls): Replace accessing list implemention details
1917 with API function.
1918 * gdbthread.h (get_first_thread): Declare.
1919 * inferiors.c (for_each_inferior_with_data): New function.
1920 (get_first_thread): New function.
1921 (find_thread_ptid): Simplify.
1922 (get_first_inferior): New function.
1923 (clear_list): Delete.
1924 (one_inferior_p): New function.
1925 (clear_inferior_list): New function.
1926 (clear_inferiors): Update.
1927 * inferiors.h (for_each_inferior_with_data): Declare.
1928 (clear_inferior_list): Declare.
1929 (one_inferior_p): Declare.
1930 (get_first_inferior): Declare.
1931 * linux-low.c (linux_wait_for_event): Replace accessing list
1932 implemention details with API function.
1933 * server.c (target_running): Ditto.
1934 (accumulate_file_name_length): New function.
1935 (emit_dll_description): New function.
1936 (handle_qxfer_libraries): Replace accessing list implemention
1937 details with API function.
1938 (handle_qxfer_threads_worker): New function.
1939 (handle_qxfer_threads_proper): Replace accessing list implemention
1940 details with API function.
1941 (handle_query): Ditto.
1942 (visit_actioned_threads_callback_ftype): New typedef.
1943 (visit_actioned_threads_data): New struct.
1944 (visit_actioned_threads): Rewrite to be find_inferior callback.
1945 (resume): Call find_inferior.
1946 (handle_status): Replace accessing list implemention
1947 details with API function.
1948 (process_serial_event): Replace accessing list implemention details
1949 with API function.
1950 * target.c (set_desired_inferior): Replace accessing list implemention
1951 details with API function.
1952 * tracepoint.c (same_process_p): New function.
1953 (gdb_agent_about_to_close): Replace accessing list implemention
1954 details with API function.
1955 * win32-low.c (child_delete_thread): Replace accessing list
1956 implemention details with API function.
1957 (match_dll_by_basename): New function.
1958 (dll_is_loaded_by_basename): New function.
1959 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1960 details call to dll_is_loaded_by_basename.
1961
1962 2014-02-19 Doug Evans <dje@google.com>
1963
1964 * dll.h (struct dll_info): Add comment.
1965 * gdbthread.h (struct thread_info): Add comment.
1966 (current_ptid): Simplify.
1967 * inferiors.c (add_process): Update.
1968 (remove_process): Update.
1969 * inferiors.h (struct process_info): Rename member "head" to "entry".
1970 * linux-low.c (delete_lwp): Update.
1971 (add_lwp): Update.
1972 (last_thread_of_process_p): Update.
1973 (kill_one_lwp_callback, linux_kill): Update.
1974 (status_pending_p_callback): Update.
1975 (wait_for_sigstop): Update. Simplify read of ptid.
1976 (start_step_over): Update.
1977 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1978 (get_lwp_thread): Update.
1979 (struct lwp_info): Rename member "head" to "entry".
1980 * regcache.h (inferior_list_entry): Delete.
1981 * server.c (kill_inferior_callback): Update.
1982 (detach_or_kill_inferior_callback): Update.
1983 (print_started_pid): Update.
1984 (print_attached_pid): Update.
1985 (process_serial_event): Simplify read of ptid.
1986 * thread-db.c (thread_db_create_event): Update.
1987 (thread_db_get_tls_address): Update.
1988 * win32-low.c (current_inferior_ptid): Simplify.
1989
1990 2014-02-19 Tom Tromey <tromey@redhat.com>
1991
1992 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1993 argument.
1994 (target_supports_btrace): Update.
1995
1996 2014-02-14 Yao Qi <yao@codesourcery.com>
1997
1998 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1999 (rsp-low-ipa.o): New target.
2000
2001 2014-02-12 Tom Tromey <tromey@redhat.com>
2002
2003 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2004 convert_ascii_to_int.
2005 * regcache.c (registers_to_string): Likewise.
2006 * remote-utils.c (decode_M_packet): Likewise.
2007 * server.c (process_serial_event): Likewise.
2008
2009 2014-02-12 Tom Tromey <tromey@redhat.com>
2010
2011 * server.c (handle_query, handle_v_run): Use hex2bin, not
2012 unhexify.
2013 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2014
2015 2014-02-12 Tom Tromey <tromey@redhat.com>
2016
2017 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2018 convert_int_to_ascii.
2019 * regcache.c (registers_to_string, collect_register_as_string):
2020 Likewise.
2021 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2022 Likewise.
2023 * server.c (process_serial_event): Likewise.
2024 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2025 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2026
2027 2014-02-12 Tom Tromey <tromey@redhat.com>
2028
2029 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2030 bin2hex, not hexify.
2031 * tracepoint.c (cmd_qtstatus): Likewise.
2032
2033 2014-02-12 Tom Tromey <tromey@redhat.com>
2034
2035 * remote-utils.c (monitor_output): Pass explicit length to
2036 hexify.
2037
2038 2014-02-12 Tom Tromey <tromey@redhat.com>
2039
2040 * tracepoint.c: Include rsp-low.h.
2041 * server.c: Include rsp-low.h.
2042 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2043 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2044 declare.
2045 * remote-utils.c: Include rsp-low.h.
2046 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2047 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2048 (convert_int_to_ascii, convert_ascii_to_int): Move to
2049 common/rsp-low.c.
2050 * regcache.c: Include rsp-low.h.
2051 * ax.c: Include rsp-low.h.
2052 * Makefile.in (SFILES): Add common/rsp-low.c.
2053 (OBS): Add rsp-low.o.
2054 (rsp-low.o): New target.
2055
2056 2014-02-12 Tom Tromey <tromey@redhat.com>
2057
2058 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2059 Include print-utils.h.
2060 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2061 (plongest, thirty_two, phex_nz): Remove.
2062 * Makefile.in (SFILES): Add common/print-utils.c.
2063 (OBS): Add print-utils.o.
2064 (print-utils-ipa.o): New target.
2065 (print-utils.o): New target.
2066 (IPA_OBJS): Add print-utils-ipa.o.
2067
2068 2014-02-06 Tom Tromey <tromey@redhat.com>
2069
2070 * Makefile.in (SFILES): Fix indentation.
2071
2072 2014-02-05 Doug Evans <dje@google.com>
2073
2074 * linux-low.c (linux_wait_for_event): Improve comment.
2075 (linux_wait_1): Keep current_inferior in sync with event_child.
2076
2077 2014-01-22 Doug Evans <dje@google.com>
2078
2079 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2080
2081 2014-01-22 Doug Evans <dje@google.com>
2082
2083 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2084 * configure: Regenerate.
2085 * config.in: Regenerate.
2086 * Makefile.in (SFILES): Add debug.c.
2087 (OBS): Add debug.o.
2088 * debug.c: New file.
2089 * debug.h: New file.
2090 * linux-aarch64-low.c (*): Update all debugging printfs to use
2091 debug_printf instead of fprintf.
2092 * linux-arm-low.c (*): Ditto.
2093 * linux-cris-low.c (*): Ditto.
2094 * linux-crisv32-low.c (*): Ditto.
2095 * linux-m32r-low.c (*): Ditto.
2096 * linux-sparc-low.c (*): Ditto.
2097 * linux-x86.c (*): Ditto.
2098 * linux-low.c (*): Ditto.
2099 (linux_wait_1): Add calls to debug_enter, debug_exit.
2100 (linux_wait): Remove redundant debugging printf.
2101 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2102 (linux_resume, unstop_all_lwps): Ditto.
2103 * mem-break.c (*): Update all debugging printfs to use
2104 debug_printf instead of fprintf.
2105 * remote-utils.c (*): Ditto.
2106 * thread-db.c (*): Ditto.
2107 * server.c #include <ctype.h>, "gdb_vecs.h".
2108 (debug_threads): Moved to debug.c.
2109 (*): Update all debugging printfs to use debug_printf instead of
2110 fprintf.
2111 (start_inferior): Replace call to fflush with call to debug_flush.
2112 (monitor_show_help): Mention set debug-format.
2113 (parse_debug_format_options): New function.
2114 (handle_monitor_command): Handle "monitor set debug-format".
2115 (gdbserver_usage): Mention --debug-format.
2116 (main): Parse --debug-format.
2117 * server.h (debug_threads): Declaration moved to debug.h.
2118 #include "debug.h".
2119 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2120 trace_debug_1 that uses debug_printf.
2121 (tracepoint_look_up_symbols): Update all debugging printfs to use
2122 debug_printf instead of fprintf.
2123
2124 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2125
2126 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2127 sys/ptrace.h.
2128
2129 2014-01-17 Pedro Alves <palves@redhat.com>
2130
2131 PR build/16445
2132 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2133 defined after including gdb_proc_service.h.
2134
2135 2014-01-16 Doug Evans <dje@google.com>
2136
2137 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2138 (match_dll): Use it.
2139
2140 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2141
2142 * target.h (target_ops) <read_btrace>: Change parameters and
2143 return type to allow error reporting.
2144 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2145 trace reading errors on.
2146 * linux-low.c (linux_low_read_btrace): Pass trace reading
2147 errors on.
2148 (linux_low_disable_btrace): New.
2149
2150 2014-01-15 Doug Evans <dje@google.com>
2151
2152 * inferiors.c (thread_id_to_gdb_id): Delete.
2153 * inferiors.h (thread_id_to_gdb_id): Delete.
2154
2155 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2156
2157 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2158 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2159 versions.
2160
2161 2014-01-08 Pedro Alves <palves@redhat.com>
2162
2163 * server.c (handle_status): Don't discard previous queued stop
2164 replies or thread's pending status here.
2165 (main) <disconnection>: Do it here instead.
2166
2167 2014-01-08 Pedro Alves <palves@redhat.com>
2168
2169 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2170 * server.c (visit_actioned_threads, handle_pending_status): New
2171 function.
2172 (handle_v_cont): Factor out parts to ...
2173 (resume): ... this new function. If in all-stop, and a thread
2174 being resumed has a pending status, report it without actually
2175 resuming.
2176 (myresume): Adjust to use the new 'resume' function.
2177 (clear_pending_status_callback, set_pending_status_callback)
2178 (find_status_pending_thread_callback): New functions.
2179 (handle_status): Handle the case of multiple threads having
2180 interesting statuses to report. Report threads' real last signal
2181 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2182 with an interesting thread to report the status for, instead of
2183 always reporting the status of the first thread.
2184
2185 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2186
2187 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2188 * gdbreplay.c (gdbreplay_version): Likewise.
2189
2190 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2191
2192 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2193 iov.iov_len with the real length in use.
2194
2195 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2196
2197 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2198 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2199 for all targets that use win32-low.c.
2200 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2201 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2202
2203 2013-12-13 Pedro Alves <palves@redhat.com>
2204
2205 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2206 if equal to TARGET_WAITKIND_LOADED.
2207 * win32-low.c (cached_status): New static global.
2208 (win32_wait): Add declaration.
2209 (do_initial_child_stuff): Flush all initial pending debug events
2210 up to the initial breakpoint.
2211 (win32_wait): If CACHED_STATUS was set, return that instead
2212 of doing a real wait. Remove the code resuming the execution
2213 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2214 during the initial phase. Also remove the code changing
2215 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2216 TARGET_WAITKIND_STOPPED.
2217
2218 2013-12-11 Yao Qi <yao@codesourcery.com>
2219
2220 * notif.c (handle_notif_ack): Return 0 if no notification
2221 matches.
2222
2223 2013-11-20 Doug Evans <dje@google.com>
2224
2225 * linux-low.c (linux_set_resume_request): Fix comment.
2226
2227 2013-11-20 Doug Evans <dje@google.com>
2228
2229 * linux-low.c (resume_status_pending_p): Tweak comment.
2230
2231 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2232
2233 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2234 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2235 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2236 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2237 (srv_amd64_regobj): Add amd64-mpx.o.
2238 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2239 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2240 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2241 * i387-fp.c (num_pl_bnd_register) Added constant.
2242 (num_pl_bnd_cfg_registers) Added constant.
2243 (struct i387_xsave) Added reserved area and MPX fields.
2244 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2245 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2246 function.
2247 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2248 (init_registers_amd64_mpx_linux): Declare new function.
2249 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2250 (x86_64_regmap): Add MPX registers.
2251 (x86_linux_read_description): Add MPX case.
2252 (initialize_low_arch): Initialize MPX targets.
2253
2254 2013-11-18 Tom Tromey <tromey@redhat.com>
2255
2256 * configure: Rebuild.
2257 * configure.ac: Don't check for stdlib.h.
2258 * gdbreplay.c: Unconditionally include stdlib.h.
2259
2260 2013-11-18 Tom Tromey <tromey@redhat.com>
2261
2262 * config.in: Rebuild.
2263 * configure: Rebuild.
2264 * configure.ac: Don't use AC_HEADER_DIRENT.
2265
2266 2013-11-18 Tom Tromey <tromey@redhat.com>
2267
2268 * server.h: Don't check HAVE_STRING_H.
2269 * gdbreplay.c: Don't check HAVE_STRING_H.
2270 * configure: Rebuild.
2271
2272 2013-11-18 Tom Tromey <tromey@redhat.com>
2273
2274 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2275 LIBGNU.
2276
2277 2013-11-08 Tom Tromey <tromey@redhat.com>
2278
2279 * configure, config.in: Rebuild.
2280 * configure.ac: Remove unused configury.
2281
2282 2013-11-08 Tom Tromey <tromey@redhat.com>
2283
2284 * acinclude.m4: Include common.m4, codeset.m4.
2285 * configure, config.in: Rebuild.
2286 * configure.ac: Use GDB_AC_COMMON.
2287
2288 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2289
2290 * linux-s390-low.c (HWCAP_S390_TE): New define.
2291 (s390_arch_setup): Consider the TE field in the HWCAP for
2292 determining 'have_regset_tdb'.
2293
2294 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2295
2296 PR gdb/16014
2297 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2298 call to sizeof.
2299
2300 2013-10-02 Pedro Alves <palves@redhat.com>
2301
2302 * server.c (process_serial_event): Don't output "GDBserver
2303 exiting" if GDB is connected through stdio.
2304 * target.c (mywait): Likewise, be silent if GDB is connected
2305 through stdio.
2306
2307 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2308
2309 * lynx-low.c (lynx_add_threads_after_attach): New function.
2310 (lynx_attach): Remove call to add_thread. Add call to
2311 lynx_add_threads_after_attach instead.
2312
2313 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2314
2315 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2316 * config.in, configure: Regenerated.
2317
2318 2013-09-18 Yao Qi <yao@codesourcery.com>
2319
2320 PR server/15959
2321 * server.c (start_inferior): Clear 'resume_info'.
2322
2323 2013-09-16 Jiong Wang <jiwang@tilera.com>
2324
2325 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2326 for each register.
2327
2328 2013-09-16 Jiong Wang <jiwang@tilera.com>
2329
2330 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2331 linux-tile-low.o to srv_tgtobj.
2332
2333 2013-09-16 Will Newton <will.newton@linaro.org>
2334
2335 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2336 out regs.
2337
2338 2013-09-06 Pedro Alves <palves@redhat.com>
2339
2340 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2341 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2342 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2343 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2344 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2345 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2346
2347 2013-09-06 Pedro Alves <palves@redhat.com>
2348
2349 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2350 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2351
2352 2013-09-06 Pedro Alves <palves@redhat.com>
2353
2354 * linux-amd64-ipa.c: Include tracepoint.h.
2355 * linux-i386-ipa.c: Include tracepoint.h.
2356
2357 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2358
2359 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2360 (ps_get_thread_area): New function.
2361
2362 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2363
2364 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2365 (initialize_low_arch): Call init_registers_crisv32 rather than
2366 init_register_crisv32.
2367
2368 2013-09-05 Pedro Alves <palves@redhat.com>
2369
2370 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2371 to ...
2372 * hostio.h: ... this new file.
2373 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2374 win32-low.c: Include hostio.h.
2375
2376 2013-09-05 Pedro Alves <palves@redhat.com>
2377
2378 * server.h (gdb_client_data, handler_func, callback_handler_func)
2379 (delete_file_handler, add_file_handler, append_callback_event)
2380 (delete_callback_event, start_event_loop, initialize_event_loop):
2381 Move to event-loop.h and include it.
2382 * event-loop.h: New file.
2383
2384 2013-09-05 Pedro Alves <palves@redhat.com>
2385
2386 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2387 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2388 (loaded_dll, unloaded_dll): Move to ...
2389 * dll.h: ... this new file.
2390 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2391
2392 2013-09-05 Pedro Alves <palves@redhat.com>
2393
2394 * server.h (current_process, get_thread_process, all_processes)
2395 (add_inferior_to_list, for_each_inferior, current_inferior)
2396 (remove_inferior, add_process, remove_process, find_process_pid)
2397 (have_started_inferiors_p, have_attached_inferiors_p)
2398 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2399 (clear_inferiors, find_inferior, find_inferior_id)
2400 (inferior_target_data, set_inferior_target_data)
2401 (inferior_regcache_data, set_inferior_regcache_data): Move to
2402 inferiors.h, and include it.
2403 * inferiors.h: New file.
2404
2405 2013-09-05 Pedro Alves <palves@redhat.com>
2406
2407 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2408 Move ...
2409 * ax.h: ... here.
2410
2411 2013-09-05 Pedro Alves <palves@redhat.com>
2412
2413 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2414 tracepoint.h.
2415 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2416 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2417 (handle_tracepoint_general_set, handle_tracepoint_query)
2418 (tracepoint_finished_step, tracepoint_was_hit)
2419 (release_while_stepping_state_list, current_traceframe)
2420 (in_readonly_region, traceframe_read_mem)
2421 (fetch_traceframe_registers, traceframe_read_sdata)
2422 (traceframe_read_info, struct fast_tpoint_collect_status)
2423 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2424 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2425 (supply_fast_tracepoint_registers)
2426 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2427 (ipa_tdesc, claim_trampoline_space)
2428 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2429 (agent_mem_read, agent_get_trace_state_variable_value)
2430 (agent_set_trace_state_variable_value, agent_tsv_read)
2431 (agent_mem_read_string, get_raw_reg_func_addr)
2432 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2433 * tracepoint.h: ... this new file.
2434
2435 2013-09-05 Pedro Alves <palves@redhat.com>
2436
2437 * server.h (perror_with_name, error, fatal, warning, paddress)
2438 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2439 include it.
2440 * utils.h: New file.
2441
2442 2013-09-05 Pedro Alves <palves@redhat.com>
2443
2444 * server.h (remote_debug, noack_mode, transport_is_reliable)
2445 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2446 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2447 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2448 (write_enn, initialize_async_io, enable_async_io)
2449 (disable_async_io, check_remote_input_interrupt_request)
2450 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2451 (dead_thread_notify, prepare_resume_reply)
2452 (decode_address_to_semicolon, decode_address, decode_m_packet)
2453 (decode_M_packet, decode_X_packet, decode_xfer_write)
2454 (decode_search_memory_packet, unhexify, hexify)
2455 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2456 (look_up_one_symbol, relocate_instruction)
2457 (monitor_output): Move to remote-utils.h, and include it.
2458 * remote-utils.h: New file.
2459
2460 2013-09-05 Pedro Alves <palves@redhat.com>
2461
2462 * server.h (_): Delete.
2463
2464 2013-09-02 Pedro Alves <palves@redhat.com>
2465
2466 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2467 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2468 allocated.
2469 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2470
2471 2013-09-02 Pierre Muller <muller@sourceware.org>
2472
2473 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2474 or WriteProcessMemory complete successfully and handle
2475 ERROR_PARTIAL_COPY error.
2476
2477 2013-09-02 Pedro Alves <palves@redhat.com>
2478
2479 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2480 error instead of EIO.
2481
2482 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2483
2484 PR server/15604
2485 * linux-low.c: Include filestuff.h.
2486 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2487 * lynx-low.c: Include filestuff.h.
2488 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2489 * server.c: Include filestuff.h.
2490 (main): Call notice_open_fds.
2491 * spu-low.c: Include filestuff.h.
2492 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2493
2494 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2495
2496 * Makefile.in: Explain why ../target and ../nat are not
2497 listed as include file search paths.
2498 (linux-waitpid.o): New object file rule.
2499 * configure.srv (srv_native_linux_obj): New variable.
2500 Replace all occurrences of linux native object files with
2501 $srv_native_linux_obj.
2502 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2503 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2504 (linux_enable_event_reporting): Remove declaration.
2505 (my_waitpid): Moved to common/linux-waitpid.c.
2506 (linux_wait_for_event): Pass ptid when calling
2507 linux_enable_event_reporting.
2508 (linux_supports_tracefork_flag): Remove.
2509 (linux_enable_event_reporting): Likewise.
2510 (linux_tracefork_grandchild): Remove.
2511 (STACK_SIZE): Moved to common/linux-ptrace.c.
2512 (linux_tracefork_child): Remove.
2513 (linux_test_for_tracefork): Remove.
2514 (linux_look_up_symbols): Call linux_supports_traceclone.
2515 (initialize_low): Remove call to linux_test_for_tracefork.
2516 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2517 common/linux-ptrace.h.
2518 (PTRACE_TYPE_ARG4): Likewise.
2519 Include linux-ptrace.h.
2520
2521 2013-08-21 Pedro Alves <palves@redhat.com>
2522
2523 * config.in: Renegerate.
2524
2525 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2526
2527 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2528 (SFILES): Remove $(srcdir)/common/target-common.c and
2529 add $(srcdir)/target/waitstatus.c.
2530 (OBS): Remove target-common.o and add waitstatus.o.
2531 (server_h): Remove $(srcdir)/../common/target-common.h and
2532 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2533 and $(srcdir)/../target/waitstatus.h.
2534 (target-common.o): Remove.
2535 (waitstatus.o): New target object file.
2536 * target.h: Do not include target-common.h and
2537 include target/resume.h, target/wait.h and
2538 target/waitstatus.h.
2539
2540 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2541
2542 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2543 to PTRACE_TYPE_ARG3.
2544 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2545 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2546 PTRACE_TYPE_ARG4.
2547 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2548 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2549
2550 2013-07-27 Jie Zhang <jie@codesourcery.com>
2551 Daniel Jacobowitz <dan@codesourcery.com>
2552 Yao Qi <yao@codesourcery.com>
2553
2554 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2555 (mips-linux-watch.o): New rule.
2556 (mips_linux_watch_h): New variable.
2557 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2558 srv_tgtobj.
2559 * linux-mips-low.c: Include mips-linux-watch.h.
2560 (struct arch_process_info, struct arch_lwp_info): New.
2561 (update_watch_registers_callback): New function.
2562 (mips_linux_new_process, mips_linux_new_thread) New functions.
2563 (mips_linux_prepare_to_resume, mips_insert_point): New
2564 functions.
2565 (mips_remove_point, mips_stopped_by_watchpoint): New
2566 functions.
2567 (rsp_bp_type_to_target_hw_bp_type): New function.
2568 (mips_stopped_data_address): New function.
2569 (the_low_target): Add watchpoint support functions.
2570
2571 2013-07-27 Yao Qi <yao@codesourcery.com>
2572
2573 * i386-low.c: Include break-common.h.
2574 (enum target_hw_bp_type): Remove.
2575
2576 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2577
2578 * Makefile.in (SFILES): /common/target-common.c.
2579 (OBS): Add target-common.o.
2580 (server_h): Add $(srcdir)/../common/target-common.h.
2581 (target-common.o): New target.
2582 * server.c (queue_stop_reply_callback): Free
2583 status string after use.
2584 * target.c (target_waitstatus_to_string): Remove.
2585 * target.h: Include target-common.h.
2586 (resume_kind): Likewise.
2587 (target_waitkind): Likewise.
2588 (target_waitstatus): Likewise.
2589 (TARGET_WNOHANG): Likewise.
2590
2591 2013-07-04 Yao Qi <yao@codesourcery.com>
2592
2593 * Makefile.in (host_alias): Use @host_noncanonical@.
2594 (target_alias): Use @target_noncanonical@.
2595 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2596 ACX_NONCANONICAL_HOST.
2597 * configure: Regenerated.
2598
2599 Revert:
2600 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2601
2602 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2603 * configure: Rebuild.
2604 * Makefile.in (version_host, version_target): Get from configure.
2605 (version.c): Use $(version_host) and $(version_target).
2606
2607 2013-07-03 Pedro Alves <palves@redhat.com>
2608
2609 * Makefile.in (config.status): Depend on development.sh.
2610 * acinclude.m4: Include libmcheck.m4.
2611 * configure: Regenerate.
2612
2613 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2614
2615 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2616 attribute inside the parentheses.
2617 (winapi_DebugSetProcessKillOnExit): Ditto.
2618 (winapi_DebugBreakProcess): Ditto.
2619 (winapi_GenerateConsoleCtrlEvent): Ditto.
2620
2621 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2622
2623 * notif.h (notif_event): Add a dummy member to avoid compiler
2624 errors.
2625
2626 2013-07-01 Pedro Alves <palves@redhat.com>
2627
2628 * hostio.c (HOSTIO_PATH_MAX): Define.
2629 (require_filename, handle_open, handle_unlink, handle_readlink):
2630 Use it.
2631
2632 2013-07-01 Pedro Alves <palves@redhat.com>
2633
2634 * server.h: Include "pathmax.h".
2635 * linux-low.c: Don't include sys/param.h.
2636 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2637 MAXPATHLEN.
2638 * win32-low.c: Don't include sys/param.h.
2639 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2640
2641 2013-07-01 Pedro Alves <palves@redhat.com>
2642
2643 * event-loop.c: Don't check HAVE_UNISTD_H before including
2644 <unistd.h>.
2645 * gdbreplay.c: Likewise.
2646 * remote-utils.c: Likewise.
2647 * server.c: Likewise.
2648 * configure.ac: Don't check for unistd.h.
2649 * configure: Regenerate.
2650
2651 2013-06-28 Tom Tromey <tromey@redhat.com>
2652
2653 * Makefile.in (version.c): Use version.in, not
2654 common/version.in.
2655
2656 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2657
2658 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2659 * configure: Rebuild.
2660 * Makefile.in (version_host, version_target): Get from configure.
2661 (version.c): Use $(version_host) and $(version_target).
2662
2663 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2664
2665 Fix trace-status to output user name without trailing colon.
2666 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2667
2668 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2669
2670 Fix trace-status to output proper start-time and stop-time.
2671 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2672 output start time and stop time in hex as gdb expects.
2673
2674 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2675
2676 * tracepoint.c (build_traceframe_info_xml): Output trace state
2677 variables present in the trace buffer.
2678
2679 2013-06-24 Tom Tromey <tromey@redhat.com>
2680
2681 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2682 create-version.sh.
2683 (version.o): Remove.
2684 * gdbreplay.c: Include version.h.
2685 (version, host_name): Don't declare.
2686 * server.h: Include version.h.
2687 (version, host_name): Don't declare.
2688
2689 2013-06-12 Pedro Alves <palves@redhat.com>
2690
2691 * linux-x86-low.c (linux_is_elf64): Delete global.
2692 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2693 with local linux_pid_exe_is_elf_64_file use.
2694
2695 2013-06-11 Pedro Alves <palves@redhat.com>
2696
2697 * linux-low.c (regset_disabled, disable_regset): New functions.
2698 (regsets_fetch_inferior_registers)
2699 (regsets_store_inferior_registers): Use them.
2700 (initialize_regsets_info); Don't allocate the disabled_regsets
2701 array here.
2702 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2703 comment.
2704
2705 2013-06-11 Pedro Alves <palves@redhat.com>
2706
2707 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2708 xmalloc.
2709
2710 2013-06-11 Pedro Alves <palves@redhat.com>
2711
2712 * linux-x86-low.c (initialize_low_arch): Call
2713 init_registers_x32_avx_linux.
2714
2715 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2716
2717 Fix compatibility with Android Bionic.
2718 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2719 it is not empty.
2720
2721 2013-06-07 Pedro Alves <palves@redhat.com>
2722
2723 PR server/14823
2724 * Makefile.in (OBS): Add tdesc.o.
2725 (IPA_OBJS): Add tdesc-ipa.o.
2726 (tdesc-ipa.o): New rule.
2727 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2728 interface.
2729 * linux-low.c (new_inferior): Delete.
2730 (disabled_regsets, num_regsets): Delete.
2731 (linux_add_process): Adjust to set the new per-process
2732 new_inferior flag.
2733 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2734 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2735 was a stop. When calling arch_setup, switch the current inferior
2736 to the thread that got an event.
2737 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2738 (regsets_fetch_inferior_registers)
2739 (regsets_store_inferior_registers): New regsets_info parameter.
2740 Adjust to use it.
2741 (linux_register_in_regsets): New regs_info parameter. Adjust to
2742 use it.
2743 (register_addr, fetch_register, store_register): New usrregs_info
2744 parameter. Adjust to use it.
2745 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2746 parameter regs_info. Adjust to use it.
2747 (linux_fetch_registers): Get the current inferior's regs_info, and
2748 adjust to use it.
2749 (linux_store_registers): Ditto.
2750 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2751 (initialize_low): Don't initialize the target_regsets here. Call
2752 initialize_low_arch.
2753 * linux-low.h (target_regsets): Delete declaration.
2754 (struct regsets_info): New.
2755 (struct usrregs_info): New.
2756 (struct regs_info): New.
2757 (struct process_info_private) <new_inferior>: New field.
2758 (struct linux_target_ops): Delete the num_regs, regmap, and
2759 regset_bitmap fields. New field regs_info.
2760 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2761 * i387-fp.c (num_xmm_registers): Delete.
2762 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2763 calls to new interface.
2764 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2765 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2766 Infer the number of xmm registers from the regcache's target
2767 description.
2768 * i387-fp.h (num_xmm_registers): Delete.
2769 * inferiors.c (add_thread): Don't install the thread's regcache
2770 here.
2771 * proc-service.c (gregset_info): Fetch the current inferior's
2772 regs_info. Adjust to use it.
2773 * regcache.c: Include tdesc.h.
2774 (register_bytes, reg_defs, num_registers)
2775 (gdbserver_expedite_regs): Delete.
2776 (get_thread_regcache): If the thread doesn't have a regcache yet,
2777 create one, instead of aborting gdbserver.
2778 (regcache_invalidate_one): Rename to ...
2779 (regcache_invalidate_thread): ... this.
2780 (regcache_invalidate_one): New.
2781 (regcache_invalidate): Only invalidate registers of the current
2782 process.
2783 (init_register_cache): Add target_desc parameter, and use it.
2784 (new_register_cache): Ditto. Assert the target description has a
2785 non zero registers_size.
2786 (regcache_cpy): Add assertions. Adjust.
2787 (realloc_register_cache, set_register_cache): Delete.
2788 (registers_to_string, registers_from_string): Adjust.
2789 (find_register_by_name, find_regno, find_register_by_number)
2790 (register_cache_size): Add target_desc parameter, and use it.
2791 (free_register_cache_thread, free_register_cache_thread_one)
2792 (regcache_release, register_cache_size): New.
2793 (register_size): Add target_desc parameter, and use it.
2794 (register_data, supply_register, supply_register_zeroed)
2795 (supply_regblock, supply_register_by_name, collect_register)
2796 (collect_register_as_string, collect_register_by_name): Adjust.
2797 * regcache.h (struct target_desc): Forward declare.
2798 (struct regcache) <tdesc>: New field.
2799 (init_register_cache, new_register_cache): Add target_desc
2800 parameter.
2801 (regcache_invalidate_thread): Declare.
2802 (regcache_invalidate_one): Delete declaration.
2803 (regcache_release): Declare.
2804 (find_register_by_number, register_cache_size, register_size)
2805 (find_regno): Add target_desc parameter.
2806 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2807 declarations.
2808 * remote-utils.c: Include tdesc.h.
2809 (outreg, prepare_resume_reply): Adjust.
2810 * server.c: Include tdesc.h.
2811 (gdbserver_xmltarget): Delete declaration.
2812 (get_features_xml, process_serial_event): Adjust.
2813 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2814 declare.
2815 (struct process_info) <tdesc>: New field.
2816 (ipa_tdesc): Declare.
2817 * tdesc.c: New file.
2818 * tdesc.h: New file.
2819 * tracepoint.c: Include tdesc.h.
2820 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2821 (get_context_regcache): Adjust to pass ipa_tdesc down.
2822 (do_action_at_tracepoint): Adjust to get the register cache size
2823 from the context regcache's description.
2824 (traceframe_walk_blocks): Adjust to get the register cache size
2825 from the current trace frame's description.
2826 (traceframe_get_pc): Adjust to get current trace frame's
2827 description and pass it down.
2828 (gdb_collect): Adjust to get the register cache size from the
2829 IPA's description.
2830 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2831 (gdbserver_xmltarget): Delete.
2832 (initialize_low_tracepoint): Set the ipa's target description.
2833 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2834 (initialize_low_tracepoint): Set the ipa's target description.
2835 * linux-x86-low.c: Include tdesc.h.
2836 [__x86_64__] (is_64bit_tdesc): New.
2837 (ps_get_thread_area, x86_get_thread_area): Use it.
2838 (i386_cannot_store_register): Rename to ...
2839 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2840 (i386_cannot_fetch_register): Rename to ...
2841 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2842 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2843 to new interface.
2844 (target_regsets): Rename to ...
2845 (x86_regsets): ... this.
2846 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2847 interface.
2848 (x86_siginfo_fixup): Use is_64bit_tdesc.
2849 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2850 (tdesc_x32_avx_linux, tdesc_x32_linux)
2851 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2852 Declare.
2853 (x86_linux_update_xmltarget): Delete.
2854 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2855 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2856 (AMD64_LINUX_USER64_CS): New.
2857 (x86_linux_read_description): New, based on
2858 x86_linux_update_xmltarget.
2859 (same_process_callback): New.
2860 (x86_arch_setup_process_callback): New.
2861 (x86_linux_update_xmltarget): New.
2862 (x86_regsets_info): New.
2863 (amd64_linux_regs_info): New.
2864 (i386_linux_usrregs_info): New.
2865 (i386_linux_regs_info): New.
2866 (x86_linux_regs_info): New.
2867 (x86_arch_setup): Reimplement.
2868 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2869 (x86_emit_ops): Ditto.
2870 (the_low_target): Adjust. Install x86_linux_regs_info,
2871 x86_cannot_fetch_register, and x86_cannot_store_register.
2872 (initialize_low_arch): New.
2873 * linux-ia64-low.c (tdesc_ia64): Declare.
2874 (ia64_fetch_register): Adjust.
2875 (ia64_usrregs_info, regs_info): New globals.
2876 (ia64_regs_info): New function.
2877 (the_low_target): Adjust.
2878 (initialize_low_arch): New function.
2879 * linux-sparc-low.c (tdesc_sparc64): Declare.
2880 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2881 Adjust.
2882 (sparc_arch_setup): New function.
2883 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2884 (the_low_target): Adjust.
2885 (initialize_low_arch): New function.
2886 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2887 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2888 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2889 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2890 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2891 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2892 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2893 (tdesc_powerpc_isa205_vsx64l): Declare.
2894 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2895 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2896 (ppc_set_pc, ppc_get_hwcap): Adjust.
2897 (ppc_usrregs_info): Forward declare.
2898 (!__powerpc64__) ppc_regmap_adjusted: New global.
2899 (ppc_arch_setup): Adjust to the current process'es target
2900 description.
2901 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2902 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2903 (ppc_store_evrregset): Adjust.
2904 (target_regsets): Rename to ...
2905 (ppc_regsets): ... this, and make static.
2906 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2907 (ppc_regs_info): New function.
2908 (the_low_target): Adjust.
2909 (initialize_low_arch): New function.
2910 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2911 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2912 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2913 (tdesc_s390x_linux64v2): Declare.
2914 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2915 (s390_fill_gregset, s390_store_last_break): Adjust.
2916 (target_regsets): Rename to ...
2917 (s390_regsets): ... this, and make static.
2918 (s390_get_pc, s390_set_pc): Adjust.
2919 (s390_get_hwcap): New target_desc parameter, and use it.
2920 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2921 (s390_arch_setup): Adjust to set the current process'es target
2922 description. Don't adjust the regmap.
2923 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2924 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2925 (regs_info_3264): New globals.
2926 (s390_regs_info): New function.
2927 (the_low_target): Adjust.
2928 (initialize_low_arch): New function.
2929 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2930 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2931 [__mips64] (init_registers_mips_linux)
2932 (init_registers_mips_dsp_linux): Delete defines.
2933 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2934 (have_dsp): New global.
2935 (mips_read_description): New, based on mips_arch_setup.
2936 (mips_arch_setup): Reimplement.
2937 (get_usrregs_info): New function.
2938 (mips_cannot_fetch_register, mips_cannot_store_register)
2939 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2940 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2941 (target_regsets): Rename to ...
2942 (mips_regsets): ... this, and make static.
2943 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2944 (dsp_regs_info, regs_info): New globals.
2945 (mips_regs_info): New function.
2946 (the_low_target): Adjust.
2947 (initialize_low_arch): New function.
2948 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2949 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2950 Declare.
2951 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2952 (arm_read_description): New, with bits factored from
2953 arm_arch_setup.
2954 (arm_arch_setup): Reimplement.
2955 (target_regsets): Rename to ...
2956 (arm_regsets): ... this, and make static.
2957 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2958 (arm_regs_info): New function.
2959 (the_low_target): Adjust.
2960 (initialize_low_arch): New function.
2961 * linux-m68k-low.c (tdesc_m68k): Declare.
2962 (target_regsets): Rename to ...
2963 (m68k_regsets): ... this, and make static.
2964 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2965 (m68k_regs_info): New function.
2966 (m68k_arch_setup): New function.
2967 (the_low_target): Adjust.
2968 (initialize_low_arch): New function.
2969 * linux-sh-low.c (tdesc_sharch): Declare.
2970 (target_regsets): Rename to ...
2971 (sh_regsets): ... this, and make static.
2972 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2973 (sh_regs_info, sh_arch_setup): New functions.
2974 (the_low_target): Adjust.
2975 (initialize_low_arch): New function.
2976 * linux-bfin-low.c (tdesc_bfin): Declare.
2977 (bfin_arch_setup): New function.
2978 (bfin_usrregs_info, regs_info): New globals.
2979 (bfin_regs_info): New function.
2980 (the_low_target): Adjust.
2981 (initialize_low_arch): New function.
2982 * linux-cris-low.c (tdesc_cris): Declare.
2983 (cris_arch_setup): New function.
2984 (cris_usrregs_info, regs_info): New globals.
2985 (cris_regs_info): New function.
2986 (the_low_target): Adjust.
2987 (initialize_low_arch): New function.
2988 * linux-cris-low.c (tdesc_crisv32): Declare.
2989 (cris_arch_setup): New function.
2990 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2991 (cris_regs_info): New function.
2992 (the_low_target): Adjust.
2993 (initialize_low_arch): New function.
2994 * linux-m32r-low.c (tdesc_m32r): Declare.
2995 (m32r_arch_setup): New function.
2996 (m32r_usrregs_info, regs_info): New globals.
2997 (m32r_regs_info): Adjust.
2998 (initialize_low_arch): New function.
2999 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3000 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3001 (tic6x_usrregs_info): Forward declare.
3002 (tic6x_read_description): New function, based on ...
3003 (tic6x_arch_setup): ... this. Reimplement.
3004 (target_regsets): Rename to ...
3005 (tic6x_regsets): ... this, and make static.
3006 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3007 (tic6x_regs_info): New function.
3008 (the_low_target): Adjust.
3009 (initialize_low_arch): New function.
3010 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3011 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3012 (target_regsets): Rename to ...
3013 (xtensa_regsets): ... this, and make static.
3014 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3015 globals.
3016 (xtensa_arch_setup, xtensa_regs_info): New functions.
3017 (the_low_target): Adjust.
3018 (initialize_low_arch): New function.
3019 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3020 (nios2_arch_setup): Set the current process'es tdesc.
3021 (target_regsets): Rename to ...
3022 (nios2_regsets): ... this.
3023 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3024 (nios2_regs_info): New function.
3025 (the_low_target): Adjust.
3026 (initialize_low_arch): New function.
3027 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3028 (aarch64_arch_setup): Set the current process'es tdesc.
3029 (target_regsets): Rename to ...
3030 (aarch64_regsets): ... this.
3031 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3032 (aarch64_regs_info): New function.
3033 (the_low_target): Adjust.
3034 (initialize_low_arch): New function.
3035 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3036 globals.
3037 (target_regsets): Rename to ...
3038 (tile_regsets): ... this.
3039 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3040 (tile_regs_info): New function.
3041 (tile_arch_setup): Set the current process'es tdesc.
3042 (the_low_target): Adjust.
3043 (initialize_low_arch): New function.
3044 * spu-low.c (tdesc_spu): Declare.
3045 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3046 * win32-arm-low.c (tdesc_arm): Declare.
3047 (arm_arch_setup): New function.
3048 (the_low_target): Install arm_arch_setup instead of
3049 init_registers_arm.
3050 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3051 (init_windows_x86): Rename to ...
3052 (i386_arch_setup): ... this. Set `win32_tdesc'.
3053 (the_low_target): Adjust.
3054 * win32-low.c (win32_tdesc): New global.
3055 (child_add_thread): Don't create the thread cache here.
3056 (do_initial_child_stuff): Set the new process'es tdesc.
3057 * win32-low.h (struct target_desc): Forward declare.
3058 (win32_tdesc): Declare.
3059 * lynx-i386-low.c (tdesc_i386): Declare global.
3060 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3061 * lynx-low.c (lynx_tdesc): New global.
3062 (lynx_add_process): Set the new process'es tdesc.
3063 * lynx-low.h (struct target_desc): Forward declare.
3064 (lynx_tdesc): Declare global.
3065 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3066 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3067 * nto-low.c (nto_tdesc): New global.
3068 (do_attach): Set the new process'es tdesc.
3069 * nto-low.h (struct target_desc): Forward declare.
3070 (nto_tdesc): Declare.
3071 * nto-x86-low.c (tdesc_i386): Declare.
3072 (nto_x86_arch_setup): Set `nto_tdesc'.
3073
3074 2013-06-04 Gary Benson <gbenson@redhat.com>
3075
3076 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3077 to qSupported response when appropriate.
3078 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3079 with nonzero-length annex.
3080 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3081 arguments supplied in annex.
3082
3083 2013-05-31 Doug Evans <dje@google.com>
3084
3085 PR server/15594
3086 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3087 64 bits in 64-cross-32 environment.
3088
3089 2013-05-28 Pedro Alves <palves@redhat.com>
3090
3091 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3092 (aarch64-without-fpu.c): Delete rule.
3093 * configure.srv (aarch64*-*-linux*): Remove references to
3094 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3095 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3096 declaration.
3097
3098 2013-05-24 Pedro Alves <palves@redhat.com>
3099
3100 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3101 instead of strchr/decode_address. Error if the range isn't split
3102 with a ','. Don't assume there's be a ':' in the action.
3103
3104 2013-05-23 Yao Qi <yao@codesourcery.com>
3105 Pedro Alves <palves@redhat.com>
3106
3107 * linux-low.c (lwp_in_step_range): New function.
3108 (linux_wait_1): If the thread was range stepping and stopped
3109 outside the stepping range, report the stop to GDB. Otherwise,
3110 continue stepping. Add range stepping debug output.
3111 (linux_set_resume_request): Copy the step range from the resume
3112 request to the lwp.
3113 (linux_supports_range_stepping): New.
3114 (linux_target_ops) <supports_range_stepping>: Set to
3115 linux_supports_range_stepping.
3116 * linux-low.h (struct linux_target_ops)
3117 <supports_range_stepping>: New field.
3118 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3119 * linux-x86-low.c (x86_supports_range_stepping): New.
3120 (the_low_target) <supports_range_stepping>: Set to
3121 x86_supports_range_stepping.
3122 * server.c (handle_v_cont): Handle 'r' action.
3123 (handle_v_requests): Append ";r" if the target supports range
3124 stepping.
3125 * target.h (struct thread_resume) <step_range_start,
3126 step_range_end>: New fields.
3127 (struct target_ops) <supports_range_stepping>:
3128 New field.
3129 (target_supports_range_stepping): New macro.
3130
3131 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3132
3133 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3134 confusion in comment.
3135
3136 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3137
3138 * lynx-low.c (struct process_info_private): New type.
3139 (lynx_add_process): New function.
3140 (lynx_create_inferior, lynx_attach): Replace calls to
3141 add_process by calls to lynx_add_process.
3142 (lynx_resume): If PTID is null, then try using
3143 current_process()->private->last_wait_event_ptid.
3144 Add comments.
3145 (lynx_clear_inferiors): Delete. The contents of that function
3146 has been inlined in lynx_mourn;
3147 (lynx_wait_1): Save the ptid in the process's private data.
3148 (lynx_mourn): Free the process' private data. Replace call
3149 to lynx_clear_inferiors by call to clear_inferiors.
3150
3151 2013-05-17 Yao Qi <yao@codesourcery.com>
3152
3153 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3154 the right place.
3155
3156 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3157
3158 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3159 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3160 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3161 PT_TEXT_END_ADDR guards. Update comments.
3162 (linux_target_op) <read_offsets>: Conditionally define to
3163 linux_read_offsets if the target is UCLIBC and if it defines
3164 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3165
3166 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3167 Andrew Jenner <andrew@codesourcery.com>
3168
3169 * Makefile.in (SFILES): Add linux-nios2-low.c.
3170 (clean): Add action to delete nios2-linux.c.
3171 (nios2-linux.c): New rule.
3172 * configure.srv: Add nios2*-*-linux*.
3173 * linux-nios2-low.c: New.
3174
3175 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3176
3177 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3178
3179 2013-04-25 Hui Zhu <hui@codesourcery.com>
3180
3181 PR gdb/15186
3182 * ax.c (ax_printf): Add fflush.
3183
3184 2013-04-22 Tom Tromey <tromey@redhat.com>
3185
3186 * Makefile.in (SFILES): Add filestuff.c.
3187 (OBS): Add filestuff.o.
3188 (filestuff.o): New target.
3189 * config.in, configure: Rebuild.
3190 * configure.ac: Check for fdwalk, pipe2.
3191
3192 2013-04-17 Pedro Alves <palves@redhat.com>
3193
3194 * configure.ac (USE_THREAD_DB): Delete variable.
3195 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3196 Don't AC_SUBST USE_THREAD_DB.
3197 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3198 * config.in, configure: Regenerate.
3199
3200 2013-04-16 Pedro Alves <palves@redhat.com>
3201
3202 * linux-low.h (struct lwp_info) <thread_known>: Move under
3203 the USE_THREAD_DB #ifdef.
3204
3205 2013-04-16 Pedro Alves <palves@redhat.com>
3206
3207 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3208 (linux-low.o): Delete rule.
3209 * linux-low.h: Always include "gdb_thread_db.h" instead of
3210 conditionally including thread_db.h.
3211 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3212 HAVE_THREAD_DB_H.
3213
3214 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3215
3216 * Makefile.in (install-only): Fix make install regression.
3217
3218 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3219
3220 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3221 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3222 installation.
3223 * gdbserver.1: Remove.
3224
3225 2013-03-22 Pedro Alves <palves@redhat.com>
3226
3227 * linux-low.c (handle_extended_wait): Don't call
3228 linux_enable_event_reporting.
3229
3230 2013-03-15 Tony Theodore <tonyt@logyst.com>
3231
3232 PR build/9098:
3233 * Makefile.in (SHELL): Use @SHELL@.
3234
3235 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3236
3237 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3238 compiler warning.
3239
3240 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3241
3242 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3243 Remove extraneous NULL element.
3244
3245 2013-03-13 Yao Qi <yao@codesourcery.com>
3246
3247 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3248 'V' block in trace frame.
3249
3250 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3251
3252 * target.h (struct target_ops): Add btrace ops.
3253 (target_supports_btrace): New macro.
3254 (target_enable_btrace): New macro.
3255 (target_disable_btrace): New macro.
3256 (target_read_btrace): New macro.
3257 * gdbthread.h (struct thread_info): Add btrace field.
3258 * server.c: Include btrace-common.h.
3259 (handle_btrace_general_set): New function.
3260 (handle_btrace_enable): New function.
3261 (handle_btrace_disable): New function.
3262 (handle_general_set): Call handle_btrace_general_set.
3263 (handle_qxfer_btrace): New function.
3264 (struct qxfer qxfer_packets[]): Add btrace entry.
3265 * inferiors.c (remove_thread): Disable btrace.
3266 * linux-low: Include linux-btrace.h.
3267 (linux_low_enable_btrace): New function.
3268 (linux_low_read_btrace): New function.
3269 (linux_target_ops): Add btrace ops.
3270 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3271 Add srv_linux_btrace=yes.
3272 (x86_64-*-linux*): Add linux-btrace.o.
3273 Add srv_linux_btrace=yes.
3274 * configure.ac: Define HAVE_LINUX_BTRACE.
3275 * config.in: Regenerated.
3276 * configure: Regenerated.
3277
3278 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3279
3280 * server.c (handle_qxfer): Preserve error message if -3 is
3281 returned.
3282 (qxfer): Document the -3 return value.
3283
3284 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3285
3286 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3287 (linux_btrace_h): New variable.
3288 (linux-btrace.o): New rule.
3289
3290 2013-03-08 Stan Shebs <stan@codesourcery.com>
3291 Hafiz Abid Qadeer <abidh@codesourcery.com>
3292
3293 * tracepoint.c (trace_buffer_size): New global.
3294 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3295 (init_trace_buffer): Change to one-argument function. Allocate
3296 trace buffer memory.
3297 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3298 handle QTBuffer:size packet.
3299 (cmd_bigqtbuffer_size): New function.
3300 (initialize_tracepoint): Call init_trace_buffer with
3301 DEFAULT_TRACE_BUFFER_SIZE.
3302 * server.c (handle_query): Add QTBuffer:size in the
3303 supported packets.
3304
3305 2013-03-07 Yao Qi <yao@codesourcery.com>
3306
3307 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3308 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3309 of -1.
3310 (cmd_qtsp): Adjust condition. Do post increment.
3311 Set cur_action and cur_step_action back to 0.
3312
3313 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3314
3315 PR server/15236
3316 * linux-low.c (linux_write_memory): Return early success if LEN is
3317 zero.
3318
3319 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3320
3321 * configure.srv: Add x86_64-*-cygwin* as target.
3322
3323 2013-02-28 Tom Tromey <tromey@redhat.com>
3324
3325 * configure.ac: Invoke AC_SYS_LARGEFILE.
3326 * configure, config.in: Rebuild.
3327
3328 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3329
3330 * win32-low.c: Throughout, fix format strings and casts of
3331 printf-like functions to avoid type related warnings on all
3332 platforms.
3333 (get_child_debug_event): Print dwDebugEventCode as hex since
3334 that's how it's usually documented.
3335
3336 2013-02-28 Yao Qi <yao@codesourcery.com>
3337
3338 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3339 pulongest.
3340
3341 2013-02-27 Jiong Wang <jiwang@tilera.com>
3342
3343 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3344 (reg-tilegx32.c): New rule.
3345 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3346 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3347 different register info initializer according to elf class.
3348 (init_registers_tilgx32): New function. The tilegx32 register info
3349 initializer.
3350 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3351 (tile_store_gregset): Likewise.
3352
3353 2013-02-27 Yao Qi <yao@codesourcery.com>
3354
3355 * server.c (process_point_options): Print debug message when
3356 debug_threads is true.
3357
3358 2013-02-26 Yao Qi <yao@codesourcery.com>
3359
3360 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3361
3362 2013-02-19 Pedro Alves <palves@redhat.com>
3363 Kai Tietz <ktietz@redhat.com>
3364
3365 PR gdb/15161
3366
3367 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3368 instead of strtoul to extract address from packet.
3369 (process_serial_event) <'z'>: Likewise.
3370
3371 2013-02-18 Yao Qi <yao@codesourcery.com>
3372
3373 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3374
3375 2013-02-14 Pedro Alves <palves@redhat.com>
3376
3377 Plug memory leak.
3378
3379 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3380 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3381
3382 2013-02-14 Pedro Alves <palves@redhat.com>
3383
3384 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3385
3386 2013-02-14 Pedro Alves <palves@redhat.com>
3387
3388 * tracepoint.c (save_string): Delete.
3389 (add_tracepoint_action): Use savestring instead of save_string.
3390
3391 2013-02-12 Pedro Alves <palves@redhat.com>
3392
3393 * linux-xtensa-low.c: Ditto.
3394 * xtensa-xtregs.c: Ditto.
3395
3396 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3397
3398 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3399 thread_db.
3400
3401 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3402
3403 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3404 aarch64_num_wp_regs and aarch64_num_bp_regs to
3405 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3406
3407 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3408
3409 * linux-aarch64-low.c (ps_get_thread_area): Replace
3410 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3411
3412 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3413 Marcus Shawcroft <marcus.shawcroft@arm.com>
3414 Nigel Stephens <nigel.stephens@arm.com>
3415 Yufeng Zhang <yufeng.zhang@arm.com>
3416
3417 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3418 (aarch64.c, aarch64-without-fpu.c): New targets.
3419 * configure.srv (aarch64*-*-linux*): New.
3420 * linux-aarch64-low.c: New file.
3421
3422 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3423
3424 * linux-low.c (handle_extended_wait, linux_create_inferior)
3425 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3426 (dequeue_one_deferred_signal, linux_resume_one_thread)
3427 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3428 (linux_tracefork_grandchild, linux_test_for_tracefork)
3429 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3430 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3431 where the argument is 0.
3432
3433 2013-01-25 Yao Qi <yao@codesourcery.com>
3434
3435 * event-loop.c: Include "queue.h".
3436 (gdb_event_p): New typedef.
3437 (struct gdb_event) <next_event>: Remove.
3438 (event_queue): Change to QUEUE(gdb_event_p).
3439 (async_queue_event): Remove.
3440 (gdb_event_xfree): New.
3441 (initialize_event_loop): New.
3442 (process_event): Use API from QUEUE.
3443 (wait_for_event): Likewise.
3444 * server.c (main): Call initialize_event_loop.
3445 * server.h (initialize_event_loop): Declare.
3446
3447 2013-01-18 Yao Qi <yao@codesourcery.com>
3448
3449 * ax.h (struct eval_agent_expr_context): New.
3450 (gdb_eval_agent_expr): Update declaration.
3451 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3452 TFRAME. Add new argument CTX.
3453 * server.h (struct eval_agent_expr_context): Declare.
3454 (agent_mem_read, agent_tsv_read): Update declaration.
3455 (agent_mem_read_string): Likewise.
3456 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3457 (add_traceframe_block): Add new argument TPOINT.
3458 Increase TPOINT->traceframe_usage.
3459 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3460 eval_tracepoint_agent_expr.
3461 (condition_true_at_tracepoint): Likewise.
3462 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3463 (agent_mem_read_string, agent_tsv_read): Likewise.
3464
3465 2013-01-16 Yao Qi <yao@codesourcery.com>
3466
3467 * linux-low.c (linux_resume_one_lwp): Don't check
3468 'lwp->bp_reinsert != 0'.
3469
3470 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3471 Pedro Alves <palves@redhat.com>
3472
3473 * lynx-low.c (ptrace_request_to_str): Define a temporary
3474 macro and use it to simplify this function's implementation.
3475
3476 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3477
3478 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3479 sets errno.
3480
3481 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3482
3483 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3484
3485 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3486
3487 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3488
3489 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3490
3491 * lynx-low.c (lynx_resume): Use the resume_info parameter
3492 to determine the ptid for the lynx_ptrace call, unless
3493 it is equal to minus_one_ptid, in which case we use the
3494 ptid of the current_inferior.
3495 (lynx_wait_1): After having received a thread create/exit
3496 event, resume the inferior's execution using the signaling
3497 thread's ptid, rather than the old ptid.
3498
3499 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3500
3501 * lynx-low.c (lynx_resume): Delete variable ret.
3502
3503 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3504
3505 * gdbreplay.c (gdbreplay_version): Update copyright year.
3506 * server.c (gdbserver_version): Likewise.
3507
3508 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3509
3510 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3511 new thread.
3512
3513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3514
3515 * lynx-low.c (ptrace_request_to_str): Add handling for
3516 PTRACE_GETTRACESIG.
3517
3518 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3519
3520 * lynx-low.c (lynx_attach): Delete variable new_process.
3521
3522 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3523
3524 * lynx-low.c (lynx_create_inferior): Delete variable
3525 new_process.
3526
3527 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3528
3529 * lynx-low.c (ptrace_request_to_str): Do not handle
3530 PTRACE_GETTHREADLIST if this macro does not exist.
3531
3532 2012-12-15 Yao Qi <yao@codesourcery.com>
3533
3534 * Makefile.in (OBS): Add notif.o.
3535 * notif.c, notif.h: New.
3536 * server.c: Include "notif.h".
3537 (struct vstop_notif) <next>: Remove.
3538 <base>: New field.
3539 (queue_stop_reply): Update.
3540 (push_event, send_next_stop_reply): Remove.
3541 (discard_queued_stop_replies): Update.
3542 (notif_stop): New variable.
3543 (handle_v_stopped): Remove.
3544 (handle_v_requests): Don't call handle_v_stopped. Call
3545 handle_ack_notif instead.
3546 (queue_stop_reply_callback): Call notif_event_enque instead
3547 of queue_stop_reply.
3548 (handle_status): Don't call send_next_stop_reply, call
3549 notif_write_event instead.
3550 (kill_inferior_callback): Likewise.
3551 (detach_or_kill_inferior_callback): Likewise.
3552 (main): Call initialize_notif.
3553 (process_serial_event): Call QUEUE_is_empty.
3554 (handle_target_event): Call notif_push instead of push event.
3555 * server.h (push_event): Remove declaration.
3556
3557 2012-12-10 Tom Tromey <tromey@redhat.com>
3558
3559 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3560 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3561 macros.
3562 (.c.o): Rewrite.
3563 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3564 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3565 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3566 (amd64-linux-ipa.o, ax.o): Rewrite.
3567 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3568 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3569 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3570 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3571 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3572 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3573 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3574 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3575 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3576 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3577 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3578 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3579 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3580 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3581 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3582 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3583 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3584 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3585 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3586 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3587 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3588 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3589 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3590 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3591 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3592 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3593 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3594 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3595 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3596 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3597 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3598 (reg-tilegx.o): Remove.
3599 (all_object_files): New macro.
3600 Include .deps files.
3601 * aclocal.m4, configure: Rebuild.
3602 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3603 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3604 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3605
3606 2012-12-05 Tom Tromey <tromey@redhat.com>
3607
3608 PR gdb/14917:
3609 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3610
3611 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3612
3613 * configure.ac: Check for linux/perf_event.h.
3614 * config.in: Regenerated.
3615 * configure: Regenerated.
3616
3617 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3618
3619 * hostio.c (handle_readlink): Decrease buffer size
3620 parameter passed to readlink by one byte.
3621
3622 2012-11-26 Yao Qi <yao@codesourcery.com>
3623
3624 * configure.ac (build_warnings): Append '-Wempty-body'.
3625 * configure: Regenerated.
3626 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3627 body.
3628
3629 2012-11-15 Pierre Muller <muller@sourceware.org>
3630
3631 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3632 * config.in: Regenerate.
3633 * configure: Regenerate.
3634 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3635 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3636 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3637 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3638 header.
3639 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3640 instead of <sys/wait.h> header.
3641 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3642
3643 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3644
3645 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3646 (various make rules): Remove -DGDBSERVER
3647
3648 2012-11-09 Yao Qi <yao@codesourcery.com>
3649
3650 * spu-low.c (current_ptid): Move it to ..
3651 * gdbthread.h: ... here. New.
3652 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3653 * server.c (myresume, process_serial_event): Likewise.
3654 * thread-db.c (thread_db_find_new_threads): Likewise.
3655 * tracepoint.c (run_inferior_command): Likewise.
3656
3657 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3658
3659 * server.c (handle_search_memory_1): Include access length in
3660 warning message.
3661
3662 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3663
3664 * linux-crisv32-low.c: Fix compile errors.
3665
3666 2012-09-04 Yao Qi <yao@codesourcery.com>
3667
3668 * tracepoint.c (cmd_qtsv): Adjust debug message.
3669 Don't check CUR_TPOINT.
3670
3671 2012-08-28 Yao Qi <yao@codesourcery.com>
3672
3673 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3674 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3675 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3676 Remove declarations of xmalloc, xreallloc, xstrdup and
3677 freeargv.
3678 * Makefile.in (libiberty_h): New.
3679 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3680 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3681
3682 2012-08-23 Yao Qi <yao@codesourcery.com>
3683
3684 * server.h: Remove declaration of 'xsnprintf'.
3685
3686 2012-08-22 Keith Seitz <keiths@redhat.com>
3687
3688 * server.h: Include build-gnulib-gbserver/config.h.
3689 * gdbreplay.c: Likewise.
3690
3691 2012-08-08 Doug Evans <dje@google.com>
3692
3693 * Makefile.in (SFILES): Add gdb_vecs.c.
3694 (OBS): Add gdb_vecs.o.
3695 (gdb_vecs_h, host_defs_h): New variables.
3696 (thread-db.o): Add $(gdb_vecs_h) dependency.
3697 (gdb_vecs.o): New rule.
3698 * thread-db.c: #include "gdb_vecs.h".
3699 (thread_db_load_search): Use a vector to iterate over path elements.
3700 Handle text appearing after "$pdir".
3701
3702 * configure.ac: Add check for strstr.
3703 * config.in: Regenerate.
3704 * configure: Regenerate.
3705
3706 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3707
3708 * hostio.c (handle_pread): If pread fails, fall back to attempting
3709 lseek/read.
3710 (handle_pwrite): Likewise for pwrite.
3711
3712 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3713
3714 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3715 between unsupported TYPE and unimplementable ADDR/LEN combination.
3716 (arm_insert_point): Act on new return value.
3717
3718 2012-07-31 Pedro Alves <palves@redhat.com>
3719
3720 * server.c (process_point_options): Only skip tokens if we find
3721 one that is unrecognized. Don't treat 'X' specially while
3722 skipping unrecognized tokens.
3723
3724 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3725
3726 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3727 to 4-byte-align HW breakpoint addresses for Thumb.
3728
3729 2012-07-27 Yao Qi <yao@codesourcery.com>
3730
3731 PR remote/14161.
3732
3733 * server.h: Declare gdb_agent_about_to_close.
3734 * target.c (kill_inferior): Include "agent.h".
3735 New. Send command 'kill'.
3736 * target.h (kill_inferior): Removed macro.
3737 * tracepoint.c (gdb_agent_about_to_close): New.
3738 (gdb_agent_helper_thread): Handle command 'close'.
3739 Wait endlessly until the inferior stops.
3740 Install gdb_agent_remove_socket to atexit hook.
3741 (agent_socket_name): New static variable.
3742 (gdb_agent_socket_init): Replace local variable 'name' with
3743 'agent_socket_name'.
3744 (gdb_agent_remove_socket): New.
3745
3746 2012-07-27 Yao Qi <yao@codesourcery.com>
3747
3748 * server.c (process_point_options): Stop at 'X' when parsing.
3749
3750 2012-07-19 Michael Eager <eager@eagercon.com>
3751
3752 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3753 to hw_execute.
3754 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3755 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3756 hardware breakpoint.
3757
3758 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3759
3760 * gdbserver/linux-low.c (initialize_low): Call
3761 linux_ptrace_init_warnings.
3762
3763 2012-07-02 Doug Evans <dje@google.com>
3764
3765 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3766 pointer to int.
3767
3768 2012-07-02 Stan Shebs <stan@codesourcery.com>
3769
3770 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3771 (ax.o): Add it to build rule.
3772 (ax-ipa.o): Ditto.
3773 (OBS): Add format.o.
3774 (IPA_OBS): Add format.o.
3775 * server.c (handle_query): Claim support for breakpoint commands.
3776 (process_point_options): Add command case.
3777 (process_serial_event): Leave running if there are printfs in
3778 effect.
3779 * mem-break.h (any_persistent_commands): Declare.
3780 (add_breakpoint_commands): Declare.
3781 (gdb_no_commands_at_breakpoint): Declare.
3782 (run_breakpoint_commands): Declare.
3783 * mem-break.c (struct point_command_list): New struct.
3784 (struct breakpoint): New field command_list.
3785 (any_persistent_commands): New function.
3786 (add_commands_to_breakpoint): New function.
3787 (add_breakpoint_commands): New function.
3788 (gdb_no_commands_at_breakpoint): New function.
3789 (run_breakpoint_commands): New function.
3790 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3791 locally.
3792 * ax.c: Include format.h.
3793 (ax_printf): New function.
3794 (gdb_eval_agent_expr): Add printf opcode.
3795
3796 2012-06-13 Yao Qi <yao@codesourcery.com>
3797
3798 * server.c (start_inferior): Remove duplicated writes to fields
3799 'last_resume_kind' and 'last_status' of 'current_inferior'.
3800
3801 2012-06-12 Yao Qi <yao@codesourcery.com>
3802 Pedro Alves <palves@redhat.com>
3803
3804 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3805 comment.
3806 * server.c (handle_v_cont): Extend comment.
3807
3808 2012-06-11 Yao Qi <yao@codesourcery.com>
3809
3810 * linux-low.c (linux_attach): Add 'static'.
3811
3812 2012-06-06 Yao Qi <yao@codesourcery.com>
3813
3814 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3815
3816 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3817
3818 Fix gcc -flto compilation warning.
3819 * server.c (main): Make variable multi_mode and attach volatile.
3820
3821 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3822
3823 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3824 if the platform doesn't know about it.
3825
3826 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3827
3828 * Makefile.in (SFILES): Add linux-tile-low.c.
3829 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3830 * configure.srv: Handle tilegx-*-linux*.
3831 * linux-tile-low.c: New file.
3832
3833 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3834
3835 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3836
3837 2012-05-24 Pedro Alves <palves@redhat.com>
3838
3839 PR gdb/7205
3840
3841 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3842
3843 2012-05-24 Pedro Alves <palves@redhat.com>
3844
3845 PR gdb/7205
3846
3847 Replace target_signal with gdb_signal throughout.
3848
3849 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3850
3851 * linux-low.c (linux_store_registers): Avoid the copying sequence
3852 when no data has been retrieved by ptrace.
3853
3854 2012-05-22 Will Deacon <will.deacon@arm.com>
3855
3856 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3857 Include asm/ptrace.h.
3858 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3859 already defined.
3860
3861 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3862
3863 * linux-low.c (linux_store_registers): Don't re-retrieve data
3864 with ptrace that has already been obtained from /proc. Always
3865 copy any data retrieved with ptrace to the buffer supplied.
3866
3867 2012-05-11 Yao Qi <yao@codesourcery.com>
3868 Pedro Alves <palves@redhat.com>
3869
3870 * linux-low.c (enum stopping_threads_kind): New.
3871 (stopping_threads): Change type to `enum stopping_threads_kind'.
3872 (handle_extended_wait): If stopping and suspending threads, leave
3873 the new_lwp suspended too.
3874 (linux_wait_for_event): Adjust.
3875 (stop_all_lwps): Set `stopping_threads' to
3876 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3877 whether we're suspending threads or just stopping them. Assert no
3878 recursion happens.
3879
3880 2012-04-29 Yao Qi <yao@codesourcery.com>
3881
3882 * server.h: Move some code to ...
3883 * gdbthread.h: ... here. New.
3884 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3885 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3886 (nto-low.o, win32-low.o): Likewise.
3887 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3888 * regcache.c, remote-utils.c, server.c: Likewise.
3889 * target.c, tracepoint.c, win32-low.c: Likewise.
3890
3891 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3892
3893 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3894 (PTRACE_ARG4_TYPE): Likewise.
3895 (PTRACE_XFER_TYPE): Likewise.
3896 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3897 ptrace to PTRACE_ARG3_TYPE.
3898 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3899 (PTRACE_ARG4_TYPE): Likewise.
3900 (PTRACE_XFER_TYPE): Likewise.
3901 (linux_detach_one_lwp): Cast fourth argument of
3902 ptrace to long then PTRACE_ARG4_TYPE.
3903 (regsets_fetch_inferior_registers): Cast third argument of
3904 ptrace to long then PTRACE_ARG3_TYPE.
3905 (regsets_store_inferior_registers): Likewise.
3906
3907 2012-04-20 Pedro Alves <palves@redhat.com>
3908
3909 * configure: Regenerate.
3910
3911 2012-04-19 Pedro Alves <palves@redhat.com>
3912
3913 * Makefile.in (GNULIB_BUILDDIR): New.
3914 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3915 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3916 (all, install-only, uninstall, clean-info, all-lib, clean): No
3917 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3918 (maintainer-clean realclean distclean): Use subdir_do.
3919 (subdir_do): New.
3920 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3921 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3922 * acinclude.m4: Include acx_configure_dir.m4.
3923 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3924 calls. Call AC_PROG_RANLIB. Configure gnulib using
3925 ACX_CONFIGURE_DIR.
3926 (GNULIB): New.
3927 (GNULIB_STDINT_H): Adjust.
3928 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3929 * gdbreplay.c: Include build-gnulib/config.h.
3930 * server.h: Likewise.
3931 * aclocal.m4: Regenerate.
3932 * config.in: Regenerate.
3933 * configure: Regenerate.
3934
3935 2012-04-19 Pedro Alves <palves@redhat.com>
3936
3937 * Makefile.in (LIBGNU, INCGNU): Adjust.
3938 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3939 (all, install-only, uninstall, clean-info, all-lib, clean)
3940 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3941 * configure.ac: Adjust AC_OUTPUT output.
3942 * aclocal.m4: Regenerate.
3943 * configure: Regenerate.
3944
3945 2012-04-19 Pedro Alves <palves@redhat.com>
3946
3947 * Makefile.in (generated_files): New.
3948 (server_h): Remove the explicit dependency on config.h, and depend
3949 on $generated_files.
3950
3951 2012-04-19 Pedro Alves <palves@redhat.com>
3952
3953 * Makefile.in (INCGNU): Add -Ignulib.
3954
3955 2012-04-19 Pedro Alves <palves@redhat.com>
3956
3957 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3958 (INCGNU): ... this, and spell out -I here.
3959 (GNULIB_LIB): Rename to ...
3960 (LIBGNU): ... this.
3961 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3962
3963 2012-04-19 Pedro Alves <palves@redhat.com>
3964
3965 * config.in: Regenerate.
3966
3967 2012-04-19 Pedro Alves <palves@redhat.com>
3968
3969 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3970 * server.h (memmem): Remove declaration.
3971 * config.in: Regenerate.
3972 * configure: Regenerate.
3973
3974 2012-04-19 Yao Qi <yao@codesourcery.com>
3975
3976 * Makefile.in (SFILES): Add common/vec.c.
3977 (OBS): Add vec.o.
3978 (vec.o): New rule.
3979
3980 2012-04-19 Yao Qi <yao@codesourcery.com>
3981
3982 * remote-utils.c (prepare_resume_reply): Replace with macro
3983 target_core_of_thread.
3984 * server.c (handle_qxfer_threads_proper): Likewise.
3985 * target.h (traget_core_of_thread): New macro.
3986
3987 2012-04-18 Pedro Alves <palves@redhat.com>
3988
3989 * aclocal.m4: Regenerate.
3990 * configure: Regenerate.
3991
3992 2012-04-16 Yao Qi <yao@codesourcery.com>
3993
3994 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3995 duplicated on address.
3996
3997 2012-04-16 Yao Qi <yao@codesourcery.com>
3998
3999 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4000 (struct tracepoint_action_ops) <send>: New field.
4001 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4002 (agent_expr_send, x_tracepoint_action_send): New.
4003 (l_tracepoint_action_send): New.
4004 (cmd_qtdp): Download and install tracepoint
4005 according to `use_agent'.
4006 (run_inferior_command): Add one more parameter `len'.
4007 Update callers.
4008 (tracepoint_send_agent): New.
4009 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4010
4011 2012-04-16 Yao Qi <yao@codesourcery.com>
4012
4013 * tracepoint.c (download_tracepoints): Moved to ...
4014 (cmd_qtstart): ... here.
4015
4016 2012-04-14 Yao Qi <yao@codesourcery.com>
4017
4018 * tracepoint.c: Include inttypes.h.
4019 (struct collect_memory_action): Use sized types.
4020 (struct tracepoint): Likewise.
4021 (cmd_qtdp, stop_tracing): Update print specifiers.
4022 (cmd_qtp, response_tracepoint): Likewise.
4023 (collect_data_at_tracepoint): Likewise.
4024 (collect_data_at_step): Likewise.
4025
4026 2012-04-14 Yao Qi <yao@codesourcery.com>
4027
4028 Import gnulib module inttypes.
4029 * aclocal.m4, config.in, configure: Regenerated.
4030
4031 2012-04-14 Yao Qi <yao@codesourcery.com>
4032
4033 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4034 Makefile and config.status at last.
4035
4036 2012-04-13 Yao Qi <yao@codesourcery.com>
4037
4038 * tracepoint.c: Include stdint.h unconditionally.
4039
4040 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4041
4042 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4043 on BFD_HAVE_SYS_PROCFS_TYPE.
4044 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4045 * configure: Regenerate.
4046 * config.in: Likewise.
4047
4048 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4049
4050 * Makefile.in (clean): Also remove x32.c x32-linux.c
4051 x32-avx.c x32-avx-linux.c.
4052 (x32.o): New target.
4053 (x32.c): Likewise.
4054 (x32-linux.o): Likewise.
4055 (x32-linux.c): Likewise.
4056 (x32-avx.o): Likewise.
4057 (x32-avx.c): Likewise.
4058 (x32-avx-linux.o): Likewise.
4059 (x32-avx-linux.c): Likewise.
4060
4061 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4062 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4063 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4064 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4065 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4066 i386/x32-avx-linux.xml.
4067
4068 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4069 (init_registers_x32_avx_linux): Likwise.
4070 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4071 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4072
4073 2012-04-13 Pedro Alves <palves@redhat.com>
4074
4075 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4076 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4077 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4078 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4079 the sub-make.
4080
4081 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4082
4083 * linux-x86-low.c (compat_x32_clock_t): New.
4084 (compat_x32_siginfo_t): Likewise.
4085 (compat_x32_siginfo_from_siginfo): Likewise.
4086 (siginfo_from_compat_x32_siginfo): Likewise.
4087 (linux_is_elf64): Likewise.
4088 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4089 and siginfo_from_compat_x32_siginfo for x32.
4090 (x86_arch_setup): Set linux_is_elf64.
4091
4092 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4093
4094 PR gdb/13969
4095 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4096 e_machine field.
4097 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4098 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4099 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4100 compatible with process.
4101
4102 2012-04-12 Yao Qi <yao@codesourcery.com>
4103
4104 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4105 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4106 (install-only, install-info, clean): Handle sub dir gnulib.
4107 (all-lib, am--refresh): New targets.
4108 (memmem.o): Remove target.
4109 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4110 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4111 (AC_REPLACE_FUNCS): Remove memmem.
4112 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4113 (AC_OUTPUT): Generate Makefile in gnulib/.
4114 * aclocal.m4, config.in, configure: Regenerated.
4115
4116 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4117
4118 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4119
4120 2012-04-05 Pedro Alves <palves@redhat.com>
4121
4122 -Werror=strict-aliasing
4123
4124 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4125 pointer.
4126
4127 2012-04-04 Pedro Alves <palves@redhat.com>
4128
4129 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4130 (sparc_store_gregset_from_stack, sparc_store_gregset)
4131 (sparc_breakpoint_at): Fix formatting.
4132
4133 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4134
4135 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4136 are available.
4137 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4138 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4139 * config.in: Regenerate.
4140 * configure: Likewise.
4141
4142 2012-03-29 Pedro Alves <palves@redhat.com>
4143
4144 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4145 Correct ptrace arguments.
4146
4147 2012-03-28 Pedro Alves <palves@redhat.com>
4148
4149 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4150 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4151 (IA64_FR1_REGNUM): New defines.
4152 (ia64_fetch_register): New.
4153 (the_low_target): Install it.
4154 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4155 field.
4156 * linux-low.c (linux_fetch_registers): Try the
4157 the_low_target.fetch_register hook first.
4158
4159 * linux-arm-low.c (the_low_target): Adjust.
4160 * linux-bfin-low.c (the_low_target): Adjust.
4161 * linux-cris-low.c (the_low_target): Adjust.
4162 * linux-crisv32-low.c (the_low_target): Adjust.
4163 * linux-m32r-low.c (the_low_target): Adjust.
4164 * linux-m68k-low.c (the_low_target): Adjust.
4165 * linux-mips-low.c (the_low_target): Adjust.
4166 * linux-ppc-low.c (the_low_target): Adjust.
4167 * linux-s390-low.c (the_low_target): Adjust.
4168 * linux-sh-low.c (the_low_target): Adjust.
4169 * linux-sparc-low.c (the_low_target): Adjust.
4170 * linux-tic6x-low.c (the_low_target): Adjust.
4171 * linux-x86-low.c (the_low_target): Adjust.
4172 * linux-xtensa-low.c (the_low_target): Adjust.
4173
4174 2012-03-26 Pedro Alves <palves@redhat.com>
4175
4176 * server.c (handle_qxfer_libraries): Don't bail early if
4177 the_target->qxfer_libraries_svr4 is not NULL.
4178
4179 2012-03-26 Pedro Alves <palves@redhat.com>
4180
4181 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4182
4183 2012-03-23 Pedro Alves <palves@redhat.com>
4184
4185 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4186 "library-list-svr4" element's start tag when the the DSO list is
4187 empty.
4188
4189 2012-03-23 Pedro Alves <palves@redhat.com>
4190
4191 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4192 a variable whose type size is the same as the inferior's pointer
4193 size.
4194
4195 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4196
4197 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4198 struct siginfo.
4199 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4200 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4201 * linux-low.h: Include <signal.h>.
4202 (struct siginfo): Remove forward declaration.
4203 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4204 struct siginfo.
4205
4206 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4207
4208 * .gitignore: Ignore more files.
4209
4210 2012-03-19 Pedro Alves <palves@redhat.com>
4211 Jan Kratochvil <jan.kratochvil@redhat.com>
4212
4213 * server.c (cont_thread, general_thread): Add describing comments.
4214 (start_inferior): Clear `cont_thread'.
4215 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4216 of a process.
4217
4218 2012-03-15 Yao Qi <yao@codesourcery.com>
4219
4220 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4221 handling to ...
4222 (cmd_qtdp): ... here.
4223
4224 2012-03-15 Yao Qi <yao@codesourcery.com>
4225
4226 * tracepoint.c (struct tracepoint_action_ops): New.
4227 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4228 (m_tracepoint_action_download): New.
4229 (r_tracepoint_action_download): New.
4230 (x_tracepoint_action_download): New.
4231 (l_tracepoint_action_download): New.
4232 (add_tracepoint_action): Install `action->ops' according type.
4233 (download_tracepoint_1): Move code `download' function pointer
4234 of various tracepoint_action_ops.
4235
4236 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4237
4238 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4239 linux_ptrace_attach_warnings.
4240
4241 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4242
4243 * Makefile.in (linux-ptrace.o): New.
4244 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4245 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4246 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4247 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4248 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4249 of these targets.
4250 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4251
4252 2012-03-08 Yao Qi <yao@codesourcery.com>
4253 Pedro Alves <palves@redhat.com>
4254
4255 Fix PR server/13392.
4256 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4257 offset of JMP insn.
4258 * tracepoint.c (remove_tracepoint): New.
4259 (cmd_qtdp): Call remove_tracepoint when failed to install.
4260
4261 2012-03-07 Pedro Alves <palves@redhat.com>
4262
4263 * linux-low.c (get_detach_signal): New.
4264 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4265 Pass on pending signals to PTRACE_DETACH. Check the result of the
4266 ptrace call.
4267 * server.c (program_signals, program_signals_p): New.
4268 (handle_general_set): Handle QProgramSignals.
4269 * server.h (program_signals, program_signals_p): Declare.
4270
4271 2012-03-05 Pedro Alves <palves@redhat.com>
4272 Jan Kratochvil <jan.kratochvil@redhat.com>
4273
4274 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4275 New comment why.
4276
4277 2012-03-03 Yao Qi <yao@codesourcery.com>
4278
4279 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4280 agent_look_up_symbols.
4281
4282 2012-03-03 Yao Qi <yao@codesourcery.com>
4283
4284 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4285 (linux-x86-low.o): Likewise.
4286 * server.h: Remove in_process_agent_loaded.
4287 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4288 common/agent.c.
4289 Update callers.
4290
4291 2012-03-03 Yao Qi <yao@codesourcery.com>
4292
4293 * tracepoint.c (gdb_agent_capability): New global.
4294 (in_process_agent_loaded_ust): Renamed to
4295 `in_process_agent_supports_ust'.
4296 Update callers.
4297 (in_process_agent_supports_ust): Call agent_capability_check.
4298 (clear_installed_tracepoints): Assert that agent supports
4299 agent.
4300
4301 2012-03-03 Yao Qi <yao@codesourcery.com>
4302
4303 * linux-low.c (linux_supports_agent): New.
4304 (linux_target_ops): Initialize field `supports_agent' with
4305 linux_supports_agent.
4306 * target.h (struct target_ops) <supports_agent>: New.
4307 (target_supports_agent): New macro.
4308 * server.c (handle_general_set): Handle packet 'QAgent'.
4309 (handle_query): Send `QAgent+'.
4310 * Makefile.in (server.o): Depends on agent.h.
4311
4312 2012-03-03 Yao Qi <yao@codesourcery.com>
4313
4314 * Makefile.in (OBS): Add agent.o.
4315 Add new rule for agent.o.
4316 Track dependence of tracepoint.c on agent.h.
4317 * tracepoint.c (run_inferior_command_1):
4318 (run_inferior_command): Call agent_run_command.
4319 (gdb_ust_connect_sync_socket): Deleted. Move it to
4320 common/agent.c.
4321 (resume_thread, stop_thread): Likewise.
4322 (gdb_ust_socket_init): Renamed to ...
4323 (gdb_agent_socket_init): ... New.
4324 (gdb_ust_thread): Renamed to ...
4325 (gdb_agent_helper_thread): ... New.
4326 (gdb_ust_init): Move some code to ...
4327 (gdb_agent_init): ... here. New.
4328 [HAVE_UST]: Call gdb_ust_init.
4329 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4330 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4331 * config.in, configure: Regenerated.
4332
4333 2012-03-02 Pedro Alves <palves@redhat.com>
4334
4335 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4336 * linux-low.c (struct simple_pid_list): New.
4337 (stopped_pids): New a struct simple_pid_list pointer.
4338 (add_to_pid_list, pull_pid_from_list): New.
4339 (handle_extended_wait): Don't assume the first signal new children
4340 report is SIGSTOP. Adjust call to pull_pid_from_list.
4341 (linux_wait_for_lwp): Adjust.
4342
4343 2012-03-02 Yao Qi <yao@codesourcery.com>
4344
4345 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4346 debug log.
4347
4348 2012-03-02 Yao Qi <yao@codesourcery.com>
4349
4350 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4351 `stop_pc' and `tpoint'. Update caller.
4352
4353 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4354
4355 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4356 * linux-low.c (use_linux_regsets): New macro.
4357 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4358 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4359 (linux_register_in_regsets): New function.
4360 (usr_fetch_inferior_registers): Skip registers covered by
4361 regsets.
4362 (usr_store_inferior_registers): Likewise.
4363 (usr_fetch_inferior_registers): New macro.
4364 (usr_store_inferior_registers): Likewise.
4365 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4366 (linux_store_registers): Likewise.
4367 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4368 prototype.
4369 (init_registers_mips64_dsp_linux): Likewise.
4370 (init_registers_mips_linux): New macro.
4371 (init_registers_mips_dsp_linux): Likewise.
4372 (mips_dsp_num_regs): Likewise.
4373 (DSP_BASE, DSP_CONTROL): New fallback macros.
4374 (mips_base_regs): New macro.
4375 (mips_regmap): Use it. Fix the size.
4376 (mips_dsp_regmap): New variable.
4377 (mips_dsp_regset_bitmap): Likewise.
4378 (mips_arch_setup): New function.
4379 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4380 than mips_regmap.
4381 (mips_cannot_store_register): Likewise.
4382 (the_low_target): Update .arch_setup, .num_regs and .regmap
4383 initializers. Add .regset_bitmap initializer.
4384 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4385 initializer.
4386 * linux-bfin-low.c (the_low_target): Likewise.
4387 * linux-cris-low.c (the_low_target): Likewise.
4388 * linux-crisv32-low.c (the_low_target): Likewise.
4389 * linux-ia64-low.c (the_low_target): Likewise.
4390 * linux-m32r-low.c (the_low_target): Likewise.
4391 * linux-m68k-low.c (the_low_target): Likewise.
4392 * linux-ppc-low.c (the_low_target): Likewise.
4393 * linux-s390-low.c (the_low_target): Likewise.
4394 * linux-sh-low.c (the_low_target): Likewise.
4395 * linux-sparc-low.c (the_low_target): Likewise.
4396 * linux-tic6x-low.c (the_low_target): Likewise.
4397 * linux-x86-low.c (the_low_target): Likewise.
4398 * linux-xtensa-low.c (the_low_target): Likewise.
4399 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4400 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4401 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4402 srv_xmlfiles.
4403 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4404 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4405
4406 2012-02-29 Yao Qi <yao@codesourcery.com>
4407 Pedro Alves <palves@redhat.com>
4408
4409 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4410 `step_over_finished' is true.
4411
4412 2012-02-27 Pedro Alves <palves@redhat.com>
4413
4414 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4415 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4416
4417 2012-02-27 Pedro Alves <palves@redhat.com>
4418
4419 PR server/9684
4420 * linux-low.c (pid_is_stopped): New.
4421 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4422
4423 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4424
4425 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4426 of conditions.
4427
4428 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4429
4430 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4431
4432 2012-02-24 Luis Machado <lgustavo@codesourcery>
4433
4434 * server.c (handle_query): Advertise support for target-side
4435 breakpoint condition evaluation.
4436 (process_point_options): New function.
4437 (process_serial_event): When inserting a breakpoint, check for
4438 a target-side condition that should be evaluated.
4439
4440 * mem-break.c: Include regcache.h and ax.h.
4441 (point_cond_list_t): New data structure.
4442 (breakpoint) <cond_list>: New field.
4443 (find_gdb_breakpoint_at): Make non-static.
4444 (delete_gdb_breakpoint_at): Clear any target-side
4445 conditions.
4446 (clear_gdb_breakpoint_conditions): New function.
4447 (add_condition_to_breakpoint): Likewise.
4448 (add_breakpoint_condition): Likewise.
4449 (gdb_condition_true_at_breakpoint): Likewise.
4450 (gdb_breakpoint_here): Return result directly instead
4451 of going through a local variable.
4452
4453 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4454 (clear_gdb_breakpoint_conditions): Likewise.
4455 (add_breakpoint_condition): Likewise.
4456 (gdb_condition_true_at_breakpoint): Likewise.
4457
4458 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4459 (need_step_over_p): Take target-side breakpoint condition into
4460 consideration.
4461
4462 2012-02-24 Luis Machado <lgustavo@codesourcery>
4463
4464 * server.h: Include tracepoint.h.
4465 (agent_mem_read, agent_get_trace_state_variable_value,
4466 agent_set_trace_state_variable_value,
4467 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4468 get_set_tsv_func_addr): New prototypes.
4469
4470 * ax.h: New include file.
4471 * ax.c: New source file.
4472
4473 * tracepoint.c: Include ax.h.
4474 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4475 agent_expr, eval_result_type): Move to ax.h.
4476 (parse_agent_expr): Rename to ...
4477 (gdb_parse_agent_expr): ... this, make it non-static and move
4478 to ax.h.
4479 (unparse_agent_expr) Rename to ...
4480 (gdb_unparse_agent_expr): ... this, make it non-static and move
4481 to ax.h.
4482 (eval_agent_expr): Rename to ...
4483 (eval_tracepoint_agent_expr): ... this.
4484 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4485 forward declarations.
4486 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4487 (agent_get_trace_state_variable_value): New function.
4488 (agent_set_trace_state_variable_value): New function.
4489 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4490 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4491 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4492 (condition_true_at_tracepoint): Likewise.
4493 (parse_agent_expr): Rename to ...
4494 (gdb_parse_agent_expr): ... this and move to ax.c.
4495 (unparse_agent_expr): Rename to ...
4496 (gdb_unparse_agent_expr): ... this and move to ax.c.
4497 (gdb_agent_op_name): Move to ax.c.
4498 (eval_agent_expr): Rename to ...
4499 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4500 and move to ax.c.
4501 (eval_tracepoint_agent_expr): New function.
4502 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4503 non-static.
4504 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4505 ax.c.
4506 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4507 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4508 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4509 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4510 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4511 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4512 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4513 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4514 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4515 (compile_bytecodes): Remove forward declaration.
4516 (is_goto_target): Move to ax.c.
4517 (compile_bytecodes): Move to ax.c and call
4518 agent_get_trace_state_variable_value (...) and
4519 agent_set_trace_state_variable_value (...).
4520
4521 * Makefile.in: Update ax.c and IPA dependencies.
4522
4523 2012-02-24 Pedro Alves <palves@redhat.com>
4524
4525 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4526 (cmd_bigqtbuffer_circular): ... this. Only handle
4527 'QTBuffer:circular:'.
4528 (handle_tracepoint_general_set): Adjust.
4529
4530 2012-02-16 Yao Qi <yao@codesourcery.com>
4531
4532 * inferiors.c: Move code to ...
4533 * dll.c: .... here. New.
4534 * server.h: Declare clear_dlls.
4535 * Makefile.in (SFILES): Add dll.c.
4536 (OBS): Add dll.o
4537 (dll.o): New rule.
4538
4539 2012-02-11 Yao Qi <yao@codesourcery.com>
4540
4541 * server.c: (handle_monitor_command): Add a new parameter
4542 `own_buf'.
4543 (handle_query): Update caller.
4544
4545 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4546
4547 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4548 * configure, config.in: Regenerate.
4549 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4550 is not defined.
4551
4552 2012-02-02 Pedro Alves <palves@redhat.com>
4553
4554 Try SIGKILL first, then PTRACE_KILL.
4555 * linux-low.c (linux_kill_one_lwp): New.
4556 (linux_kill_one_lwp): Rename to ...
4557 (kill_one_lwp_callback): ... this. Use the new
4558 linux_kill_one_lwp.
4559
4560 2012-02-02 Pedro Alves <palves@redhat.com>
4561
4562 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4563 inferior.
4564
4565 2012-01-27 Pedro Alves <palves@redhat.com>
4566
4567 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4568 (elf_64_file_p): Make static.
4569 (linux_pid_exe_is_elf_64_file): New.
4570 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4571 Delete declarations.
4572 (linux_pid_exe_is_elf_64_file): Declare.
4573 * linux-x86-low.c (x86_arch_setup): Use
4574 linux_pid_exe_is_elf_64_file.
4575
4576 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4577
4578 * linux-low.c (linux_wait_for_event_1): Rename to ...
4579 (linux_wait_for_event): ... here and merge it with former
4580 linux_wait_for_event - new variable wait_ptid, use it.
4581 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4582
4583 2012-01-23 Pedro Alves <palves@redhat.com>
4584
4585 * server.c (main): Avoid yet another case of infinite loop while
4586 detaching/killing after a longjmp.
4587
4588 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4589
4590 Code cleanup.
4591 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4592
4593 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4594
4595 * hostio.c (handle_readlink): New function.
4596 (handle_vFile): Call it to handle "vFile:readlink" packets.
4597
4598 2012-01-20 Pedro Alves <palves@redhat.com>
4599 Ulrich Weigand <ulrich.weigand@linaro.org>
4600
4601 * server.c (handle_v_requests): Only support vAttach and vRun to
4602 start multiple processes when in extended protocol mode.
4603
4604 2012-01-17 Pedro Alves <palves@redhat.com>
4605
4606 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4607 memalign plus mprotect to allocate the scratch buffer.
4608
4609 2012-01-13 Pedro Alves <palves@redhat.com>
4610
4611 * server.c (attach_inferior): Clear `cont_thread'.
4612
4613 2012-01-13 Pedro Alves <palves@redhat.com>
4614
4615 * server.c (main): Avoid infinite loop while detaching/killing
4616 after a longjmp.
4617
4618 2012-01-09 Doug Evans <dje@google.com>
4619
4620 * server.c (start_inferior): Set last_ptid in --wrapper case.
4621
4622 2012-01-06 Yao Qi <yao@codesourcery.com>
4623
4624 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4625 defined.
4626 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4627
4628 2012-01-04 Yao Qi <yao@codesourcery.com>
4629
4630 * tracepoint.c (cmd_qtdp): Print debug message
4631 for static tracepoint.
4632
4633 2012-01-04 Yao Qi <yao@codesourcery.com>
4634
4635 * tracepoint.c (trace_vdebug): Differentiate debug message
4636 between gdbserver and IPA.
4637
4638 2012-01-03 Yao Qi <yao@codesourcery.com>
4639
4640 * tracepoint.c (tracepoint_was_hit): Don't collect for
4641 static tracepoint.
4642
4643 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4644
4645 * terminal.h: Reformat copyright header.
4646
4647 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4648
4649 * server.c (gdbserver_version): Update copyright year.
4650 * gdbreplay.c (gdbreplay_version): Likewise.
4651
4652 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4653
4654 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4655
4656 Revert:
4657 2011-12-18 Hui Zhu <teawater@gmail.com>
4658 * linux-low.c (linux_create_inferior): Save return value to ret.
4659
4660 2011-12-18 Hui Zhu <teawater@gmail.com>
4661
4662 * linux-low.c (linux_create_inferior): Save return value to ret.
4663
4664 2011-12-16 Doug Evans <dje@google.com>
4665
4666 * linux-low.c (linux_create_inferior): If stdio connection,
4667 redirect stdin from /dev/null, stdout to stderr.
4668 * remote-utils.c (remote_is_stdio): New static global.
4669 (remote_connection_is_stdio): New function.
4670 (remote_prepare): Handle stdio connection.
4671 (remote_open): Ditto.
4672 (remote_close): Don't close stdin for stdio connections.
4673 (read_prim,write_prim): New functions. Replace all calls to
4674 read/write to these.
4675 * server.c (main): Watch for "-" argument. Move call to
4676 remote_prepare before start_inferior.
4677 * server.h (STDIO_CONNECTION_NAME): New macro.
4678 (remote_connection_is_stdio): Declare.
4679
4680 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4681 in debugging output.
4682
4683 2011-12-15 Yao Qi <yao@codesourcery.com>
4684
4685 * tracepoint.c: Include sys/syscall.h.
4686 (gdb_ust_thread): Remove preprocessor conditional.
4687
4688 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4689
4690 * linux-low.c (linux_detach_one_lwp): Call
4691 the_low_target.prepare_to_resume before detaching.
4692
4693 2011-12-14 Yao Qi <yao@codesourcery.com>
4694
4695 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4696 of write.
4697
4698 2011-12-14 Yao Qi <yao@codesourcery.com>
4699
4700 * i386-low.c (i386_low_stopped_data_address): Initialize local
4701 variable `control'.
4702
4703 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4704
4705 PR remote/13492
4706
4707 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4708 DR_CONTROL unless necessary. Extend comments.
4709 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4710 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4711
4712 2011-12-13 Yao Qi <yao@codesourcery.com>
4713
4714 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4715 macros.
4716 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4717
4718 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4719
4720 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4721 Print new debug message for such case.
4722
4723 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4724
4725 Fix overlapping memcpy.
4726 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4727 the read_inferior_memory transfer.
4728 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4729 write_inferior_memory transfer.
4730 (set_fast_tracepoint_jump): New variable buf. Use it for the
4731 read_inferior_memory and write_inferior_memory transfers.
4732 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4733 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4734 Use it for the write_inferior_memory transfer.
4735 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4736 buffers.
4737
4738 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4739
4740 * linux-low.c (fetch_register, store_register): Make code
4741 consistent, fix formatting.
4742
4743 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4744
4745 * linux-low.c (usr_store_inferior_registers): Factor out code
4746 to handle individual registers into...
4747 (store_register): ... this new function.
4748
4749 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4750
4751 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4752 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4753 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4754 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4755 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4756 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4757 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4758 (srv_xmlfiles): Add new XML files.
4759
4760 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4761 and <sys/uio.h>.
4762 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4763 (init_registers_s390_linux32v1): Add prototype.
4764 (init_registers_s390_linux32v2): Likewise.
4765 (init_registers_s390_linux64v1): Likewise.
4766 (init_registers_s390_linux64v2): Likewise.
4767 (init_registers_s390x_linux64v1): Likewise.
4768 (init_registers_s390x_linux64v2): Likewise.
4769 (s390_num_regs): Increment to 52.
4770 (s390_regmap): Add orig_r2 register.
4771 (s390_num_regs_3264): Increment to 68.
4772 (s390_regmap_3264): Add orig_r2 register.
4773 (s390_collect_ptrace_register): Handle orig_r2 register.
4774 (s390_supply_ptrace_register): Likewise.
4775 (s390_fill_last_break): New function.
4776 (s390_store_last_break): Likewise.
4777 (s390_fill_system_call): New function.
4778 (s390_store_system_call): Likewise.
4779 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4780 register sets.
4781 (s390_check_regset): New function.
4782 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4783 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4784 Update target_regsets for available register sets.
4785
4786 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4787 Jan Kratochvil <jan.kratochvil@redhat.com>
4788
4789 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4790 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4791 New.
4792 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4793 * linux-low.h (struct process_info_private): New member r_debug.
4794 * server.c (handle_qxfer_libraries): Call
4795 the_target->qxfer_libraries_svr4.
4796 (handle_qxfer_libraries_svr4): New function.
4797 (qxfer_packets): New entry "libraries-svr4".
4798 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4799 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4800 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4801 PACKET_qXfer_libraries_svr4.
4802
4803 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4804
4805 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4806 PSW address/mask between 8-byte and 16-byte formats.
4807 (s390_supply_ptrace_register): Likewise.
4808 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4809 basic addressing mode bit.
4810
4811 2011-11-24 Stan Shebs <stan@codesourcery.com>
4812
4813 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4814
4815 2011-11-17 Stan Shebs <stan@codesourcery.com>
4816
4817 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4818 (tracing_start_time): New global.
4819 (tracing_stop_time): New global.
4820 (tracing_user_name): New global.
4821 (tracing_notes): New global.
4822 (tracing_stop_note): New global.
4823 (cmd_qtstart): Set traceframe_usage, start_time.
4824 (stop_tracing): Set stop_time.
4825 (cmd_qtstatus): Report additional status.
4826 (cmd_qtp): New function.
4827 (handle_tracepoint_query): Call it.
4828 (cmd_qtnotes): New function.
4829 (handle_tracepoint_general_set): Call it.
4830 (get_timestamp): Rename from tsv_get_timestamp.
4831
4832 2011-11-14 Stan Shebs <stan@codesourcery.com>
4833 Kwok Cheung Yeung <kcy@codesourcery.com>
4834
4835 * linux-x86-low.c (small_jump_insn): New.
4836 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4837 trampoline and error message, build a trampoline and issue a small
4838 jump instruction to it.
4839 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4840 trampoline and error message.
4841 (x86_get_min_fast_tracepoint_insn_len): New.
4842 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4843 * linux-low.h (struct linux_target_ops): Add arguments to
4844 install_fast_tracepoint_jump_pad operation, add new operation.
4845 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4846 arguments.
4847 (linux_get_min_fast_tracepoint_insn_len): New function.
4848 (linux_target_op): Add new operation.
4849 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4850 (gdb_trampoline_buffer_end): Ditto.
4851 (gdb_trampoline_buffer_error): Ditto.
4852 (struct ipa_sym_addresses): Add fields for new IPA variables.
4853 (symbol_list): Add entries for new IPA variables.
4854 (struct tracepoint): Add fields to hold the address range of the
4855 trampoline used by the tracepoint.
4856 (trampoline_buffer_head): New static variable.
4857 (trampoline_buffer_tail): Ditto.
4858 (claim_trampoline_space): New function.
4859 (have_fast_tracepoint_trampoline_buffer): New function.
4860 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4861 structure.
4862 (install_fast_tracepoint): Ditto, also add error buffer argument.
4863 (cmd_qtminftpilen): New function.
4864 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4865 (fast_tracepoint_from_trampoline_address): New function.
4866 (fast_tracepoint_collecting): Handle trampoline as part of jump
4867 pad space.
4868 (set_trampoline_buffer_space): New function.
4869 (initialize_tracepoint): Initialize new IPA variables.
4870 * target.h (struct target_ops): Add arguments to
4871 install_fast_tracepoint_jump_pad operation, add new
4872 get_min_fast_tracepoint_insn_len operation.
4873 (target_get_min_fast_tracepoint_insn_len): New.
4874 (install_fast_tracepoint_jump_pad): Add arguments.
4875 * server.h (IPA_BUFSIZ): Define.
4876 * linux-i386-ipa.c: Include extra header files.
4877 (initialize_fast_tracepoint_trampoline_buffer): New function.
4878 (initialize_low_tracepoint): Call it.
4879 * server.h (set_trampoline_buffer_space): Declare.
4880 (claim_trampoline_space): Ditto.
4881 (have_fast_tracepoint_trampoline_buffer): Ditto.
4882
4883 2011-11-14 Yao Qi <yao@codesourcery.com>
4884
4885 * server.c (handle_query): Handle InstallInTrace for qSupported.
4886 * tracepoint.c (add_tracepoint): Sort list.
4887 (install_tracepoint, download_tracepoint): New.
4888 (cmd_qtdp): Call them to install and download tracepoints.
4889 (sort_tracepoints): Removed.
4890 (cmd_qtstart): Update.
4891
4892 2011-11-14 Yao Qi <yao@codesourcery.com>
4893
4894 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4895 * mem-break.h: Declare.
4896 * tracepoint.c (cmd_qtstart): Move some code to ...
4897 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4898 New.
4899 (download_tracepoints): Move some code to ...
4900 (download_tracepoint_1): ... here. New.
4901
4902 2011-11-08 Yao Qi <yao@codesourcery.com>
4903
4904 * remote-utils.c (relocate_instruction): A comment fix.
4905
4906 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4907
4908 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4909 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4910 dr_status_mirror and dr_control_mirror from debug_reg_state.
4911 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4912 (i386_initial_stuff): Remove use of deleted globals.
4913 (i386_get_thread_context, i386_set_thread_context,
4914 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4915 from debug_reg_state.
4916
4917 2011-11-05 Yao Qi <yao@codesourcery.com>
4918
4919 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4920 address as TPOINT's.
4921
4922 2011-11-02 Stan Shebs <stan@codesourcery.com>
4923
4924 * tracepoint.c (agent_mem_read_string): New function.
4925 (eval_agent_expr): Call it for tracenz.
4926 * server.c (handle_query): Report support for tracenz.
4927
4928 2011-11-02 Yao Qi <yao@codesourcery.com>
4929
4930 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4931
4932 2011-11-02 Yao Qi <yao@codesourcery.com>
4933
4934 * target.h: Fix a typo in comment.
4935
4936 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4937
4938 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4939 clobber the breakpoints' shadows with fast tracepoint jumps.
4940 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4941 * target.c (write_inferior_memory): Also pass MYADDR down to
4942 check_mem_write.
4943
4944 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4945
4946 * configure.ac: Check support for personality routine.
4947 * configure: Regenerate.
4948 * config.in: Likewise.
4949 * linux-low.c: Include <sys/personality.h>.
4950 Define ADDR_NO_RANDOMIZE if necessary.
4951 (linux_create_inferior): Disable address space randomization when
4952 forking inferior, if requested.
4953 (linux_supports_disable_randomization): New function.
4954 (linux_target_ops): Install it.
4955 * server.h (disable_randomization): Declare.
4956 * server.c (disable_randomization): New global variable.
4957 (handle_general_set): Handle QDisableRandomization.
4958 (handle_query): Likewise for qSupported.
4959 (main): Support --disable-randomization and --no-disable-randomization
4960 command line arguments.
4961 * target.h (struct target_ops): Add supports_disable_randomization.
4962 (target_supports_disable_randomization): New macro.
4963
4964 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4965
4966 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4967 ifdef check.
4968 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4969 [!PT_GETDSBT] (target_loadmap): New definition.
4970 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4971 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4972 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4973 and PT_GETDSBT to LINUX_LOADMAP.
4974 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4975 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4976
4977 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4978
4979 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4980 (arm_linux_hwbp_cap): New static variable.
4981 (arm_linux_get_hwbp_cap): Replace by ...
4982 (arm_linux_init_hwbp_cap): ... this new function.
4983 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4984 (arm_linux_get_hw_watchpoint_count): Likewise.
4985 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4986 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4987 (arm_prepare_to_resume): Use perror_with_name instead of error.
4988
4989 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4990
4991 * linux-arm-low.c: Include <signal.h>.
4992 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4993 (struct arm_linux_hwbp_cap): New data type.
4994 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4995 (struct arm_linux_hw_breakpoint): New data type.
4996 (MAX_BPTS, MAX_WPTS): Define.
4997 (struct arch_process_info, struct arch_lwp_info): New data types.
4998 (arm_linux_get_hwbp_cap): New function.
4999 (arm_linux_get_hw_breakpoint_count): Likewise.
5000 (arm_linux_get_hw_watchpoint_count): Likewise.
5001 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5002 (arm_hwbp_control_initialize): Likewise.
5003 (arm_hwbp_control_is_enabled): Likewise.
5004 (arm_hwbp_control_is_initialized): Likewise.
5005 (arm_hwbp_control_disable): Likewise.
5006 (arm_linux_hw_breakpoint_equal): Likewise.
5007 (arm_linux_hw_point_initialize): Likewise.
5008 (struct update_registers_data): New data structure.
5009 (update_registers_callback: New function.
5010 (arm_insert_point): Likewise.
5011 (arm_remove_point): Likewise.
5012 (arm_stopped_by_watchpoint): Likewise.
5013 (arm_stopped_data_address): Likewise.
5014 (arm_new_process): Likewise.
5015 (arm_new_thread): Likewise.
5016 (arm_prepare_to_resume): Likewise.
5017 (the_low_target): Register arm_insert_point, arm_remove_point,
5018 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5019 arm_new_thread, and arm_prepare_to_resume.
5020
5021 2011-09-15 Stan Shebs <stan@codesourcery.com>
5022
5023 * server.h (struct emit_ops): Add compare-goto fields.
5024 * tracepoint.c (gdb_agent_op_sizes): New table.
5025 (emit_eq_goto): New function.
5026 (emit_ne_goto): New function.
5027 (emit_lt_goto): New function.
5028 (emit_le_goto): New function.
5029 (emit_gt_goto): New function.
5030 (emit_ge_goto): New function.
5031 (is_goto_target): New function.
5032 (compile_bytecodes): Recognize special cases of compare-goto
5033 combinations and call specialized emitters for them.
5034 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5035 (amd64_emit_ne_goto): New function.
5036 (amd64_emit_lt_goto): New function.
5037 (amd64_emit_le_goto): New function.
5038 (amd64_emit_gt_goto): New function.
5039 (amd64_emit_ge_goto): New function.
5040 (amd64_emit_ops): Add the new functions.
5041 (i386_emit_eq_goto): New function.
5042 (i386_emit_ne_goto): New function.
5043 (i386_emit_lt_goto): New function.
5044 (i386_emit_le_goto): New function.
5045 (i386_emit_gt_goto): New function.
5046 (i386_emit_ge_goto): New function.
5047 (i386_emit_ops): Add the new functions.
5048
5049 2011-09-08 Stan Shebs <stan@codesourcery.com>
5050
5051 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5052 (i386_emit_epilogue): Restore %ebx.
5053
5054 2011-08-31 Jie Zhang <jzhang918@gmail.com>
5055
5056 * server.c (step_thread): Remove definition.
5057 (process_serial_event): Don't handle Hs.
5058 * server.h (step_thread): Remove declaration.
5059 * target.c (set_desired_inferior): Remove use of step_thread.
5060
5061 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5062
5063 * linux-low.c: Include linux-procfs.h.
5064 (linux_attach_lwp_1): Update comments.
5065 (linux_attach): Scan for existing threads when attaching to a
5066 process that is the tgid.
5067 * Makefile.in: Update dependencies.
5068
5069 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5070
5071 * configure.srv: Add linux-procfs.o dependencies.
5072
5073 2011-08-14 Yao Qi <yao@codesourcery.com>
5074
5075 * target.h (struct target_ops): Fix indent.
5076 * win32-low.c (win32_target_ops): Fix comment.
5077
5078 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5079 Yao Qi <yao@codesourcery.com>
5080
5081 * Makefile.in (clean): Remove tic6x-*.c files.
5082 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5083 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5084 (tic6x-c64xp-linux.c): Likewise.
5085 * configure.srv: Add support for tic6x-*-uclinux.
5086 * linux-tic6x-low.c: New.
5087 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5088
5089 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5090 Yao Qi <yao@codesourcery.com>
5091
5092 * target.h (struct target_ops): Add read_loadmap.
5093 * linux-low.c (struct target_loadseg): New type.
5094 (struct target_loadmap): New type.
5095 (linux_read_loadmap): New function.
5096 (linux_target_ops): Add linux_read_loadmap.
5097 * server.c (handle_query): Support qXfer:fdpic:read packet.
5098 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5099 to NULL.
5100
5101 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5102
5103 * win32-low.c: Include <stdint.h>.
5104
5105 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5106
5107 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5108 to the inferior here.
5109 (i386_remove_aligned_watchpoint): Ditto.
5110 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5111 fit part of the watchpoint in the debug registers.
5112 (i386_update_inferior_debug_regs): New.
5113 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5114 registers, and only update the inferior on success.
5115 (i386_low_remove_watchpoint): Ditto.
5116
5117 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5118
5119 * linux-low.c (compare_ints, unique, list_threads, show_process,
5120 linux_core_of_thread): Delete.
5121 (linux_target_ops): Change linux_core_of_thread to
5122 linux_common_core_of_thread.
5123 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5124 * utils.c (malloc_failure): Change type of argument.
5125 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5126 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5127 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5128 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5129 (IPA_OBJS): Add common-utils-ipa.o.
5130 (ptid_h, linux_osdata_h): New macros.
5131 (server_h): Add common/common-utils.h, common/xml-utils.h,
5132 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5133 common/ptid.h.
5134 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5135 ptid.o, buffer.o): New rules.
5136 (linux-low.o): Add common/linux-osdata.h as a dependency.
5137 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5138 * configure.ac: Add AC_HEADER_DIRENT check.
5139 * config.in: Regenerate.
5140 * configure: Regenerate.
5141 * remote-utils.c (xml_escape_text): Delete.
5142 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5143 buffer_xml_printf): Move to common/buffer.c.
5144 * server.c (main): Remove call to initialize_inferiors.
5145 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5146 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5147 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5148 internal_error, gdb_assert, gdb_assert_fail): Delete.
5149 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5150 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5151 common/buffer.h.
5152 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5153 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5154 initialize_inferiors): Delete.
5155
5156 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5157
5158 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5159 symbol error.
5160
5161 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5162
5163 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5164 assertion.
5165 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5166
5167 2011-05-26 Yao Qi <yao@codesourcery.com>
5168
5169 * Makefile.in (thread-db.o): Track dependence to
5170 common/gdb_thread_db.h.
5171 * thread-db.c: include gdb_thread_db.h from right place.
5172
5173 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5174
5175 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5176 __FILE__ and __LINE__ to internal_error.
5177
5178 2011-05-13 Doug Evans <dje@google.com>
5179
5180 * thread-db.c (try_thread_db_load_from_sdir): New function.
5181 (try_thread_db_load_from_dir): New function.
5182 (thread_db_load_search): Handle $sdir, ignore $pdir.
5183 Remove trying of system directories if search of
5184 libthread-db-search-path fails, that is now done via $sdir.
5185
5186 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5187
5188 * server.c (handle_query): Add EnableDisableTracepoints to the list
5189 of supported features.
5190 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5191 tracepoints.
5192 (cmd_qtenable_disable): New.
5193 (cmd_qtstart): Install tracepoints even if disabled.
5194 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5195 receiving a QTEnable or QTDisable packet.
5196 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5197 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5198 tracepoints.
5199 (gdb_probe): Skip data collection if static tracepoint is disabled.
5200
5201 2011-05-10 Doug Evans <dje@google.com>
5202
5203 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5204
5205 2011-05-04 Doug Evans <dje@google.com>
5206
5207 * linux-low.c (linux_join): Skip process lookup.
5208 * spu-low.c (spu_join): Ditto.
5209 * server.c (join_inferiors_callback): Delete.
5210 (process_serial_event): For 'D' packet (detach) call join_inferior
5211 directly.
5212
5213 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5214
5215 * README: Don't mention xscale*-*-linux*.
5216 * configure.srv (xscale*-*-linux*): Don't handle target.
5217
5218 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5219
5220 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5221 casting pointers.
5222 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5223 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5224 (i386_emit_void_call_2): Likewise.
5225
5226 2011-04-26 Yao Qi <yao@codesourcery.com>
5227
5228 * linux-low.c: Move common macros to linux-ptrace.h.
5229 Include linux-ptrace.h.
5230 * Makefile.in (linux_ptrace_h): New.
5231 (linux-low.o): Depends on linux-ptrace.h.
5232
5233 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5234
5235 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5236 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5237 (remote_prepare): New function with most of the TCP code from ...
5238 (remote_open): ... here. Detect PORT here unconditionally. Move also
5239 setting transport_is_reliable.
5240 * server.c (run_once): New variable.
5241 (gdbserver_usage): Document it.
5242 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5243 the first run if RUN_ONCE.
5244 * server.h (run_once, remote_prepare): New declarations.
5245
5246 2011-04-19 Tom Tromey <tromey@redhat.com>
5247
5248 * win32-low.c (handle_load_dll): Remove duplicate "the".
5249
5250 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5251
5252 Remove support for old Cygwin 1.5 versions.
5253 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5254 function to avoid warning.
5255 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5256 warning.
5257
5258 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5259
5260 * gdbserver/server.h (Macro _): Define it if not available.
5261
5262 2011-03-14 Michael Snyder <msnyder@vmware.com>
5263
5264 * hostio.c (handle_close): Remove unnecessary null test.
5265
5266 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5267
5268 * Makefile.in (maintainer-clean realclean distclean): Remove
5269 "make ... subdir_do" command.
5270
5271 2011-03-10 Michael Snyder <msnyder@vmware.com>
5272
5273 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5274
5275 * server.c (handle_v_run): Free alloced buffer on early return.
5276
5277 2011-03-09 Yao Qi <yao@codesourcery.com>
5278
5279 Revert:
5280 2011-03-04 Yao Qi <yao@codesourcery.com>
5281
5282 * Makefile.in: Remove GNU make feature --directory.
5283
5284 2011-03-05 Yao Qi <yao@codesourcery.com>
5285
5286 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5287 (subdir_do): New make target. Copied from gdb/Makefile.
5288 (maintainer-clean, realclean, distclean, clean): Call corresponding
5289 make targets in common/Makefile.
5290
5291 2011-02-11 Yao Qi <yao@codesourcery.com>
5292
5293 * configure.ac: Call AC_PROG_RANLIB.
5294 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5295 * configure: Regenerate.
5296
5297 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5298
5299 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5300
5301 2011-03-06 Yao Qi <yao@codesourcery.com>
5302
5303 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5304
5305 2011-03-05 Yao Qi <yao@codesourcery.com>
5306
5307 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5308 (subdir_do): New make target. Copied from gdb/Makefile.
5309 (maintainer-clean, realclean, distclean, clean): Call corresponding
5310 make targets in common/Makefile.
5311
5312 2011-03-04 Yao Qi <yao@codesourcery.com>
5313
5314 * Makefile.in: Remove GNU make feature --directory.
5315
5316 2011-03-04 Michael Snyder <msnyder@vmware.com>
5317
5318 * server.c (queue_stop_reply): Call xmalloc not malloc.
5319
5320 2011-03-02 Michael Snyder <msnyder@vmware.com>
5321
5322 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5323
5324 2011-02-28 Michael Snyder <msnyder@vmware.com>
5325
5326 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5327 (cmd_qtframe): Ditto.
5328 (cmd_qtbuffer): Ditto.
5329 (cmd_bigqtbuffer): Ditto.
5330
5331 * utils.c (decimal2str): Initialize 'width' to nine, then
5332 don't mess with it.
5333
5334 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5335
5336 * hostio.c (require_data): Free *data, not data.
5337
5338 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5339
5340 * hostio.c (require_data): Use free, not xfree.
5341
5342 2011-02-27 Michael Snyder <msnyder@vmware.com>
5343
5344 * server.c (handle_query): Discard unused value.
5345
5346 * hostio.c (require_data): Free malloc memory before returning
5347 error.
5348
5349 2011-02-26 Michael Snyder <msnyder@vmware.com>
5350
5351 * linux-low.c (list_threads): Call closedir for dirent.
5352
5353 2011-02-27 Michael Snyder <msnyder@vmware.com>
5354
5355 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5356 a case statement falls through.
5357
5358 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5359
5360 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5361 in comparison.
5362
5363 2011-02-26 Michael Snyder <msnyder@vmware.com>
5364
5365 * utils.c (decimal2str): Eliminate dead code and dead param.
5366 (pulongest): Drop dead param from call to decimal2str.
5367 (plongest): Ditto.
5368
5369 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5370
5371 Revert the following patch (not approved yet):
5372 2011-02-21 Hui Zhu <teawater@gmail.com>
5373 * tracepoint.c (tp_printf): New function.
5374 (eval_agent_expr): Handle gdb_agent_op_printf.
5375
5376 2011-02-21 Hui Zhu <teawater@gmail.com>
5377
5378 * tracepoint.c (tp_printf): New function.
5379 (eval_agent_expr): Handle gdb_agent_op_printf.
5380
5381 2011-02-18 Tom Tromey <tromey@redhat.com>
5382
5383 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5384 (tracepoint.o): Likewise.
5385 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5386 (gdb_agent_op_names): Likewise.
5387
5388 2011-02-18 Tom Tromey <tromey@redhat.com>
5389
5390 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5391 gdb_agent_op_rot>: New constants.
5392 (gdb_agent_op_names): Add pick and roll.
5393 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5394 cases.
5395
5396 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5397
5398 * aclocal.m4: Regenerated with aclocal-1.11.1.
5399
5400 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5401
5402 * server.c (handle_qxfer_traceframe_info): New.
5403 (qxfer_packets): Register "traceframe-info".
5404 (handle_query): Report support for qXfer:traceframe-info:read+.
5405 * tracepoint.c (match_blocktype): New.
5406 (traceframe_find_block_type): Rename to ...
5407 (traceframe_walk_blocks): ... this. Add callback filter argument,
5408 and use it.
5409 (traceframe_find_block_type): New, reimplemented on top of
5410 traceframe_walk_blocks.
5411 (build_traceframe_info_xml): New.
5412 (traceframe_read_info): New.
5413 * server.h (traceframe_read_info): Declare.
5414
5415 2011-02-11 Yao Qi <yao@codesourcery.com>
5416
5417 * configure.ac: Call AC_PROG_RANLIB.
5418 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5419 * configure: Regenerate.
5420
5421 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5422
5423 * server.c (gdb_read_memory): Change return semantics to allow
5424 partial transfers.
5425 (handle_search_memory_1): Adjust.
5426 (process_serial_event) <'m' packet>: Handle partial transfers.
5427 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5428
5429 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5430
5431 * regcache.c (init_register_cache): Initialize
5432 regcache->register_status.
5433 (free_register_cache): Release regcache->register_status.
5434 (regcache_cpy): Copy register_status.
5435 (registers_to_string): Print 'x's for unavailable registers.
5436 (supply_register): Mark the register's status valid or
5437 unavailable, depending on whether a buffer was passed in or not.
5438 (supply_register_zeroed): New.
5439 (supply_regblock): Mark the registers' status valid or
5440 unavailable, depending on whether a buffer was passed in or not.
5441 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5442 (struct regcache): New `register_status' field.
5443 (supply_register_zeroed): Declare.
5444 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5445 supply_register_zeroed, rather than passing a NULL buffer to
5446 supply_register.
5447 * tracepoint.c (fetch_traceframe_registers): Update comment.
5448
5449 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5450
5451 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5452 buffer explicit.
5453
5454 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5455
5456 * server.h (decode_xfer_write): Change prototype.
5457 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5458 and don't extract the annex here.
5459 * server.c (decode_xfer_read): Remove `annex' parameter,
5460 and don't extract the annex here.
5461 (decode_xfer): New.
5462 (struct qxfer): New.
5463 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5464 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5465 (handle_qxfer_statictrace): New functions, abstracted out from
5466 handle_query, and made to use the struct qxfer interface.
5467 (handle_threads_qxfer_proper): Rename to ...
5468 (handle_qxfer_threads_proper): ... this.
5469 (handle_threads_qxfer): Rename to ...
5470 (handle_qxfer_threads): ... this. Adjust.
5471 (qxfer_packets): New array.
5472 (handle_qxfer): New function.
5473 (handle_query): Use handle_qxfer.
5474
5475 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5476
5477 * gdbreplay.c: Shorten lines of >= 80 columns.
5478 * linux-low.c: Ditto.
5479 * linux-ppc-low.c: Ditto.
5480 * linux-s390-low.c: Ditto.
5481 * linux-sparc-low.c: Ditto.
5482 * linux-x86-low.c: Ditto.
5483 * linux-xtensa-low.c: Ditto.
5484 * mem-break.c: Ditto.
5485 * nto-low.c: Ditto.
5486 * regcache.h: Ditto.
5487 * remote-utils.c: Ditto.
5488 * server.c: Ditto.
5489 * server.h: Ditto.
5490 * thread-db.c: Ditto.
5491 * tracepoint.c: Ditto.
5492 * utils.c: Ditto.
5493 * win32-low.h: Ditto.
5494
5495 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5496
5497 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5498 update.
5499
5500 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5501
5502 * server.c (gdbserver_version): Update copyright year in version
5503 output.
5504 * gdbreplay.c (gdbreplay_version): Ditto.
5505
5506 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5507
5508 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5509 * linux-bfin-low.c: New file.
5510 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5511 PT_DATA_ADDR for BFIN targets.
5512 * Makefile.in (SFILES): Add linux-bfin-low.c.
5513 (clean): Remove reg-bfin.c.
5514 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5515 * README: Mention supported Blackfin targets.
5516
5517 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5518
5519 * .gitignore: New file.
5520
5521 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5522
5523 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5524
5525 2010-10-22 Jie Zhang <jie@codesourcery.com>
5526
5527 * Makefile.in: Add FLAGS_TO_PASS variable.
5528 (install): Remove dependency of install-only and recursively
5529 invoke make for install-only.
5530
5531 2010-10-04 Doug Evans <dje@google.com>
5532
5533 * Makefile.in (uninstall): Use $(DESTDIR).
5534
5535 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5536
5537 PR gdb/11842
5538
5539 * linux-x86-low.c (compat_siginfo_from_siginfo)
5540 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5541 si_code is < 0. Check for si_code == SI_TIMER before checking for
5542 si_code < 0.
5543
5544 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5545
5546 * lynx-i386-low.c: New file.
5547 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5548
5549 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5550
5551 * lynx-low.c (ptrace_request_to_str): Remove handling for
5552 request values that have been removed in LynxOS 5.x.
5553
5554 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5555
5556 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5557 <ptrace.h>
5558
5559 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5560
5561 * configure.ac: Add --enable-inprocess-agent option.
5562 * configure: Rebuilt.
5563
5564 2010-09-06 Yao Qi <yao@codesourcery.com>
5565
5566 * linux-low.c (linux_kill): Remove unused variable.
5567 (linux_stabilize_threads): Likewise.
5568 * server.c (start_inferior): Likewise.
5569 (queue_stop_reply_callback): Likewise.
5570 * tracepoint.c (do_action_at_tracepoint): Likewise.
5571
5572 2010-09-06 Yao Qi <yao@codesourcery.com>
5573
5574 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5575 on return.
5576
5577 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5578
5579 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5580
5581 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5582
5583 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5584 "$(IPA_DEPFILES)".
5585
5586 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5587
5588 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5589 gdbserver/lynx-ppc-low.c: New files.
5590 * Makefile.in (lynx_low_h): New variable.
5591 (lynx-low.o, lynx-ppc-low.o): New rules.
5592 * configure.ac: On LynxOS, link with -lnetinet.
5593 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5594 * configure: regenerate.
5595
5596 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5597
5598 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5599 * configure.ac: Add check for vasprintf and vsnprintf.
5600 * configure, config.in: Regenerate.
5601 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5602
5603 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5604
5605 * gdbreplay.c: Move include of alloca.h up, next to include of
5606 malloc.h.
5607 * server.h: Add include of malloc.h.
5608 * mem-break.c: Remove include of malloc.h.
5609 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5610
5611 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5612
5613 * Makefile.in (memmem.o): Build with -Wno-error.
5614
5615 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5616
5617 * utils.c (xsnprintf): Make non-static.
5618 * server.h: Add xsnprintf declaration.
5619 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5620 replace calls to snprintf by calls to xsnprintf throughout.
5621
5622 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5623
5624 * configure.ac: Add configure check for alloca.
5625 * configure, config.in: Regenerate.
5626 * server.h: Include alloca.h if it exists.
5627 * gdbreplay.c: Include alloca.h if it exists.
5628
5629 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5630
5631 * linux-low.c (__SIGRTMIN): Define if not already defined.
5632 (linux_create_inferior): Check for __ANDROID__ rather than
5633 __SIGRTMIN.
5634 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5635 are already deferred.
5636 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5637 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5638 stopped and already has a pending signal to report.
5639 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5640 a pending signal to report or is moving out of a jump pad.
5641 (linux_init_signals): Check for __ANDROID__ rather than
5642 __SIGRTMIN.
5643
5644 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5645
5646 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5647 debug_threads check. Avoid a linear search when not doing debug
5648 output.
5649
5650 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5651
5652 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5653 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5654 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5655 (process_event): Change local fd's type to gdb_fildes_t.
5656 (create_file_handler): Adjust prototype.
5657 (delete_file_handler): Adjust prototype.
5658 (handle_file_event): Adjust prototype. Use pfildes.
5659 (create_file_event): Adjsut prototype.
5660 * remote-utils.c (remote_desc, listen_desc): Change type to
5661 gdb_fildes_t.
5662 * server.h: New gdb_fildes_t typedef.
5663 [USE_WIN32API]: Include winsock2.h.
5664 (delete_file_handler, add_file_handler): Adjust prototypes.
5665 (pfildes): Declare.
5666 * utils.c (pfildes): New.
5667
5668 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5669
5670 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5671 * configure: Regenerate.
5672
5673 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5674
5675 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5676 (linux_done_accessing_memory): ... this.
5677 (linux_target_ops): Adjust.
5678 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5679 * nto-low.c (nto_target_ops): Adjust comment.
5680 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5681 * spu-low.c (spu_target_ops): Adjust comment.
5682 * target.h (target_ops): Rename unprepare_to_access_memory field
5683 to done_accessing_memory.
5684 (unprepare_to_access_memory): Rename to ...
5685 (done_accessing_memory): ... this.
5686
5687 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5688
5689 * linux-low.c (linux_prepare_to_access_memory): New.
5690 (linux_unprepare_to_access_memory): New.
5691 (linux_target_ops): Install them.
5692 * server.c (read_memory): Rename to ...
5693 (gdb_read_memory): ... this. Use
5694 prepare_to_access_memory/prepare_to_access_memory.
5695 (write_memory): Rename to ...
5696 (gdb_write_memory): ... this. Use
5697 prepare_to_access_memory/prepare_to_access_memory.
5698 (handle_search_memory_1): Adjust.
5699 (process_serial_event): Adjust.
5700 * target.h (struct target_ops): New fields
5701 prepare_to_access_memory and unprepare_to_access_memory.
5702 (prepare_to_access_memory, unprepare_to_access_memory): New.
5703 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5704 prepare_to_access_memory/prepare_to_access_memory.
5705 * nto-low.c (nto_target_ops): Adjust.
5706 * spu-low.c (spu_target_ops): Adjust.
5707 * win32-low.c (win32_target_ops): Adjust.
5708
5709 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5710
5711 * Makefile.in (WARN_CFLAGS): Get it from configure.
5712 (WERROR_CFLAGS): New.
5713 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5714 * configure.ac: Introduce --enable-werror, which adds -Werror to
5715 the compiler command line. Enabled by default. Disable with
5716 --disable-werror. Add -Wdeclaration-after-statement
5717 Wpointer-arith and -Wformat-nonliteral to warning flags.
5718 * configure: Regenerate.
5719
5720 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5721
5722 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5723
5724 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5725
5726 * gdbreplay.c (remote_error): New.
5727 (gdbchar): New.
5728 (expect): Use gdbchar. Check for error reading from GDB.
5729 Clarify sync error output.
5730 (play): Check for errors writing to GDB.
5731 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5732 * remote-utils.c (getpkt): Check for errors writing to the remote
5733 descriptor.
5734
5735 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5736
5737 * linux-low.c (linux_wait_1): Move non-debugging code out of
5738 `debug_threads' control.
5739
5740 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5741
5742 * linux-low.c (linux_wait_1): Don't set last_status here.
5743 * server.c (push_event, queue_stop_reply_callback): Assert we're
5744 not pushing a TARGET_WAITKIND_IGNORE event.
5745 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5746 (myresume, handle_target_event): Set the thread's last_resume_kind
5747 and last_status from the target returned status.
5748
5749 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5750
5751 PR threads/10729
5752
5753 * linux-x86-low.c (update_debug_registers_callback): New.
5754 (i386_dr_low_set_addr): Use it.
5755 (i386_dr_low_get_addr): New.
5756 (i386_dr_low_set_control): Use update_debug_registers_callback.
5757 (i386_dr_low_get_control): New.
5758 (i386_dr_low_get_status): Adjust.
5759 * linux-low.c (linux_stop_lwp): New.
5760 * linux-low.h (linux_stop_lwp): Declare.
5761
5762 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5763 argument instead of a i386_debug_reg_state.
5764 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5765 a i386_debug_reg_state.
5766 (i386_insert_aligned_watchpoint): Adjust.
5767 (i386_remove_aligned_watchpoint): Adjust.
5768 (i386_low_stopped_data_address): Read the debug registers from the
5769 inferior instead of from the mirrors.
5770 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5771 (i386_dr_low_get_addr): Declare.
5772 (i386_dr_low_get_control): Declare.
5773 (i386_dr_low_get_status): Change prototype.
5774
5775 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5776 (i386_dr_low_get_addr): New.
5777 (i386_dr_low_get_control): New.
5778 (i386_dr_low_get_status): Adjust prototype. Return
5779 dr_status_mirror.
5780 (i386_initial_stuff): Clear dr_status_mirror and
5781 dr_control_mirror.
5782 (i386_get_thread_context): Adjust.
5783 (i386_set_thread_context): Adjust.
5784 (i386_thread_added): Adjust.
5785
5786 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5787
5788 * linux-low.h (linux_thread_area): Delete declaration.
5789
5790 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5791
5792 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5793 after its termination.
5794
5795 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5796
5797 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5798 (gdb_wants_all_stopped): Delete.
5799 (linux_wait_1): Don't call them.
5800 * server.c (handle_v_cont): Tag all threads as want-stopped.
5801 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5802 stopped as "client-wants-stopped".
5803
5804 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5805
5806 * Makefile.in (signals_h): New.
5807 (server_h): Depend on it.
5808 (server.o): Don't depend on $(signals_def).
5809 (signals.o): Depend on $(signals_def).
5810
5811 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5812
5813 * Makefile.in (signals_def): New.
5814 (server_h): Append include/gdb/signals.h and signals_def.
5815 (server.o): Append signals_def.
5816
5817 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5818
5819 * server.c (handle_target_event): Use target_signal_to_host for
5820 resume_info.sig initialization.
5821 * target.h (struct thread_resume) <sig>: New comment.
5822
5823 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5824
5825 * server.c (handle_query): strcpy() the returned string from paddress()
5826 instead of sprintf().
5827 * utils.c (paddress): Return phex_nz().
5828
5829 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5830
5831 * server.c (handle_v_cont): Call mourn_inferior if process
5832 just exited.
5833 (myresume): Likewise.
5834
5835 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5836
5837 Static tracepoints, and integration with UST.
5838
5839 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5840 * mem-break.c (uninsert_all_breakpoints)
5841 (reinsert_all_breakpoints): New.
5842 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5843 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5844 (gdb_agent_ust_loaded, helper_thread_id)
5845 (gdb_agent_helper_thread_id): New macros.
5846 (struct ipa_sym_addresses): Add addr_ust_loaded,
5847 addr_helper_thread_id, addr_cmd_buf.
5848 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5849 (in_process_agent_loaded_ust): New.
5850 (write_e_ust_not_loaded): New.
5851 (maybe_write_ipa_ust_not_loaded): New.
5852 (struct collect_static_trace_data_action): New.
5853 (enum tracepoint_type) <static_tracepoint>: New.
5854 (struct tracepoint) <handle>: Mention static tracepoints.
5855 (struct static_tracepoint_ctx): New.
5856 (CMD_BUF_SIZE): New.
5857 (add_tracepoint_action): Handle static tracepoint actions.
5858 (unprobe_marker_at): New.
5859 (clear_installed_tracepoints): Handle static tracepoints.
5860 (cmd_qtdp): Handle static tracepoints.
5861 (probe_marker_at): New.
5862 (cmd_qtstart): Handle static tracepoints.
5863 (response_tracepoint): Handle static tracepoints.
5864 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5865 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5866 (get_context_regcache): Handle static tracepoints.
5867 (do_action_at_tracepoint): Handle static tracepoint actions.
5868 (traceframe_find_block_type): Handle static trace data blocks.
5869 (traceframe_read_sdata): New.
5870 (download_tracepoints): Download static tracepoint actions.
5871 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5872 (GDB_PROBE_NAME): New.
5873 (ust_ops): New.
5874 (GET_UST_SYM): New.
5875 (USTF): New.
5876 (dlsym_ust): New.
5877 (ust_marker_to_static_tracepoint): New.
5878 (gdb_probe): New.
5879 (collect_ust_data_at_tracepoint): New.
5880 (gdb_ust_probe): New.
5881 (UNIX_PATH_MAX, SOCK_DIR): New.
5882 (gdb_ust_connect_sync_socket): New.
5883 (resume_thread, stop_thread): New.
5884 (run_inferior_command): New.
5885 (init_named_socket): New.
5886 (gdb_ust_socket_init): New.
5887 (cstr_to_hexstr): New.
5888 (next_st): New.
5889 (first_marker, next_marker): New.
5890 (response_ust_marker): New.
5891 (cmd_qtfstm, cmd_qtsstm): New.
5892 (unprobe_marker_at, probe_marker_at): New.
5893 (cmd_qtstmat, gdb_ust_thread): New.
5894 (gdb_ust_init): New.
5895 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5896 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5897 (ST_REGENTRY): New.
5898 (x86_64_st_collect_regmap): New.
5899 (X86_64_NUM_ST_COLLECT_GREGS): New.
5900 (AMD64_RIP_REGNUM): New.
5901 (supply_static_tracepoint_registers): New.
5902 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5903 (ST_REGENTRY): New.
5904 (i386_st_collect_regmap): New.
5905 (i386_NUM_ST_COLLECT_GREGS): New.
5906 (supply_static_tracepoint_registers): New.
5907 * server.c (handle_query): Handle qXfer:statictrace:read.
5908 <qSupported>: Report support for StaticTracepoints, and
5909 qXfer:statictrace:read features.
5910 * server.h (traceframe_read_sdata)
5911 (supply_static_tracepoint_registers): Declare.
5912 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5913 (unpack_varlen_hex): Include in IPA build.
5914 * Makefile.in (ustlibs, ustinc): New.
5915 (IPA_OBJS): Add remote-utils-ipa.o.
5916 ($(IPA_LIB)): Link -ldl and -lpthread.
5917 (UST_CFLAGS): New.
5918 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5919 * config.in, configure: Regenerate.
5920
5921 2010-06-20 Ian Lance Taylor <iant@google.com>
5922 Pedro Alves <pedro@codesourcery.com>
5923
5924 * linux-x86-low.c (always_true): Delete.
5925 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5926 trying to fool the compiler with always_true.
5927
5928 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5929
5930 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5931 conditions in gdbserver.
5932
5933 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5934
5935 * spu-low.c (spu_read_memory): Wrap around local store limit.
5936 (spu_write_memory): Likewise.
5937
5938 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5939
5940 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5941 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5942 LONGEST uses.
5943 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5944 uses.
5945 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5946 uses with LONGEST uses.
5947
5948 2010-06-14 Stan Shebs <stan@codesourcery.com>
5949 Pedro Alves <pedro@codesourcery.com>
5950
5951 Bytecode compiler.
5952
5953 * linux-x86-low.c: Include limits.h.
5954 (add_insns): New.
5955 (always_true): New.
5956 (EMIT_ASM): New.
5957 (EMIT_ASM32): New.
5958 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5959 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5960 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5961 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5962 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5963 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5964 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5965 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5966 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5967 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5968 (amd64_emit_void_call_2): New.
5969 (amd64_emit_ops): New.
5970 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5971 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5972 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5973 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5974 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5975 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5976 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5977 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5978 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5979 (i386_emit_stack_adjust, i386_emit_int_call_1)
5980 (i386_emit_void_call_2): New.
5981 (i386_emit_ops): New.
5982 (x86_emit_ops): New.
5983 (the_low_target): Install x86_emit_ops.
5984 * server.h (struct emit_ops): New.
5985 (get_raw_reg_func_addr): Declare.
5986 (current_insn_ptr, emit_error): Declare.
5987 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5988 (set_trace_state_variable_value): New defines.
5989 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5990 addr_get_trace_state_variable_value and
5991 addr_set_trace_state_variable_value.
5992 (symbol_list): New fields for get_raw_reg,
5993 get_trace_state_variable_value and set_trace_state_variable_value.
5994 (condfn): New typedef.
5995 (struct tracepoint): New field `compiled_cond'.
5996 (do_action_at_tracepoint): Clear compiled_cond.
5997 (get_trace_state_variable_value, set_trace_state_variable_value):
5998 Export in the IPA.
5999 (condition_true_at_tracepoint): If there's a compiled condition,
6000 run that.
6001 (current_insn_ptr, emit_error): New globals.
6002 (struct bytecode_address): New.
6003 (get_raw_reg_func_addr): New.
6004 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6005 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6006 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6007 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6008 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6009 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6010 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6011 (compile_tracepoint_condition, compile_bytecodes): New.
6012 * target.h (emit_ops): Forward declare.
6013 (struct target_ops): New field emit_ops.
6014 (target_emit_ops): New.
6015 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6016 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6017 * linux-low.c (linux_emit_ops): New.
6018 (linux_target_ops): Install it.
6019 * linux-low.h (struct linux_target_ops): New field emit_ops.
6020
6021 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6022
6023 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6024 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6025
6026 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6027 Stan Shebs <stan@codesourcery.com>
6028
6029 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6030 (all): Depend on $(extra_libraries).
6031 (install-only): Install the IPA.
6032 (IPA_OBJS, IPA_LIB): New.
6033 (clean): Remove the IPA lib.
6034 (IPAGENT_CFLAGS): New.
6035 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6036 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6037 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6038 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6039 * configure.ac: Check for atomic builtins support in the compiler.
6040 (IPA_DEPFILES, extra_libraries): Define.
6041 * configure.srv (ipa_obj): Add description.
6042 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6043 (i[34567]86-*-linux*): Set ipa_obj.
6044 (x86_64-*-linux*): Set ipa_obj.
6045 * linux-low.c (stabilizing_threads): New.
6046 (supports_fast_tracepoints): New.
6047 (linux_detach): Stabilize threads before detaching.
6048 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6049 the lwp is either not stabilizing, or is moving out of a jump pad.
6050 (linux_fast_tracepoint_collecting): New.
6051 (maybe_move_out_of_jump_pad): New.
6052 (enqueue_one_deferred_signal): New.
6053 (dequeue_one_deferred_signal): New.
6054 (linux_wait_for_event_1): If moving out of a jump pad, defer
6055 pending signals to later.
6056 (linux_stabilize_threads): New.
6057 (linux_wait_1): Check if threads need moving out of jump pads, and
6058 do it if so.
6059 (stuck_in_jump_pad_callback): New.
6060 (move_out_of_jump_pad_callback): New.
6061 (lwp_running): New.
6062 (linux_resume_one_lwp): Handle moving out of jump pads.
6063 (linux_set_resume_request): Dequeue deferred signals.
6064 (need_step_over_p): Also step over fast tracepoint jumps.
6065 (start_step_over): Also uninsert fast tracepoint jumps.
6066 (finish_step_over): Also reinsert fast tracepoint jumps.
6067 (linux_install_fast_tracepoint_jump): New.
6068 (linux_target_ops): Install linux_stabilize_threads and
6069 linux_install_fast_tracepoint_jump_pad.
6070 * linux-low.h (linux_target_ops) <get_thread_area,
6071 install_fast_tracepoint_jump_pad>: New fields.
6072 (struct lwp_info) <collecting_fast_tracepoint,
6073 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6074 (linux_get_thread_area): Declare.
6075 * linux-x86-low.c (jump_insn): New.
6076 (x86_get_thread_area): New.
6077 (append_insns): New.
6078 (push_opcode): New.
6079 (amd64_install_fast_tracepoint_jump_pad): New.
6080 (i386_install_fast_tracepoint_jump_pad): New.
6081 (x86_install_fast_tracepoint_jump_pad): New.
6082 (the_low_target): Install x86_get_thread_area and
6083 x86_install_fast_tracepoint_jump_pad.
6084 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6085 (struct fast_tracepoint_jump): New.
6086 (fast_tracepoint_jump_insn): New.
6087 (fast_tracepoint_jump_shadow): New.
6088 (find_fast_tracepoint_jump_at): New.
6089 (fast_tracepoint_jump_here): New.
6090 (delete_fast_tracepoint_jump): New.
6091 (set_fast_tracepoint_jump): New.
6092 (uninsert_fast_tracepoint_jumps_at): New.
6093 (reinsert_fast_tracepoint_jumps_at): New.
6094 (set_breakpoint_at): Use write_inferior_memory.
6095 (uninsert_raw_breakpoint): Use write_inferior_memory.
6096 (check_mem_read): Mask out fast tracepoint jumps.
6097 (check_mem_write): Mask out fast tracepoint jumps.
6098 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6099 (set_fast_tracepoint_jump): Declare.
6100 (delete_fast_tracepoint_jump)
6101 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6102 (reinsert_fast_tracepoint_jumps_at): Declare.
6103 * regcache.c: Don't compile many functions when building the
6104 in-process agent library.
6105 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6106 the register buffer in the heap.
6107 (free_register_cache): If the register buffer isn't owned by the
6108 regcache, don't free it.
6109 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6110 pre-existing register caches.
6111 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6112 type.
6113 (convert_ascii_to_int): : Constify `from' parameter type.
6114 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6115 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6116 the needed buffer in-place.
6117 (relocate_instruction): New.
6118 * server.c (handle_query) <qSymbols>: If the target supports
6119 tracepoints, give it a chance of looking up symbols. Report
6120 support for fast tracepoints.
6121 (handle_status): Stabilize threads.
6122 (process_serial_event): Adjust.
6123 * server.h (struct fast_tracepoint_jump): Forward declare.
6124 (struct process_info) <fast_tracepoint_jumps>: New field.
6125 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6126 (decode_X_packet, decode_M_packet): Adjust.
6127 (relocate_instruction): Declare.
6128 (in_process_agent_loaded): Declare.
6129 (tracepoint_look_up_symbols): Declare.
6130 (struct fast_tpoint_collect_status): Declare.
6131 (fast_tracepoint_collecting): Declare.
6132 (force_unlock_trace_buffer): Declare.
6133 (handle_tracepoint_bkpts): Declare.
6134 (initialize_low_tracepoint)
6135 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6136 * target.h (struct target_ops) <stabilize_threads,
6137 install_fast_tracepoint_jump_pad>: New fields.
6138 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6139 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6140 [HAVE_STDINT_H]: Include stdint.h.
6141 (trace_debug_1): Rename to ...
6142 (trace_vdebug): ... this.
6143 (trace_debug): Rename to ...
6144 (trace_debug_1): ... this. Add `level' parameter.
6145 (trace_debug): New.
6146 (ATTR_USED, ATTR_NOINLINE): New.
6147 (IP_AGENT_EXPORT): New.
6148 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6149 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6150 (about_to_request_buffer_space, trace_buffer_is_full)
6151 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6152 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6153 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6154 (traceframe_write_count, traceframes_created)
6155 (trace_state_variables)
6156 New renaming defines.
6157 (struct ipa_sym_addresses): New.
6158 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6159 (symbol_list): New.
6160 (ipa_sym_addrs): New.
6161 (all_tracepoint_symbols_looked_up): New.
6162 (in_process_agent_loaded): New.
6163 (write_e_ipa_not_loaded): New.
6164 (maybe_write_ipa_not_loaded): New.
6165 (tracepoint_look_up_symbols): New.
6166 (debug_threads) [IN_PROCESS_AGENT]: New.
6167 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6168 (UNKNOWN_SIDE_EFFECTS): New.
6169 (stop_tracing): New.
6170 (flush_trace_buffer): New.
6171 (stop_tracing_bkpt): New.
6172 (flush_trace_buffer_bkpt): New.
6173 (read_inferior_integer): New.
6174 (read_inferior_uinteger): New.
6175 (read_inferior_data_pointer): New.
6176 (write_inferior_data_pointer): New.
6177 (write_inferior_integer): New.
6178 (write_inferior_uinteger): New.
6179 (struct collect_static_trace_data_action): Delete.
6180 (enum tracepoint_type): New.
6181 (struct tracepoint) <type>: New field `type'.
6182 <actions_str, step_actions, step_actions_str>: Only include in
6183 GDBserver.
6184 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6185 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6186 (tracepoints): Use IP_AGENT_EXPORT.
6187 (last_tracepoint): Don't include in the IPA.
6188 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6189 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6190 (alloced_trace_state_variables): New.
6191 (trace_state_variables): Use IP_AGENT_EXPORT.
6192 (traceframe_t): Delete unused variable.
6193 (circular_trace_buffer): Don't include in the IPA.
6194 (trace_buffer_start): Delete.
6195 (struct trace_buffer_control): New.
6196 (trace_buffer_free): Delete.
6197 (struct ipa_trace_buffer_control): New.
6198 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6199 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6200 New.
6201 (trace_buffer_ctrl): New.
6202 (TRACE_BUFFER_CTRL_CURR): New.
6203 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6204 Reimplement as macros.
6205 (trace_buffer_wrap): Delete.
6206 (traceframe_write_count, traceframe_read_count)
6207 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6208 (struct tracepoint_hit_ctx) <type>: New field.
6209 (struct fast_tracepoint_ctx): New.
6210 (memory_barrier): New.
6211 (cmpxchg): New.
6212 (record_tracepoint_error): Update atomically in the IPA.
6213 (clear_inferior_trace_buffer): New.
6214 (about_to_request_buffer_space): New.
6215 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6216 updating the same buffer.
6217 (add_tracepoint): Default the tracepoint's type to trap
6218 tracepoint, and orig_size to -1.
6219 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6220 internal variables.
6221 (create_trace_state_variable): New parameter `gdb'. Handle it.
6222 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6223 (cmd_qtdp): Handle fast tracepoints.
6224 (cmd_qtdv): Adjust.
6225 (max_jump_pad_size): New.
6226 (gdb_jump_pad_head): New.
6227 (get_jump_space_head): New.
6228 (claim_jump_space): New.
6229 (sort_tracepoints): New.
6230 (MAX_JUMP_SIZE): New.
6231 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6232 IPA.
6233 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6234 support. Upload fast traceframes, and delete internal IPA
6235 breakpoints.
6236 (stop_tracing_handler): New.
6237 (flush_trace_buffer_handler): New.
6238 (cmd_qtstop): Upload fast tracepoints.
6239 (response_tracepoint): Handle fast tracepoints.
6240 (tracepoint_finished_step): Upload fast traceframes. Set the
6241 tracepoint hit context's tracepoint type.
6242 (handle_tracepoint_bkpts): New.
6243 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6244 type. Add comment about fast tracepoints.
6245 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6246 non-existing action_str field.
6247 (get_context_regcache): Handle fast tracepoints.
6248 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6249 to the regcache.
6250 (fast_tracepoint_from_jump_pad_address): New.
6251 (fast_tracepoint_from_ipa_tpoint_address): New.
6252 (collecting_t): New.
6253 (force_unlock_trace_buffer): New.
6254 (fast_tracepoint_collecting): New.
6255 (collecting): New.
6256 (gdb_collect): New.
6257 (write_inferior_data_ptr): New.
6258 (target_tp_heap): New.
6259 (target_malloc): New.
6260 (download_agent_expr): New.
6261 (UALIGN): New.
6262 (download_tracepoints): New.
6263 (download_trace_state_variables): New.
6264 (upload_fast_traceframes): New.
6265 (IPA_FIRST_TRACEFRAME): New.
6266 (IPA_NEXT_TRACEFRAME_1): New.
6267 (IPA_NEXT_TRACEFRAME): New.
6268 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6269 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6270 (gdb_jump_pad_buffer_end): New.
6271 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6272 (initialize_tracepoint): Adjust.
6273 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6274 buffer. Initialize the low module.
6275 * utils.c (PREFIX, TOOLNAME): New.
6276 (malloc_failure): Use PREFIX.
6277 (error): In the IPA, an error causes an exit.
6278 (fatal, warning): Use PREFIX.
6279 (internal_error): Use TOOLNAME.
6280 (NUMCELLS): Increase to 10.
6281 * configure, config.in: Regenerate.
6282
6283 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6284
6285 * server.c (handle_query) <qSupported>: Do two passes over the
6286 qSupported string to avoid nesting strtok.
6287
6288 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6289
6290 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6291 (CDEPS): New.
6292 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6293 -Wl,--dynamic-list.
6294 * configure: Regenerate.
6295 * proc-service.list: New.
6296
6297 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6298
6299 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6300 New comment.
6301
6302 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6303
6304 * gdbreplay.c (remote_open): Check error return from socket() call by
6305 its equality to -1 not by it being negative.
6306 * remote-utils.c (remote_open): Likewise.
6307
6308 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6309
6310 * config.h: Regenerate.
6311
6312 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6313
6314 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6315 doesn't provide PTRACE_GET_THREAD_AREA.
6316
6317 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6318
6319 * linux-m68k-low.c: Include <asm/ptrace.h>
6320 (ps_get_thread_area): Implement.
6321
6322 2010-05-03 Doug Evans <dje@google.com>
6323
6324 * event-loop.c (struct callback_event): New struct.
6325 (callback_list): New global.
6326 (append_callback_event, delete_callback_event): New functions.
6327 (process_callback): New function.
6328 (start_event_loop): Call it.
6329 * remote-utils.c (NOT_SCHEDULED): Define.
6330 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6331 moved out of readchar.
6332 (readchar): Rewrite. Call reschedule before returning.
6333 (reset_readchar): New function.
6334 (remote_close): Call it.
6335 (process_remaining, reschedule): New functions.
6336 * server.h (callback_handler_func): New typedef.
6337 (append_callback_event, delete_callback_event): Declare.
6338
6339 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6340
6341 * proc-service.c (ps_pglobal_lookup): Use
6342 thread_db_look_up_one_symbol.
6343 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6344 parameter. Use it instead of all_symbols_looked_up.
6345 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6346 field.
6347 (all_symbols_looked_up): Don't declare.
6348 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6349 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6350 field.
6351 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6352 Set all_symbols_looked_up here.
6353 (thread_db_look_up_one_symbol): New.
6354 (thread_db_get_tls_address): Adjust.
6355 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6356 thread_db object on the heap, and tentatively set it in the
6357 process structure.
6358 (thread_db_init): Don't set all_symbols_looked_up here.
6359 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6360
6361 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6362
6363 * linux-low.c (linux_kill, linux_detach): Adjust.
6364 (status_pending_p_callback): Remove redundant statement. Check
6365 for !TARGET_WAITIKIND_IGNORE, instead of
6366 TARGET_WAITKIND_STOPPED.
6367 (handle_tracepoints): Make sure LWP is locked. Adjust.
6368 (linux_wait_for_event_1): Adjust.
6369 (linux_cancel_breakpoints): New.
6370 (unsuspend_one_lwp): New.
6371 (unsuspend_all_lwps): New.
6372 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6373 (send_sigstop_callback): Change return type to int, add new
6374 `except' parameter and handle it.
6375 (suspend_and_send_sigstop_callback): New.
6376 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6377 pass them down. If SUSPEND, also increment the lwp's suspend
6378 count.
6379 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6380 (need_step_over_p): Don't consider suspended LWPs.
6381 (start_step_over): Adjust.
6382 (proceed_one_lwp): Change return type to int, add new `except'
6383 parameter and handle it.
6384 (unsuspend_and_proceed_one_lwp): New.
6385 (proceed_all_lwps): Use find_inferior instead of
6386 for_each_inferior.
6387 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6388 also decrement the suspend count of LWPs. Pass `except' down,
6389 instead of hacking its suspend count.
6390 (linux_pause_all): Add `freeze' parameter. Adjust.
6391 (linux_unpause_all): New.
6392 (linux_target_ops): Install linux_unpause_all.
6393 * server.c (handle_status): Adjust.
6394 * target.h (struct target_ops): New fields `unpause_all' and
6395 `cancel_breakpoints'. Add new parameter to `pause_all'.
6396 (pause_all): Add new `freeze' parameter.
6397 (unpause_all): New.
6398 (cancel_breakpoints): New.
6399 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6400 cancel breakpoints.
6401 (cmd_qtstart): Pause threads.
6402 (stop_tracing): Pause threads, and cancel breakpoints.
6403 * win32-low.c (win32_target_ops): Adjust.
6404
6405 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6406
6407 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6408 the inferior right away from here...
6409 (linux_wait_1): ... to here, and adjust to check the thread's
6410 last_resume_kind instead of the lwp's step or stop_expected flags.
6411
6412 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6413
6414 * README: Use consistent `GDB' and `GDBserver' spellings.
6415
6416 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6417
6418 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6419 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6420 (linux_detach_one_lwp): Assume the lwp is stopped.
6421 (any_thread_of): Delete.
6422 (linux_detach): Stop all lwps here. Don't blindly delete all
6423 breakpoints.
6424 (delete_lwp_callback): New.
6425 (linux_mourn): Delete all lwps of the process that is gone.
6426 (linux_wait_1): Don't delete the last lwp of the process here.
6427 * mem-break.h (mark_breakpoints_out): Declare.
6428 * mem-break.c (mark_breakpoints_out): New.
6429 (free_all_breakpoints): Use it.
6430 * server.c (handle_target_event): If the process is gone, mark
6431 breakpoints out.
6432 * thread-db.c (struct thread_db) <create_bp>: New field.
6433 (thread_db_enable_reporting): Fix prototype. Store a thread event
6434 breakpoint reference in the thread_db struct.
6435 (thread_db_load_search): Clear the thread_db object.
6436 (try_thread_db_load_1): Ditto.
6437 (switch_to_process): New.
6438 (disable_thread_event_reporting): Use it.
6439 (remove_thread_event_breakpoints): New.
6440 (thread_db_detach, thread_db_mourn): Use it.
6441
6442 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6443
6444 * linux-low.c (linux_enable_event_reporting): New.
6445 (linux_wait_for_event_1, handle_extended_wait): Use it.
6446
6447 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6448
6449 * linux-low.c (linux_kill_one_lwp, linux_kill)
6450 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6451 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6452 SIGSTOP even if the LWP is stopped.
6453 (send_sigstop_callback): New.
6454 (stop_all_lwps): Use send_sigstop_callback instead.
6455 (linux_resume_one_thread): Adjust.
6456 (proceed_one_lwp): Still proceed an LWP that the client has
6457 requested to stop, if we haven't reported it as stopped yet. Make
6458 sure that LWPs the client want stopped, have a pending SIGSTOP.
6459
6460 2010-04-26 Doug Evans <dje@google.com>
6461
6462 * server.c (handle_general_set): Make static.
6463
6464 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6465 Print received char after testing for error/eof instead of before.
6466 (input_interrupt): Tweak comment.
6467
6468 2010-04-23 Doug Evans <dje@google.com>
6469
6470 * server.c (start_inferior): Print inferior argv if --debug.
6471
6472 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6473
6474 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6475 * nto-x86-low.c: Include server.h
6476
6477 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6478
6479 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6480 be consistent with other sources of this directory.
6481 (init_registers_amd64): Correct name of source file of this function
6482 in the comment.
6483
6484 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6485
6486 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6487 64-bit executables.
6488
6489 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6490
6491 * win32-i386-low.c: Add 64-bit support.
6492 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6493 (init_registers_amd64): Declare.
6494 (mappings): Add 64-bit version of array.
6495 (init_windows_x86): New function.
6496 (the_low_target): Change init_arch field to init_windows_x86.
6497
6498 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6499
6500 * win32-low.c: Adapt to support also 64-bit architecture.
6501 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6502 (get_image_name): Use SIZE_T type for local variable `done'.
6503 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6504 (toolhelp_get_dll_name): Idem.
6505 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6506 Use uintptr_t typecast to avoid warning.
6507 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6508 (handle_exception): Use phex_nz to avoid warning.
6509 (win32_wait): Remove unused local variable `process'.
6510
6511 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6512
6513 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6514 `amd64-avx.o'.
6515
6516 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6517
6518 * configure.ac: Use `ws2_32' library for srv_mingw.
6519 * configure: Regenerate.
6520 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6521 * remote-utils.c: Likewise.
6522
6523 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6524
6525 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6526 if __x86_64__ is defined.
6527
6528 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6529
6530 * configure: Regenerate.
6531
6532 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6533
6534 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6535 * target.h (target_ops): New get_tib_address field.
6536 * win32-low.h (win32_thread_info): Add thread_local_base field.
6537 * win32-low.c (child_add_thread): Add tlb argument.
6538 Set thread_local_base field to TLB.
6539 (get_child_debug_event): Adapt to child_add_thread change.
6540 (win32_get_tib_address): New function.
6541 (win32_target_ops): Set get_tib_address field to
6542 win32_get_tib_address.
6543 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6544
6545 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6546
6547 * linux-low.c (linux_mourn): Also remove the process.
6548 * server.c (handle_target_event): Don't remove the process here.
6549 * nto-low.c (nto_mourn): New.
6550 (nto_target_ops): Install it.
6551 * spu-low.c (spu_mourn): New.
6552 (spu_target_ops): Install it.
6553 * win32-low.c (win32_mourn): New.
6554 (win32_target_ops): Install it.
6555
6556 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6557
6558 * server.h (buffer_xml_printf): Remove redundant `;'.
6559
6560 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6561
6562 * regcache.c (set_register_cache): Invalidate regcaches before
6563 changing the register cache layout.
6564 (regcache_invalidate_one): Allow a NULL regcache.
6565 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6566 regcaches before changing the register cache layout or the target
6567 regsets.
6568
6569 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6570
6571 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6572 variable warning on Linux/x86-64.
6573
6574 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6575
6576 GDBserver disconnected tracing support.
6577
6578 * linux-low.c (linux_remove_process): Delete.
6579 (add_lwp): Don't set last_resume_kind here.
6580 (linux_kill): Use `mourn'.
6581 (linux_detach): Use `thread_db_detach', and `mourn'.
6582 (linux_mourn): New.
6583 (linux_attach_lwp_1): Adjust comment.
6584 (linux_attach): last_resume_kind moved the thread_info; adjust.
6585 (status_pending_p_callback): Adjust.
6586 (linux_wait_for_event_1): Adjust.
6587 (count_events_callback, select_singlestep_lwp_callback)
6588 (select_event_lwp_callback, cancel_breakpoints_callback)
6589 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6590 (proceed_one_lwp): Adjust.
6591 (linux_async): Add debug output.
6592 (linux_thread_stopped): New.
6593 (linux_pause_all): New.
6594 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6595 linux_pause_all.
6596 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6597 (thread_db_free): Delete declaration.
6598 (thread_db_detach, thread_db_mourn): Declare.
6599 * thread-db.c (thread_db_init): Use thread_db_mourn.
6600 (thread_db_free): Delete, split in two.
6601 (disable_thread_event_reporting): New.
6602 (thread_db_detach): New.
6603 (thread_db_mourn): New.
6604
6605 * server.h (struct thread_info) <last_resume_kind>: New field.
6606 <attached>: Add comment.
6607 <gdb_detached>: New field.
6608 (handler_func): Change return type to int.
6609 (handle_serial_event, handle_target_event): Ditto.
6610 (gdb_connected): Declare.
6611 (tracing): Delete.
6612 (disconnected_tracing): Declare.
6613 (stop_tracing): Declare.
6614
6615 * server.c (handle_query) <qSupported>: Report support for
6616 disconnected tracing.
6617 (queue_stop_reply_callback): Account for running threads.
6618 (gdb_wants_thread_stopped): New.
6619 (gdb_wants_all_threads_stopped): New.
6620 (gdb_reattached_process): New.
6621 (handle_status): Clear the `gdb_detached' flag of all processes.
6622 In all-stop, stop all threads.
6623 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6624 (process_serial_event): If the remote connection breaks, or if an
6625 exit was forced with "monitor exit", force an event loop exit.
6626 Handle disconnected tracing on detach.
6627 (handle_serial_event): Adjust.
6628 (handle_target_event): If GDB isn't connected, forward events back
6629 to the inferior, unless the last process exited, in which case,
6630 exit gdbserver. Adjust interface.
6631
6632 * remote-utils.c (remote_open): Don't block in accept. Instead
6633 register an event loop source on the listen socket file
6634 descriptor. Refactor bits into ...
6635 (listen_desc): ... this new global.
6636 (gdb_connected): ... this new function.
6637 (enable_async_notification): ... this new function.
6638 (handle_accept_event): ... this new function.
6639 (remote_close): Clear remote_desc.
6640
6641 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6642
6643 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6644 New fields.
6645 (mourn_inferior): Define.
6646 (target_process_qsupported): Avoid the dangling else problem.
6647 (thread_stopped): Define.
6648 (pause_all): Define.
6649 (target_waitstatus_to_string): Declare.
6650 * target.c (target_waitstatus_to_string): New.
6651
6652 * tracepoint.c (tracing): Make extern.
6653 (disconnected_tracing): New.
6654 (stop_tracing): Make extern. Handle tracing stops due to GDB
6655 disconnecting.
6656 (cmd_qtdisconnected): New.
6657 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6658 (handle_tracepoint_general_set): Handle QTDisconnected.
6659
6660 * event-loop.c (event_handler_func): Change return type to int.
6661 (process_event): Bail out if the event handler wants the event
6662 loop to stop.
6663 (handle_file_event): Ditto.
6664 (start_event_loop): Bail out if the event handler wants the event
6665 loop to stop.
6666
6667 * nto-low.c (nto_target_ops): Adjust.
6668 * spu-low.c (spu_wait): Don't remove the process here.
6669 (spu_target_ops): Adjust.
6670 * win32-low.c (win32_wait): Don't remove the process here.
6671 (win32_target_ops): Adjust.
6672
6673 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6674
6675 * regcache.c (realloc_register_cache): Invalidate inferior's
6676 regcache before recreating it.
6677
6678 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6679
6680 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6681
6682 2010-04-09 Stan Shebs <stan@codesourcery.com>
6683 Pedro Alves <pedro@codesourcery.com>
6684
6685 * server.h (LONGEST): New.
6686 (struct thread_info) <while_stepping>: New field.
6687 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6688 Declare.
6689 (initialize_tracepoint, handle_tracepoint_general_set)
6690 (handle_tracepoint_query, tracepoint_finished_step)
6691 (tracepoint_was_hit, release_while_stepping_state_list):
6692 (current_traceframe): Declare.
6693 * server.c (handle_general_set): Handle tracepoint packets.
6694 (read_memory): New.
6695 (write_memory): New.
6696 (handle_search_memory_1): Use read_memory.
6697 (handle_query): Report support for conditional tracepoints, trace
6698 state variables, and tracepoint sources. Handle tracepoint
6699 queries.
6700 (main): Initialize the tracepoints module.
6701 (process_serial_event): Handle traceframe reads/writes.
6702
6703 * linux-low.c (handle_tracepoints): New.
6704 (linux_wait_1): Call it.
6705 (linux_resume_one_lwp): Handle while-stepping.
6706 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6707 (linux_target_ops): Install them.
6708 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6709 New field.
6710 * linux-x86-low.c (x86_supports_tracepoints): New.
6711 (the_low_target). Install it.
6712
6713 * mem-break.h (delete_breakpoint): Declare.
6714 * mem-break.c (delete_breakpoint): Make external.
6715
6716 * target.h (struct target_ops): Add `supports_tracepoints',
6717 `read_pc', and `write_pc' fields.
6718 (target_supports_tracepoints): Define.
6719 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6720 (phex_nz): New.
6721
6722 * regcache.h (struct regcache) <registers_owned>: New field.
6723 (init_register_cache, regcache_cpy): Declare.
6724 (regcache_read_pc, regcache_write_pc): Declare.
6725 (register_cache_size): Declare.
6726 (supply_regblock): Declare.
6727 * regcache.c (init_register_cache): New.
6728 (new_register_cache): Use it.
6729 (regcache_cpy): New.
6730 (register_cache_size): New.
6731 (supply_regblock): New.
6732 (regcache_read_pc, regcache_write_pc): New.
6733
6734 * tracepoint.c: New.
6735
6736 * Makefile.in (OBS): Add tracepoint.o.
6737 (tracepoint.o): New rule.
6738
6739 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6740
6741 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6742 (i386-mmx.o): New.
6743 (i386-mmx.c): Likewise.
6744 (i386-mmx-linux.o): Likewise.
6745 (i386-mmx-linux.c): Likewise.
6746
6747 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6748 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6749 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6750 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6751
6752 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6753 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6754 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6755
6756 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6757
6758 * Makefile.in (clean): Updated.
6759 (i386-avx.o): New.
6760 (i386-avx.c): Likewise.
6761 (i386-avx-linux.o): Likewise.
6762 (i386-avx-linux.c): Likewise.
6763 (amd64-avx.o): Likewise.
6764 (amd64-avx.c): Likewise.
6765 (amd64-avx-linux.o): Likewise.
6766 (amd64-avx-linux.c): Likewise.
6767
6768 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6769 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6770 (srv_amd64_regobj): Add amd64-avx.o.
6771 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6772 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6773 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6774 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6775 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6776 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6777 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6778
6779 * i387-fp.c: Include "i386-xstate.h".
6780 (i387_xsave): New.
6781 (i387_cache_to_xsave): Likewise.
6782 (i387_xsave_to_cache): Likewise.
6783 (x86_xcr0): Likewise.
6784
6785 * i387-fp.h (i387_cache_to_xsave): Likewise.
6786 (i387_xsave_to_cache): Likewise.
6787 (x86_xcr0): Likewise.
6788
6789 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6790 * linux-crisv32-low.c (target_regsets): Likewise.
6791 * linux-m68k-low.c (target_regsets): Likewise.
6792 * linux-mips-low.c (target_regsets): Likewise.
6793 * linux-ppc-low.c (target_regsets): Likewise.
6794 * linux-s390-low.c (target_regsets): Likewise.
6795 * linux-sh-low.c (target_regsets): Likewise.
6796 * linux-sparc-low.c (target_regsets): Likewise.
6797 * linux-xtensa-low.c (target_regsets): Likewise.
6798
6799 * linux-low.c: Include <sys/uio.h>.
6800 (regsets_fetch_inferior_registers): Support nt_type.
6801 (regsets_store_inferior_registers): Likewise.
6802 (linux_process_qsupported): New.
6803 (linux_target_ops): Add linux_process_qsupported.
6804
6805 * linux-low.h (regset_info): Add nt_type.
6806 (linux_target_ops): Add process_qsupported.
6807
6808 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6809 and <sys/uio.h>.
6810 (init_registers_i386_avx_linux): New.
6811 (init_registers_amd64_avx_linux): Likewise.
6812 (xmltarget_i386_linux_no_xml): Likewise.
6813 (xmltarget_amd64_linux_no_xml): Likewise.
6814 (PTRACE_GETREGSET): Likewise.
6815 (PTRACE_SETREGSET): Likewise.
6816 (x86_fill_xstateregset): Likewise.
6817 (x86_store_xstateregset): Likewise.
6818 (use_xml): Likewise.
6819 (x86_linux_update_xmltarget): Likewise.
6820 (x86_linux_process_qsupported): Likewise.
6821 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6822 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6823 init_registers_i386_linux here. Call
6824 x86_linux_update_xmltarget.
6825 (the_low_target): Add x86_linux_process_qsupported.
6826
6827 * server.c (handle_query): Call target_process_qsupported.
6828
6829 * target.h (target_ops): Add process_qsupported.
6830 (target_process_qsupported): New.
6831
6832 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6833
6834 * inferiors.c (add_thread): Set last_status kind to
6835 TARGET_WAITKIND_IGNORE.
6836 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6837 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6838 (linux_wait_1): Move `thread' local definition to block that uses
6839 it. Don't NULL initialize `event_child'.
6840 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6841 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6842 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6843
6844 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6845
6846 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6847 an extended waitstatus, or by a watchpoint.
6848 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6849 thread was stepping or has been stopped by a watchpoint.
6850
6851 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6852
6853 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6854 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6855 of another, then delete the previous, and validate all
6856 breakpoints.
6857 (validate_inserted_breakpoint): New.
6858 (delete_disabled_breakpoints): New.
6859 (validate_breakpoints): New.
6860 (check_mem_read): Validate breakpoints before trusting their
6861 shadow. Delete disabled breakpoints.
6862 (check_mem_write): Validate breakpoints before trusting they
6863 should be inserted. Delete disabled breakpoints.
6864 * mem-break.h (validate_breakpoints):
6865 * server.c (handle_query): Validate breakpoints when we see a
6866 qSymbol query.
6867
6868 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6869
6870 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6871 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6872 if we could tell there's a GDB breakpoint at stop_pc.
6873 (need_step_over_p): Don't do a step over if we find a GDB
6874 breakpoint at the resume PC.
6875
6876 * mem-break.c (struct raw_breakpoint): New.
6877 (enum bkpt_type): New type `gdb_breakpoint'.
6878 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6879 fields. New field `raw'.
6880 (find_raw_breakpoint_at): New.
6881 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6882 breakpoint instead.
6883 (set_breakpoint_at): Adjust.
6884 (delete_raw_breakpoint): New.
6885 (release_breakpoint): New.
6886 (delete_breakpoint): Rename to...
6887 (delete_breakpoint_1): ... this. Add proc parameter. Use
6888 release_breakpoint. Return ENOENT.
6889 (delete_breakpoint): Reimplement.
6890 (find_breakpoint_at): Delete.
6891 (find_gdb_breakpoint_at): New.
6892 (delete_breakpoint_at): Delete.
6893 (set_gdb_breakpoint_at): New.
6894 (delete_gdb_breakpoint_at): New.
6895 (gdb_breakpoint_here): New.
6896 (set_reinsert_breakpoint): Use release_breakpoint.
6897 (uninsert_breakpoint): Rename to ...
6898 (uninsert_raw_breakpoint): ... this.
6899 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6900 (reinsert_raw_breakpoint): Change parameter type to
6901 raw_breakpoint.
6902 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6903 instead.
6904 (check_breakpoints): Adjust. Use release_breakpoint.
6905 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6906 (breakpoint_inserted_here): Ditto.
6907 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6908 Don't trust the breakpoint's shadow if it is not inserted.
6909 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6910 (delete_all_breakpoints): Adjust.
6911 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6912 use delete_breakpoint_1.
6913
6914 * mem-break.h (breakpoints_supported): Delete declaration.
6915 (set_gdb_breakpoint_at): Declare.
6916 (gdb_breakpoint_here): Declare.
6917 (delete_breakpoint_at): Delete.
6918 (delete_gdb_breakpoint_at): Declare.
6919
6920 * server.h (struct raw_breakpoint): Forward declare.
6921 (struct process_info): New field `raw_breakpoints'.
6922
6923 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6924 breakpoints.
6925
6926 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6927
6928 * linux-low.c (status_pending_p_callback): Fix comment.
6929 (linux_wait_for_event_1): Move most of the internal breakpoint
6930 handling from here...
6931 (linux_wait_1): ... to here.
6932 (count_events_callback): New.
6933 (select_singlestep_lwp_callback): New.
6934 (select_event_lwp_callback): New.
6935 (cancel_breakpoints_callback): New.
6936 (select_event_lwp): New.
6937 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6938 priority to all LWPs that have had events that should be reported
6939 to the client. Cancel breakpoints when about to reporting the
6940 event to the client, not while stopping lwps. No longer cancel
6941 finished single-steps here.
6942 (cancel_finished_single_step): Delete.
6943 (cancel_finished_single_steps): Delete.
6944
6945 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6946
6947 * mem-break.c (enum bkpt_type): New.
6948 (struct breakpoint): New field `type'.
6949 (set_breakpoint_at): Change return type to struct breakpoint
6950 pointer. Set type to `other_breakpoint' by default.
6951 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6952 in the breakpoint list.
6953 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6954 (reinsert_breakpoint): Rename to ...
6955 (reinsert_raw_breakpoint): ... this.
6956 (reinsert_breakpoints_at): Adjust.
6957 * mem-break.h (struct breakpoint): Declare.
6958 (set_breakpoint_at): Change return type to struct breakpoint
6959 pointer.
6960
6961 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6962
6963 * server.c (handle_query): Assign, not compare.
6964
6965 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6966
6967 Teach linux gdbserver to step-over-breakpoints.
6968
6969 * linux-low.c (can_hardware_single_step): New.
6970 (supports_breakpoints): New.
6971 (handle_extended_wait): If stopping threads, read the stop pc of
6972 the new cloned LWP.
6973 (get_pc): New.
6974 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6975 low target doesn't support retrieving the PC.
6976 (add_lwp): Set last_resume_kind to resume_continue.
6977 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6978 (linux_attach): Don't clear stop_expected. Set the lwp's
6979 last_resume_kind to resume_stop.
6980 (linux_detach_one_lwp): Don't check for removed breakpoints.
6981 (check_removed_breakpoint): Delete.
6982 (status_pending_p): Rename to ...
6983 (status_pending_p_callback): ... this. Don't check for removed
6984 breakpoints. Don't consider threads that are stopped from GDB's
6985 perspective.
6986 (linux_wait_for_lwp): Always read the stop_pc here.
6987 (cancel_breakpoint): New.
6988 (step_over_bkpt): New global.
6989 (linux_wait_for_event_1): Implement stepping over breakpoints.
6990 (gdb_wants_lwp_stopped): New.
6991 (gdb_wants_all_stopped): New.
6992 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6993 single-step traps here. Store the thread's last reported target
6994 wait status.
6995 (send_sigstop): Don't clear stop_expected. Always set it,
6996 instead.
6997 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6998 (cancel_finished_single_step): New.
6999 (cancel_finished_single_steps): New.
7000 (wait_for_sigstop): Don't cancel finished single-step traps here.
7001 (linux_resume_one_lwp): Don't check for removed breakpoints.
7002 Don't set `step' on non-hardware step archs.
7003 (linux_set_resume_request): Ignore resume_stop requests if already
7004 stopping or stopped. Set the lwp's last_resume_kind.
7005 (resume_status_pending_p): Don't check for removed breakpoints.
7006 (need_step_over_p): New.
7007 (start_step_over): New.
7008 (finish_step_over): New.
7009 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7010 requests. Clear the thread's last reported target waitstatus.
7011 Don't use the `suspended' flag. Don't consider pending breakpoints.
7012 (linux_resume): Start a step-over if necessary.
7013 (proceed_one_lwp): New.
7014 (proceed_all_lwps): New.
7015 (unstop_all_lwps): New.
7016 * linux-low.h (struct lwp_info): Rewrite comment for the
7017 `suspended' flag. Add the `stop_pc' field. Delete the
7018 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7019 Add `'last_resume_kind' and `need_step_over' fields.
7020 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7021 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7022 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7023 (set_raw_breakpoint_at): New.
7024 (set_breakpoint_at): Rewrite to use it.
7025 (reinsert_breakpoint_handler): Delete.
7026 (set_reinsert_breakpoint): New.
7027 (reinsert_breakpoint_by_bp): Delete.
7028 (delete_reinsert_breakpoints): New.
7029 (uninsert_breakpoint): Rewrite.
7030 (uninsert_breakpoints_at): New.
7031 (reinsert_breakpoint): Rewrite.
7032 (reinsert_breakpoints_at): New.
7033 (check_breakpoints): Rewrite.
7034 (breakpoint_here): New.
7035 (breakpoint_inserted_here): New.
7036 (check_mem_read): Adjust.
7037 * mem-break.h (breakpoints_supported, breakpoint_here)
7038 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7039 (reinsert_breakpoint_by_bp): Delete declaration.
7040 (delete_reinsert_breakpoints): Declare.
7041 (reinsert_breakpoint): Delete declaration.
7042 (reinsert_breakpoints_at): Declare.
7043 (uninsert_breakpoint): Delete declaration.
7044 (uninsert_breakpoints_at): Declare.
7045 (check_breakpoints): Adjust prototype.
7046 * server.h: Adjust include order.
7047 (struct thread_info): Declare here. Add a `last_status' field.
7048
7049 2010-03-23 Michael Snyder <msnyder@vmware.com>
7050
7051 * server.c (crc32): New function.
7052 (handle_query): Add handling for 'qCRC:' request.
7053
7054 2010-03-23 Pedro Alves <pedro@codesourcery.com>
7055
7056 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7057 lwp had been stopped by a watchpoint.
7058
7059 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7060
7061 * server.h (internal_error): Declare.
7062 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7063 * utils.c (internal_error): New function.
7064
7065 2010-03-15 Andreas Schwab <schwab@redhat.com>
7066
7067 * configure.srv: Fix typo setting srv_regobj.
7068
7069 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7070
7071 * linux-low.c (fetch_register): Avoid passing a non string literal
7072 format to `error'.
7073 (usr_store_inferior_registers): Ditto.
7074
7075 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7076
7077 * linux-low.c (linux_write_memory): Bail out early if peeking
7078 memory failed.
7079
7080 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7081
7082 * linux-low.h (struct lwp_info): New fields
7083 `stopped_by_watchpoint' and `stopped_data_address'.
7084 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7085 here, and cache them in the lwp object.
7086 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7087 directly.
7088 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7089 field.
7090 (linux_stopped_by_watchpoint): Rewrite.
7091 (linux_stopped_data_address): Rewrite.
7092
7093 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7094
7095 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7096 switching the current inferior, not before.
7097
7098 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7099
7100 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7101 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7102 i386-linux.c and amd64-linux.c.
7103 (reg-i386.o): Removed.
7104 (reg-i386.c): Likewise.
7105 (reg-i386-linux.o): Likewise.
7106 (reg-i386-linux.c): Likewise.
7107 (reg-x86-64.o): Likewise.
7108 (reg-x86-64.c): Likewise.
7109 (reg-x86-64-linux.o): Likewise.
7110 (reg-x86-64-linux.c): Likewise.
7111 (i386.o): New.
7112 (i386.c): Likewise.
7113 (i386-linux.o): Likewise.
7114 (i386-linux.c): Likewise.
7115 (amd64.o): Likewise.
7116 (amd64.c): Likewise.
7117 (amd64-linux.o): Likewise.
7118 (amd64-linux.c): Likewise.
7119
7120 * configure.srv (srv_i386_regobj): New.
7121 (srv_i386_linux_regobj): Likewise.
7122 (srv_amd64_regobj): Likewise.
7123 (srv_amd64_linux_regobj): Likewise.
7124 (srv_i386_32bit_xmlfiles): Likewise.
7125 (srv_i386_64bit_xmlfiles): Likewise.
7126 (srv_i386_xmlfiles): Likewise.
7127 (srv_amd64_xmlfiles): Likewise.
7128 (srv_i386_linux_xmlfiles): Likewise.
7129 (srv_amd64_linux_xmlfiles): Likewise.
7130 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7131 srv_xmlfiles to $srv_i386_xmlfiles.
7132 (i[34567]86-*-mingw32ce*): Likewise.
7133 (i[34567]86-*-mingw*): Likewise.
7134 (i[34567]86-*-nto*): Likewise.
7135 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7136 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7137 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7138 (x86_64-*-linux*): Likewise.
7139
7140 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7141 (init_registers_amd64_linux): New.
7142 (x86_arch_setup): Replace init_registers_x86_64_linux with
7143 init_registers_amd64_linux.
7144
7145 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7146
7147 * configure.ac: Check for libdl. If it is not available link against
7148 static libthread_db.
7149 * configure: Regenerate.
7150
7151 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7152
7153 PR9605
7154
7155 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7156 handing a read watchpoint.
7157 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7158
7159 2010-02-12 Doug Evans <dje@google.com>
7160
7161 * linux-low.c (linux_supports_tracefork_flag): Document.
7162 (linux_look_up_symbols): Add comment.
7163
7164 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7165
7166 * regcache.c (supply_register): Clear regcache if buf is NULL.
7167
7168 2010-02-02 Nicolas Roche <roche@sourceware.org>
7169 Joel Brobecker <brobecker@adacore.com>
7170
7171 * inferiors.c (find_inferior): Add function documentation.
7172 (unloaded_dll): Handle the case where the unloaded dll has not
7173 been previously registered in the dll list.
7174
7175 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7176
7177 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7178 (thumb2_breakpoint): New.
7179 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7180
7181 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7182
7183 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7184 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7185 breakpoints.
7186
7187 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7188
7189 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7190
7191 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7192
7193 * linux-s390-low.c (s390_collect_ptrace_register)
7194 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7195
7196 2010-01-21 Doug Evans <dje@google.com>
7197
7198 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7199 (PTRACE_ARG4_TYPE): New macro.
7200 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7201 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7202 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7203 (usr_store_inferior_registers): Ditto.
7204 (linux_read_memory, linux_write_memory): Ditto.
7205 (linux_test_for_tracefork): Ditto.
7206
7207 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7208 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7209
7210 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7211
7212 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7213 target.
7214
7215 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7216
7217 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7218 prototype to take a regcache. Adjust.
7219
7220 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7221
7222 * regcache.h (struct thread_info): Forward declare.
7223 (struct regcache): New.
7224 (new_register_cache): Adjust prototype.
7225 (get_thread_regcache): Declare.
7226 (free_register_cache): Adjust prototype.
7227 (registers_to_string, registers_from_string): Ditto.
7228 (supply_register, supply_register_by_name, collect_register)
7229 (collect_register_as_string, collect_register_by_name): Ditto.
7230 * regcache.c (struct inferior_regcache_data): Delete.
7231 (get_regcache): Rename to ...
7232 (get_thread_regcache): ... this. Adjust. Switch inferior before
7233 fetching registers.
7234 (regcache_invalidate_one): Adjust.
7235 (regcache_invalidate): Fix prototype.
7236 (new_register_cache): Return the new register cache.
7237 (free_register_cache): Change prototype.
7238 (realloc_register_cache): Adjust.
7239 (registers_to_string): Change prototype to take a regcache. Adjust.
7240 (registers_from_string): Ditto.
7241 (register_data): Ditto.
7242 (supply_register): Ditto.
7243 (supply_register_by_name): Ditto.
7244 (collect_register): Ditto.
7245 (collect_register_as_string): Ditto.
7246 (collect_register_by_name): Ditto.
7247 * server.c (process_serial_event): Adjust.
7248 * linux-low.h (regset_fill_func, regset_store_func): Change
7249 prototype.
7250 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7251 Change prototype.
7252 * linux-low.c (get_stop_pc): Adjust.
7253 (check_removed_breakpoint): Adjust.
7254 (linux_wait_for_event): Adjust.
7255 (linux_resume_one_lwp): Adjust.
7256 (fetch_register): Add regcache parameter. Adjust.
7257 (usr_store_inferior_registers): Ditto.
7258 (regsets_fetch_inferior_registers): Ditto.
7259 (regsets_store_inferior_registers): Ditto.
7260 (linux_fetch_registers, linux_store_registers): Ditto.
7261 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7262 regcache. Adjust.
7263 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7264 Ditto.
7265 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7266 prototype to take a regcache.
7267 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7268 * remote-utils.c (convert_ascii_to_int, outreg)
7269 (prepare_resume_reply): Change prototype to take a regcache.
7270 Adjust.
7271 * target.h (struct target_ops) <fetch_registers, store_registers>:
7272 Change prototype to take a regcache.
7273 (fetch_inferior_registers, store_inferior_registers): Change
7274 prototype to take a regcache. Adjust.
7275 * proc-service.c (ps_lgetregs): Adjust.
7276 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7277 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7278 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7279 take a regcache. Adjust.
7280 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7281 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7282 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7283 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7284 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7285 (cris_cannot_fetch_register):
7286 (cris_breakpoint_at): Change prototype to take a regcache.
7287 Adjust.
7288 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7289 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7290 to take a regcache. Adjust.
7291 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7292 Adjust.
7293 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7294 take a regcache. Adjust.
7295 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7296 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7297 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7298 * linux-mips-low.c (mips_get_pc):
7299 (mips_set_pc): Change prototype to take a regcache. Adjust.
7300 (mips_reinsert_addr): Adjust.
7301 (mips_collect_register): Change prototype to take a regcache.
7302 Adjust.
7303 (mips_supply_register):
7304 (mips_collect_register_32bit, mips_supply_register_32bit)
7305 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7306 (mips_store_fpregset): Ditto.
7307 * linux-ppc-low.c (ppc_supply_ptrace_register)
7308 (ppc_supply_ptrace_register): Ditto.
7309 (parse_spufs_run): Adjust.
7310 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7311 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7312 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7313 take a regcache. Adjust.
7314 * linux-s390-low.c (s390_collect_ptrace_register)
7315 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7316 (s390_set_pc): Change prototype to take a regcache. Adjust.
7317 (s390_arch_setup): Adjust.
7318 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7319 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7320 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7321 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7322 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7323 regcache. Adjust.
7324 (sparc_breakpoint_at): Adjust.
7325 * linux-xtensa-low.c (xtensa_fill_gregset):
7326 (xtensa_store_gregset):
7327 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7328 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7329 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7330 prototype to take a regcache. Adjust.
7331 * win32-arm-low.c (arm_fetch_inferior_register)
7332 (arm_store_inferior_register): Change prototype to take a
7333 regcache. Adjust.
7334 * win32-i386-low.c (i386_fetch_inferior_register)
7335 (i386_store_inferior_register): Change prototype to take a
7336 regcache. Adjust.
7337 * win32-low.c (child_fetch_inferior_registers)
7338 (child_store_inferior_registers): Change prototype to take a
7339 regcache. Adjust.
7340 (win32_wait): Adjust.
7341 (win32_fetch_inferior_registers): Change prototype to take a
7342 regcache. Adjust.
7343 (win32_store_inferior_registers): Adjust.
7344 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7345 store_inferior_register>: Change prototype to take a regcache.
7346
7347 2010-01-20 Doug Evans <dje@google.com>
7348
7349 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7350 #ifdef.
7351 (linux_wait_for_event1, linux_init_signals): Ditto.
7352 (W_STOPCODE): Provide definition if missing.
7353
7354 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7355
7356 * linux-low.c (linux_core_of_thread): New.
7357 (compare_ints, show_process, list_threads): New.
7358 (linux_qxfer_osdata): Report threads and cores.
7359 (linux_target_op): Register linux_core_of_thread.
7360 * remote-utils.c (prepare_resume_reply): Report the core.
7361 (buffer_xml_printf): Support %d specifier.
7362 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7363 New.
7364 (handle_query): Handle qXfer:threads. Announce availability
7365 thereof.
7366 * target.h (struct target_ops): New field core_of_thread.
7367
7368 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7369
7370 * Makefile.in (clean): Remove new generated files.
7371 (reg-s390.o, reg-s390.c): Remove rules.
7372 (reg-s390x.o, reg-s390x.c): Likewise.
7373 (s390-linux32.o, s390-linux32.c): Add rules.
7374 (s390-linux64.o, s390-linux64.c): Likewise.
7375 (s390x-linux64.o, s390x-linux64.c): Likewise.
7376 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7377 * linux-s390-low.c: Include <elf.h>.
7378 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7379 (init_registers_s390): Remove prototype.
7380 (init_registers_s390x): Likewise.
7381 (init_registers_s390_linux32): Add prototype.
7382 (init_registers_s390_linux64): Likewise.
7383 (init_registers_s390x_linux64): Likewise.
7384 (s390_num_regs_3264): New define.
7385 (s390_regmap_3264): New global variable.
7386 (s390_cannot_fetch_register): Remove obsolete check.
7387 (s390_cannot_store_register): Likewise.
7388 (s390_collect_ptrace_register): Handle upper/lower register halves.
7389 (s390_supply_ptrace_register): Likewise.
7390 (s390_fill_gregset): Update to register number changes.
7391 (s390_get_hwcap): New routine.
7392 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7393 Install appropriate regmap and register set.
7394
7395 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7396
7397 * server.c (gdbserver_version): Update copyright year to 2010.
7398 * gdbreplay.c (gdbreplay_version): Likewise.
7399
7400 2009-12-28 Doug Evans <dje@google.com>
7401
7402 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7403 elf/external.h. Include <elf.h> instead but only if necessary.
7404
7405 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7406
7407 * linux-low.c (linux_remove_process): Remove `detaching'
7408 parameter. Don't release/detach from thread_db here.
7409 (linux_kill): Release/detach from thread_db here, ...
7410 (linux_detach): ... and here, before actually detaching.
7411 (linux_wait_1): ... and here, when a process exits.
7412 * thread-db.c (any_thread_of): New.
7413 (thread_db_free): Switch the current inferior to a thread of the
7414 passed in process.
7415
7416 2009-12-21 Doug Evans <dje@google.com>
7417
7418 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7419
7420 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7421 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7422 warning ifndef __NR_tkill. Move setting of errno there too.
7423 Delete unnecessary resetting of errno after syscall.
7424 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7425
7426 * configure.ac: Check for dladdr.
7427 * config.in: Regenerate.
7428 * configure: Regenerate.
7429 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7430 (try_thread_db_load): Update.
7431
7432 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7433
7434 2009-12-18 Doug Evans <dje@google.com>
7435
7436 * event-loop.c: Include unistd.h if it exists.
7437
7438 * linux-low.c (my_waitpid): Move definition away from being in
7439 between linux_tracefork_child/linux_test_for_tracefork.
7440
7441 * gdb_proc_service.h (psaddr_t): Fix type.
7442 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7443 signature to match glibc.
7444
7445 2009-12-16 Doug Evans <dje@google.com>
7446
7447 * linux-low.c (linux_read_memory): Fix argument to read.
7448
7449 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7450
7451 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7452 events, don't leave current_inferior pointing at null.
7453
7454 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7455
7456 * win32-low.c (LOG): Delete.
7457 (OUTMSG): Output to stderr.
7458 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7459 on compile time LOG macro.
7460 (win32_wait): Fix debug output.
7461
7462 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7463
7464 * win32-low.c (win32_add_one_solib): If the dll name is
7465 "ntdll.dll", prepend the system directory to the dll path.
7466
7467 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7468
7469 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7470
7471 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7472 Vladimir Prus <vladimir@codesourcery.com>
7473
7474 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7475 * configure.ac: Check for __mcoldfire__ and set
7476 gdb_cv_m68k_is_coldfire.
7477 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7478 reg-cf.o and reg-m68k.o.
7479 * configure: Regenerated.
7480
7481 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7482
7483 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7484 Pass it to thread_db_free.
7485 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7486 proper `detaching' argument to linux_remove_process.
7487 * linux-low.h (thread_db_free): Add `detaching' parameter.
7488 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7489 to thread_db_free.
7490 (thread_db_free): Add `detaching' parameter. Only
7491 call td_ta_clear_event if detaching from process.
7492
7493 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7494
7495 * thread-db.c (thread_db_free): Fix typo.
7496
7497 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7498
7499 PR gdb/10838
7500 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7501
7502 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7503
7504 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7505 with an i686 compiler.
7506 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7507 needed.
7508 * configure: Rebuilt.
7509
7510 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7511
7512 PR gdb/10783
7513
7514 * server.c (handle_search_memory_1): Correct read_addr initialization
7515 in loop for searching subsequent chunks.
7516
7517 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7518
7519 * configure.ac: New --with-libthread-db option.
7520 * thread-db.c: Allow direct dependence on libthread_db.
7521 (thread_db_free): Adjust.
7522 * config.in: Regenerate.
7523 * configure: Likewise.
7524
7525 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7526
7527 PR gdb/10757
7528 * thread-db.c (attach_thread): New function.
7529 (maybe_attach_thread): Return success/failure.
7530 (find_new_threads_callback): Adjust.
7531 (thread_db_find_new_threads): Loop until no new threads.
7532
7533 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7534
7535 * proc-service.c (ps_lgetregs): Formatting.
7536
7537 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7538
7539 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7540 * configure.ac: Adjust.
7541 * linux-low.h (struct process_info_private): Move members to struct
7542 thread_db.
7543 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7544 * linux-low.c (linux_remove_process): Adjust.
7545 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7546 * server.c (handle_query): Move code ...
7547 (handle_monitor_command): ... here. New function.
7548 * target.h (struct target_ops): New member.
7549 * thread-db.c (struct thread_db): New.
7550 (libthread_db_search_path): New variable.
7551 (thread_db_create_event, thread_db_enable_reporting)
7552 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7553 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7554 (try_thread_db_load_1, dladdr_to_soname): New functions.
7555 (try_thread_db_load, thread_db_load_search): New functions.
7556 (thread_db_init): Search for libthread_db.
7557 (thread_db_free): New function.
7558 (thread_db_handle_monitor_command): Likewise.
7559 * config.in: Regenerate.
7560 * configure: Regenerate.
7561
7562 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7563
7564 * spu-low.c (spu_kill): Wait for inferior to terminate.
7565 Call clear_inferiors.
7566 (spu_detach): Call clear_inferiors.
7567
7568 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7569
7570 * aclocal.m4: Regenerate.
7571 * config.in: Likewise.
7572 * configure: Likewise.
7573
7574 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7575
7576 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7577 (parse_spufs_run): New function.
7578 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7579 (ppc_breakpoint_at): Handle SPU breakpoints.
7580
7581 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7582
7583 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7584 (SPUFS_MAGIC): Define.
7585 (spu_enumerate_spu_ids): New function.
7586 (linux_qxfer_spu): New function.
7587 (linux_target_ops): Install linux_qxfer_spu.
7588
7589 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7590
7591 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7592 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7593 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7594 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7595 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7596 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7597 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7598 (init_registers_powerpc_cell32l): Add prototype.
7599 (init_registers_powerpc_cell64l): Likewise.
7600 (ppc_arch_setup): Detect Cell/B.E. architecture.
7601
7602 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7603
7604 * Makefile.in (datarootdir): New variable.
7605
7606 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7607
7608 * linux-low.c (linux_write_memory): Update debugging output.
7609 * Makefile.in (clean): Add new descriptions.
7610 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7611 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7612 * configure.srv: Add new files for arm*-*-linux*.
7613 * linux-arm-low.c: Add new declarations.
7614 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7615 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7616 (HWCAP_VFPv3D16): New.
7617 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7618 instead of __IWMMXT__.
7619 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7620 (arm_arch_setup): New.
7621 (target_regsets): Remove #ifdef. Add VFP regset.
7622 (the_low_target): Use arm_arch_setup.
7623
7624 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7625
7626 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7627 the main thread again.
7628
7629 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7630
7631 Adding Neutrino gdbserver.
7632 * configure: Regenerated.
7633 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7634 * configure.srv (i[34567]86-*-nto*): New target.
7635 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7636 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7637 (nto_comctrl) [__QNX__]: New function.
7638 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7639
7640 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7641
7642 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7643 srv_tgtobj.
7644
7645 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7646 Pedro Alves <pedro@codesourcery.com>
7647
7648 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7649 don't support CONTEXT_EXTENDED_REGISTERS.
7650 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7651 (the_low_target): Install them.
7652 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7653 failing with ERROR_PIPE_NOT_CONNECTED.
7654
7655 2009-06-30 Doug Evans <dje@google.com>
7656 Pierre Muller <muller@ics.u-strasbg.fr>
7657
7658 Add h/w watchpoint support to x86-linux, win32-i386.
7659 * Makefile.in (SFILES): Add i386-low.c
7660 (i386_low_h): Define.
7661 (i386-low.o): Add dependencies.
7662 (linux-x86-low.o): Add i386-low.h dependency.
7663 (win32-i386-low.o): Ditto.
7664 * i386-low.c: New file.
7665 * i386-low.h: New file.
7666 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7667 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7668 * linux-low.c (linux_add_process): Initialize arch_private.
7669 (linux_remove_process): Free arch_private.
7670 (add_lwp): Initialize arch_private.
7671 (delete_lwp): Free arch_private.
7672 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7673 provided.
7674 * linux-low.h (process_info_private): New member arch_private.
7675 (lwp_info): New member arch_private.
7676 (linux_target_ops): New members new_process, new_thread,
7677 prepare_to_resume.
7678 (ptid_of): New macro.
7679 * linux-x86-low.c: Include stddef.h, i386-low.h.
7680 (arch_process_info): New struct.
7681 (arch_lwp_info): New struct.
7682 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7683 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7684 (i386_dr_low_get_status): New function.
7685 (x86_insert_point, x86_remove_point): New functions.
7686 (x86_stopped_by_watchpoint): New function.
7687 (x86_stopped_data_address): New function.
7688 (x86_linux_new_process, x86_linux_new_thread): New functions.
7689 (x86_linux_prepare_to_resume): New function.
7690 (the_low_target): Add entries for insert_point, remove_point,
7691 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7692 prepare_to_resume.
7693 * server.c (debug_hw_points): New global.
7694 (monitor_show_help): Document set debug-hw-points.
7695 (handle_query): Process "set debug-hw-points".
7696 * server.h (debug_hw_points): Declare.
7697 (paddress): Declare.
7698 * utils.c (NUMCELLS, CELLSIZE): New macros.
7699 (get_sell, xsnprintf, paddress): New functions.
7700 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7701 remove_point, stopped_by_watchpoint, stopped_data_address.
7702 * win32-i386-low.c: Include i386-low.h.
7703 (debug_reg_state): Replaces dr.
7704 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7705 (i386_dr_low_get_status): New function.
7706 (i386_insert_point, i386_remove_point): New functions.
7707 (i386_stopped_by_watchpoint): New function.
7708 (i386_stopped_data_address): New function.
7709 (i386_initial_stuff): Update.
7710 (get_thread_context,set_thread_context,i386_thread_added): Update.
7711 (the_low_target): Add entries for insert_point,
7712 remove_point, stopped_by_watchpoint, stopped_data_address.
7713 * win32-low.c (win32_insert_watchpoint): New function.
7714 (win32_remove_watchpoint): New function.
7715 (win32_stopped_by_watchpoint): New function.
7716 (win32_stopped_data_address): New function.
7717 (win32_target_ops): Add entries for insert_watchpoint,
7718 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7719 * win32-low.h (win32_target_ops): New members insert_point,
7720 remove_point, stopped_by_watchpoint, stopped_data_address.
7721
7722 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7723
7724 * server.c (process_serial_event): Re-return unsupported, not
7725 error, if the type isn't recognized. Re-allow supporting only
7726 insert or remove packets. Also call require_running for
7727 breakpoints. Add missing break statement to default case. Tidy.
7728 * target.h (struct target_ops): Rename insert_watchpoint to
7729 insert_point, and remove_watchpoint to remove_point.
7730
7731 * linux-low.h (struct linux_target_ops): Likewise.
7732 * linux-low.c (linux_insert_watchpoint): Rename to ...
7733 (linux_insert_point): ... this. Adjust.
7734 (linux_remove_watchpoint): Rename to ...
7735 (linux_remove_point): ... this. Adjust.
7736 (linux_target_ops): Adjust.
7737 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7738 (cris_insert_point): ... this.
7739 (cris_remove_watchpoint): Rename to ...
7740 (cris_remove_point): ... this.
7741 (the_low_target): Adjust.
7742
7743 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7744
7745 * server.c (handle_v_kill): Pass signal_pid to
7746 kill_inferior if multi_process is zero.
7747
7748 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7749
7750 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7751 * target.h (target_ops): Comment for *_watchpoint to make it clear
7752 the functions can get types '0' and '1'.
7753
7754 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7755
7756 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7757 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7758 * regcache.c (get_regcache): Likewise.
7759 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7760 * win32-low.c (child_fetch_inferior_registers): Remove check for
7761 regno 0.
7762
7763 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7764 Pedro Alves <pedro@codesourcery.com>
7765
7766 * target.h (struct target_ops) <supports_multi_process>: New
7767 callback.
7768 (target_supports_multi_process): New.
7769 * server.c (handle_query): Even if GDB reports support, only
7770 enable multi-process if the target also supports it. Report
7771 multi-process support only if the target backend supports it.
7772 * linux-low.c (linux_supports_multi_process): New function.
7773 (linux_target_ops): Install it as target_supports_multi_process
7774 callback.
7775
7776 2009-05-24 Doug Evans <dje@google.com>
7777
7778 Global renaming of find_thread_pid to find_thread_ptid.
7779 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7780 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7781 All callers updated.
7782
7783 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7784 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7785 directly.
7786
7787 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7788 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7789 (linux_resume_one_lwp): Ditto.
7790
7791 2009-05-23 Doug Evans <dje@google.com>
7792
7793 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7794 from struct inferior_list_entry * to struct lwp_info *.
7795 All callers updated.
7796
7797 2009-05-13 Doug Evans <dje@google.com>
7798
7799 * linux-x86-low.c: Don't include assert.h.
7800 (x86_siginfo_fixup): Use fatal, not assert.
7801 (x86_arch_setup): Fix comment.
7802
7803 2009-05-12 Doug Evans <dje@google.com>
7804
7805 Biarch support for i386/amd64 gdbserver.
7806 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7807 Add linux-x86-low.c.
7808 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7809 (linux-x86-low.o): Add.
7810 * linux-x86-64-low.c: Delete.
7811 * linux-i386-low.c: Delete.
7812 * linux-x86-low.c: New file.
7813 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7814 linux-x86-low.o.
7815 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7816 linux-x86-low.o.
7817 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7818 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7819 (linux_child_pid_to_exec_file): New function.
7820 (elf_64_header_p, elf_64_file_p): New functions.
7821 (siginfo_fixup): New function.
7822 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7823 give target a chance to convert layout.
7824 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7825 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7826
7827 2009-05-07 Doug Evans <dje@google.com>
7828
7829 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7830 (regsets_store_inferior_registers): Ditto.
7831
7832 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7833
7834 PR server/10048
7835
7836 * linux-low.c (must_set_ptrace_flags): Delete.
7837 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7838 of the global.
7839 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7840 `lwp->must_set_ptrace_flags' instead.
7841 (linux_wait_for_event_1): Set ptrace options here.
7842 (linux_wait_1): ... not here.
7843
7844 2009-04-30 Doug Evans <dje@google.com>
7845
7846 * inferiors.c (started_inferior_callback): New function.
7847 (attached_inferior_callback): New function.
7848 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7849 * server.c (print_started_pid, print_attached_pid): New functions.
7850 (detach_or_kill_for_exit): New function.
7851 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7852 * server.h (have_started_inferiors_p): Declare.
7853 (have_attached_inferiors_p): Declare.
7854
7855 * inferiors.c (remove_process): Fix memory leak, free process.
7856 * linux-low.c (linux_remove_process): New function.
7857 (linux_kill): Call it instead of remove_process.
7858 (linux_detach, linux_wait_1): Ditto.
7859
7860 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7861
7862 * configure.srv: Add x86 Windows CE target.
7863
7864 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7865
7866 * inferiors.c (get_thread_process): Make global.
7867 * server.h (get_thread_process): Add prototype.
7868 * thread-db.c (find_one_thread): Use get_thread_process
7869 instead of current_process.
7870 (thread_db_get_tls_address): Do not crash if called when
7871 thread layer is not yet initialized.
7872
7873 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7874
7875 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7876 * spu-low.c (current_tid): Rename to ...
7877 (current_ptid): ... this.
7878 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7879 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7880 ptid_get_lwp (current_ptid) instead of current_tid.
7881 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7882 instead of current_tid. Use find_process_pid to verify pid
7883 argument is valid. Pass proper argument to remove_process.
7884 (spu_thread_alive): Compare current_ptid instead of current_tid.
7885 (spu_resume): Likewise.
7886
7887 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7888
7889 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7890 variable.
7891
7892 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7893
7894 Implement the multiprocess extensions, and add linux multiprocess
7895 support.
7896
7897 * server.h (ULONGEST): Declare.
7898 (struct ptid, ptid_t): New.
7899 (minus_one_ptid, null_ptid): Declare.
7900 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7901 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7902 (struct inferior_list_entry): Change `id' type from unsigned from
7903 to ptid_t.
7904 (struct sym_cache, struct breakpoint, struct
7905 process_info_private): Forward declare.
7906 (struct process_info): Declare.
7907 (current_process): Declare.
7908 (all_processes): Declare.
7909 (initialize_inferiors): Declare.
7910 (add_thread): Adjust to use ptid_t.
7911 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7912 (add_process, remove_process, find_thread_pid): Declare.
7913 (find_inferior_id): Adjust to use ptid_t.
7914 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7915 (multi_process): Declare.
7916 (push_event): Adjust to use ptid_t.
7917 (read_ptid, write_ptid): Declare.
7918 (prepare_resume_reply): Adjust to use ptid_t.
7919 (clear_symbol_cache): Declare.
7920 * inferiors.c (all_processes): New.
7921 (null_ptid, minus_one_ptid): New.
7922 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7923 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7924 (add_thread): Change unsigned long to ptid. Remove gdb_id
7925 parameter. Adjust.
7926 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7927 (gdb_id_to_thread): Rename to ...
7928 (find_thread_pid): ... this. Change unsigned long to ptid.
7929 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7930 (loaded_dll, pull_pid_from_list): Adjust.
7931 (add_process, remove_process, find_process_pid)
7932 (get_thread_process, current_process, initialize_inferiors): New.
7933 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7934 (struct target_waitstatus) <related_pid>: Ditto.
7935 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7936 return type to int.
7937 (struct target_ops) <join>: Add `pid' argument.
7938 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7939 (struct target_ops) <wait>: Add `ptid' field. Change return type
7940 to ptid.
7941 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7942 (mywait): Add `ptid' argument. Change return type to ptid_t.
7943 (target_pid_to_str): Declare.
7944 * target.c (set_desired_inferior): Adjust to use ptids.
7945 (mywait): Add new `ptid' argument. Adjust.
7946 (target_pid_to_str): New.
7947 * mem-break.h (free_all_breakpoints): Declare.
7948 * mem-break.c (breakpoints): Delelete.
7949 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7950 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7951 to use per-process breakpoint list.
7952 (free_all_breakpoints): New.
7953 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7954 (symbol_cache, all_symbols_looked_up): Delete.
7955 (hexchars): New.
7956 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7957 read_ptid): New.
7958 (prepare_resume_reply): Change ptid argument's type from unsigned
7959 long to ptid_t. Adjust. Implement W;process and X;process.
7960 (free_sym_cache, clear_symbol_cache): New.
7961 (look_up_one_symbol): Adjust to per-process symbol cache. *
7962 * server.c (cont_thread, general_thread, step_thread): Change type
7963 to ptid_t.
7964 (attached): Delete.
7965 (multi_process): New.
7966 (last_ptid): Change type to ptid_t.
7967 (struct vstop_notif) <ptid>: Change type to ptid_t.
7968 (queue_stop_reply, push_event): Change `ptid' argument's type to
7969 ptid_t.
7970 (discard_queued_stop_replies): Add `pid' argument.
7971 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7972 changes. Don't reference the `attached' global.
7973 (attach_inferior): Adjust to mywait interface changes.
7974 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7975 features. Handle and report "multiprocess+". Handle
7976 "qAttached:PID".
7977 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7978 changes.
7979 (handle_v_kill): New.
7980 (handle_v_stopped): Adjust to use target_pid_to_str.
7981 (handle_v_requests): Allow multiple attaches and runs when
7982 multiprocess extensions are in effect. Handle "vKill".
7983 (myresume): Adjust to use ptids.
7984 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7985 (handle_status): Adjust to discard_queued_stop_replies interface
7986 change.
7987 (first_thread_of, kill_inferior_callback)
7988 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7989 (main): Call initialize_inferiors. Adjust to use ptids, killing
7990 and detaching from all inferiors. Handle multiprocess packet
7991 variants.
7992 * linux-low.h: Include gdb_proc_service.h.
7993 (struct process_info_private): New.
7994 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7995 <lwpid_of>: Use ptid_get_lwp.
7996 (get_lwp_thread): Adjust.
7997 (struct lwp_info): Add `dead' member.
7998 (find_lwp_pid): Declare.
7999 * linux-low.c (thread_db_active): Delete.
8000 (new_inferior): Adjust comment.
8001 (inferior_pid): Delete.
8002 (linux_add_process): New.
8003 (handle_extended_wait): Adjust.
8004 (add_lwp): Change unsigned long to ptid.
8005 (linux_create_inferior): Add process to processes table. Adjust
8006 to use ptids. Don't set new_inferior here.
8007 (linux_attach_lwp): Rename to ...
8008 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8009 it. Adjust to use ptids.
8010 (linux_attach_lwp): New.
8011 (linux_attach): Add process to processes table. Don't set
8012 new_inferior here.
8013 (struct counter): New.
8014 (second_thread_of_pid_p, last_thread_of_process_p): New.
8015 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8016 multiple processes.
8017 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8018 processes. Remove process from process table.
8019 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8020 to multiple processes.
8021 (any_thread_of): New.
8022 (linux_detach): Add `pid' argument, and handle it. Remove process
8023 from processes table.
8024 (linux_join): Add `pid' argument. Handle it.
8025 (linux_thread_alive): Change unsighed long argument to ptid_t.
8026 Consider dead lwps as not being alive.
8027 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8028 threads we're not interested in.
8029 (same_lwp, find_lwp_pid): New.
8030 (linux_wait_for_lwp): Change `pid' argument's type from int to
8031 ptid_t. Adjust.
8032 (linux_wait_for_event): Rename to ...
8033 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8034 from int to ptid_t. Adjust.
8035 (linux_wait_for_event): New.
8036 (linux_wait_1): Add `ptid' argument. Change return type to
8037 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8038 that exit from the process table.
8039 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8040 Adjust.
8041 (mark_lwp_dead): New.
8042 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8043 stopping all threads, mark its main lwp as dead.
8044 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8045 ptids.
8046 (fetch_register, usr_store_inferior_registers)
8047 (regsets_fetch_inferior_registers)
8048 (regsets_store_inferior_registers, linux_read_memory)
8049 (linux_write_memory): Inline `inferior_pid'.
8050 (linux_look_up_symbols): Adjust to use per-process
8051 `thread_db_active'.
8052 (linux_request_interrupt): Adjust to use ptids.
8053 (linux_read_auxv): Inline `inferior_pid'.
8054 (initialize_low): Don't reference thread_db_active.
8055 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8056 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8057 (ps_getpid): Return the pid of the current inferior.
8058 * thread-db.c (proc_handle, thread_agent): Delete.
8059 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8060 per-process data.
8061 (find_one_thread): Change argument type to ptid_t. Adjust to
8062 per-process data.
8063 (maybe_attach_thread): Adjust to per-process data and ptids.
8064 (thread_db_find_new_threads): Ditto.
8065 (thread_db_init): Ditto.
8066 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8067 processes table. Adjust to use ptids.
8068 (spu_kill, spu_detach): Adjust interface. Remove process from
8069 processes table.
8070 (spu_join, spu_thread_alive): Adjust interface.
8071 (spu_wait): Adjust interface. Remove process from processes
8072 table. Adjust to use ptids.
8073 * win32-low.c (current_inferior_tid): Delete.
8074 (current_inferior_ptid): New.
8075 (debug_event_ptid): New.
8076 (thread_rec): Take a ptid. Adjust.
8077 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8078 (child_delete_thread): Ditto.
8079 (do_initial_child_stuff): Add `attached' argument. Add process to
8080 processes table.
8081 (child_fetch_inferior_registers, child_store_inferior_registers):
8082 Adjust.
8083 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8084 (win32_attach): Pass 1 to do_initial_child_stuff.
8085 (win32_kill): Adjust interface. Remove process from processes
8086 table.
8087 (win32_detach): Ditto.
8088 (win32_join): Adjust interface.
8089 (win32_thread_alive): Take a ptid.
8090 (win32_resume): Adjust to use ptids.
8091 (get_child_debug_event): Ditto.
8092 (win32_wait): Adjust interface. Remove exiting process from
8093 processes table.
8094
8095 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8096
8097 Non-stop mode support.
8098
8099 * server.h (non_stop): Declare.
8100 (gdb_client_data, handler_func): Declare.
8101 (delete_file_handler, add_file_handler, start_event_loop):
8102 Declare.
8103 (handle_serial_event, handle_target_event, push_event)
8104 (putpkt_notif): Declare.
8105 * target.h (enum resume_kind): New.
8106 (struct thread_resume): Replace `step' field by `kind' field.
8107 (TARGET_WNOHANG): Define.
8108 (struct target_ops) <wait>: Add `options' argument.
8109 <supports_non_stop, async, start_non_stop>: New fields.
8110 (target_supports_non_stop, target_async): New.
8111 (start_non_stop): Declare.
8112 (mywait): Add `options' argument.
8113 * target.c (mywait): Add `options' argument. Print child exit
8114 notifications here.
8115 (start_non_stop): New.
8116 * server.c (non_stop, own_buf, mem_buf): New globals.
8117 (struct vstop_notif): New.
8118 (notif_queue): New global.
8119 (queue_stop_reply, push_event, discard_queued_stop_replies)
8120 (send_next_stop_reply): New.
8121 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8122 interface changes.
8123 (attach_inferior): In non-stop mode, don't wait for the target
8124 here.
8125 (handle_general_set): Handle QNonStop.
8126 (handle_query): When handling qC, return the current general
8127 thread, instead of the first thread of the list.
8128 (handle_query): If the backend supports non-stop mode, include
8129 QNonStop+ in the qSupported query response.
8130 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8131 and non-stop mode.
8132 (handle_v_attach, handle_v_run): Handle non-stop mode.
8133 (handle_v_stopped): New.
8134 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8135 (myresume): Adjust to use resume_kind. Handle non-stop.
8136 (queue_stop_reply_callback): New.
8137 (handle_status): Handle non-stop mode.
8138 (main): Clear non_stop flag on reconnection. Use the event-loop.
8139 Refactor serial protocol handling from here ...
8140 (process_serial_event): ... to this new function. When GDB
8141 selects any thread, select one here. In non-stop mode, wait until
8142 GDB acks all pending events before exiting.
8143 (handle_serial_event, handle_target_event): New.
8144 * remote-utils.c (remote_open): Install remote_desc in the event
8145 loop.
8146 (remote_close): Remove remote_desc from the event loop.
8147 (putpkt_binary): Rename to...
8148 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8149 (putpkt_binary): New as wrapper around putpkt_binary_1.
8150 (putpkt_notif): New.
8151 (prepare_resume_reply): In non-stop mode, don't change the
8152 general_thread.
8153 * event-loop.c: New.
8154 * Makefile.in (OBJ): Add event-loop.o.
8155 (event-loop.o): New rule.
8156
8157 * linux-low.h (pid_of): Moved here.
8158 (lwpid_of): New.
8159 (get_lwp_thread): Use lwpid_of.
8160 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8161 * linux-low.c (pid_of): Delete.
8162 (inferior_pid): Use lwpid_of.
8163 (linux_event_pipe): New.
8164 (target_is_async_p): New.
8165 (delete_lwp): New.
8166 (handle_extended_wait): Use lwpid_of.
8167 (add_lwp): Don't set lwpid field.
8168 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8169 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8170 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8171 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8172 first. Adjust to linux_wait_for_event interface changes. Use
8173 lwpid_of.
8174 (linux_detach): Don't delete the main lwp here.
8175 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8176 (status_pending_p): Don't consider explicitly suspended lwps.
8177 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8178 pointer. Add OPTIONS argument. Change return type to int. Use
8179 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8180 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8181 pointer. Add status pointer argument. Return a pid instead of a
8182 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8183 changes. In non-stop mode, don't switch to a random thread.
8184 (linux_wait): Rename to...
8185 (linux_wait_1): ... this. Add target_options argument, and handle
8186 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8187 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8188 clean exit and signal exit code. Don't stop all threads in
8189 non-stop mode. In all-stop mode, only stop all threads when
8190 reporting a stop to GDB. Handle explicit thread stop requests.
8191 (async_file_flush, async_file_mark): New.
8192 (linux_wait): New.
8193 (send_sigstop): Use lwpid_of.
8194 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8195 interface changes. In non-stop mode, don't switch to a random
8196 thread.
8197 (linux_resume_one_lwp): Use lwpid_of.
8198 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8199 (linux_resume_one_thread): ... this. Handle resume_stop. In
8200 non-stop mode, don't look for pending flag in all threads.
8201 (resume_status_pending_p): Don't consider explicitly suspended
8202 threads.
8203 (my_waitpid): Reimplement. Emulate __WALL.
8204 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8205 Use lwpid_of.
8206 (sigchld_handler, linux_supports_non_stop, linux_async)
8207 (linux_start_non_stop): New.
8208 (linux_target_ops): Register linux_supports_non_stop, linux_async
8209 and linux_start_non_stop.
8210 (initialize_low): Install SIGCHLD handler.
8211 * thread-db.c (thread_db_create_event, find_one_thread)
8212 (thread_db_get_tls_address): Use lwpid_of.
8213 * win32-low.c (win32_detach): Adjust to use resume_kind.
8214 (win32_wait): Add `options' argument.
8215 * spu-low.c (spu_resume): Adjust to use resume_kind.
8216 (spu_wait): Add `options' argument.
8217
8218 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8219
8220 Decouple target code from remote protocol.
8221
8222 * target.h (enum target_waitkind): New.
8223 (struct target_waitstatus): New.
8224 (struct target_ops) <wait>: Return an unsigned long. Take a
8225 target_waitstatus pointer instead of a char pointer.
8226 (mywait): Likewise.
8227 * target.c (mywait): Change prototype to return an unsigned long.
8228 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8229 * server.h (thread_from_wait, old_thread_from_wait): Delete
8230 declarations.
8231 (prepare_resume_reply): Change prototype to take a
8232 target_waitstatus.
8233 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8234 (last_status, last_ptid): New.
8235 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8236 pid instead of a signal.
8237 (attach_inferior): Remove "status" and "signal" parameters.
8238 Adjust.
8239 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8240 not as an address.
8241 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8242 (handle_v_requests, myresume): Remove "status" and "signal"
8243 parameters. Adjust.
8244 (handle_status): New.
8245 (main): Delete local `status'. Adjust.
8246 * remote-utils.c: Include target.h.
8247 (prepare_resume_reply): Change prototype to take a
8248 target_waitstatus. Adjust.
8249
8250 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8251 interface.
8252 * spu-low.c (spu_wait): Adjust.
8253 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8254 Delete.
8255 (win32_wait): Adjust.
8256
8257 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8258
8259 * target.h (struct thread_resume): Delete leave_stopped member.
8260 (struct target_ops): Add a `n' argument to the `resume' callback.
8261 * server.c (start_inferior): Adjust.
8262 (handle_v_cont, myresume): Adjust.
8263 * linux-low.c (check_removed_breakpoint): Adjust to resume
8264 interface change, and to removed leave_stopped field.
8265 (resume_ptr): Delete.
8266 (struct thread_resume_array): New.
8267 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8268 resume interface change.
8269 (linux_continue_one_thread, linux_queue_one_thread)
8270 (resume_status_pending_p): Check if the resume field is NULL
8271 instead of checking the leave_stopped member.
8272 (linux_resume): Adjust to the target resume interface change.
8273 * spu-low.c (spu_resume): Adjust to the target resume interface
8274 change.
8275 * win32-low.c (win32_detach, win32_resume): Ditto.
8276
8277 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8278
8279 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8280 flag.
8281 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8282 pending.
8283 (linux_continue_one_thread): Only preserve the stepping flag if
8284 there's a pending breakpoint.
8285
8286 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8287
8288 * server.c (main): After the inferior having exited, call
8289 remote_close before exiting gdbserver.
8290
8291 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8292
8293 Fix size of FPSCR in Power 7 processors.
8294 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8295 (PPC_FEATURE_HAS_DFP): New #define.
8296 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8297 size of the FPSCR.
8298
8299 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8300
8301 * server.c (handle_query) Whitespace and formatting.
8302
8303 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8304
8305 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8306 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8307 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8308 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8309 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8310 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8311 Makefile.in, configure.ac: Fix whitespace throughout.
8312 * configure: Regenerate.
8313
8314 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8315
8316 * inferiors.c (find_inferior): Make it safe for the callback
8317 function to delete the currently iterated inferior.
8318
8319 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8320
8321 * Makefile.in (linuw_low_h): Move higher.
8322 (thread-db.o): Depend on $(linux_low_h).
8323
8324 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8325
8326 Rename "process" to "lwp" throughout.
8327
8328 * linux-low.c (all_processes): Rename to...
8329 (all_lwps): ... this.
8330 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8331 (add_process): Rename to ...
8332 (add_lwp): ... this. Adjust.
8333 (linux_create_inferior): Adjust.
8334 (linux_attach_lwp): Adjust.
8335 (linux_attach): Adjust.
8336 (linux_kill_one_process): Rename to ...
8337 (linux_kill_one_lwp): ... this. Adjust.
8338 (linux_kill): Adjust.
8339 (linux_detach_one_process): Rename to ...
8340 (linux_detach_one_lwp): ... this. Adjust.
8341 (linux_detach): Adjust.
8342 (check_removed_breakpoint): Adjust.
8343 (status_pending_p): Adjust.
8344 (linux_wait_for_process): Rename to ...
8345 (linux_wait_for_lwp): ... this. Adjust.
8346 (linux_wait_for_event): Adjust.
8347 (send_sigstop): Adjust.
8348 (wait_for_sigstop): Adjust.
8349 (stop_all_processes): Rename to ...
8350 (stop_all_lwps): ... this.
8351 (linux_resume_one_process): Rename to ...
8352 (linux_resume_one_lwp): ... this. Adjust.
8353 (linux_set_resume_request, linux_continue_one_thread)
8354 (linux_queue_one_thread, resume_status_pending_p)
8355 (usr_store_inferior_registers, regsets_store_inferior_registers)
8356 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8357 Adjust.
8358 * linux-low.h (get_process): Rename to ...
8359 (get_lwp): ... this. Adjust.
8360 (get_thread_process): Rename to ...
8361 (get_thread_lwp): ... this. Adjust.
8362 (get_process_thread): Rename to ...
8363 (get_lwp_thread): ... this. Adjust.
8364 (struct process_info): Rename to ...
8365 (struct lwp_info): ... this.
8366 (all_processes): Rename to ...
8367 (all_lwps): ... this.
8368 * proc-service.c (ps_lgetregs): Adjust.
8369 * thread-db.c (thread_db_create_event, find_one_thread)
8370 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8371
8372 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8373
8374 * server.c (handle_query): Handle "qAttached".
8375
8376 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8377
8378 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8379 GPLv3, update license URL.
8380
8381 2009-03-01 Doug Evans <dje@google.com>
8382
8383 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8384 (server_h): Add gdb_signals.h.
8385 (signals.o): Update.
8386 * server.h (target_signal_from_host,target_signal_to_host_p)
8387 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8388
8389 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8390
8391 * remote-utils.c (getpkt): Also generate remote-debug
8392 information if noack_mode is set.
8393
8394 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8395
8396 * server.c (handle_query): Report qXfer:siginfo:read and
8397 qXfer:siginfo:write as supported and handle them.
8398 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8399 * linux-low.c (linux_xfer_siginfo): New.
8400 (linux_target_ops): Set it.
8401
8402 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8403
8404 * server.c (gdbserver_usage): Mention --remote-debug.
8405 (main): Accept '--remote-debug' switch.
8406
8407 2009-01-18 Doug Evans <dje@google.com>
8408
8409 * regcache.c (new_register_cache): No need to check result of xcalloc.
8410 * server.c (handle_search_memory): Back out calls to xmalloc,
8411 result is checked and error is returned to user upon failure.
8412 (handle_query): Ditto. Add more checks for result of malloc.
8413 (handle_v_cont): Check result of malloc, report error back to
8414 user upon failure.
8415 (handle_v_run): Ditto. Call freeargv.
8416 * server.h (freeargv): Declare.
8417 * utils.c (freeargv): New fn.
8418
8419 2009-01-15 Doug Evans <dje@google.com>
8420
8421 * gdbreplay.c (perror_with_name): Make arg const char *.
8422 * server.h (target_signal_to_name): Make return type const char *.
8423 * thread-db.c (thread_db_err_str): Make return type const char *.
8424 * utils.c (perror_with_name): Make arg const char *.
8425
8426 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8427
8428 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8429 when handling a EXIT_PROCESS_DEBUG_EVENT.
8430
8431 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8432
8433 * gdbreplay.c (gdbreplay_version): Update copyright year.
8434 * server.c (gdbserver_version): Likewise.
8435
8436 2009-01-05 Doug Evans <dje@google.com>
8437
8438 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8439 (handle_extended_wait): Improve comment.
8440
8441 2008-12-13 Doug Evans <dje@google.com>
8442
8443 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8444 * server.h (ATTR_MALLOC): New macro.
8445 (xmalloc,xcalloc,xstrdup): Declare.
8446 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8447 * inferiors.c: Ditto.
8448 * linux-low.c: Ditto.
8449 * mem-break.c: Ditto.
8450 * regcache.c: Ditto.
8451 * remote-utils.c: Ditto.
8452 * server.c: Ditto.
8453 * target.c: Ditto.
8454 * win32-low.c: Ditto.
8455
8456 2008-12-12 Doug Evans <dje@google.com>
8457
8458 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8459 in debugging printf.
8460
8461 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8462
8463 2008-12-09 Doug Evans <dje@google.com>
8464
8465 * linux-low.h (struct process_info): Delete member tid, unused.
8466 * thread-db.c (find_one_thread): Update.
8467 (maybe_attach_thread): Update.
8468
8469 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8470
8471 * target.h (struct target_ops): Add qxfer_osdata member.
8472 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8473 and dirent.h.
8474 (linux_qxfer_osdata): New functions.
8475 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8476 callback.
8477 * server.c (handle_query): Handle "qXfer:osdata:read:".
8478 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8479 (buffer_xml_printf): New functions.
8480 * server.h (struct buffer): New.
8481 (buffer_grow_str, buffer_grow_str0): New macros.
8482 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8483 (buffer_xml_printf): Declare.
8484
8485 2008-11-24 Doug Evans <dje@google.com>
8486
8487 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8488
8489 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8490
8491 * server.c (handle_v_run): Always use the supplied argument list.
8492
8493 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8494
8495 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8496 (xtensa_regmap_table): Add entry for scompare1.
8497
8498 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8499
8500 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8501 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8502 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8503 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8504 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8505 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8506 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8507 XML target descriptions.
8508 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8509 when inferior is running on an ISA 2.05 or later processor. Add
8510 special case to return offset for full 64-bit slot of FPSCR when
8511 in 32-bits.
8512
8513 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8514
8515 * Makefile.in (SFILES, clean): Added sparc64 files.
8516 (reg-sparc64.o, reg-sparc64.c): New.
8517 * configure.srv (sparc*-*-linux*): New configuration.
8518 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8519 syscall arguments for SPARC.
8520 (regsets_store_inferior_registers): Likewise.
8521 * linux-sparc-low.c: New file.
8522
8523 2008-10-21 Doug Evans <dje@google.com>
8524
8525 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8526 (READLINE_DIR,READLINE_DEP): Delete.
8527 (INTERNAL_CFLAGS): Update.
8528 (LINTFLAGS): Update.
8529
8530 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8531
8532 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8533 whole argv from the last run, not just argv[0].
8534
8535 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8536
8537 * regcache.c (new_register_cache): Return NULL if the register
8538 cache size isn't known yet.
8539 (free_register_cache): Avoid dereferencing a NULL regcache.
8540
8541 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8542
8543 * configure.srv: Merge MIPS and MIPS64.
8544
8545 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8546
8547 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8548
8549 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8550
8551 * Makefile.in: Add required vsx dependencies.
8552
8553 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8554 Declare init_registers_powerpc_vsx32l.
8555 Declare init_registers_powerpc_vsx64l.
8556 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8557 (ppc_arch_setup): Check for VSX in hwcap.
8558 (ppc_fill_vsxregset): New function.
8559 (ppc_store_vsxregset): New function.
8560 Add new VSX entry in regset_info target_regsets.
8561
8562 * configure.srv: Add new VSX dependencies.
8563
8564 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8565
8566 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8567 (remote_open): Set or clear transport_is_reliable.
8568 (putpkt_binary): Don't expect acks in noack mode.
8569 (getpkt): Don't send ack/nac in noack mode.
8570 * server.c (handle_general_set): Handle QStartNoAckMode.
8571 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8572 qSupported.
8573 (main): Reset noack_mode on every connection.
8574 * server.h (noack_mode): Declare.
8575
8576 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8577
8578 * Makefile.in (GDBREPLAY_OBS): New variable.
8579 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8580
8581 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8582 Daniel Jacobowitz <dan@codesourcery.com>
8583
8584 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8585 (usr_store_inferior_registers): Likewise.
8586 (regsets_store_inferior_registers): Likewise.
8587
8588 2008-07-31 Rolf Jansen <rj@surtec.com>
8589 Pedro Alves <pedro@codesourcery.com>
8590
8591 * configure.ac: Check for memmem declaration.
8592 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8593 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8594 (disable_packet_qfThreadInfo): Unconditionally compile.
8595 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8596 * configure, config.in: Regenerate.
8597
8598 2008-07-28 Doug Kwan <dougkwan@google.com>
8599
8600 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8601 (linux_write_memory): Remove declaration of errno.
8602
8603 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8604
8605 * linux-low.c (handle_extended_wait): Do not use "status"
8606 variable uninitialized.
8607
8608 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8609
8610 * server.c (handle_v_attach): Inhibit reporting dll changes.
8611
8612 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8613
8614 * remote-utils.c (prepare_resume_reply): If requested, don't
8615 output "thread:TID" in the T stop reply.
8616
8617 * server.c (disable_packet_vCont, disable_packet_Tthread)
8618 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8619 (handle_query): If requested, disable support for qC, qfThreadInfo
8620 and qsThreadInfo.
8621 (handle_v_requests): If requested, disable support for vCont.
8622 (gdbserver_show_disableable): New.
8623 (main): Handle --disable-packet and --disable-packet=LIST.
8624
8625 * server.h (disable_packet_vCont, disable_packet_Tthread)
8626 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8627
8628 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8629
8630 * server.c (gdbserver_usage): Mention --version.
8631
8632 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8633
8634 * Makefile.in (gdbreplay.o): New rule.
8635
8636 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8637
8638 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8639 message, not gdbserver.
8640
8641 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8642 Nathan Sidwell <nathan@codesourcery.com>
8643 Joseph Myers <joseph@codesourcery.com>
8644
8645 * acinclude.m4: Include ../../config/acx.m4.
8646 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8647 * configure, config.in: Regenerate.
8648 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8649 * server.c (gdbserver_version): Print PKGVERSION.
8650 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8651 (main): Adjust gdbserver_usage calls.
8652 * gdbreplay.c (version, host_name): Add declarations.
8653 (gdbreplay_version, gdbreplay_usage): New.
8654 (main): Accept --version and --help options.
8655
8656 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8657
8658 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8659 (arm_breakpoint_at): Handle Thumb.
8660 (the_low_target): Add comment.
8661
8662 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8663
8664 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8665
8666 2008-05-09 Doug Evans <dje@google.com>
8667
8668 * server.h (decode_search_memory_packet): Declare.
8669 * remote-utils.c (decode_search_memory_packet): New fn.
8670 * server.c (handle_search_memory_1): New fn.
8671 (handle_search_memory): New fn.
8672 (handle_query): Process qSearch:memory packets.
8673
8674 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8675
8676 * regcache.c (registers_length): Remove.
8677 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8678 full register packet.
8679 * regcache.h (registers_length): Remove prototype.
8680 * server.h (PBUFSIZ): Define to 16384.
8681
8682 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8683
8684 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8685 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8686 powerpc-64l.o, and powerpc-altivec64l.o.
8687 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8688 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8689 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8690 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8691 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8692 to srv_xmlfiles.
8693
8694 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8695 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8696 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8697 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8698 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8699 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8700 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8701 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8702 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8703 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8704 (clean): Update.
8705
8706 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8707 (init_registers_powerpc_32l): ... this new prototype.
8708 (init_registers_powerpc_32): Remove, replace by ...
8709 (init_registers_powerpc_altivec32l): ... this new prototype.
8710 (init_registers_powerpc_e500): Remove, replace by ...
8711 (init_registers_powerpc_e500l): ... this new prototype.
8712 (init_registers_ppc64): Remove, replace by ...
8713 (init_registers_powerpc_64l): ... this new prototype.
8714 (init_registers_powerpc_64): Remove, replace by ...
8715 (init_registers_powerpc_altivec64l): ... this new prototype.
8716 (ppc_num_regs): Set to 73.
8717 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8718 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8719 (ppc_cannot_store_register): Handle orig_r3 and trap.
8720 (ppc_arch_setup): Update init_registers_... calls.
8721 (ppc_fill_gregset): Handle orig_r3 and trap.
8722
8723 * inferiors.c (clear_inferiors): Reset current_inferior.
8724
8725 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8726
8727 * acinclude.m4: Add override.m4.
8728 * configure: Regenerate.
8729
8730 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8731
8732 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8733 initial call to init_register_ppc64.
8734
8735 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8736
8737 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8738 single powerpc*-*-linux* case.
8739 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8740
8741 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8742
8743 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8744 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8745 from reg_xmlfiles.
8746 * linux-ppc-low.c: Include <elf.h>.
8747 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8748 (ppc_hwcap): New global variable.
8749 (ppc_regmap): Remove __SPE__ #ifdef sections.
8750 (ppc_regmap_e500): New global variable.
8751 (ppc_cannot_store_register): Update __SPE__ special case.
8752 (ppc_get_hwcap): New function.
8753 (ppc_arch_setup): Use it to determine whether inferior supports
8754 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8755 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8756 Do not access registers if target does not support AltiVec.
8757 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8758 Do not access registers if target does not support SPE.
8759 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8760
8761 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8762
8763 * linux-low.c (disabled_regsets, num_regsets): New.
8764 (use_regsets_p): Delete.
8765 (linux_wait_for_process): Clear disabled_regsets.
8766 (regsets_fetch_inferior_registers): Check and set it.
8767 (regsets_store_inferior_registers): Likewise.
8768 (linux_fetch_registers, linux_store_registers): Do not use
8769 use_regsets_p.
8770 (initialize_low): Allocate disabled_regsets.
8771
8772 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8773
8774 * Makefile.in (LIBOBJS): New.
8775 (OBS): Use LIBOBJS.
8776 (memmem.o): New rule.
8777 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8778 * configure: Regenerated.
8779
8780 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8781
8782 * server.c (handle_query): Never return "unsupported" for
8783 qXfer:features:read queries.
8784
8785 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8786
8787 * server.c (get_features_xml): Fix inverted condition.
8788 (handle_query): Always support qXfer:feature:read.
8789
8790 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8791
8792 * server.c (wrapper_argv): New.
8793 (start_inferior): Handle wrapper_argv. If set, expect an extra
8794 trap.
8795 (gdbserver_usage): Document --wrapper.
8796 (main): Parse --wrapper.
8797
8798 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8799
8800 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8801 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8802 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8803 (ppc_set_pc): Likewise.
8804 (ppc_arch_setup): New function.
8805 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8806 of collect_register.
8807 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8808
8809 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8810
8811 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8812 instead of linux-ppc64-low.o.
8813 * linux-ppc64-low.c: Remove file.
8814 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8815 (linux-ppc64-low.o): Remove rule.
8816
8817 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8818 (init_registers_powerpc_64): Likewise.
8819 (ppc_regmap): Conditionally define depending on __powerpc64__.
8820 (ppc_cannot_store_register): Do not special-case "fpscr" when
8821 compiled on __powerpc64__.
8822 (ppc_collect_ptrace_register): New function.
8823 (ppc_supply_ptrace_register): New function.
8824 (ppc_breakpoint): Change type to "unsigned int".
8825 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8826 (the_low_target): Conditionally provide initializers for the
8827 arch_setup member depending on __powerpc64__. Install
8828 collect_ptrace_register and supply_ptrace_register members.
8829
8830 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8831
8832 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8833 * server.c (gdbserver_xmltarget): Define.
8834 (get_features_xml): Use it to replace "target.xml" and arch_string.
8835
8836 * configure.srv: Remove srv_xmltarget. Add XML files that were
8837 mentioned there to srv_xmlfiles instead. Remove conditional tests
8838 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8839 srv_xmlfiles and srv_regobj to include all possible choices.
8840 * configure.ac (srv_xmltarget): Remove.
8841 (srv_xmlfiles): Do not add "target.xml".
8842 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8843 checks for supplementary target information.
8844 * configure: Regenerate.
8845 * Makefile.in (XML_TARGET): Remove.
8846 (target.xml): Remove rule.
8847 (clean): Do not clean up target.xml.
8848 (.PRECIOUS): Do not mention target.xml.
8849
8850 * target.h (struct target_ops): Remove arch_string member.
8851 * linux-low.c (linux_arch_string): Remove.
8852 (linux_target_ops): Remove arch_string initializer.
8853 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8854 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8855 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8856 * spu-low.c (spu_arch_string): Remove.
8857 (spu_target_ops): Remove arch_string initializer.
8858 * win32-low.c (win32_arch_string): Remove.
8859 (win32_target_ops): Remove arch_string initializer.
8860 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8861 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8862 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8863
8864 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8865
8866 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8867 by collect_ptrace_register and supply_ptrace_register hooks.
8868 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8869 instead of checking for the_low_target.left_pad_xfer.
8870 (usr_store_inferior_registers): Use collect_ptrace_register callback
8871 instead of checking for the_low_target.left_pad_xfer.
8872
8873 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8874 (s390_supply_ptrace_register): Likewise.
8875 (s390_fill_gregset): Call s390_collect_ptrace_register.
8876 (the_low_target): Update.
8877
8878 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8879 (ppc_supply_ptrace_register): Likewise.
8880 (the_low_target): Update.
8881
8882 * linux-i386-low.c (the_low_target): Update.
8883 * linux-x86-64-low.c (the_low_target): Update.
8884
8885 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8886
8887 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8888 reg-s390.o and reg-s390x.o.
8889
8890 * linux-low.c (new_inferior): New global variable.
8891 (linux_create_inferior, linux_attach): Set it.
8892 (linux_wait_for_process): Call the_low_target.arch_setup after the
8893 target has stopped for the first time.
8894 (initialize_low): Do not call the_low_target.arch_setup.
8895
8896 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8897 (s390_set_pc): Likewise.
8898 (s390_arch_setup): New function.
8899 (the_low_target): Use s390_arch_setup as arch_setup routine.
8900
8901 * regcache.c (realloc_register_cache): New function.
8902 (set_register_cache): Call it for each existing regcache.
8903
8904 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8905
8906 * server.h (init_registers): Remove prototype.
8907
8908 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8909 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8910 instead of init_registers ().
8911 * linux-arm-low.c (init_registers_arm): Add prototype.
8912 (init_registers_arm_with_iwmmxt): Likewise.
8913 (the_low_target): Add initializer for arch_setup field.
8914 * linux-cris-low.c (init_registers_cris): Add prototype.
8915 (the_low_target): Add initializer for arch_setup field.
8916 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8917 (the_low_target): Add initializer for arch_setup field.
8918 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8919 (the_low_target): Add initializer for arch_setup field.
8920 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8921 (the_low_target): Add initializer for arch_setup field.
8922 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8923 (the_low_target): Add initializer for arch_setup field.
8924 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8925 (the_low_target): Add initializer for arch_setup field.
8926 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8927 (init_registers_mips64_linux): Likewise.
8928 (the_low_target): Add initializer for arch_setup field.
8929 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8930 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8931 (the_low_target): Add initializer for arch_setup field.
8932 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8933 (init_registers_powerpc_64): Likewise.
8934 (the_low_target): Add initializer for arch_setup field.
8935 * linux-s390-low.c (init_registers_s390): Add prototype.
8936 (init_registers_s390x): Likewise.
8937 (the_low_target): Add initializer for arch_setup field.
8938 * linux-sh-low.c (init_registers_sh): Add prototype.
8939 (the_low_target): Add initializer for arch_setup field.
8940 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8941 (the_low_target): Add initializer for arch_setup field.
8942 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8943 (the_low_target): Add initializer for arch_setup field.
8944
8945 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8946 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8947 instead of init_registers ().
8948 * win32-arm-low.c (init_registers_arm): Add prototype.
8949 (the_low_target): Add initializer for arch_setup field.
8950 * win32-i386-low.c (init_registers_i386): Add prototype.
8951 (the_low_target): Add initializer for arch_setup field.
8952
8953 * spu-low.c (init_registers_spu): Add prototype.
8954 (initialize_low): Call initialie_registers_spu () instead of
8955 initialize_registers ().
8956
8957 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8958
8959 * server.c (handle_v_requests): When handling the vRun and vAttach
8960 packets, if already debugging a process, don't kill it. Return an
8961 error instead.
8962
8963 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8964
8965 * server.c (handle_query): Correct length check.
8966
8967 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8968
8969 * win32-low.c (do_initial_child_stuff): Add process handle
8970 parameter. Set current_process_handle and current_process_id from the
8971 parameters. Clear globals.
8972 (win32_create_inferior): Don't set current_process_handle and
8973 current_process_id here. Instead pass them on the call to
8974 do_initial_child_stuff.
8975 (win32_attach): Likewise.
8976 (win32_clear_inferiors): New.
8977 (win32_kill): Don't close the current process handle or the
8978 current thread handle here. Instead call win32_clear_inferiors.
8979 (win32_detach): Don't open a new handle to the process. Call
8980 win32_clear_inferiors.
8981 (win32_join): Don't rely on current_process_handle; open a new
8982 handle using the process id.
8983 (win32_wait): Call win32_clear_inferiors when the inferior process
8984 has exited.
8985
8986 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8987
8988 * server.c (monitor_show_help): Add "exit".
8989
8990 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8991
8992 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8993 (clean): Add reg-xtensa.c.
8994 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8995 * configure.srv (xtensa*-*-linux*) New target.
8996 * linux-xtensa-low.c: New.
8997 * xtensa-xtregs.c: New.
8998
8999 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9000
9001 * hostio.c: Don't include errno.h.
9002 (errno_to_fileio_errno): Move to hostio-errno.
9003 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9004 error number outputting to the target->hostio_last_error callback.
9005 (hostio_packet_error): Use FILEIO_EINVAL directly.
9006 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9007 calls to hostio_error.
9008 * hostio-errno.c: New.
9009 * server.h (hostio_last_error_from_errno): Declare.
9010 * target.h (target_ops): Add hostio_last_error member.
9011 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9012 as hostio_last_error handler.
9013 * spu-low.c (spu_target_ops): Likewise.
9014 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9015 (wince_hostio_last_error): New functions.
9016 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9017 as hostio_last_error handler.
9018 (win32_target_ops) [!_WIN32_WCE]: Register
9019 hostio_last_error_from_errno as hostio_last_error handler.
9020 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9021 (hostio-errno.o): New rule.
9022 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9023 * configure.srv (srv_hostio_err_objs): New variable. Default to
9024 hostio-errno.o.
9025 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9026 * configure: Regenerate.
9027
9028 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9029
9030 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9031 (linux_kill, linux_detach): Clean up the process list.
9032 * remote-utils.c (remote_open): Improve port number parsing.
9033 (putpkt_binary, input_interrupt): Only send interrupts if the target
9034 is running.
9035 * server.c (extended_protocol): Make static.
9036 (attached): Define earlier.
9037 (exit_requested, response_needed, program_argv): New variables.
9038 (target_running): New.
9039 (start_inferior): Clear attached here.
9040 (attach_inferior): Set attached here.
9041 (require_running): Define.
9042 (handle_query): Use require_running and target_running. Implement
9043 "monitor exit".
9044 (handle_v_attach, handle_v_run): New.
9045 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9046 (gdbserver_usage): Update.
9047 (main): Redo argument parsing. Handle --debug and --multi. Handle
9048 --attach along with other options or after the port. Save
9049 program_argv. Support no initial program. Resynchronize
9050 communication with GDB after an error. Handle "monitor exit".
9051 Use require_running and target_running. Always allow the extended
9052 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9053 restart in extended mode.
9054 * README: Refer to the GDB manual. Update --attach usage.
9055
9056 2007-12-20 Andreas Schwab <schwab@suse.de>
9057
9058 * linux-low.c (STACK_SIZE): Define.
9059 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9060 (linux_test_for_tracefork): Likewise.
9061
9062 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9063
9064 * linux-low.c (linux_wait_for_event): Update messages. Do not
9065 reinsert auto-delete breakpoints.
9066 * mem-break.c (struct breakpoint): Change return type of handler to
9067 int.
9068 (set_breakpoint_at): Update handler type.
9069 (reinsert_breakpoint_handler): Return 1 instead of calling
9070 delete_breakpoint.
9071 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9072 setting a new one.
9073 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9074 * mem-break.h (set_breakpoint_at): Update handler type.
9075 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9076 * win32-low.c (auto_delete_breakpoint): New.
9077 (get_child_debug_event): Use it.
9078
9079 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9080
9081 * configure.ac: Check for pread and pwrite.
9082 * hostio.c (handle_pread): Fall back to lseek and read.
9083 (handle_pwrite): Fall back to lseek and write.
9084 * config.in, configure: Regenerated.
9085
9086 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9087
9088 * server.c (myresume): Add own_buf argument.
9089 (main): Update calls.
9090
9091 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9092
9093 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9094 * remote-utils.c (remote_open): Do not call disable_async_io.
9095 (block_async_io): Delete.
9096 (unblock_async_io): Make static.
9097 (initialize_async_io): New.
9098 * server.c (handle_v_cont): Handle async I/O here.
9099 (myresume): Likewise. Move other common resume tasks here...
9100 (main): ... from here. Call initialize_async_io. Disable async
9101 I/O before the main loop.
9102 * server.h (initialize_async_io): Declare.
9103 (block_async_io, unblock_async_io): Delete prototypes.
9104 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9105
9106 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9107
9108 * remote-utils.c (readchar): Allow binary data in received messages.
9109
9110 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9111
9112 * win32-low.c (attaching): New global.
9113 (win32_create_inferior): Clear the `attaching' global.
9114 (win32_attach): Set the `attaching' global.
9115 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9116 attaching. Only set a breakpoint at the entry point if not
9117 attaching.
9118
9119 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9120
9121 * server.c (main): Don't report dll events on the initial
9122 connection on attaches.
9123
9124 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9125
9126 * server.c (main): Relax numerical bases supported for the pid of
9127 the --attach command line argument.
9128
9129 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9130
9131 * win32-low.c (win32_attach): Call OpenProcess before
9132 DebugActiveProcess, not after. Add last error output to error
9133 call.
9134
9135 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9136
9137 * win32-low.c (win32_get_thread_context)
9138 (win32_set_thread_context): New functions.
9139 (thread_rec): Use win32_get_thread_context.
9140 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9141 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9142 field.
9143
9144 2007-12-03 Leo Zayas
9145 Pedro Alves <pedro_alves@portugalmail.pt>
9146
9147 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9148 global variables.
9149 (child_add_thread): Minor cleanup.
9150 (child_continue): Resume artificially suspended threads before
9151 calling ContinueDebugEvent.
9152 (suspend_one_thread): New.
9153 (fake_breakpoint_event): New.
9154 (get_child_debug_event): Change return type to int. Check here if
9155 gdb sent an interrupt request. If a soft interrupt was requested,
9156 fake a breakpoint event. Return 0 if there is no event to handle,
9157 and 1 otherwise.
9158 (win32_wait): Don't check here if gdb sent an interrupt request.
9159 Ensure there is a valid event to handle.
9160 (win32_request_interrupt): Add soft interruption method as last
9161 resort.
9162
9163 2007-12-03 Leo Zayas
9164 Pedro Alves <pedro_alves@portugalmail.pt>
9165
9166 * win32-low.h (win32_thread_info): Add descriptions to the
9167 structure members. Replace `suspend_count' counter by a
9168 `suspended' flag.
9169 * win32-low.c (thread_rec): Update condition of when to get the
9170 context from the inferior. Rely on ContextFlags being set if it
9171 has already been retrieved. Only suspend the inferior thread if
9172 we haven't already. Warn if that fails.
9173 (continue_one_thread): s/suspend_count/suspended/. Only call
9174 ResumeThread once. Warn if that fails.
9175
9176 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9177
9178 * win32-low.c (win32_wait): Don't read from the inferior when it
9179 has already exited.
9180
9181 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9182
9183 * Makefile.in (win32_low_h): New variable.
9184 (win32-low.o): Add dependency on $(win32_low_h).
9185 (win32-arm-low.o, win32-i386-low.o): New rules.
9186
9187 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9188
9189 * hostio.c: Correct copyright year.
9190
9191 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9192
9193 * Makefile.in (OBS): Add hostio.o.
9194 (hostio.o): New rule.
9195 * server.h (handle_vFile): Declare.
9196 * hostio.c: New file.
9197 * server.c (handle_v_requests): Take packet_len and new_packet_len
9198 for binary packets. Call handle_vFile.
9199 (main): Update call to handle_v_requests.
9200
9201 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9202
9203 * linux-low.c: Include <sched.h>.
9204
9205 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9206
9207 * linux-low.c (linux_tracefork_grandchild): New.
9208 (linux_tracefork_child): Use clone.
9209 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9210
9211 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9212
9213 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9214
9215 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9216
9217 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9218
9219 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9220
9221 * inferiors.c (change_inferior_id): Delete.
9222 (add_pid_to_list, pull_pid_from_list): New.
9223 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9224 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9225 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9226 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9227 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9228 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9229 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9230 (using_threads): Always set to 1.
9231 (handle_extended_wait): New.
9232 (add_process): Do not set TID.
9233 (linux_create_inferior): Set must_set_ptrace_flags.
9234 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9235 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9236 (linux_thread_alive): Rename TID argument to LWPID.
9237 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9238 (linux_wait_for_event): Do not use TID or check using_threads. Update
9239 call to dead_thread_notify. Call handle_extended_wait.
9240 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9241 (send_sigstop): Delete sigstop_sent.
9242 (wait_for_sigstop): Avoid TID.
9243 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9244 (linux_test_for_tracefork): New.
9245 (linux_lookup_signals): Use thread_db_active and
9246 linux_supports_tracefork_flag.
9247 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9248 * linux-low.h (get_process_thread): Avoid TID.
9249 (struct process_ifo): Move thread_known and tid to the end. Remove
9250 sigstop_sent.
9251 (linux_attach_lwp, thread_db_init): Update prototypes.
9252 * server.h (change_inferior_id): Delete prototype.
9253 (add_pid_to_list, pull_pid_from_list): New prototypes.
9254 * thread-db.c (thread_db_use_events): New.
9255 (find_first_thread): Rename to...
9256 (find_one_thread): ...this. Update callers and messages. Do not
9257 call fatal. Check thread_db_use_events. Do not call
9258 change_inferior_id or new_thread_notify.
9259 (maybe_attach_thread): Update. Do not call new_thread_notify.
9260 (thread_db_init): Set thread_db_use_events. Check use_events.
9261 * utils.c (fatal, warning): Correct message prefix.
9262
9263 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9264
9265 * Makefile.in (clean): Remove new files.
9266 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9267 (powerpc-64.o, powerpc-64.c): New rules.
9268 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9269 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9270 with SPE.
9271 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9272 SPE targets.
9273 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9274 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9275 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9276 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9277 (target_regsets): Add AltiVec and SPE register sets.
9278 * configure.ac: Check for AltiVec and SPE.
9279 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9280 (ppc_fill_vrregset, ppc_store_vrregset): New.
9281 (target_regsets): Add AltiVec register set.
9282 * configure: Regenerated.
9283
9284 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9285
9286 * linux-low.c (O_LARGEFILE): Define.
9287 (linux_read_memory): Use /proc/PID/mem.
9288 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9289 * configure, config.in: Regenerated.
9290
9291 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9292
9293 * linux-low.c (linux_wait_for_event): Do not pass signals while
9294 single-stepping.
9295
9296 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9297
9298 * win32-low.c (create_process): New.
9299 (win32_create_inferior): Use create_process instead of
9300 CreateProcess. If create_process failed retry appending an ".exe"
9301 suffix. Store the GetLastError result immediatelly after
9302 create_process calls and use it on the call to error.
9303
9304 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9305
9306 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9307
9308 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9309
9310 * configure.ac: Switch license to GPLv3.
9311
9312 2007-08-01 Michael Snyder <msnyder@access-company.com>
9313
9314 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9315
9316 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9317
9318 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9319 typedef.
9320 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9321 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9322 CloseToolhelp32Snapshot.
9323 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9324 CloseToolhelp32Snapshot.
9325
9326 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9327
9328 * server.c (main): Check for inferior exit before main loop.
9329
9330 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9331
9332 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9333 instead of on tmp_desc.
9334
9335 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9336 Daniel Jacobowitz <dan@codesourcery.com>
9337
9338 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9339 (add_thread): Minor cleanups.
9340 (clear_inferiors): Move lower in the file. Clear the DLL
9341 list.
9342 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9343 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9344 (xml_escape_text): New.
9345 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9346 for qSupported.
9347 (handle_v_cont): Report errors.
9348 (gdbserver_version): Update.
9349 (main): Correct size of own_buf. Do not report initial DLL events.
9350 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9351 (unloaded_dll, xml_escape_text): New.
9352 * win32-low.c (enum target_waitkind): Update comments.
9353 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9354 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9355 (win32_EnumProcessModules, win32_GetModuleInformation)
9356 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9357 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9358 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9359 (win32_Module32First, win32_Module32Next, load_toolhelp)
9360 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9361 (get_child_debug_event): Handle DLL events.
9362 (win32_wait): Likewise.
9363
9364 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9365
9366 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9367 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9368
9369 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9370
9371 * win32-low.c (handle_output_debug_string): Ignore event if not
9372 waiting.
9373
9374 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9375
9376 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9377
9378 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9379
9380 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9381
9382 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9383
9384 * inferiors.c (change_inferior_id): Add comment.
9385 * linux-low.c (check_removed_breakpoint): Add an early
9386 prototype. Improve debug output.
9387 (linux_attach): Doc update.
9388 (linux_detach_one_process, linux_detach): Clean up before releasing
9389 each process.
9390 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9391 * linux-low.h (struct process_info): Doc improvement.
9392 * mem-break.c (delete_all_breakpoints): New.
9393 * mem-break.h (delete_all_breakpoints): New prototype.
9394 * thread-db.c (find_first_thread): New.
9395 (thread_db_create_event): Call it instead of
9396 thread_db_find_new_threads. Clean up unused variables.
9397 (maybe_attach_thread): Remove first thread handling.
9398 (thread_db_find_new_threads): Use find_first_thread.
9399 (thread_db_get_tls_address): Likewise.
9400
9401 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9402
9403 * thread-db.c (thread_db_find_new_threads): Add prototype.
9404 (thread_db_create_event): Check for the main thread before adding
9405 a new thread.
9406 (maybe_attach_thread): Only enable event reporting if TID == 0.
9407 (thread_db_get_tls_address): Check for new threads.
9408
9409 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9410
9411 * linux-low.c (linux_create_inferior): Try execv before execvp.
9412 * spu-low.c (spu_create_inferior): Likewise.
9413
9414 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9415
9416 * linux-low.c (linux_create_inferior): Change execv to execvp.
9417 * spu-low.c (spu_create_inferior): Likewies.
9418
9419 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9420
9421 * Makefile.in (clean): Clean new files instead of deleted ones.
9422 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9423 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9424 rules.
9425 * configure.srv: Specify XML files and new regformats for MIPS and
9426 MIPS64 GNU/Linux.
9427 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9428 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9429 an entry for the restart register.
9430 (mips_cannot_fetch_register, mips_cannot_store_register)
9431 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9432 register names to match the XML descriptions.
9433 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9434 restart register instead of $0.
9435
9436 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9437 Markus Deuling <deuling@de.ibm.com>
9438
9439 * remote-utils.c (decode_xfer_write): New function.
9440 * server.h (decode_xfer_write): Add prototype.
9441 * server.c (handle_query): Add PACKET_LEN argument. Support
9442 qXfer:spu:read and qXfer:spu:write packets.
9443 (main): Pass packet_len to handle_query.
9444 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9445 * target.h (target_ops): Add qxfer_spu.
9446
9447 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9448
9449 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9450 accessing non-seekable spufs files.
9451
9452 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9453
9454 * server.c (handle_query): Add reply for qC packet.
9455
9456 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9457 Leo Zayas <lerele@champenstudios@com>
9458
9459 * server.h (check_remote_input_interrupt_request): New function.
9460 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9461 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9462 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9463 (check_remote_input_interrupt_request): New function.
9464 * server.h (check_remote_input_interrupt_request): Declare.
9465 * win32-low.c (winapi_DebugBreakProcess,
9466 winapi_GenerateConsoleCtrlEvent): New typedefs.
9467 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9468 to 250 ms.
9469 (win32_wait): Check for remote interrupt request
9470 with check_remote_input_interrupt_request.
9471 (win32_request_interrupt): New function.
9472 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9473
9474 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9475
9476 * win32-low.c (debug_registers_changed,
9477 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9478 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9479 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9480 (thread_rec): Get context using the low target.
9481 (child_add_thread): Call thread_added on the low target,
9482 which does the same thing.
9483 (regptr): Delete.
9484 (do_initial_child_stuff): Remove debug registers references.
9485 Set context using the low target. Resume threads after
9486 setting the contexts.
9487 (child_continue): Remove dead variable. Remove debug
9488 registers references.
9489 (child_fetch_inferior_registers): Go through the low target.
9490 (do_child_store_inferior_registers): Remove.
9491 (child_store_inferior_registers): Go through the low target.
9492 (win32_resume): Remove debug registers references.
9493 Set context using the low target.
9494 (handle_exception): Change return type to void. Don't record
9495 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9496 first chance exception.
9497 (get_child_debug_event): Change return type to void. Remove
9498 goto loop. Always return after waiting for debug event.
9499 (win32_wait): Convert to switch statement. Handle spurious
9500 events.
9501
9502 * win32-i386-low.c (debug_registers_changed,
9503 debug_registers_used): New.
9504 (initial_stuff): Rename to ...
9505 (i386_initial_stuff): ... this. Clear debug registers
9506 state variables.
9507 (store_debug_registers): Delete.
9508 (i386_get_thread_context): New.
9509 (load_debug_registers): Delete.
9510 (i386_set_thread_context): New.
9511 (i386_thread_added): New.
9512 (single_step): Rename to ...
9513 (i386_single_step): ... this.
9514 (do_fetch_inferior_registers): Rename to ...
9515 (i386_fetch_inferior_register): ... this.
9516 (i386_store_inferior_register): New.
9517 (the_low_target): Adapt to new interface.
9518
9519 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9520 (arm_get_thread_context): New.
9521 (arm_set_thread_context): New.
9522 (regptr): New.
9523 (do_fetch_inferior_registers): Rename to ...
9524 (arm_fetch_inferior_register): ... this.
9525 (arm_store_inferior_register): New.
9526 (arm_wince_breakpoint): Reimplement as unsigned long.
9527 (arm_wince_breakpoint_len): Define.
9528 (the_low_target): Adapt to new interface.
9529
9530 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9531 load_debug_registers. Add get_thread_context, set_thread_context,
9532 thread_added and store_inferior_register. Rename
9533 fetch_inferior_registers to fetch_inferior_register.
9534 (regptr): Remove declaration.
9535
9536 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9537
9538 * linux-low.c (linux_detach): Change return type to int. Return 0.
9539 * spu-low.c (spu_detach): Likewise.
9540
9541 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9542
9543 * target.h (target_ops): Change return type of detach to int.
9544 Add join.
9545 (join_inferior): New.
9546 * server.c (main): Don't skip detach support on mingw32.
9547 If the inferior doesn't support detaching return error.
9548 Call join_inferior instead of using waitpid.
9549 * linux-low.c (linux_join): New.
9550 (linux_target_op): Add linux_join.
9551 * spu-low.c (spu_join): New.
9552 (spu_target_ops): Add spu_join.
9553 * win32-low.c (win32_detach): Adapt to new interface.
9554 Reopen current_process_handle before detaching. Issue a child
9555 resume before detaching.
9556 (win32_join): New.
9557 (win32_target_op): Add win32_join.
9558
9559 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9560
9561 * win32-low.c (win32-attach): Fix return value.
9562 * target.h (target_ops): Describe ATTACH return values.
9563
9564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9565
9566 * win32-low.c (GETPROCADDRESS): Define.
9567 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9568 (winapi_DebugSetProcessKillOnExit): Likewise.
9569 (win32_create_inferior): Force usage of ansi CreateProcessA.
9570 (win32_attach): Use GETPROCADDRESS.
9571 (win32_detach): Likewise.
9572
9573 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9574
9575 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9576
9577 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9578
9579 * win32-low.c: Commit leftover changes from 2007-03-29.
9580
9581 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9582
9583 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9584 fields short instead of int. Add explicit padding.
9585 (i387_cache_to_fsave): Remove unnecessary casts.
9586 (i387_fsave_to_cache): Doc fix.
9587 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9588
9589 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9590
9591 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9592 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9593
9594 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9595
9596 * configure.srv (arm*-*-mingw32ce*): Move near the other
9597 arm targets.
9598
9599 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9600
9601 * configure.ac: Add errno checking.
9602 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9603 sys/file.h and malloc.h.
9604 (AC_CHECK_DECLS): Add perror.
9605 (srv_mingwce): Handle.
9606 * configure.srv (i[34567]86-*-cygwin*): Add
9607 win32-i386-low.o to srv_tgtobj.
9608 (i[34567]86-*-mingw*): Likewise.
9609 (arm*-*-mingw32ce*): Add case.
9610 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9611 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9612 [__MINGW32CE__] (strerror): New function.
9613 [__MINGW32CE__] (errno): Define to GetLastError.
9614 [__MINGW32CE__] (COUNTOF): New macro.
9615 (remote_open): Remove extra close call.
9616 * mem-break.c (delete_breakpoint_at): New function.
9617 * mem-break.h (delete_breakpoint_at): Declare.
9618 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9619 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9620 [USE_WIN32API] (read, write): Add char* casts.
9621 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9622 * server.h: Include wincecompat.h on Windows CE.
9623 [HAVE_ERRNO_H]: Check.
9624 (perror): Declare if not declared.
9625 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9626 (perror_with_name): Remove errno declaration.
9627 * wincecompat.h: New.
9628 * wincecompat.c: New.
9629 * win32-low.h: New.
9630 * win32-arm-low.c: New.
9631 * win32-i386-low.c: New.
9632 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9633 (OUTMSG2): Make it safe.
9634 (_T): New macro.
9635 (COUNTOF): New macro.
9636 (NUM_REGS): Get it from the low target.
9637 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9638 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9639 (thread_rec): Let low target handle debug registers.
9640 (child_add_thread): Likewise.
9641 (child_init_thread_list): Likewise.
9642 (continue_one_thread): Likewise.
9643 (regptr): New.
9644 (do_child_fetch_inferior_registers): Move to ...
9645 * win32-i386-low.c: ... here, and rename to ...
9646 (do_fetch_inferior_registers): ... this.
9647 * win32-low.c (child_fetch_inferior_registers):
9648 Go through the low target.
9649 (do_child_store_inferior_registers): Use regptr.
9650 (strwinerror): New function.
9651 (win32_create_inferior): Handle Windows CE.
9652 Use strwinerror instead of strerror on Windows error
9653 codes. Add program to the error output.
9654 Don't close the main thread handle on Windows CE.
9655 (win32_attach): Use coredll.dll on Windows CE.
9656 (win32_kill): Close current process and current
9657 thread handles.
9658 (win32_detach): Use coredll.dll on Windows CE.
9659 (win32_resume): Let low target handle debug registers, and
9660 step request.
9661 (handle_exception): Add/Remove initial breakpoint. Avoid
9662 non-existant WSTOPSIG on Windows CE.
9663 (win32_read_inferior_memory): Cast to remove warning.
9664 (win32_arch_string): Go through the low target.
9665 (initialize_low): Call set_breakpoint_data with the low
9666 target's breakpoint.
9667 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9668 FOP_REGNUM, mappings): Move to ...
9669 * win32-i386-low.c: ... here.
9670 * win32-low.c (win32_thread_info): Move to ...
9671 * win32-low.h: ... here.
9672 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9673 win32-arm-low.c and wincecompat.c.
9674 (all:): Add $EXEEXT.
9675 (install-only:): Likewise.
9676 (gdbserver:): Likewise.
9677 (gdbreplay:): Likewise.
9678 * config.in: Regenerate.
9679 * configure: Regenerate.
9680
9681 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9682
9683 * win32-low.c: Rename typedef thread_info to
9684 win32_thread_info throughout.
9685
9686 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9687
9688 * win32-i386-low.c: Rename to ...
9689 * win32-low.c: ... this.
9690 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9691 * Makefile.in: Likewise.
9692
9693 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9694
9695 * remote-utils.c (monitor_output): Constify msg parameter.
9696 * server.h (monitor_output): Likewise.
9697 * win32-i386-low.c (handle_output_debug_string): New.
9698 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9699 handle_output_debug_string.
9700 (get_child_debug_event): Likewise.
9701
9702 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9703
9704 * server.c (main): Correct strtoul check.
9705
9706 2007-03-27 Jon Ringle <jon@ringle.org>
9707
9708 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9709
9710 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9711
9712 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9713
9714 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9715
9716 * terminal.h: Check HAVE_SGTTY_H.
9717
9718 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9719
9720 * remote-utils.c (remote_open): Print out the assigned port number.
9721
9722 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9723
9724 * remote-utils.c (monitor_output): New function.
9725 * server.c (debug_threads): Define here.
9726 (monitor_show_help): New function.
9727 (handle_query): Handle qRcmd.
9728 (main): Do not handle 'd' packet.
9729 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9730 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9731 of debug_threads.
9732
9733 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9734
9735 * Makefile.in (EXEEXT): New.
9736 (clean): Use $(EXEEXT).
9737
9738 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9739
9740 * target.h (target_ops): Rename send_signal to request_interrupt,
9741 and remove enum target_signal parameter.
9742 * linux-low.c (linux_request_interrupt): Rename from
9743 linux_send_signal, and always send SIGINT.
9744 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9745 and always send SIGINT.
9746 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9747 of send_signal.
9748 (input_interrupt): Likewise.
9749
9750 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9751
9752 * server.c (get_features_xml): Check if target implemented
9753 arch_string.
9754 * win32-i386-low.c (win32_arch_string): New.
9755 (win32_target_ops): Add win32_arch_string as arch_string member.
9756
9757 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9758
9759 * spu-low.c (spu_arch_string): New.
9760 (spu_target_ops): Add spu_arch_string.
9761
9762 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9763
9764 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9765 * configure.ac: Do not check for terminal.h.
9766 * configure, config.in: Regenerated.
9767
9768 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * Makefile.in (OBS): Add $(XML_BUILTIN).
9771 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9772 (clean): Update.
9773 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9774 (arm-with-iwmmxt.c): New.
9775 * config.in, configure: Regenerate.
9776 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9777 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9778 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9779 (arm*-*-linux*): Add iWMMXt and regset support.
9780 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9781 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9782 (arm_store_wmmxregset, target_regsets): New.
9783 * server.c (get_features_xml): Take annex argument. Check builtin
9784 XML documents.
9785 (handle_query): Handle multiple annexes.
9786
9787 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9788
9789 * remote-utils.c [USE_WIN32API] (read, write): Define.
9790 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9791 write.
9792
9793 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9794
9795 * linux-i386-low.c (the_low_target): Set arch_string.
9796 * linux-x86-64-low.c (the_low_target): Likewise.
9797 * linux-low.c (linux_arch_string): New.
9798 (linux_target_ops): Add it.
9799 * linux-low.h (struct linux_target_ops): Add arch_string.
9800 * server.c (write_qxfer_response): Use const void * for DATA.
9801 (get_features_xml): New.
9802 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9803 * target.h (struct target_ops): Add arch_string method.
9804
9805 2007-01-03 Denis Pilat <denis.pilat@st.com>
9806 Daniel Jacobowitz <dan@codesourcery.com>
9807
9808 * linux-low.c (linux_kill): Handle being called with no threads.
9809 * win32-i386-low.c (win32_kill): Likewise.
9810 (get_child_debug_event): Clear current_process_handle.
9811
9812 2006-12-30 Denis PILAT <denis.pilat@st.com>
9813 Daniel Jacobowitz <dan@codesourcery.com>
9814
9815 * remote-utils.c (remote_open): Check the type of specified
9816 serial port devices before opening them.
9817 * server.c (main): Kill the inferior if an error occurs during
9818 the first remote_open.
9819
9820 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9821
9822 * README: Update supported targets.
9823
9824 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9825
9826 * Makefile.in (clean): Remove reg-mips64.c.
9827 (reg-mips64.c, reg-mips64.o): New rules.
9828 * configure.srv: Handle mips64. Include regset support for mips.
9829 * linux-mips-low.c (union mips_register): New.
9830 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9831 (mips_breakpoint, mips_breakpoint_at): Use int.
9832 (mips_collect_register, mips_supply_register)
9833 (mips_collect_register_32bit, mips_supply_register_32bit)
9834 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9835 (mips_store_fpregset, target_regsets): New.
9836 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9837
9838 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9839
9840 * configure.srv: Add target "spu*-*-*".
9841 * Makefile.in (clean): Remove reg-spu.c.
9842 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9843 * spu-low.c: New file.
9844
9845 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9846
9847 * configure.ac: Correct td_thr_tls_get_addr test.
9848 * configure: Regenerated.
9849
9850 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9851
9852 * linux-low.c (linux_wait_for_event): Reformat. Use the
9853 pass_signals array.
9854 * remote-utils.c (decode_address_to_semicolon): New.
9855 * server.c (pass_signals, handle_general_set): New.
9856 (handle_query): Mention QPassSignals for qSupported.
9857 (main): Call handle_general_set.
9858 * server.h (pass_signals, decode_address_to_semicolon): New.
9859
9860 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9861
9862 * server.c (handle_query): Correct error handling for read_auxv.
9863
9864 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9865
9866 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9867 and srv_linux_thread_db to yes.
9868 * linux-s390-low.c (s390_fill_gregset): New function.
9869 (target_regsets): Define data structure.
9870
9871 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9872
9873 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9874 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9875 * config.in, configure: Regenerated.
9876 * inferiors.c (gdb_id_to_thread): New function.
9877 (gdb_id_to_thread_id): Use it.
9878 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9879 * linux-low.h (struct process_info): Add th member.
9880 (thread_db_get_tls_address): New prototype.
9881 * remote-utils.c (decode_address): Make non-static.
9882 * server.c (handle_query): Handle qGetTLSAddr.
9883 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9884 * target.h (struct target_ops): Add get_tls_address.
9885 * thread-db.c (maybe_attach_thread): Save the thread handle.
9886 (thread_db_get_tls_address): New.
9887
9888 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9891 (linux_resume_one_process): Take a siginfo_t *. Update all
9892 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9893 (struct pending_signals): Add a siginfo_t.
9894 (linux_wait_for_process): Always set last_status.
9895 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9896 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9897 * linux-low.h (struct process_info): Add last_status.
9898
9899 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9900
9901 * remote-utils.c (try_rle): New function.
9902 (putpkt_binary): Use it.
9903
9904 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9905
9906 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9907 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9908 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9909 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9910 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9911 point registers.
9912
9913 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9914
9915 * server.c (terminal_fd): New variable.
9916 (old_foreground_pgrp): Likewise.
9917 (restore_old_foreground_pgrp): New function.
9918 (start_inferior): Record the terminal file descriptor in terminal_fd
9919 and its original foreground group in old_foreground_pgrp. Register
9920 restore_old_foreground_pgrp with atexit().
9921
9922 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9923
9924 * server.c (handle_query): Correct qPart to qXfer.
9925
9926 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9927
9928 * configure.ac: Check for more headers which are missing on
9929 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9930 * configure.srv: Add Cygwin and mingw32.
9931 * remote-utils.c: Don't include headers unconditionally which
9932 are missing on mingw32. Include <winsock.h> for mingw32.
9933 (remote_open): Adjust for mingw32 support. Flush
9934 standard error after writing to it.
9935 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9936 (unblock_async_io, enable_async_io, disable_async_io)
9937 (readchar, getpkt): Update for Winsock support.
9938 (prepare_resume_reply): Expect a protocol signal number.
9939 * server.c: Disable <sys/wait.h> on mingw32.
9940 (start_inferior): Adjust for mingw32 support. Flush
9941 standard error after writing to it.
9942 (attach_inferior): Likewise. Use protocol signal
9943 numbers.
9944 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9945 and names.
9946 * win32-i386-low.c: New file.
9947 * Makefile.in (XM_CLIBS): Set.
9948 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9949 (win32-i386-low.o): New dependency rule.
9950 * linux-low.c (linux_wait): Use target signal numbers.
9951 * target.h (struct target_ops): Doc fix.
9952 * server.h (target_signal_to_name): New prototype.
9953 * gdbreplay.c: Don't include headers unconditionally which
9954 are missing on mingw32. Include <winsock.h> for mingw32.
9955 (remote_close, remote_open): Adjust for Winsock support.
9956 * configure, config.in: Regenerated.
9957
9958 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9959
9960 * server.c (decode_xfer_read, write_qxfer_response): New.
9961 (handle_query): Take a packet length argument. Handle
9962 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9963 the qSupported response.
9964 (main): Update call to handle_query.
9965
9966 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9967
9968 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9969 (putpkt_binary): Renamed from putpkt and adjusted for binary
9970 data.
9971 (putpkt): New wrapper for putpkt_binary.
9972 (readchar): Don't mask off the high bit.
9973 (decode_X_packet): New function.
9974 * server.c (main): Call putpkt_binary if a handler sets the packet
9975 length. Save the length of the incoming packet. Handle 'X'.
9976 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9977
9978 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9979
9980 * server.c (handle_query): Handle qSupported.
9981
9982 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9983
9984 * remote-utils.c (all_symbols_looked_up): New variable.
9985 (look_up_one_symbol): Check it.
9986 * server.h (look_up_one_symbol): New declaration.
9987 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9988
9989 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9990
9991 * Makefile.in (linux-arm-low.o): Update dependencies.
9992 * linux-arm-low.c: Include "gdb_proc_service.h".
9993 (PTRACE_GET_THREAD_AREA): Define.
9994 (ps_get_thread_area): New function.
9995
9996 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9997
9998 * configure.srv (m68k*-*-uclinux*): New target.
9999 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10000 (linux_resume_one_process): Remove extraneous cast.
10001 (linux_read_offsets): New.
10002 (linux_target_op): Add linux_read_offsets on mmuless systems.
10003 * server.c (handle_query): Add qOffsets logic.
10004 * target.h (struct target_ops): Add read_offsets.
10005
10006 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10007
10008 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10009 (PTRACE_GET_THREAD_AREA): Define.
10010 (ps_get_thread_area): New function.
10011 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10012 (linux-x86-64-low.o): Update.
10013
10014 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10015
10016 * configure.ac: Remove checks for prfpregset_t.
10017 * gdb_proc_service.h: New file.
10018 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10019 new "gdb_proc_service.h".
10020 * proc-service.c: Likewise.
10021 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10022 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10023 * Makefile.in (gdb_proc_service_h): Updated.
10024 * configure, config.in: Regenerated.
10025
10026 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10027
10028 * remote-utils.c (prepare_resume_reply): Move declaration
10029 of gdb_id_from_wait to the top of the block.
10030
10031 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10032
10033 * linux-low.c (regsets_store_inferior_registers): Read the regset
10034 from the target before filling it.
10035
10036 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10037
10038 * server.c (attach_inferior): Return SIGTRAP for a successful
10039 attach.
10040
10041 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10042
10043 * Makefile.in (OBS): Add version.o.
10044 (STAGESTUFF): Delete.
10045 (version.o): Add dependencies.
10046 (version.c): Replace rule.
10047 (clean): Remove version.c.
10048 * server.c (gdbserver_version): New.
10049 (gdbserver_usage): Use printf.
10050 (main): Handle --version and --help.
10051 * server.h (version, host_name): Add declarations.
10052
10053 2005-12-23 Eli Zaretskii <eliz@gnu.org>
10054
10055 * linux-arm-low.c:
10056 * linux-arm-low.c:
10057 * inferiors.c:
10058 * i387-fp.h:
10059 * i387-fp.c:
10060 * gdbreplay.c:
10061 * regcache.c:
10062 * proc-service.c:
10063 * mem-break.h:
10064 * mem-break.c:
10065 * linux-x86-64-low.c:
10066 * linux-sh-low.c:
10067 * linux-s390-low.c:
10068 * linux-ppc64-low.c:
10069 * linux-ppc-low.c:
10070 * linux-mips-low.c:
10071 * linux-m68k-low.c:
10072 * linux-m32r-low.c:
10073 * linux-low.h:
10074 * linux-low.c:
10075 * linux-ia64-low.c:
10076 * linux-i386-low.c:
10077 * linux-crisv32-low.c:
10078 * thread-db.c:
10079 * terminal.h:
10080 * target.h:
10081 * target.c:
10082 * server.h:
10083 * server.c:
10084 * remote-utils.c:
10085 * regcache.h:
10086 * utils.c:
10087 * Makefile.in:
10088 * configure.ac:
10089 * gdbserver.1: Add (C) after Copyright. Update the FSF
10090 address.
10091
10092 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10093
10094 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10095 (arm_breakpoint_at): Recognize both breakpoints.
10096 (the_low_target): Use the correct breakpoint instruction.
10097
10098 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10099
10100 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10101 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10102 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10103 (the_low_target): Update.
10104
10105 2005-10-25 Andreas Schwab <schwab@suse.de>
10106
10107 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10108
10109 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10110 (ia64_num_regs): Reduce to 462.
10111
10112 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10113
10114 * acinclude.m4: Correct quoting.
10115 * aclocal.m4: Regenerated.
10116
10117 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10118 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10119 (thread_db_init): Call thread_db_err_str.
10120 * configure.ac: Check for TD_VERSION.
10121 * config.in, configure: Regenerated.
10122
10123 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10124
10125 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10126
10127 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10128
10129 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10130 is not available. Define HAVE_PTRACE_GETREGS if it is.
10131 * config.in, configure: Regenerated.
10132 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10133 * linux-i386-low.c, linux-m68k-low.c: Update to use
10134 HAVE_PTRACE_GETREGS.
10135 * linux-low.c (regsets_fetch_inferior_registers)
10136 (regsets_store_inferior_registers): Only return 0 if we processed
10137 GENERAL_REGS.
10138 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10139 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10140
10141 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * inferiors.c (struct thread_info): Add gdb_id.
10144 (add_thread): Add gdb_id argument.
10145 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10146 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10147 calls to add_thread.
10148 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10149 * server.c (handle_query): Use thread_to_gdb_id.
10150 (handle_v_cont, main): Use gdb_id_to_thread_id.
10151 * server.h (add_thread): Update prototype.
10152 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10153 prototypes.
10154
10155 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10156
10157 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10158 left-padded registers.
10159 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10160 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10161
10162 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10163
10164 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10165 * configure: Regenerate.
10166 * config.in: Regenerate.
10167 * server.h (NEED_DECLARATION_STRERROR):
10168 Replace with !HAVE_DECL_STRERROR.
10169
10170 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10171
10172 * linux-low.c (linux_wait, linux_send_signal): Don't test
10173 an unsigned long variable for > 0 if it could be MAX_ULONG.
10174 * server.c (myresume): Likewise.
10175 * target.c (set_desired_inferior): Likewise.
10176
10177 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10178
10179 * configure.ac: Simplify and improve check for socklen_t.
10180 * configure, config.in: Regenerate.
10181
10182 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10183
10184 * acconfig.h: Remove.
10185 * configure.ac: Add a test for socklen_t. Use three-argument
10186 AC_DEFINE throughout.
10187 * config.in: Regenerated using autoheader 2.59.
10188 * configure: Regenerated.
10189
10190 * gdbreplay.c (socklen_t): Provide a default.
10191 (remote_open): Use socklen_t.
10192 * remote-utils.c (socklen_t): Provide a default.
10193 (remote_open): Use socklen_t.
10194 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10195 unsigned char.
10196
10197 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10198 char for buffers.
10199 * linux-low.c (linux_read_memory, linux_write_memory)
10200 (linux_read_auxv): Likewise.
10201 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10202 (check_mem_write): Likewise.
10203 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10204 Likewise.
10205 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10206 (registers_from_string, register_data): Likewise.
10207 * server.c (handle_query, main): Likewise.
10208 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10209 (decode_M_packet): Likewise.
10210 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10211 * target.h (struct target_ops): Update read_memory, write_memory,
10212 and read_auxv.
10213 (read_inferior_memory, write_inferior_memory): Update.
10214 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10215 to unsigned char *.
10216 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10217 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10218 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10219 linux-s390-low.c, linux-sh-low.c: Update for changes in
10220 read_inferior_memory and the_low_target->breakpoint.
10221
10222 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10223
10224 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10225 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10226 * configure.srv: Add powerpc64-*-linux*.
10227 * linux-ppc64-low.c: New file.
10228
10229 2005-05-23 Orjan Friberg <orjanf@axis.com>
10230
10231 * linux-cris-low.c: New file with support for CRIS.
10232 * linux-crisv32-low.c: Ditto for CRISv32.
10233 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10234 (clean): Add reg-cris.c and reg-crisv32.c.
10235 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10236 reg-crisv32.o, and reg-crisv32.c to make rules.
10237 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10238 recognized targets.
10239
10240 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10241
10242 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10243 of sizeof (PTRACE_XFER_TYPE).
10244 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10245
10246 2005-05-12 Orjan Friberg <orjanf@axis.com>
10247
10248 * target.h (struct target_ops): Add insert_watchpoint,
10249 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10250 pointers for hardware watchpoint support.
10251 * linux-low.h (struct linux_target_ops): Ditto.
10252 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10253 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10254 to linux_target_ops.
10255 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10256 reply packet.
10257 * server.c (main): Recognize 'Z' and 'z' packets.
10258
10259 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10260
10261 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10262 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10263 (the_low_target): Add new members.
10264
10265 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10266
10267 * proc-service.c (ps_lgetregs): Search all_processes instead of
10268 all_threads.
10269
10270 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10271
10272 * server.c (start_inferior): Change return type to int.
10273 (attach_inferior): Change sigptr to int *.
10274 (handle_v_cont, handle_v_requests): Change signal to int *.
10275 (main): Change signal to int.
10276
10277 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10278
10279 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10280 * configure.srv: Add m32r*-*-linux*.
10281 * linux-m32r-low.c: New file.
10282
10283 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10284
10285 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10286
10287 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10288
10289 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10290 Take unsigned long arguments for PIDs.
10291 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10292 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10293 (wait_for_sigstop, linux_resume_one_process)
10294 (regsets_fetch_inferior_registers, linux_send_signal)
10295 (linux_read_auxv): Likewise. Update the types of variables holding
10296 PIDs. Update format string specifiers.
10297 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10298 * remote-utils.c (prepare_resume_reply): Likewise.
10299 * server.c (cont_thread, general_thread, step_thread)
10300 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10301 unsigned long.
10302 (handle_query): Update format specifiers.
10303 (handle_v_cont, main): Use strtoul for thread IDs.
10304 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10305 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10306 (general_thread, step_thread, thread_from_wait)
10307 (old_thread_from_wait): Update.
10308 * target.h (struct thread_resume): Use unsigned long for THREAD.
10309 (struct target_ops): Use unsigned long for arguments to attach and
10310 thread_alive.
10311
10312 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10313
10314 * acinclude.m4: Include bfd/bfd.m4 directly.
10315 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10316 <agriffis@toolchain.org>.
10317 * aclocal.m4, configure: Regenerated.
10318
10319 2005-01-07 Andrew Cagney <cagney@gnu.org>
10320
10321 * configure.ac: Rename configure.in, require autoconf 2.59.
10322 * configure: Re-generate.
10323
10324 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10325
10326 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10327 LIBS when finished.
10328 * aclocal.m4: Regenerated.
10329 * configure: Regenerated.
10330
10331 2004-11-21 Andreas Schwab <schwab@suse.de>
10332
10333 * linux-m68k-low.c (m68k_num_gregs): Define.
10334 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10335 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10336 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10337 (m68k_breakpoint_at): New. Add to the_low_target.
10338
10339 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10340 srv_linux_thread_db to yes.
10341
10342 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10343
10344 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10345 (ARCH_SET_FS): Likewise.
10346 (ARCH_GET_FS): Likewise.
10347 (ARCH_GET_GS): Likewise.
10348
10349 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10350
10351 * linux-i386-low.c (ps_get_thread_area): New.
10352 * linux-x86-64-low.c (ps_get_thread_area): New.
10353 * linux-low.c: Include <sys/syscall.h>.
10354 (linux_kill_one_process): Don't kill the first thread here.
10355 (linux_kill): Kill the first thread here.
10356 (kill_lwp): New function.
10357 (send_sigstop, linux_send_signal): Use it.
10358 * proc-service.c: Clean up #ifdefs.
10359 (fpregset_info): Delete.
10360 (ps_lgetregs): Update and enable implementation.
10361 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10362 implementations.
10363 * remote-utils.c (struct sym_cache, symbol_cache): New.
10364 (input_interrupt): Print a clearer message.
10365 (async_io_enabled): New variable.
10366 (enable_async_io, disable_async_io): Use it. Update comments.
10367 (look_up_one_symbol): Use the symbol cache.
10368 * thread-db.c (thread_db_look_up_symbols): New function.
10369 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10370
10371 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10372
10373 * configure.in: Test for -rdynamic.
10374 * configure: Regenerated.
10375 * Makefile (INTERNAL_LDFLAGS): New.
10376 (gdbserver, gdbreplay): Use it.
10377
10378 2004-09-02 Andrew Cagney <cagney@gnu.org>
10379
10380 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10381
10382 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10383
10384 * linux-low.c (linux_wait): Clear all_processes list also.
10385
10386 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10387
10388 * linux-low.c: Include <errno.h>. Remove extern declaration of
10389 errno.
10390
10391 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10392
10393 * gdbreplay.c, server.h, utils.c: Update copyright years.
10394
10395 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10396
10397 * server.c (main): Print child status or termination signal from
10398 variable 'signal', not 'sig'.
10399
10400 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10401
10402 * linux-low.c (linux_read_memory): Change return type to
10403 int. Check for and return error from ptrace().
10404 * target.c (read_inferior_memory): Change return type to int. Pass
10405 back return status from the_target->read_memory().
10406 * target.h (struct target_ops): Adapt *read_memory() prototype.
10407 Update comment.
10408 (read_inferior_memory): Adapt prototype.
10409 * server.c (main): Return an error packet if
10410 read_inferior_memory() returns an error.
10411
10412 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10413
10414 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10415 Unify with other clean targets.
10416
10417 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10418
10419 * server.c (handle_v_cont): Call set_desired_inferior.
10420
10421 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10422
10423 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10424
10425 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10426
10427 * linux-low.c (linux_wait): Unblock async I/O.
10428 (linux_resume): Block and enable async I/O.
10429 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10430 * server.h (block_async_io, unblock_async_io): Add prototypes.
10431
10432 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10433
10434 * remote-utils.c (remote_open): Print a status notice after
10435 opening a TCP port.
10436 * server.c (attach_inferior): Print a status notice after
10437 attaching.
10438
10439 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10440
10441 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10442
10443 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10444
10445 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10446 error packet.
10447 * server.c, target.h: Update copyright years.
10448
10449 2004-02-25 Roland McGrath <roland@redhat.com>
10450
10451 * target.h (struct target_ops): New member `read_auxv'.
10452 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10453 * linux-low.c (linux_read_auxv): New function.
10454 (linux_target_ops): Initialize `read_auxv' member to that.
10455
10456 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10457
10458 Committed by Jim Blandy <jimb@redhat.com>.
10459
10460 * linux-s390-low.c (s390_num_regs): Update.
10461 (s390_regmap): Remove control registers. Use __s390x__ predefine
10462 instead of GPR_SIZE to distiguish s390 and s390x targets.
10463
10464 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10465
10466 * linux-low.c: Update copyright year.
10467 (check_removed_breakpoint): Clear pending_is_breakpoint.
10468 (linux_set_resume_request, linux_queue_one_thread)
10469 (resume_status_pending_p): New functions.
10470 (linux_continue_one_thread): Use process->resume.
10471 (linux_resume): Only resume threads if there are no pending events.
10472 * linux-low.h (struct process_info): Add resume request
10473 pointer.
10474
10475 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10476
10477 * regcache.c (new_register_cache): Clear the allocated register
10478 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10479
10480 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10481
10482 * linux-low.c (linux_resume): Take a struct thread_resume *
10483 argument.
10484 (linux_wait): Update call.
10485 (resume_ptr): New static variable.
10486 (linux_continue_one_thread): Renamed from
10487 linux_continue_one_process. Use resume_ptr.
10488 (linux_resume): Use linux_continue_one_thread.
10489 * server.c (handle_v_cont, handle_v_requests): New functions.
10490 (myresume): New function.
10491 (main): Handle 'v' case.
10492 * target.h (struct thread_resume): New type.
10493 (struct target_ops): Change argument of "resume" to struct
10494 thread_resume *.
10495 (myresume): Delete macro.
10496
10497 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10498
10499 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10500 (uninstall): Support DESTDIR.
10501
10502 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10503
10504 * configure.srv: Add xscale*linux copy of arm*linux entry.
10505
10506 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10507
10508 * linux-arm-low.c (arm_reinsert_addr): New function.
10509 (the_low_target): Add arm_reinsert_addr.
10510
10511 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10512
10513 * mem-break.c: Remove whitespace at end of file.
10514
10515 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10516
10517 * configure.in: Check whether we need to prototype strerror.
10518 * server.h: Optionally prototype strerror.
10519 * gdbreplay.c (perror_with_name): Use strerror.
10520 * linux-low.c (linux_attach_lwp): Use strerror.
10521 * utils.c (perror_with_name): Use strerror.
10522 * config.in, configure: Regenerated.
10523
10524 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10525
10526 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10527 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10528
10529 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10530
10531 * Makefile.in (SFILES): Update.
10532 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10533 low-sun3.c: Remove files.
10534
10535 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10536
10537 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10538 (linux_detach_one_process, linux_detach): New functions.
10539 (linux_target_ops): Add linux_detach.
10540 * server.c (main): Handle 'D' packet.
10541 * target.h (struct target_ops): Add "detach" member.
10542 (detach_inferior): Define.
10543
10544 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10545
10546 From Kelley Cook <kelleycook@wideopenwest.com>:
10547 * configure.srv: Accept i[34567]86 variants.
10548
10549 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10550
10551 * linux-low.c (linux_wait_for_event): Correct comment typos.
10552 (linux_resume_one_process): Call check_removed_breakpoint.
10553 (linux_send_signal): New function.
10554 (linux_target_ops): Add linux_send_signal.
10555 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10556 of kill.
10557 * target.h (struct target_ops): Add send_signal.
10558
10559 2003-05-29 Jim Blandy <jimb@redhat.com>
10560
10561 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10562 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10563 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10564 away part of the register's value.
10565
10566 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10567
10568 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10569 (linux_wait_for_event, linux_init_signals): Likewise.
10570
10571 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10572
10573 * configure.in: Check for stdlib.h.
10574 * configure: Regenerated.
10575 * config.in: Regenerated.
10576
10577 2003-01-04 Andreas Schwab <schwab@suse.de>
10578
10579 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10580
10581 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10582
10583 * Makefile.in: Remove obsolete code.
10584
10585 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10586
10587 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10588 defined(PT_FPR0_HI).
10589
10590 2002-11-17 Stuart Hughes <seh@zee2.com>
10591
10592 * linux-arm-low.c (arm_num_regs): Increase.
10593 (arm_regmap): Include status register.
10594
10595 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10596
10597 * linux-low.c (register_addr): Remove incorrect -1 check.
10598
10599 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10600
10601 * linux-low.c (linux_create_inferior): Call setpgid. Return
10602 the new PID.
10603 (unstopped_p, linux_signal_pid): Remove.
10604 (linux_target_ops): Remove linux_signal_pid.
10605 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10606 global instead of target method.
10607 * target.h (struct target_ops): Remove signal_pid. Update comment
10608 for create_inferior.
10609 * server.c (signal_pid): New variable.
10610 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10611 gdbserver. Set the child to be the foreground process group.
10612 (attach_inferior): Set signal_pid.
10613
10614 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10615
10616 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10617
10618 2002-08-20 Jim Blandy <jimb@redhat.com>
10619
10620 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10621 default for this.
10622
10623 2002-08-01 Andrew Cagney <cagney@redhat.com>
10624
10625 * Makefile.in: Make chill references obsolete.
10626
10627 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10628
10629 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10630 * configure: Regenerate.
10631 * config.in: Regenerate.
10632
10633 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10634
10635 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10636 (perror_with_name, remote_close, remote_open, expect, play): Static.
10637
10638 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10639
10640 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10641 byte offsets instead of an array of indexes.
10642 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10643
10644 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10645
10646 * regcache.c: Add comment.
10647
10648 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10649
10650 * thread-db.c: New file.
10651 * proc-service.c: New file.
10652 * acinclude.m4: New file.
10653 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10654 proc-service.o, and thread-db.o.
10655 (linux-low.o): Add USE_THREAD_DB.
10656 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10657 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10658 * aclocal.m4: Regenerated.
10659 * config.in: Regenerated.
10660 * configure: Regenerated.
10661 * configure.in: Check for proc_service.h, sys/procfs.h,
10662 thread_db.h, and linux/elf.h headrs.
10663 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10664 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10665 Check for -lthread_db and thread support.
10666 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10667 PowerPC, and SuperH.
10668 * i387-fp.c: Constify arguments.
10669 * i387-fp.h: Likewise.
10670 * inferiors.c: (struct thread_info): Renamed from
10671 `struct inferior_info'. Remove PID member. Use generic inferior
10672 list header. All uses updated.
10673 (inferiors, signal_pid): Removed.
10674 (all_threads): New variable.
10675 (get_thread): Define.
10676 (add_inferior_to_list): New function.
10677 (for_each_inferior): New function.
10678 (change_inferior_id): New function.
10679 (add_inferior): Removed.
10680 (remove_inferior): New function.
10681 (add_thread): New function.
10682 (free_one_thread): New function.
10683 (remove_thread): New function.
10684 (clear_inferiors): Use for_each_inferior and free_one_thread.
10685 (find_inferior): New function.
10686 (find_inferior_id): New function.
10687 (inferior_target_data): Update argument type.
10688 (set_inferior_target_data): Likewise.
10689 (inferior_regcache_data): Likewise.
10690 (set_inferior_regcache_data): Likewise.
10691 * linux-low.c (linux_bp_reinsert): Remove.
10692 (all_processes, stopping_threads, using_thrads)
10693 (struct pending_signals, debug_threads, pid_of): New.
10694 (inferior_pid): Replace with macro.
10695 (struct inferior_linux_data): Remove.
10696 (get_stop_pc, add_process): New functions.
10697 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10698 Use add_process and add_thread.
10699 (linux_attach_lwp): New function, based on old linux_attach. Use
10700 add_process and add_thread. Set stop_expected for new threads.
10701 (linux_attach): New function.
10702 (linux_kill_one_process): New function.
10703 (linux_kill): Kill all LWPs.
10704 (linux_thread_alive): Use find_inferior_id.
10705 (check_removed_breakpoints, status_pending_p): New functions.
10706 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10707 Update. Use WNOHANG. Wait for cloned processes also. Update process
10708 struct for the found process.
10709 (linux_wait_for_event): New function.
10710 (linux_wait): Use it. Support LWPs.
10711 (send_sigstop, wait_for_sigstop, stop_all_processes)
10712 (linux_resume_one_process, linux_continue_one_process): New functions.
10713 (linux_resume): Support LWPs.
10714 (REGISTER_RAW_SIZE): Remove.
10715 (fetch_register): Use register_size instead. Call supply_register.
10716 (usr_store_inferior_registers): Likewise. Call collect_register.
10717 Fix recursive case.
10718 (regsets_fetch_inferior_registers): Improve error message.
10719 (regsets_store_inferior_registers): Add debugging.
10720 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10721 (unstopped_p, linux_signal_pid): New functions.
10722 (linux_target_ops): Add linux_signal_pid.
10723 (linux_init_signals): New function.
10724 (initialize_low): Call it. Initialize using_threads.
10725 * regcache.c (inferior_regcache_data): Add valid
10726 flag.
10727 (get_regcache): Fetch registers lazily. Add fetch argument
10728 and update all callers.
10729 (regcache_invalidate_one, regcache_invalidate): New
10730 functions.
10731 (new_register_cache): Renamed from create_register_cache.
10732 Return the new regcache.
10733 (free_register_cache): Change argument to a void *.
10734 (registers_to_string, registers_from_string): Call get_regcache
10735 with fetch flag set.
10736 (register_data): Make static. Pass fetch flag to get_regcache.
10737 (supply_register): Call get_regcache with fetch flag clear.
10738 (collect_register): Call get_regcache with fetch flag set.
10739 (collect_register_as_string): New function.
10740 * regcache.h: Update.
10741 * remote-utils.c (putpkt): Flush after debug output and use
10742 stderr.
10743 Handle input interrupts while waiting for an ACK.
10744 (input_interrupt): Use signal_pid method.
10745 (getpkt): Flush after debug output and use stderr.
10746 (outreg): Use collect_register_as_string.
10747 (new_thread_notify, dead_thread_notify): New functions.
10748 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10749 and general_thread.
10750 (look_up_one_symbol): Flush after debug output.
10751 * server.c (step_thread, server_waiting): New variables.
10752 (start_inferior): Don't use signal_pid. Update call to mywait.
10753 (attach_inferior): Update call to mywait.
10754 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10755 (main): Don't fetch/store registers explicitly. Use
10756 set_desired_inferior. Support proposed ``Hs'' packet. Update
10757 calls to mywait.
10758 * server.h: Update.
10759 (struct inferior_list, struct_inferior_list_entry): New.
10760 * target.c (set_desired_inferior): New.
10761 (write_inferior_memory): Constify.
10762 (mywait): New function.
10763 * target.h: Update.
10764 (struct target_ops): New signal_pid method.
10765 (mywait): Removed macro, added prototype.
10766
10767 * linux-low.h (regset_func): Removed.
10768 (regset_fill_func, regset_store_func): New.
10769 (enum regset_type): New.
10770 (struct regset_info): Add type field. Use new operation types.
10771 (struct linux_target_ops): stop_pc renamed to get_pc.
10772 Add decr_pc_after_break and breakpoint_at.
10773 (get_process, get_thread_proess, get_process_thread)
10774 (strut process_info, all_processes, linux_attach_lwp)
10775 (thread_db_init): New.
10776
10777 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10778 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10779 (the_low_target): Add new members.
10780 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10781 (i386_store_fpxregset): Constify.
10782 (target_regsets): Add new kind identifier.
10783 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10784 (i386_set_pc): Add debugging.
10785 (i386_breakpoint_at): New function.
10786 (the_low_target): Add new members.
10787 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10788 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10789 (mips_breakpoint_at): New.
10790 (the_low_target): Add new members.
10791 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10792 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10793 (the_low_target): Add new members.
10794 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10795 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10796 (the_low_target): Add new members.
10797 * linux-x86-64-low.c (target_regsets): Add new kind
10798 identifier.
10799
10800 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10801
10802 From Martin Pool <mbp@samba.org>:
10803 * server.c (gdbserver_usage): New function.
10804 (main): Call it.
10805
10806 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10807
10808 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10809 stop_at -> stop_pc.
10810
10811 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10812
10813 * Makefile.in: Remove obsolete code.
10814
10815 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10816
10817 * linux-low.c (regsets_fetch_inferior_registers),
10818 (regsets_store_inferior_registers): Removed cast to int from
10819 ptrace() calls.
10820 * regcache.h: Added declaration of struct inferior_info.
10821
10822 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10823
10824 * inferiors.c (struct inferior_info): Add regcache_data.
10825 (add_inferior): Call create_register_cache.
10826 (clear_inferiors): Call free_register_cache.
10827 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10828 * regcache.c (struct inferior_regcache_data): New.
10829 (registers): Remove.
10830 (get_regcache): New function.
10831 (create_register_cache, free_register_cache): New functions.
10832 (set_register_cache): Don't initialize the register cache here.
10833 (registers_to_string, registers_from_string, register_data): Call
10834 get_regcache.
10835 * regcache.h: Add prototypes.
10836 * server.h: Likewise.
10837
10838 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10839
10840 * mem-break.c: New file.
10841 * mem-break.h: New file.
10842 * Makefile.in: Add mem-break.o rule; update server.h
10843 dependencies.
10844 * inferiors.c (struct inferior_info): Add target_data
10845 member.
10846 (clear_inferiors): Free target_data member if set.
10847 (inferior_target_data, set_inferior_target_data): New functions.
10848 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10849 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10850 * linux-low.c (linux_bp_reinsert): New variable.
10851 (struct inferior_linux_data): New.
10852 (linux_create_inferior): Use set_inferior_target_data.
10853 (linux_attach): Likewise. Call add_inferior.
10854 (linux_wait_for_one_inferior): New function.
10855 (linux_wait): Call it.
10856 (linux_write_memory): Add const.
10857 (initialize_low): Call set_breakpoint_data.
10858 * linux-low.h (struct linux_target_ops): Add breakpoint
10859 handling members.
10860 * server.c (attach_inferior): Remove extra add_inferior
10861 call.
10862 * server.h: Include mem-break.h. Update inferior.c
10863 prototypes.
10864 * target.c (read_inferior_memory)
10865 (write_inferior_memory): New functions.
10866 * target.h (read_inferior_memory)
10867 (write_inferior_memory): Change macros to prototypes.
10868 (struct target_ops): Update comments. Add const to write_memory
10869 definition.
10870
10871 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10872
10873 * linux-low.c (usr_store_inferior_registers): Support
10874 registers which are allowed to fail to store.
10875 * linux-low.h (linux_target_ops): Likewise.
10876 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10877 (ppc_cannot_store_register): FPSCR may not be storable.
10878
10879 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10880
10881 * server.h: Include <string.h> if HAVE_STRING_H.
10882 * ChangeLog: Correct paths in last ChangeLog entry.
10883
10884 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10885
10886 * linux-low.h: Remove obsolete prototypes.
10887 (struct linux_target_ops): New.
10888 (extern the_low_target): New.
10889 * linux-low.c (num_regs, regmap): Remove declarations.
10890 (register_addr): Use the_low_target explicitly.
10891 (fetch_register): Likewise.
10892 (usr_fetch_inferior_registers): Likewise.
10893 (usr_store_inferior_registers): Likewise.
10894 * linux-arm-low.c (num_regs): Remove.
10895 (arm_num_regs): Define.
10896 (arm_regmap): Renamed from regmap, made static.
10897 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10898 made static.
10899 (arm_cannot_store_register): Renamed from cannot_store_register,
10900 made static.
10901 (the_low_target): New.
10902 * linux-i386-low.c (num_regs): Remove.
10903 (i386_num_regs): Define.
10904 (i386_regmap): Renamed from regmap, made static.
10905 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10906 made static.
10907 (i386_cannot_store_register): Renamed from cannot_store_register,
10908 made static.
10909 (the_low_target): New.
10910 * linux-ia64-low.c (num_regs): Remove.
10911 (ia64_num_regs): Define.
10912 (ia64_regmap): Renamed from regmap, made static.
10913 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10914 made static.
10915 (ia64_cannot_store_register): Renamed from cannot_store_register,
10916 made static.
10917 (the_low_target): New.
10918 * linux-m68k-low.c (num_regs): Remove.
10919 (m68k_num_regs): Define.
10920 (m68k_regmap): Renamed from regmap, made static.
10921 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10922 made static.
10923 (m68k_cannot_store_register): Renamed from cannot_store_register,
10924 made static.
10925 (the_low_target): New.
10926 * linux-mips-low.c (num_regs): Remove.
10927 (mips_num_regs): Define.
10928 (mips_regmap): Renamed from regmap, made static.
10929 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10930 made static.
10931 (mips_cannot_store_register): Renamed from cannot_store_register,
10932 made static.
10933 (the_low_target): New.
10934 * linux-ppc-low.c (num_regs): Remove.
10935 (ppc_num_regs): Define.
10936 (ppc_regmap): Renamed from regmap, made static.
10937 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10938 made static.
10939 (ppc_cannot_store_register): Renamed from cannot_store_register,
10940 made static.
10941 (the_low_target): New.
10942 * linux-s390-low.c (num_regs): Remove.
10943 (s390_num_regs): Define.
10944 (s390_regmap): Renamed from regmap, made static.
10945 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10946 made static.
10947 (s390_cannot_store_register): Renamed from cannot_store_register,
10948 made static.
10949 (the_low_target): New.
10950 * linux-sh-low.c (num_regs): Remove.
10951 (sh_num_regs): Define.
10952 (sh_regmap): Renamed from regmap, made static.
10953 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10954 made static.
10955 (sh_cannot_store_register): Renamed from cannot_store_register,
10956 made static.
10957 (the_low_target): New.
10958 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10959 (the_low_target): New.
10960
10961 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10962
10963 * Makefile.in: Add stamp-h target.
10964 * configure.in: Create stamp-h.
10965 * configure: Regenerated.
10966
10967 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10968
10969 * inferiors.c: New file.
10970 * target.c: New file.
10971 * target.h: New file.
10972 * Makefile.in: Add target.o and inferiors.o. Update
10973 dependencies.
10974 * linux-low.c (inferior_pid): New static variable,
10975 moved from server.c.
10976 (linux_create_inferior): Renamed from create_inferior.
10977 Call add_inferior. Return 0 on success instead of a PID.
10978 (linux_attach): Renamed from myattach.
10979 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10980 (linux_thread_alive): Renamed from mythread_alive.
10981 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10982 child dies.
10983 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10984 (regsets_store_inferior_registers): Correct error message.
10985 Add missing ``return 0''.
10986 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10987 (linux_store_registers): Renamed from store_inferior_registers.
10988 (linux_read_memory): Renamed from read_inferior_memory.
10989 (linux_write_memory): Renamed from write_inferior_memory.
10990 (linux_target_ops): New structure.
10991 (initialize_low): Call set_target_ops ().
10992 * remote-utils.c (unhexify): New function.
10993 (hexify): New function.
10994 (input_interrupt): Send signals to ``signal_pid''.
10995 * server.c (inferior_pid): Remove.
10996 (start_inferior): Update create_inferior call.
10997 (attach_inferior): Call add_inferior.
10998 (handle_query): New function.
10999 (main): Call handle_query for `q' packets.
11000 * server.h: Include "target.h". Remove obsolete prototypes.
11001 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11002
11003 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
11004
11005 * Makefile.in: Add WARN_CFLAGS. Update configury
11006 dependencies.
11007 * configure.in: Check for <string.h>
11008 * configure: Regenerate.
11009 * config.in: Regenerate.
11010 * gdbreplay.c: Include needed system headers.
11011 (remote_open): Remove strchr prototype.
11012 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11013 * regcache.c (supply_register): Change buf argument to const void *.
11014 (supply_register_by_name): Likewise.
11015 (collect_register): Change buf argument to void *.
11016 (collect_register_by_name): Likewise.
11017 * regcache.h: Add missing prototypes.
11018 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11019 * server.c (handle_query): New function.
11020 (attached): New static variable, moved out of main.
11021 (main): Quiet longjmp clobber warnings.
11022 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11023 * utils.c (error): Remove NORETURN.
11024 (fatal): Likewise.
This page took 0.25985 seconds and 5 git commands to generate.