Fix struct sockaddr/sockaddr_in/sockaddr_un strict aliasing violations
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-03-07 Pedro Alves <palves@redhat.com>
2
3 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4 or <winsock2.h> here. Instead include "gdb_socket.h".
5 (remote_open): Use union gdb_sockaddr_u.
6 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7 or <winsock2.h> here. Instead include "gdb_socket.h".
8 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
10 or <sys/un.h>.
11 (init_named_socket, gdb_agent_helper_thread): Use union
12 gdb_sockaddr_u.
13
14 2015-03-07 Pedro Alves <palves@redhat.com>
15
16 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
17 instead.
18
19 2015-03-06 Yao Qi <yao.qi@linaro.org>
20
21 * linux-aarch64-low.c (aarch64_insert_point): Use
22 show_debug_regs as a boolean.
23 (aarch64_remove_point): Likewise.
24
25 2015-03-05 Pedro Alves <palves@redhat.com>
26
27 * lynx-low.c (lynx_target_ops): Install NULL hooks for
28 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
29 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
30 * nto-low.c (nto_target_ops): Likewise.
31 * spu-low.c (spu_target_ops): Likewise.
32 * win32-low.c (win32_target_ops): Likewise.
33
34 2015-03-04 Pedro Alves <palves@redhat.com>
35
36 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
37 Decide whether a breakpoint triggered based on the SIGTRAP's
38 siginfo.si_code.
39 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
40 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
41 (linux_low_filter_event): Check for breakpoints before checking
42 watchpoints.
43 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
44 siginfo.si_code.
45 (linux_stopped_by_sw_breakpoint)
46 (linux_supports_stopped_by_sw_breakpoint)
47 (linux_stopped_by_hw_breakpoint)
48 (linux_supports_stopped_by_hw_breakpoint): New functions.
49 (linux_target_ops): Install new target methods.
50
51 2015-03-04 Pedro Alves <palves@redhat.com>
52
53 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
54 * server.c (swbreak_feature, hwbreak_feature): New globals.
55 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
56 (captured_main): Clear swbreak_feature and hwbreak_feature.
57 * server.h (swbreak_feature, hwbreak_feature): Declare.
58 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
59 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
60 supports_stopped_by_hw_breakpoint>: New fields.
61 (target_supports_stopped_by_sw_breakpoint)
62 (target_stopped_by_sw_breakpoint)
63 (target_supports_stopped_by_hw_breakpoint)
64 (target_stopped_by_hw_breakpoint): Declare.
65
66 2015-03-04 Pedro Alves <palves@redhat.com>
67
68 enum lwp_stop_reason -> enum target_stop_reason
69 * linux-low.c (check_stopped_by_breakpoint): Adjust.
70 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
71 (linux_wait_1, stuck_in_jump_pad_callback)
72 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
73 (linux_stopped_by_watchpoint):
74 * linux-low.h (enum lwp_stop_reason): Delete.
75 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
76 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
77
78 2015-03-04 Yao Qi <yao.qi@linaro.org>
79
80 * Makefile.in (SFILES): Add linux-aarch64-low.c.
81
82 2015-03-03 Gary Benson <gbenson@redhat.com>
83
84 * hostio.c (handle_vFile): Fix prefix lengths.
85
86 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
87
88 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
89 ptr_bits.
90
91 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
92
93 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
94 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
95 (clean): Add "rm -f" for above C files.
96 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
97 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
98 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
99 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
100 * linux-s390-low.c (HWCAP_S390_VX): New macro.
101 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
102 (init_registers_s390x_vx_linux64)
103 (init_registers_s390x_tevx_linux64)
104 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
105 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
106 declarations.
107 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
108 (s390_store_vxrs_high): New functions.
109 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
110 NT_S390_VXRS_HIGH.
111 (s390_arch_setup): Add logic for selecting one of the new target
112 descriptions. Activate the new vector regsets if applicable.
113 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
114 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
115 and init_registers_s390x_tevx_linux64.
116
117 2015-03-01 Pedro Alves <palves@redhat.com>
118
119 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
120 parameter.
121
122 2015-02-27 Pedro Alves <palves@redhat.com>
123
124 * linux-x86-low.c (u_debugreg_offset): New function.
125 (x86_linux_dr_get, x86_linux_dr_set): Use it.
126
127 2015-02-27 Pedro Alves <palves@redhat.com>
128
129 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
130 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
131 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
132 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
133 (ps_lsetfpregs, ps_getpid)
134 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
135 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
136 (ps_lsetxregs, ps_plog): Declare.
137
138 2015-02-27 Pedro Alves <palves@redhat.com>
139
140 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
141 IP_AGENT_EXPORT_FUNC.
142 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
143 IP_AGENT_EXPORT_FUNC.
144 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
145 (IP_AGENT_EXPORT): Delete.
146 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
147 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
148 (gdb_trampoline_buffer_error, collecting, gdb_collect)
149 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
150 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
151 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
152 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
153 (traceframe_read_count, traceframe_write_count)
154 (traceframes_created, trace_state_variables, get_raw_reg)
155 (get_trace_state_variable_value, set_trace_state_variable_value)
156 (ust_loaded, helper_thread_id, cmd_buf): Use
157 IPA_SYM_EXPORTED_NAME.
158 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
159 (tracepoints) Use IP_AGENT_EXPORT_VAR.
160 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
161 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
162 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
163 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
164 EXTERN_C_PUSH/EXTERN_C_POP.
165 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
166 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
167 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
168 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
169 (traceframe_write_count, traceframe_read_count)
170 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
171 (about_to_request_buffer_space, get_trace_state_variable_value)
172 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
173 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
174 EXTERN_C_PUSH/EXTERN_C_POP.
175 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
176 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
177 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
178 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
179 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
180 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
181 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
182 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
183 Define.
184 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
185 (IP_AGENT_EXPORT_VAR_DECL): Define.
186 (tracing): Declare.
187 (gdb_agent_get_raw_reg): Declare.
188
189 2015-02-27 Tom Tromey <tromey@redhat.com>
190 Pedro Alves <palves@redhat.com>
191
192 Rename symbols whose names are reserved C++ keywords throughout.
193
194 2015-02-27 Pedro Alves <palves@redhat.com>
195
196 * Makefile.in (COMPILER): New, get it from autoconf.
197 (CXX): Get from autoconf instead.
198 (COMPILE.pre): Use COMPILER.
199 (CC-LD): Rename to ...
200 (CC_LD): ... this. Use COMPILER.
201 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
202 (CXX_FOR_TARGET): Default to g++ instead of gcc.
203 * acinclude.m4: Include build-with-cxx.m4.
204 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
205 Disable -Werror by default if building in C++ mode.
206 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
207 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
208 the C++ compiler. Save/restore CXXFLAGS too.
209 * configure: Regenerate.
210
211 2015-02-27 Pedro Alves <palves@redhat.com>
212
213 * acinclude.m4: Include libiberty.m4.
214 * configure.ac: Call libiberty_INIT.
215 * config.in, configure: Regenerate.
216
217 2015-02-26 Pedro Alves <palves@redhat.com>
218
219 * linux-low.c (linux_wait_1): When incrementing the PC past a
220 program breakpoint always use the_low_target.breakpoint_len as
221 increment, rather than the maximum between that and
222 the_low_target.decr_pc_after_break.
223
224 2015-02-23 Pedro Alves <palves@redhat.com>
225
226 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
227 thread was doing a step-over; always adjust the PC if
228 we stepped over a permanent breakpoint.
229 (linux_wait_1): If we stepped over breakpoint that was on top of a
230 permanent breakpoint, manually advance the PC past it.
231
232 2015-02-23 Pedro Alves <palves@redhat.com>
233
234 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
235 modes.
236 (x86_fill_gregset, x86_store_gregset): Use it when handling
237 $orig_eax.
238
239 2015-02-20 Pedro Alves <palves@redhat.com>
240
241 * thread-db.c: Include "nat/linux-procfs.h".
242 (thread_db_init): Skip listing new threads if the kernel supports
243 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
244
245 2015-02-20 Pedro Alves <palves@redhat.com>
246
247 * linux-low.c (status_pending_p_callback): Use ptid_match.
248
249 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
250
251 PR breakpoints/16812
252 * linux-low.c (wstatus_maybe_breakpoint): Remove.
253 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
254 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
255
256 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
257
258 PR breakpoints/15956
259 * tracepoint.c (cmd_qtinit): Add check for current_thread.
260
261 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
262
263 * linux-low.c (linux_low_btrace_conf): Print size.
264 * server.c (handle_btrace_conf_general_set): New.
265 (hanle_general_set): Call handle_btrace_conf_general_set.
266 (handle_query): Report Qbtrace-conf:bts:size as supported.
267
268 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
269
270 * linux-low.c (linux_low_enable_btrace): Update parameters.
271 (linux_low_btrace_conf): New.
272 (linux_target_ops)<to_btrace_conf>: Initialize.
273 * server.c (current_btrace_conf): New.
274 (handle_btrace_enable): Rename to ...
275 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
276 to target_enable_btrace. Update comment. Update users.
277 (handle_qxfer_btrace_conf): New.
278 (qxfer_packets): Add btrace-conf entry.
279 (handle_query): Report qXfer:btrace-conf:read as supported packet.
280 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
281 (target_ops)<read_btrace_conf>: New.
282 (target_enable_btrace): Update parameters.
283 (target_read_btrace_conf): New.
284
285 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
286
287 * server.c (handle_btrace_general_set): Remove call to
288 target_supports_btrace.
289 (supported_btrace_packets): New.
290 (handle_query): Call supported_btrace_packets.
291 * target.h: include btrace-common.h.
292 (btrace_target_info): Removed.
293 (supports_btrace, target_supports_btrace): Update parameters.
294
295 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
296
297 * Makefile.in (SFILES): Add common/btrace-common.c.
298 (OBS): Add common/btrace-common.o.
299 (btrace-common.o): Add build rules.
300 * linux-low: Include btrace-common.h.
301 (linux_low_read_btrace): Use struct btrace_data. Call
302 btrace_data_init and btrace_data_fini.
303
304 2015-02-06 Pedro Alves <palves@redhat.com>
305
306 * thread-db.c (find_new_threads_callback): Add debug output.
307
308 2015-02-04 Pedro Alves <palves@redhat.com>
309
310 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
311 (resume_stopped_resumed_lwps): New function.
312 (linux_wait_for_event_filtered): Use it.
313
314 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
315
316 * Makefile.in (SFILES): Add linux-personality.c.
317 (linux-personality.o): New rule.
318 * configure.srv (srv_linux_obj): Add linux-personality.o to the
319 list of objects to be built.
320 * linux-low.c: Include nat/linux-personality.h.
321 (linux_create_inferior): Remove code to disable address space
322 randomization (moved to ../nat/linux-personality.c). Create
323 cleanup to disable address space randomization.
324
325 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
326
327 * Makefile.in (posix-strerror.o): New rule.
328 (mingw-strerror.o): Likewise.
329 * configure: Regenerated.
330 * configure.ac: Source file ../common/common.host. Initialize new
331 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
332
333 2015-01-14 Yao Qi <yao@codesourcery.com>
334
335 * Makefile.in (SFILES): Add nat/ppc-linux.c.
336 (ppc-linux.o): New rule.
337 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
338 * configure.ac: AC_CHECK_FUNCS(getauxval).
339 * config.in: Re-generated.
340 * configure: Re-generated.
341 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
342 ppc64_64bit_inferior_p
343
344 2015-01-14 Yao Qi <yao@codesourcery.com>
345
346 * linux-ppc-low.c: Include "nat/ppc-linux.h".
347 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
348 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
349 (PT_ORIG_R3, PT_TRAP): Likewise.
350 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
351 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
352 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
353
354 2015-01-10 Joel Brobecker <brobecker@adacore.com>
355
356 * i387-fp.c (i387_cache_to_xsave): In look over
357 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
358 zmmh_low_space field by use of zmmh_high_space.
359
360 2015-01-09 Pedro Alves <palves@redhat.com>
361
362 * linux-low.c (step_over_bkpt): Move higher up in the file.
363 (handle_extended_wait): Don't store the stop_pc here.
364 (get_stop_pc): Adjust comments and rename to ...
365 (check_stopped_by_breakpoint): ... this. Record whether the LWP
366 stopped for a software breakpoint or hardware breakpoint.
367 (thread_still_has_status_pending_p): New function.
368 (status_pending_p_callback): Use
369 thread_still_has_status_pending_p. If the event is no longer
370 interesting, resume the LWP.
371 (handle_tracepoints): Add assert.
372 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
373 (wstatus_maybe_breakpoint): New function.
374 (cancel_breakpoint): Delete function.
375 (check_stopped_by_watchpoint): New function, factored out from
376 linux_low_filter_event.
377 (lp_status_maybe_breakpoint): Delete function.
378 (linux_low_filter_event): Remove filter_ptid argument.
379 Leave thread group exits pending here. Store the LWP's stop PC.
380 Always leave events pending.
381 (linux_wait_for_event_filtered): Pull all events out of the
382 kernel, and leave them all pending.
383 (count_events_callback, select_event_lwp_callback): Consider all
384 events.
385 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
386 (select_event_lwp): Only give preference to the stepping LWP in
387 all-stop mode. Adjust comments.
388 (ignore_event): New function.
389 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
390 references to cancel_breakpoints. Adjust to renames. Also give
391 equal priority to all LWPs that have had events in non-stop mode.
392 If reporting a software breakpoint event, unadjust the LWP's PC.
393 (linux_wait): If linux_wait_1 returned an ignored event, retry.
394 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
395 Adjust.
396 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
397 (resume_status_pending_p): Use thread_still_has_status_pending_p.
398 (linux_stopped_by_watchpoint): Adjust.
399 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
400 * linux-low.h (enum lwp_stop_reason): New.
401 (struct lwp_info) <stop_pc>: Adjust comment.
402 <stopped_by_watchpoint>: Delete field.
403 <stop_reason>: New field.
404 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
405 * mem-break.c (software_breakpoint_inserted_here)
406 (hardware_breakpoint_inserted_here): New function.
407 * mem-break.h (software_breakpoint_inserted_here)
408 (hardware_breakpoint_inserted_here): Declare.
409 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
410 (cancel_breakpoints): Delete.
411 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
412 (upload_fast_traceframes): Remove references to
413 cancel_breakpoints.
414
415 2015-01-09 Pedro Alves <palves@redhat.com>
416
417 * thread-db.c (find_new_threads_callback): Ignore thread if the
418 kernel thread ID is -1.
419
420 2015-01-09 Pedro Alves <palves@redhat.com>
421
422 * linux-low.c (linux_attach_fail_reason_string): Move to
423 nat/linux-ptrace.c, and rename.
424 (linux_attach_lwp): Update comment.
425 (attach_proc_task_lwp_callback): New function.
426 (linux_attach): Adjust to rename and use
427 linux_proc_attach_tgid_threads.
428 (linux_attach_fail_reason_string): Delete declaration.
429
430 2015-01-01 Joel Brobecker <brobecker@adacore.com>
431
432 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
433 * server.c (gdbserver_version): Likewise.
434
435 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
436
437 * remote-utils.c: Include ctype.h.
438 (input_interrupt): Explicitly handle the case when the char
439 received is the NUL byte. Improve the printing of non-ASCII
440 characters.
441
442 2014-12-16 Joel Brobecker <brobecker@adacore.com>
443
444 * linux-low.c (linux_low_filter_event): Update call to
445 linux_enable_event_reporting following the addition of
446 a new parameter to that function.
447
448 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
449
450 PR server/17457
451 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
452 (AARCH64_FPCR_REGNO): Likewise.
453 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
454 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
455 (aarch64_store_fpregset): Likewise.
456
457 2014-12-15 Joel Brobecker <brobecker@adacore.com>
458
459 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
460 Remove FIXME comment about assumption about N.
461
462 2014-12-13 Joel Brobecker <brobecker@adacore.com>
463
464 * configure.ac: If large-file support is disabled in GDBserver,
465 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
466 * configure: Regenerate.
467
468 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
469
470 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
471 warning upon ENODATA from ptrace.
472 * linux-s390-low.c (s390_store_tdb): New.
473 (s390_regsets): Add regset for NT_S390_TDB.
474
475 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
476
477 * linux-low.c (regsets_store_inferior_registers): Skip regsets
478 without a fill_function.
479 * linux-s390-low.c (s390_fill_last_break): Remove.
480 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
481 (s390_arch_setup): Use regset's size instead of fill_function for
482 loop end condition.
483
484 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
485
486 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
487 the regset's store function when ptrace returned an error.
488 * regcache.c (get_thread_regcache): Invalidate register cache
489 before fetching inferior's registers.
490
491 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
492
493 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
494 while-loop as for-loop.
495 (regsets_store_inferior_registers): Likewise.
496
497 2014-11-28 Yao Qi <yao@codesourcery.com>
498
499 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
500 * config.in, configure: Re-generate.
501 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
502 is defined.
503
504 2014-11-21 Yao Qi <yao@codesourcery.com>
505
506 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
507 (AC_CHECK_HEADERS): Remove malloc.h.
508 * configure: Re-generated.
509 * config.in: Re-generated.
510 * server.h: Don't include alloca.h and malloc.h.
511 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
512 Don't include malloc.h.
513
514 2014-11-17 Joel Brobecker <brobecker@adacore.com>
515
516 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
517 corresponding ERRNO check in same block.
518
519 2014-11-12 Pedro Alves <palves@redhat.com>
520
521 * server.c (cont_thread): Update comment.
522 (start_inferior, attach_inferior): No longer clear cont_thread.
523 (handle_v_cont): No longer set cont_thread.
524 (captured_main): Clear cont_thread each time a GDB connects.
525
526 2014-11-12 Pedro Alves <palves@redhat.com>
527
528 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
529 thread, and don't resume all threads if the Hc thread has exited.
530
531 2014-11-12 Pedro Alves <palves@redhat.com>
532
533 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
534 the process group instead of to a specific LWP.
535
536 2014-10-15 Pedro Alves <palves@redhat.com>
537
538 PR server/17487
539 * win32-arm-low.c (arm_set_thread_context): Remove current_event
540 parameter.
541 (arm_set_thread_context): Delete.
542 (the_low_target): Adjust.
543 * win32-i386-low.c (debug_registers_changed)
544 (debug_registers_used): Delete.
545 (update_debug_registers_callback): New function.
546 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
547 needing to update their debug registers.
548 (win32_get_current_dr): New function.
549 (x86_dr_low_get_addr, x86_dr_low_get_control)
550 (x86_dr_low_get_status): Fetch the debug register from the thread
551 record's context.
552 (i386_initial_stuff): Adjust.
553 (i386_get_thread_context): Remove current_event parameter. Don't
554 clear debug_registers_changed nor copy DR values to
555 debug_reg_state.
556 (i386_set_thread_context): Delete.
557 (i386_prepare_to_resume): New function.
558 (i386_thread_added): Mark the thread as needing to update irs
559 debug registers.
560 (the_low_target): Remove i386_set_thread_context and install
561 i386_prepare_to_resume.
562 * win32-low.c (win32_get_thread_context): Adjust.
563 (win32_set_thread_context): Use SetThreadContext
564 directly.
565 (win32_prepare_to_resume): New function.
566 (win32_require_context): New function, factored out from ...
567 (thread_rec): ... this.
568 (continue_one_thread): Call win32_prepare_to_resume on each thread
569 we're about to continue.
570 (win32_resume): Call win32_prepare_to_resume on the event thread.
571 * win32-low.h (struct win32_thread_info)
572 <debug_registers_changed>: New field.
573 (struct win32_target_ops): Change prototype of set_thread_context,
574 delete set_thread_context and add prepare_to_resume.
575 (win32_require_context): New declaration.
576
577 2014-10-08 Gary Benson <gbenson@redhat.com>
578
579 * server.h: Do not include common-exceptions.h.
580
581 2014-10-08 Gary Benson <gbenson@redhat.com>
582
583 * server.h: Do not include cleanups.h.
584
585 2014-09-30 James Hogan <james.hogan@imgtec.com>
586
587 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
588 mips64-dsp-linux.c.
589
590 2014-09-23 Yao Qi <yao@codesourcery.com>
591
592 * linux-low.c (lp_status_maybe_breakpoint): New function.
593 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
594 (count_events_callback): Likewise.
595 (select_event_lwp_callback): Likewise.
596 (cancel_breakpoints_callback): Likewise.
597
598 2014-09-19 Don Breazeal <donb@codesourcery.com>
599
600 * linux-low.c (handle_extended_wait): Call
601 linux_ptrace_get_extended_event.
602 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
603 linux_is_extended_waitstatus.
604
605 2014-09-16 Joel Brobecker <brobecker@adacore.com>
606
607 * Makefile.in (CPPFLAGS): Define.
608 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
609 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
610
611 2014-09-16 Gary Benson <gbenson@redhat.com>
612
613 * inferiors.h (current_inferior): Renamed as...
614 (current_thread): New variable. All uses updated.
615 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
616 (maybe_move_out_of_jump_pad): Likewise.
617 (cancel_breakpoint): Likewise.
618 (linux_low_filter_event): Likewise.
619 (wait_for_sigstop): Likewise.
620 (linux_resume_one_lwp): Likewise.
621 (need_step_over_p): Likewise.
622 (start_step_over): Likewise.
623 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
624 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
625 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
626 and save_inferior as saved_thread.
627 * regcache.c (get_thread_regcache): Renamed saved_inferior as
628 saved_thread.
629 (regcache_invalidate_thread): Likewise.
630 * remote-utils.c (prepare_resume_reply): Likewise.
631 * thread-db.c (thread_db_get_tls_address): Likewise.
632 (disable_thread_event_reporting): Likewise.
633 (remove_thread_event_breakpoints): Likewise.
634 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
635 as saved_thread.
636 * target.h (set_desired_inferior): Renamed as...
637 (set_desired_thread): New declaration. All uses updated.
638 * server.c (myresume): Updated comment to reference thread instead
639 of inferior.
640 (handle_serial_event): Likewise.
641 (handle_target_event): Likewise.
642
643 2014-09-12 Tom Tromey <tromey@redhat.com>
644 Gary Benson <gbenson@redhat.com>
645
646 * regcache.h: Include common-regcache.h.
647 (regcache_read_pc): Don't declare.
648 * regcache.c (get_thread_regcache_for_ptid): New function.
649
650 2014-09-11 Tom Tromey <tromey@redhat.com>
651 Gary Benson <gbenson@redhat.com>
652
653 * symbol.c: New file.
654 * Makefile.in (SFILES): Add symbol.c.
655 (OBS): Add symbol.o.
656
657 2014-09-11 Gary Benson <gbenson@redhat.com>
658
659 * target.c (target_stop_ptid, target_continue_ptid): New
660 functions.
661
662 2014-09-11 Tom Tromey <tromey@redhat.com>
663 Gary Benson <gbenson@redhat.com>
664
665 * target.h: Include target/target.h.
666 * target.c (target_read_memory, target_read_uint32)
667 (target_write_memory): New functions.
668
669 2014-09-11 Gary Benson <gbenson@redhat.com>
670
671 * server.h (debug_hw_points): Don't declare.
672 * server.c (debug_hw_points): Don't define. Replace all uses
673 with show_debug_regs.
674 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
675 all uses with show_debug_regs.
676
677 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
678
679 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
680 endianness into account.
681 (ppc_supply_ptrace_register): Likewise.
682
683 2014-09-03 James Hogan <james.hogan@imgtec.com>
684
685 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
686 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
687
688 2014-09-03 Gary Benson <gbenson@redhat.com>
689
690 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
691 ALL_DEBUG_ADDRESS_REGISTERS.
692
693 2014-09-02 Gary Benson <gbenson@redhat.com>
694
695 * i386-low.h: Renamed as...
696 * x86-low.h: New file. All type, function and variable name
697 prefixes changed from "i386_" to "x86_". All references updated.
698 * i386-low.c: Renamed as...
699 * x86-low.c: New file. All type, function and variable name
700 prefixes changed from "i386_" to "x86_". All references updated.
701
702 2014-09-02 Gary Benson <gbenson@redhat.com>
703
704 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
705 (x86_linux_new_thread): Likewise.
706
707 2014-08-29 Gary Benson <gbenson@redhat.com>
708
709 * server.h (setjmp.h): Do not include.
710 (toplevel): Do not declare.
711 (common-exceptions.h): Include.
712 (cleanups.h): Likewise.
713 * server.c (toplevel): Do not define.
714 (exit_code): New static global.
715 (detach_or_kill_for_exit_cleanup): New function.
716 (main): New function. Original main renamed to...
717 (captured_main): New function.
718 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
719
720 2014-08-29 Gary Benson <gbenson@redhat.com>
721
722 * Makefile.in (SFILES): Add common/common-exceptions.c.
723 (OBS): Add common-exceptions.o.
724 (common-exceptions.o): New rule.
725 * utils.c (prepare_to_throw_exception): New function.
726
727 2014-08-29 Gary Benson <gbenson@redhat.com>
728
729 * config.in: Regenerate.
730 * configure: Likewise.
731
732 2014-08-29 Gary Benson <gbenson@redhat.com>
733
734 * Makefile.in (SFILES): Add common/cleanups.c.
735 (OBS): cleanups.o.
736 (cleanups.o): New rule.
737
738 2014-08-29 Gary Benson <gbenson@redhat.com>
739
740 * utils.c (internal_vwarning): New function.
741
742 2014-08-28 Gary Benson <gbenson@redhat.com>
743
744 * utils.h (fatal): Remove declaration.
745 * utils.c (fatal): Remove function.
746
747 2014-08-28 Gary Benson <gbenson@redhat.com>
748
749 * tracepoint.c (gdb_agent_init): Replace fatal with
750 perror_with_name.
751 (initialize_tracepoint): Likewise.
752
753 2014-08-28 Gary Benson <gbenson@redhat.com>
754
755 * remote-utils.c (remote_prepare): Replace fatal with error.
756
757 2014-08-28 Gary Benson <gbenson@redhat.com>
758
759 * linux-low.c (linux_async): Replace fatal with warning.
760 Tidy up and return.
761 (linux_start_non_stop): Return -1 if linux_async failed.
762
763 2014-08-28 Gary Benson <gbenson@redhat.com>
764
765 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
766 gdb_assert.
767 (i386_dr_low_get_addr): Remove vague comment.
768 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
769 gdb_assert.
770
771 2014-08-28 Gary Benson <gbenson@redhat.com>
772
773 * inferiors.c (get_thread_process): Replace check with gdb_assert.
774 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
775 internal_error.
776 (linux_resume_one_lwp): Likewise.
777 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
778 gdb_assert.
779 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
780 with internal_error.
781 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
782 (init_register_cache): Replace fatal with gdb_assert_not_reached.
783 (find_register_by_name): Replace fatal with internal_error.
784 (find_regno): Likewise.
785 * tdesc.c (init_target_desc): Replace check with gdb_assert.
786 * thread-db.c (thread_db_create_event): Likewise.
787 (thread_db_load_search): Likewise.
788 (try_thread_db_load_1): Likewise.
789 * tracepoint.c (get_jump_space_head): Replace fatal with
790 internal_error.
791 (claim_trampoline_space): Likewise.
792 (have_fast_tracepoint_trampoline_buffer): Likewise.
793 (cmd_qtstart): Likewise.
794 (stop_tracing): Likewise.
795 (fast_tracepoint_collecting): Likewise.
796 (target_malloc): Likewise.
797 (download_tracepoint): Likewise.
798 (download_trace_state_variables): Replace check with gdb_assert.
799 (upload_fast_traceframes): Replace fatal with internal_error.
800
801 2014-08-19 Tom Tromey <tromey@redhat.com>
802 Gary Benson <gbenson@redhat.com>
803
804 * Makefile.in (SFILES): Add common/common-debug.c.
805 (OBS): Add common-debug.o.
806 (common-debug.o): New rule.
807 * debug.h (debug_printf): Don't declare.
808 * debug.c (debug_printf): Renamed and rewritten as...
809 (debug_vprintf): New function.
810
811 2014-08-19 Gary Benson <gbenson@redhat.com>
812
813 * utils.h: Do not include print-utils.h.
814
815 2014-08-19 Tom Tromey <tromey@redhat.com>
816 Gary Benson <gbenson@redhat.com>
817
818 * server.h: Add static assertion.
819 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
820
821 2014-08-19 Tom Tromey <tromey@redhat.com>
822 Gary Benson <gbenson@redhat.com>
823
824 * Makefile.in (SFILES): Add common/errors.c.
825 (OBS): Add errors.o.
826 (IPA_OBS): Add errors-ipa.o.
827 (errors.o): New rule.
828 (errors-ipa.o): Likewise.
829 * utils.h (perror_with_name, error, warning): Don't declare.
830 * utils.c (warning): Renamed and rewritten as...
831 (vwarning): New function.
832 (error): Renamed and rewritten as...
833 (verror): New function.
834 (internal_error): Renamed and rewritten as...
835 (internal_verror): New function.
836
837 2014-08-07 Gary Benson <gbenson@redhat.com>
838
839 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
840 * configure: Regenerate.
841 * config.in: Likewise.
842 * server.h: Do not include errno.h.
843 * event-loop.c: Likewise.
844 * hostio-errno.c: Likewise.
845 * linux-low.c: Likewise.
846 * remote-utils.c: Likewise.
847 * spu-low.c: Likewise.
848 * utils.c: Likewise.
849 * gdbreplay.c: Unconditionally include errno.h.
850
851 2014-08-07 Gary Benson <gbenson@redhat.com>
852
853 * server.h: Do not include string.h.
854 * event-loop.c: Likewise.
855 * linux-low.c: Likewise.
856 * regcache.c: Likewise.
857 * remote-utils.c: Likewise.
858 * spu-low.c: Likewise.
859 * utils.c: Likewise.
860
861 2014-08-07 Gary Benson <gbenson@redhat.com>
862
863 * server.h: Do not include gdb_assert.h.
864
865 2014-08-07 Gary Benson <gbenson@redhat.com>
866
867 * server.h: Do not include common-utils.h.
868
869 2014-08-07 Gary Benson <gbenson@redhat.com>
870
871 * server.h: Do not include ptid.h.
872 * notif.h: Likewise.
873
874 2014-08-07 Gary Benson <gbenson@redhat.com>
875
876 * server.h: Do not include gdb_locale.h.
877
878 2014-08-07 Gary Benson <gbenson@redhat.com>
879
880 * server.h: Do not include gdb/signals.h.
881 * win32-low.c: Likewise.
882
883 2014-08-07 Gary Benson <gbenson@redhat.com>
884
885 * server.h: Do not include pathmax.h.
886
887 2014-08-07 Gary Benson <gbenson@redhat.com>
888
889 * server.h: Do not include libiberty.h.
890 * linux-bfin-low.c: Likewise.
891
892 2014-08-07 Gary Benson <gbenson@redhat.com>
893
894 * server.h: Do not include ansidecl.h.
895
896 2014-08-07 Gary Benson <gbenson@redhat.com>
897
898 * linux-x86-low.c: Do not include stddef.h.
899 * lynx-ppc-low.c: Likewise.
900 * tracepoint.c: Likewise.
901
902 2014-08-07 Gary Benson <gbenson@redhat.com>
903
904 * server.h: Do not include stdarg.h.
905 * nto-low.c: Likewise.
906
907 2014-08-07 Gary Benson <gbenson@redhat.com>
908
909 * server.h: Do not include stdlib.h.
910 * inferiors.c: Likewise.
911 * linux-low.c: Likewise.
912 * regcache.c: Likewise.
913 * spu-low.c: Likewise.
914 * tracepoint.c: Likewise.
915 * utils.c: Likewise.
916
917 2014-08-07 Gary Benson <gbenson@redhat.com>
918
919 * server.h: Do not include stdio.h.
920 * linux-low.c: Likewise.
921 * remote-utils.c: Likewise.
922 * spu-low.c: Likewise.
923 * utils.c: Likewise.
924 * wincecompat.c: Likewise.
925
926 2014-08-06 Gary Benson <gbenson@redhat.com>
927
928 * regcache.c (init_register_cache): Move conditionals inside if.
929
930 2014-08-06 Gary Benson <gbenson@redhat.com>
931
932 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
933
934 2014-07-31 Gary Benson <gbenson@redhat.com>
935
936 * ax.h: Do not include server.h.
937 * gdbthread.h: Likewise.
938 * lynx-low.h: Likewise.
939 * notif.h: Likewise.
940
941 2014-07-30 Gary Benson <gbenson@redhat.com>
942
943 * server.h: Include common-defs.h.
944 Do not include config.h or build-gnulib-gdbserver/config.h.
945
946 2014-07-30 Gary Benson <gbenson@redhat.com>
947
948 * hostio-errno.c: Move server.h to top of includes list.
949 * inferiors.c: Likewise.
950 * linux-x86-low.c: Likewise.
951 * notif.c: Include server.h.
952
953 2014-07-24 Tom Tromey <tromey@redhat.com>
954 Gary Benson <gbenson@redhat.com>
955
956 * server.h (CORE_ADDR): Now unsigned.
957
958 2014-07-16 Pedro Alves <palves@redhat.com>
959
960 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
961
962 2014-07-15 Pedro Alves <palves@redhat.com>
963
964 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
965 copy.
966
967 2014-07-11 Pedro Alves <palves@redhat.com>
968
969 * linux-low.c (kill_wait_lwp): New function, based on
970 kill_one_lwp_callback, but use my_waitpid directly.
971 (kill_one_lwp_callback, linux_kill): Use it.
972
973 2014-06-23 Pedro Alves <palves@redhat.com>
974
975 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
976 before setting DR0..DR3.
977
978 2014-06-20 Gary Benson <gbenson@redhat.com>
979
980 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
981 * configure: Regenerated.
982 * config.in: Likewise.
983
984 2014-06-20 Gary Benson <gbenson@redhat.com>
985
986 * Makefile.in (SFILES): Update locations for files moved
987 from common to nat.
988 (object file files): Reordered.
989
990 2014-06-20 Gary Benson <gbenson@redhat.com>
991
992 * i386-low.h (i386_dr_low_can_set_addr): Removed.
993 (i386_dr_low_set_addr): Likewise.
994 (i386_dr_low_get_addr): Likewise.
995 (i386_dr_low_can_set_control): Likewise.
996 (i386_dr_low_set_control): Likewise.
997 (i386_dr_low_get_control): Likewise.
998 (i386_dr_low_get_status): Likewise.
999 (i386_get_debug_register_length): Likewise.
1000 * linux-x86-low.c (i386_dr_low_set_addr):
1001 Changed signature. Made static.
1002 (i386_dr_low_get_addr): Likewise.
1003 (i386_dr_low_set_control): Likewise.
1004 (i386_dr_low_get_control): Likewise.
1005 (i386_dr_low_get_status): Likewise.
1006 (i386_dr_low): New global variable.
1007 * win32-i386-low.c (i386_dr_low_set_addr):
1008 Changed signature. Made static.
1009 (i386_dr_low_get_addr): Likewise.
1010 (i386_dr_low_set_control): Likewise.
1011 (i386_dr_low_get_control): Likewise.
1012 (i386_dr_low_get_status): Likewise.
1013 (i386_dr_low): New global variable.
1014
1015 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1016
1017 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1018 * Makefile.in (AR, AR_FLAGS): Define.
1019 * configure: Regenerate.
1020
1021 2014-06-19 Gary Benson <gbenson@redhat.com>
1022
1023 * Makefile.in (i386-dregs.o): New rule.
1024 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1025 * i386-low.c (target.h): Remove include.
1026 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1027 (DR_CONTROL_SHIFT): Likewise.
1028 (DR_CONTROL_SIZE): Likewise.
1029 (DR_RW_EXECUTE): Likewise.
1030 (DR_RW_WRITE): Likewise.
1031 (DR_RW_READ): Likewise.
1032 (DR_RW_IORW): Likewise.
1033 (DR_LEN_1): Likewise.
1034 (DR_LEN_2): Likewise.
1035 (DR_LEN_4): Likewise.
1036 (DR_LEN_8): Likewise.
1037 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1038 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1039 (DR_ENABLE_SIZE): Likewise.
1040 (DR_LOCAL_SLOWDOWN): Likewise.
1041 (DR_GLOBAL_SLOWDOWN): Likewise.
1042 (DR_CONTROL_RESERVED): Likewise.
1043 (I386_DR_CONTROL_MASK): Likewise.
1044 (I386_DR_VACANT): Likewise.
1045 (I386_DR_LOCAL_ENABLE): Likewise.
1046 (I386_DR_GLOBAL_ENABLE): Likewise.
1047 (I386_DR_DISABLE): Likewise.
1048 (I386_DR_SET_RW_LEN): Likewise.
1049 (I386_DR_GET_RW_LEN): Likewise.
1050 (I386_DR_WATCH_HIT): Likewise.
1051 (i386_wp_op_t): Likewise.
1052 (i386_show_dr): Likewise.
1053 (i386_length_and_rw_bits): Likewise.
1054 (i386_insert_aligned_watchpoint): Likewise.
1055 (i386_remove_aligned_watchpoint): Likewise.
1056 (i386_handle_nonaligned_watchpoint): Likewise.
1057 i386_update_inferior_debug_regs(): Likewise.
1058 (i386_dr_insert_watchpoint): Likewise.
1059 (i386_dr_remove_watchpoint): Likewise.
1060 (i386_dr_region_ok_for_watchpoint): Likewise.
1061 (i386_dr_stopped_data_address): Likewise.
1062 (i386_dr_stopped_by_watchpoint): Likewise.
1063
1064 2014-06-19 Gary Benson <gbenson@redhat.com>
1065
1066 * i386-low.c (i386_dr_show): Renamed to
1067 i386_show_dr and made static. All uses updated.
1068 (i386_dr_length_and_rw_bits): Renamed to
1069 i386_length_and_rw_bits and made static.
1070 All uses updated.
1071 (i386_dr_insert_aligned_watchpoint): Renamed to
1072 i386_insert_aligned_watchpoint and made static.
1073 All uses updated.
1074 (i386_dr_remove_aligned_watchpoint): Renamed to
1075 i386_remove_aligned_watchpoint and made static.
1076 All uses updated.
1077 (i386_dr_update_inferior_debug_regs): Renamed to
1078 i386_update_inferior_debug_regs and made static.
1079 All uses updated.
1080
1081 2014-06-18 Gary Benson <gbenson@redhat.com>
1082
1083 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1084 (i386_dr_low_can_set_control): Likewise.
1085 (i386_get_debug_register_length): Likewise.
1086 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1087 (i386_dr_low_can_set_control): Likewise.
1088 (i386_get_debug_register_length): Likewise.
1089
1090 2014-06-17 Gary Benson <gbenson@redhat.com>
1091
1092 * i386-low.h (i386-dregs.h): New include.
1093 (DR_FIRSTADDR): Now in i386-dregs.h.
1094 (DR_LASTADDR): Likewise.
1095 (DR_NADDR): Likewise.
1096 (DR_STATUS): Likewise.
1097 (DR_CONTROL): Likewise.
1098 (i386_debug_reg_state): Likewise.
1099 (i386_dr_insert_watchpoint): Likewise.
1100 (i386_dr_remove_watchpoint): Likewise.
1101 (i386_dr_region_ok_for_watchpoint): Likewise.
1102 (i386_dr_stopped_data_address): Likewise.
1103 (i386_dr_stopped_by_watchpoint): Likewise.
1104 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1105
1106 2014-06-18 Gary Benson <gbenson@redhat.com>
1107
1108 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1109 i386_dr_insert_watchpoint.
1110 (i386_low_remove_watchpoint): Renamed to
1111 i386_dr_remove_watchpoint.
1112 (i386_low_region_ok_for_watchpoint): Renamed to
1113 i386_dr_region_ok_for_watchpoint.
1114 (i386_low_stopped_data_address): Renamed to
1115 i386_dr_stopped_data_address.
1116 (i386_low_stopped_by_watchpoint): Renamed to
1117 i386_dr_stopped_by_watchpoint.
1118 * i386-low.c (i386_show_dr): Renamed to
1119 i386_dr_show and made nonstatic. All uses updated.
1120 (i386_length_and_rw_bits): Renamed to
1121 i386_dr_length_and_rw_bits and made nonstatic.
1122 All uses updated.
1123 (i386_insert_aligned_watchpoint): Renamed to
1124 i386_dr_insert_aligned_watchpoint and made nonstatic.
1125 All uses updated.
1126 (i386_remove_aligned_watchpoint): Renamed to
1127 i386_dr_remove_aligned_watchpoint and made nonstatic.
1128 All uses updated.
1129 (i386_update_inferior_debug_regs): Renamed to
1130 i386_dr_update_inferior_debug_regs and made nonstatic.
1131 All uses updated.
1132 (i386_low_insert_watchpoint): Renamed to
1133 i386_dr_insert_watchpoint. All uses updated.
1134 (i386_low_remove_watchpoint): Renamed to
1135 i386_dr_remove_watchpoint. All uses updated.
1136 (i386_low_region_ok_for_watchpoint): Renamed to
1137 i386_dr_region_ok_for_watchpoint. All uses updated.
1138 (i386_low_stopped_data_address): Renamed to
1139 i386_dr_stopped_data_address. All uses updated.
1140 (i386_low_stopped_by_watchpoint): Renamed to
1141 i386_dr_stopped_by_watchpoint. All uses updated.
1142
1143 2014-06-18 Gary Benson <gbenson@redhat.com>
1144
1145 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1146 (i386_dr_low_can_set_control): Likewise.
1147 (i386_insert_aligned_watchpoint): New check.
1148
1149 2014-06-18 Gary Benson <gbenson@redhat.com>
1150
1151 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1152 Renamed to state.
1153
1154 2014-06-18 Gary Benson <gbenson@redhat.com>
1155
1156 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1157 instead of fatal and error.
1158 (i386_handle_nonaligned_watchpoint): Likewise.
1159
1160 2014-06-18 Gary Benson <gbenson@redhat.com>
1161
1162 * i386-low.c (i386_get_debug_register_length): New macro.
1163 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1164 (i386_show_dr): Use debug_printf instead of fprintf. Use
1165 phex to format values.
1166
1167 2014-06-18 Gary Benson <gbenson@redhat.com>
1168
1169 * i386-low.h: Comment changes.
1170 * i386-low.c: Likewise.
1171
1172 2014-06-18 Gary Benson <gbenson@redhat.com>
1173
1174 * i386-low.c: Whitespace changes.
1175
1176 2014-06-12 Tom Tromey <tromey@redhat.com>
1177
1178 * utils.c (freeargv): Remove.
1179
1180 2014-06-12 Tom Tromey <tromey@redhat.com>
1181
1182 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1183 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1184 (parse_debug_format_options): Likewise.
1185 (gdbserver_usage): Likewise.
1186 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1187 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1188 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1189 against libiberty.
1190 ($(LIBGNU)): Depend on libiberty.
1191 (all-lib): Recurse into all subdirs.
1192 (install-only): Invoke "install" target in subdirs.
1193 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1194 targets.
1195 * configure: Rebuild.
1196 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1197 for vasprintf, vsnprintf, or gettimeofday.
1198 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1199 srv_tgtobj.
1200
1201 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1202
1203 * development.sh: Delete.
1204 * Makefile.in (config.status): Adjust dependency on development.sh.
1205 * configure.ac: Adjust development.sh source call.
1206 * configure: Regenerate.
1207
1208 2014-06-02 Pedro Alves <palves@redhat.com>
1209
1210 * ax.c (gdb_free_agent_expr): New function.
1211 * ax.h (gdb_free_agent_expr): New declaration.
1212 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1213 list.
1214 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1215 static.
1216 (clear_breakpoint_conditions_and_commands): New function.
1217 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1218 (clear_breakpoint_conditions_and_commands): New declaration.
1219
1220 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1221
1222 * linux-aarch64-low.c (asm/ptrace.h): Include.
1223
1224 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1225
1226 Fix TLS access for -static -pthread.
1227 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1228 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1229 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1230
1231 2014-05-20 Pedro Alves <palves@redhat.com>
1232
1233 * linux-aarch64-low.c (aarch64_insert_point)
1234 (aarch64_remove_point): No longer check whether the type is
1235 supported here. Adjust to new interface.
1236 (the_low_target): Install aarch64_supports_z_point_type as
1237 supports_z_point_type method.
1238 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1239 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1240 instead of a Z packet char. Adjust.
1241 (arm_supports_z_point_type): New function.
1242 (arm_insert_point, arm_remove_point): Adjust to new interface.
1243 (the_low_target): Install arm_supports_z_point_type.
1244 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1245 (cris_insert_point, cris_remove_point): Adjust to new interface.
1246 Don't check whether the type is supported here.
1247 (the_low_target): Install cris_supports_z_point_type.
1248 * linux-low.c (linux_supports_z_point_type): New function.
1249 (linux_insert_point, linux_remove_point): Adjust to new interface.
1250 * linux-low.h (struct linux_target_ops) <insert_point,
1251 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1252 raw_breakpoint pointer parameter.
1253 <supports_z_point_type>: New method.
1254 * linux-mips-low.c (mips_supports_z_point_type): New function.
1255 (mips_insert_point, mips_remove_point): Adjust to new interface.
1256 Use mips_supports_z_point_type.
1257 (the_low_target): Install mips_supports_z_point_type.
1258 * linux-ppc-low.c (the_low_target): Install NULL as
1259 supports_z_point_type method.
1260 * linux-s390-low.c (the_low_target): Install NULL as
1261 supports_z_point_type method.
1262 * linux-sparc-low.c (the_low_target): Install NULL as
1263 supports_z_point_type method.
1264 * linux-x86-low.c (x86_supports_z_point_type): New function.
1265 (x86_insert_point): Adjust to new insert_point interface. Use
1266 insert_memory_breakpoint. Adjust to new
1267 i386_low_insert_watchpoint interface.
1268 (x86_remove_point): Adjust to remove_point interface. Use
1269 remove_memory_breakpoint. Adjust to new
1270 i386_low_remove_watchpoint interface.
1271 (the_low_target): Install x86_supports_z_point_type.
1272 * lynx-low.c (lynx_target_ops): Install NULL as
1273 supports_z_point_type callback.
1274 * nto-low.c (nto_supports_z_point_type): New.
1275 (nto_insert_point, nto_remove_point): Adjust to new interface.
1276 (nto_target_ops): Install nto_supports_z_point_type.
1277 * mem-break.c: Adjust intro comment.
1278 (struct raw_breakpoint) <raw_type, size>: New fields.
1279 <inserted>: Update comment.
1280 <shlib_disabled>: Delete field.
1281 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1282 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1283 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1284 (raw_bkpt_type_to_target_hw_bp_type): New function.
1285 (find_enabled_raw_code_breakpoint_at): New function.
1286 (find_raw_breakpoint_at): New type and size parameters. Use them.
1287 (insert_memory_breakpoint): New function, based off
1288 set_raw_breakpoint_at.
1289 (remove_memory_breakpoint): New function.
1290 (set_raw_breakpoint_at): Reimplement.
1291 (set_breakpoint): New, based on set_breakpoint_at.
1292 (set_breakpoint_at): Reimplement.
1293 (delete_raw_breakpoint): Go through the_target->remove_point
1294 instead of assuming memory breakpoints.
1295 (find_gdb_breakpoint_at): Delete.
1296 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1297 (find_gdb_breakpoint): New function.
1298 (set_gdb_breakpoint_at): Delete.
1299 (z_type_supported): New function.
1300 (set_gdb_breakpoint_1): New function, loosely based off
1301 set_gdb_breakpoint_at.
1302 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1303 (delete_gdb_breakpoint_at): Delete.
1304 (delete_gdb_breakpoint_1): New function, loosely based off
1305 delete_gdb_breakpoint_at.
1306 (delete_gdb_breakpoint): New function.
1307 (clear_gdb_breakpoint_conditions): Rename to ...
1308 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1309 breakpoint.
1310 (add_condition_to_breakpoint): Make static.
1311 (add_breakpoint_condition): Take a struct breakpoint pointer
1312 instead of an address. Adjust.
1313 (gdb_condition_true_at_breakpoint): Rename to ...
1314 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1315 z_type parameter.
1316 (gdb_condition_true_at_breakpoint): Reimplement.
1317 (add_breakpoint_commands): Take a struct breakpoint pointer
1318 instead of an address. Adjust.
1319 (gdb_no_commands_at_breakpoint): Rename to ...
1320 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1321 parameter. Return true if no breakpoint was found. Change debug
1322 output.
1323 (gdb_no_commands_at_breakpoint): Reimplement.
1324 (run_breakpoint_commands): Rename to ...
1325 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1326 and change return type to boolean.
1327 (run_breakpoint_commands): New function.
1328 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1329 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1330 breakpoint. Go through the_target->remove_point instead of
1331 assuming memory breakpoint.
1332 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1333 software and hardware breakpoints.
1334 (reinsert_raw_breakpoint): Go through the_target->insert_point
1335 instead of assuming memory breakpoint.
1336 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1337 software and hardware breakpoints.
1338 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1339 Check both software and hardware breakpoints.
1340 (validate_inserted_breakpoint): Assert the breakpoint is a
1341 software breakpoint. Set the inserted flag to -1 instead of
1342 setting shlib_disabled.
1343 (delete_disabled_breakpoints): Adjust.
1344 (validate_breakpoints): Only validate software breakpoints.
1345 Adjust to inserted flag change.
1346 (check_mem_read, check_mem_write): Skip breakpoint types other
1347 than software breakpoints. Adjust to inserted flag change.
1348 * mem-break.h (enum raw_bkpt_type): New enum.
1349 (raw_breakpoint, struct process_info): Forward declare.
1350 (Z_packet_to_target_hw_bp_type): Delete declaration.
1351 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1352 (set_gdb_breakpoint, delete_gdb_breakpoint)
1353 (clear_breakpoint_conditions): New declarations.
1354 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1355 (breakpoint_inserted_here): Update comment.
1356 (add_breakpoint_condition, add_breakpoint_commands): Replace
1357 address parameter with a breakpoint pointer parameter.
1358 (gdb_breakpoint_here): Update comment.
1359 (delete_gdb_breakpoint_at): Delete.
1360 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1361 * server.c (process_point_options): Take a struct breakpoint
1362 pointer instead of an address. Adjust.
1363 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1364 delete_gdb_breakpoint.
1365 * spu-low.c (spu_target_ops): Install NULL as
1366 supports_z_point_type method.
1367 * target.h: Include mem-break.h.
1368 (struct target_ops) <prepare_to_access_memory>: Update comment.
1369 <supports_z_point_type>: New field.
1370 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1371 instead of a char. Also take a raw breakpoint pointer.
1372 * win32-arm-low.c (the_low_target): Install NULL as
1373 supports_z_point_type.
1374 * win32-i386-low.c (i386_supports_z_point_type): New function.
1375 (i386_insert_point, i386_remove_point): Adjust to new interface.
1376 (the_low_target): Install i386_supports_z_point_type.
1377 * win32-low.c (win32_supports_z_point_type): New function.
1378 (win32_insert_point, win32_remove_point): Adjust to new interface.
1379 (win32_target_ops): Install win32_supports_z_point_type.
1380 * win32-low.h (struct win32_target_ops):
1381 <supports_z_point_type>: New method.
1382 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1383 instead of a char. Also take a raw breakpoint pointer.
1384
1385 2014-05-20 Pedro Alves <palves@redhat.com>
1386
1387 * mem-break.h: Include break-common.h.
1388 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1389 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1390 (Z_packet_to_target_hw_bp_type): New declaration.
1391 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1392 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1393 (Z_PACKET_ACCESS_WP): Delete macros.
1394 (Z_packet_to_hw_type): Delete function.
1395 * i386-low.h: Don't include break-common.h here.
1396 (Z_packet_to_hw_type): Delete declaration.
1397 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1398 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1399 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1400 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1401 * linux-aarch64-low.c: Don't include break-common.h here.
1402 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1403 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1404 (Z_packet_to_target_hw_bp_type): Delete function.
1405 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1406 function.
1407 (mips_insert_point, mips_remove_point): Use
1408 Z_packet_to_target_hw_bp_type.
1409
1410 2014-05-20 Pedro Alves <palves@redhat.com>
1411
1412 * linux-aarch64-low.c: Include break-common.h.
1413 (enum target_point_type): Delete.
1414 (Z_packet_to_point_type): Rename to ...
1415 (Z_packet_to_target_hw_bp_type): ... this, and return a
1416 target_hw_bp_type instead.
1417 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1418 instead of an enum target_point_type.
1419 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1420 breakpoint type.
1421 (aarch64_dr_state_insert_one_point)
1422 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1423 (aarch64_handle_aligned_watchpoint)
1424 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1425 Take an enum target_hw_bp_type instead of an enum
1426 target_point_type.
1427 (aarch64_supports_z_point_type): New function.
1428 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1429 use Z_packet_to_target_hw_bp_type.
1430
1431 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1432
1433 * configure.ac: Only use -Werror by default when DEVELOPMENT
1434 is true.
1435 * configure: Regenerate.
1436
1437 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1438
1439 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1440 * linux-x86-low.c (X86_64_USER_REGS): New.
1441 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1442
1443 2014-04-28 Yao Qi <yao@codesourcery.com>
1444
1445 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1446 name.
1447
1448 2014-04-25 Pedro Alves <palves@redhat.com>
1449
1450 PR server/16255
1451 * linux-low.c (linux_attach_fail_reason_string): New function.
1452 (linux_attach_lwp): Delete.
1453 (linux_attach_lwp_1): Rename to ...
1454 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1455 argument. Remove "initial" parameter. Return int instead of
1456 void. Don't error or warn here.
1457 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1458 failure to attach to the tgid. Call warning when failing to
1459 attach to an lwp.
1460 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1461 argument. Remove "initial" parameter. Return int instead of
1462 void. Don't error or warn here.
1463 (linux_attach_fail_reason_string): New declaration.
1464 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1465 interface change. Use linux_attach_fail_reason_string.
1466
1467 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1468 Walfred Tedeschi <walfred.tedeschi@intel.com>
1469
1470 * Makefile.in: Added rules to handle new files
1471 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1472 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1473 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1474 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1475 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1476 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1477 x32-avx512-linux.o.
1478 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1479 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1480 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1481 i386/x32-avx512.xml.
1482 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1483 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1484 i386/x32-avx512-linux.xml.
1485 * i387-fp.c (num_avx512_k_registers): New constant for number
1486 of K registers.
1487 (num_avx512_zmmh_low_registers): New constant for number of
1488 lower ZMM registers (0-15).
1489 (num_avx512_zmmh_high_registers): New constant for number of
1490 higher ZMM registers (16-31).
1491 (num_avx512_ymmh_registers): New contant for number of higher
1492 YMM registers (ymm16-31 added by avx521 on x86_64).
1493 (num_avx512_xmm_registers): New constant for number of higher
1494 XMM registers (xmm16-31 added by AVX512 on x86_64).
1495 (struct i387_xsave): Add space for AVX512 registers.
1496 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1497 Add code to handle AVX512 registers.
1498 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1499 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1500 prototypei from generated file.
1501 (tdesc_amd64_avx512_linux): Likewise.
1502 (init_registers_x32_avx512_linux): Likewise.
1503 (tdesc_x32_avx512_linux): Likewise.
1504 (init_registers_i386_avx512_linux): Likewise.
1505 (tdesc_i386_avx512_linux): Likewise.
1506 (x86_64_regmap): Add AVX512 registers.
1507 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1508 mask.
1509 (initialize_low_arch): Add code to initialize AVX512 registers.
1510
1511 2014-04-23 Pedro Alves <palves@redhat.com>
1512
1513 * mem-break.c (find_gdb_breakpoint_at): Make static.
1514 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1515
1516 2014-04-23 Pedro Alves <palves@redhat.com>
1517
1518 * i386-low.c: Don't include break-common.h here.
1519 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1520 prototype to take target_hw_bp_type as argument instead of a Z
1521 packet char.
1522 * i386-low.h: Include break-common.h here.
1523 (Z_packet_to_hw_type): Declare.
1524 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1525 prototypes.
1526 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1527 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1528 (x86_remove_point): Convert the packet number to a
1529 target_hw_bp_type before calling i386_low_remove_watchpoint.
1530 * win32-i386-low.c (i386_insert_point): Convert the packet number
1531 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1532 (i386_remove_point): Convert the packet number to a
1533 target_hw_bp_type before calling i386_low_remove_watchpoint.
1534
1535 2014-04-23 Pedro Alves <palves@redhat.com>
1536
1537 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1538
1539 2014-04-10 Pedro Alves <palves@redhat.com>
1540
1541 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1542 Check if the condition or command is NULL before checking if the
1543 breakpoint is known. On success, return true.
1544 * mem-break.h (add_breakpoint_condition): Document return.
1545 (add_breakpoint_commands): Add describing comment.
1546 * server.c (skip_to_semicolon): New function.
1547 (process_point_options): Use it.
1548
1549 2014-04-09 Pedro Alves <palves@redhat.com>
1550
1551 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1552 to lwpid_of.
1553
1554 2014-02-27 Pedro Alves <palves@redhat.com>
1555
1556 PR 12702
1557 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1558 macros.
1559 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1560 output.
1561 (last_thread_of_process_p): Take a PID argument instead of a
1562 thread pointer.
1563 (linux_wait_for_lwp): Delete.
1564 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1565 functions.
1566 (linux_low_filter_event): New function, party factored out from
1567 linux_wait_for_event.
1568 (linux_wait_for_event): Rename to ...
1569 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1570 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1571 sigsuspend. Check for zombie leaders.
1572 (linux_wait_for_event): Reimplement as wrapper around
1573 linux_wait_for_event_filtered.
1574 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1575 a normal or signal exit is seen, it's the whole process exiting.
1576 (wait_for_sigstop): No longer a for_each_inferior callback.
1577 Rewrite on top of linux_wait_for_event_filtered.
1578 (stop_all_lwps): Call wait_for_sigstop directly.
1579 * server.c (resume, handle_target_event): Handle
1580 TARGET_WAITKIND_NO_RESUMED.
1581
1582 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1583
1584 * win32-low.c (psapi_get_dll_name,
1585 * win32_CreateToolhelp32Snapshot): Delete.
1586 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1587 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1588 Delete.
1589 (handle_load_dll): Add function description.
1590 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1591
1592 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1593
1594 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1595 Add comment.
1596 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1597 base address when calling win32_add_one_solib.
1598 (handle_load_dll): Delete local variable load_addr.
1599 Remove 0x1000 offset applied to DLL base address when calling
1600 win32_add_one_solib.
1601 (handle_unload_dll): Add comment.
1602
1603 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1604
1605 * win32-low.c (win32_add_all_dlls): Renames
1606 win32_ensure_ntdll_loaded. Rewrite function documentation.
1607 Adjust implementation to always load all DLLs.
1608 Add 0x1000 offset to DLL base address when calling
1609 win32_add_one_solib.
1610 (child_initialization_done): New static global.
1611 (do_initial_child_stuff): Set child_initialization_done to
1612 zero during child initialization, and 1 after. Replace call
1613 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1614 Add comment.
1615 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1616 (handle_unload_dll): Add function documentation.
1617 (get_child_debug_event): Ignore load and unload DLL events
1618 during child initialization.
1619
1620 2014-02-20 Doug Evans <dje@google.com>
1621
1622 Remove global all_lwps.
1623 * inferiors.h (ptid_of): Move here from linux-low.h.
1624 (pid_of, lwpid_of): Ditto.
1625 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1626 parameter is a struct thread_info * now.
1627 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1628 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1629 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1630 directly.
1631 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1632 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1633 * linux-arm-low.c (update_registers_callback): Update, "entry"
1634 parameter is a struct thread_info * now.
1635 Fetch lwpid from current_inferior directly.
1636 (arm_insert_point): Pass &all_threads to find_inferior instead of
1637 &all_lwps.
1638 (arm_remove_point): Ditto.
1639 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1640 (arm_prepare_to_resume): Fetch pid from thread.
1641 (arm_read_description): Fetch lwpid from current_inferior directly.
1642 * linux-low.c (all_lwps): Delete.
1643 (delete_lwp): Delete call to remove_inferior.
1644 (handle_extended_wait): Fetch lwpid from thread.
1645 (add_lwp): Don't set lwp->entry.id. Remove call to
1646 add_inferior_to_list.
1647 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1648 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1649 (kill_one_lwp_callback): Ditto.
1650 (linux_kill): Don't dereference NULL pointer.
1651 Fetch ptid,lwpid from thread.
1652 (get_detach_signal): Fetch ptid from thread.
1653 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1654 Simplify call to regcache_invalidate_thread.
1655 (delete_lwp_callback): Update, "entry" parameter is a
1656 struct thread_info * now. Fetch pid from thread.
1657 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1658 (status_pending_p_callback): Update, "entry" parameter is a
1659 struct thread_info * now. Fetch ptid from thread.
1660 (find_lwp_pid): Update, "entry" parameter is a
1661 struct thread_info * now.
1662 (linux_wait_for_lwp): Fetch pid from thread.
1663 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1664 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1665 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1666 (dequeue_one_deferred_signal): Ditto.
1667 (cancel_breakpoint): Fetch ptid from current_inferior.
1668 (linux_wait_for_event): Pass &all_threads to find_inferior,
1669 not &all_lwps. Fetch ptid, lwpid from thread.
1670 (count_events_callback): Update, "entry" parameter is a
1671 struct thread_info * now.
1672 (select_singlestep_lwp_callback): Ditto.
1673 (select_event_lwp_callback): Ditto.
1674 (cancel_breakpoints_callback): Ditto.
1675 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1676 not &all_lwps.
1677 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1678 (unsuspend_one_lwp): Update, "entry" parameter is a
1679 struct thread_info * now.
1680 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1681 not &all_lwps.
1682 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1683 Fetch lwpid from thread, not lwp.
1684 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1685 Pass &all_threads to find_inferior, not &all_lwps.
1686 (send_sigstop): Fetch lwpid from thread, not lwp.
1687 (send_sigstop_callback): Update, "entry" parameter is a
1688 struct thread_info * now.
1689 (suspend_and_send_sigstop_callback): Ditto.
1690 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1691 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1692 struct thread_info * now.
1693 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1694 from thread, lwp.
1695 (lwp_running): Update, "entry" parameter is a
1696 struct thread_info * now.
1697 (stop_all_lwps): Fetch ptid from thread.
1698 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1699 (linux_resume_one_lwp): Fetch lwpid from thread.
1700 (linux_set_resume_request): Update, "entry" parameter is a
1701 struct thread_info * now. Fetch pid, lwpid from thread.
1702 (resume_status_pending_p): Update, "entry" parameter is a
1703 struct thread_info * now.
1704 (need_step_over_p): Ditto. Fetch lwpid from thread.
1705 (start_step_over): Fetch lwpid from thread.
1706 (linux_resume_one_thread): Update, "entry" parameter is a
1707 struct thread_info * now. Fetch lwpid from thread.
1708 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1709 (proceed_one_lwp): Update, "entry" parameter is a
1710 struct thread_info * now. Fetch lwpid from thread.
1711 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1712 struct thread_info * now.
1713 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1714 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1715 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1716 directly.
1717 (regsets_store_inferior_registers): Ditto.
1718 (fetch_register, store_register): Ditto.
1719 (linux_read_memory, linux_write_memory): Ditto.
1720 (linux_request_interrupt): Ditto.
1721 (linux_read_auxv): Ditto.
1722 (linux_xfer_siginfo): Ditto.
1723 (linux_qxfer_spu): Ditto.
1724 (linux_qxfer_libraries_svr4): Ditto.
1725 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1726 moved to inferiors.h.
1727 (get_lwp): Delete.
1728 (get_thread_lwp): Update.
1729 (struct lwp_info): Delete member "entry". Simplify comment for
1730 member "thread".
1731 (all_lwps): Delete.
1732 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1733 current_inferior directly.
1734 (update_watch_registers_callback): Update, "entry" parameter is a
1735 struct thread_info * now. Fetch pid from thread.
1736 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1737 (mips_insert_point): Fetch lwpid from current_inferior.
1738 Pass &all_threads to find_inferior, not &all_lwps.
1739 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1740 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1741 directly.
1742 (mips_stopped_data_address): Ditto.
1743 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1744 directly.
1745 * linux-tile-low.c (tile_arch_setup): Ditto.
1746 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1747 (update_debug_registers_callback): Update, "entry" parameter is a
1748 struct thread_info * now. Fetch pid from thread.
1749 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1750 Pass &all_threads to find_inferior, not &all_lwps.
1751 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1752 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1753 Pass &all_threads to find_inferior, not &all_lwps.
1754 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1755 (i386_dr_low_get_status): Ditto.
1756 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1757 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1758 (x86_linux_read_description): Ditto.
1759 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1760
1761 2014-02-20 Doug Evans <dje@google.com>
1762
1763 * inferiors.c (get_first_inferior): Fix buglet.
1764
1765 2014-02-19 Doug Evans <dje@google.com>
1766
1767 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1768 * inferiors.c (add_thread): Change result type to struct thread_info *.
1769 All callers updated.
1770 (add_lwp): Call add_thread here instead of in callers.
1771 All callers updated.
1772 * linux-low.h (get_lwp_thread): Rewrite.
1773 (struct lwp_info): New member "thread".
1774
1775 2014-02-19 Doug Evans <dje@google.com>
1776
1777 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1778 All callers updated.
1779
1780 2014-02-19 Doug Evans <dje@google.com>
1781
1782 * inferiors.c (add_thread): Fix whitespace.
1783
1784 2014-02-19 Doug Evans <dje@google.com>
1785
1786 * dll.c (clear_dlls): Replace accessing list implemention details
1787 with API function.
1788 * gdbthread.h (get_first_thread): Declare.
1789 * inferiors.c (for_each_inferior_with_data): New function.
1790 (get_first_thread): New function.
1791 (find_thread_ptid): Simplify.
1792 (get_first_inferior): New function.
1793 (clear_list): Delete.
1794 (one_inferior_p): New function.
1795 (clear_inferior_list): New function.
1796 (clear_inferiors): Update.
1797 * inferiors.h (for_each_inferior_with_data): Declare.
1798 (clear_inferior_list): Declare.
1799 (one_inferior_p): Declare.
1800 (get_first_inferior): Declare.
1801 * linux-low.c (linux_wait_for_event): Replace accessing list
1802 implemention details with API function.
1803 * server.c (target_running): Ditto.
1804 (accumulate_file_name_length): New function.
1805 (emit_dll_description): New function.
1806 (handle_qxfer_libraries): Replace accessing list implemention
1807 details with API function.
1808 (handle_qxfer_threads_worker): New function.
1809 (handle_qxfer_threads_proper): Replace accessing list implemention
1810 details with API function.
1811 (handle_query): Ditto.
1812 (visit_actioned_threads_callback_ftype): New typedef.
1813 (visit_actioned_threads_data): New struct.
1814 (visit_actioned_threads): Rewrite to be find_inferior callback.
1815 (resume): Call find_inferior.
1816 (handle_status): Replace accessing list implemention
1817 details with API function.
1818 (process_serial_event): Replace accessing list implemention details
1819 with API function.
1820 * target.c (set_desired_inferior): Replace accessing list implemention
1821 details with API function.
1822 * tracepoint.c (same_process_p): New function.
1823 (gdb_agent_about_to_close): Replace accessing list implemention
1824 details with API function.
1825 * win32-low.c (child_delete_thread): Replace accessing list
1826 implemention details with API function.
1827 (match_dll_by_basename): New function.
1828 (dll_is_loaded_by_basename): New function.
1829 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1830 details call to dll_is_loaded_by_basename.
1831
1832 2014-02-19 Doug Evans <dje@google.com>
1833
1834 * dll.h (struct dll_info): Add comment.
1835 * gdbthread.h (struct thread_info): Add comment.
1836 (current_ptid): Simplify.
1837 * inferiors.c (add_process): Update.
1838 (remove_process): Update.
1839 * inferiors.h (struct process_info): Rename member "head" to "entry".
1840 * linux-low.c (delete_lwp): Update.
1841 (add_lwp): Update.
1842 (last_thread_of_process_p): Update.
1843 (kill_one_lwp_callback, linux_kill): Update.
1844 (status_pending_p_callback): Update.
1845 (wait_for_sigstop): Update. Simplify read of ptid.
1846 (start_step_over): Update.
1847 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1848 (get_lwp_thread): Update.
1849 (struct lwp_info): Rename member "head" to "entry".
1850 * regcache.h (inferior_list_entry): Delete.
1851 * server.c (kill_inferior_callback): Update.
1852 (detach_or_kill_inferior_callback): Update.
1853 (print_started_pid): Update.
1854 (print_attached_pid): Update.
1855 (process_serial_event): Simplify read of ptid.
1856 * thread-db.c (thread_db_create_event): Update.
1857 (thread_db_get_tls_address): Update.
1858 * win32-low.c (current_inferior_ptid): Simplify.
1859
1860 2014-02-19 Tom Tromey <tromey@redhat.com>
1861
1862 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1863 argument.
1864 (target_supports_btrace): Update.
1865
1866 2014-02-14 Yao Qi <yao@codesourcery.com>
1867
1868 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1869 (rsp-low-ipa.o): New target.
1870
1871 2014-02-12 Tom Tromey <tromey@redhat.com>
1872
1873 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1874 convert_ascii_to_int.
1875 * regcache.c (registers_to_string): Likewise.
1876 * remote-utils.c (decode_M_packet): Likewise.
1877 * server.c (process_serial_event): Likewise.
1878
1879 2014-02-12 Tom Tromey <tromey@redhat.com>
1880
1881 * server.c (handle_query, handle_v_run): Use hex2bin, not
1882 unhexify.
1883 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1884
1885 2014-02-12 Tom Tromey <tromey@redhat.com>
1886
1887 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1888 convert_int_to_ascii.
1889 * regcache.c (registers_to_string, collect_register_as_string):
1890 Likewise.
1891 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1892 Likewise.
1893 * server.c (process_serial_event): Likewise.
1894 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1895 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1896
1897 2014-02-12 Tom Tromey <tromey@redhat.com>
1898
1899 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1900 bin2hex, not hexify.
1901 * tracepoint.c (cmd_qtstatus): Likewise.
1902
1903 2014-02-12 Tom Tromey <tromey@redhat.com>
1904
1905 * remote-utils.c (monitor_output): Pass explicit length to
1906 hexify.
1907
1908 2014-02-12 Tom Tromey <tromey@redhat.com>
1909
1910 * tracepoint.c: Include rsp-low.h.
1911 * server.c: Include rsp-low.h.
1912 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1913 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1914 declare.
1915 * remote-utils.c: Include rsp-low.h.
1916 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1917 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1918 (convert_int_to_ascii, convert_ascii_to_int): Move to
1919 common/rsp-low.c.
1920 * regcache.c: Include rsp-low.h.
1921 * ax.c: Include rsp-low.h.
1922 * Makefile.in (SFILES): Add common/rsp-low.c.
1923 (OBS): Add rsp-low.o.
1924 (rsp-low.o): New target.
1925
1926 2014-02-12 Tom Tromey <tromey@redhat.com>
1927
1928 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1929 Include print-utils.h.
1930 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1931 (plongest, thirty_two, phex_nz): Remove.
1932 * Makefile.in (SFILES): Add common/print-utils.c.
1933 (OBS): Add print-utils.o.
1934 (print-utils-ipa.o): New target.
1935 (print-utils.o): New target.
1936 (IPA_OBJS): Add print-utils-ipa.o.
1937
1938 2014-02-06 Tom Tromey <tromey@redhat.com>
1939
1940 * Makefile.in (SFILES): Fix indentation.
1941
1942 2014-02-05 Doug Evans <dje@google.com>
1943
1944 * linux-low.c (linux_wait_for_event): Improve comment.
1945 (linux_wait_1): Keep current_inferior in sync with event_child.
1946
1947 2014-01-22 Doug Evans <dje@google.com>
1948
1949 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1950
1951 2014-01-22 Doug Evans <dje@google.com>
1952
1953 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1954 * configure: Regenerate.
1955 * config.in: Regenerate.
1956 * Makefile.in (SFILES): Add debug.c.
1957 (OBS): Add debug.o.
1958 * debug.c: New file.
1959 * debug.h: New file.
1960 * linux-aarch64-low.c (*): Update all debugging printfs to use
1961 debug_printf instead of fprintf.
1962 * linux-arm-low.c (*): Ditto.
1963 * linux-cris-low.c (*): Ditto.
1964 * linux-crisv32-low.c (*): Ditto.
1965 * linux-m32r-low.c (*): Ditto.
1966 * linux-sparc-low.c (*): Ditto.
1967 * linux-x86.c (*): Ditto.
1968 * linux-low.c (*): Ditto.
1969 (linux_wait_1): Add calls to debug_enter, debug_exit.
1970 (linux_wait): Remove redundant debugging printf.
1971 (stop_all_lwps): Add calls to debug_enter, debug_exit.
1972 (linux_resume, unstop_all_lwps): Ditto.
1973 * mem-break.c (*): Update all debugging printfs to use
1974 debug_printf instead of fprintf.
1975 * remote-utils.c (*): Ditto.
1976 * thread-db.c (*): Ditto.
1977 * server.c #include <ctype.h>, "gdb_vecs.h".
1978 (debug_threads): Moved to debug.c.
1979 (*): Update all debugging printfs to use debug_printf instead of
1980 fprintf.
1981 (start_inferior): Replace call to fflush with call to debug_flush.
1982 (monitor_show_help): Mention set debug-format.
1983 (parse_debug_format_options): New function.
1984 (handle_monitor_command): Handle "monitor set debug-format".
1985 (gdbserver_usage): Mention --debug-format.
1986 (main): Parse --debug-format.
1987 * server.h (debug_threads): Declaration moved to debug.h.
1988 #include "debug.h".
1989 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1990 trace_debug_1 that uses debug_printf.
1991 (tracepoint_look_up_symbols): Update all debugging printfs to use
1992 debug_printf instead of fprintf.
1993
1994 2014-01-20 Baruch Siach <baruch@tkos.co.il>
1995
1996 * linux-xtensa-low.c: Include asm/ptrace.h instead of
1997 sys/ptrace.h.
1998
1999 2014-01-17 Pedro Alves <palves@redhat.com>
2000
2001 PR build/16445
2002 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2003 defined after including gdb_proc_service.h.
2004
2005 2014-01-16 Doug Evans <dje@google.com>
2006
2007 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2008 (match_dll): Use it.
2009
2010 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2011
2012 * target.h (target_ops) <read_btrace>: Change parameters and
2013 return type to allow error reporting.
2014 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2015 trace reading errors on.
2016 * linux-low.c (linux_low_read_btrace): Pass trace reading
2017 errors on.
2018 (linux_low_disable_btrace): New.
2019
2020 2014-01-15 Doug Evans <dje@google.com>
2021
2022 * inferiors.c (thread_id_to_gdb_id): Delete.
2023 * inferiors.h (thread_id_to_gdb_id): Delete.
2024
2025 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2026
2027 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2028 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2029 versions.
2030
2031 2014-01-08 Pedro Alves <palves@redhat.com>
2032
2033 * server.c (handle_status): Don't discard previous queued stop
2034 replies or thread's pending status here.
2035 (main) <disconnection>: Do it here instead.
2036
2037 2014-01-08 Pedro Alves <palves@redhat.com>
2038
2039 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2040 * server.c (visit_actioned_threads, handle_pending_status): New
2041 function.
2042 (handle_v_cont): Factor out parts to ...
2043 (resume): ... this new function. If in all-stop, and a thread
2044 being resumed has a pending status, report it without actually
2045 resuming.
2046 (myresume): Adjust to use the new 'resume' function.
2047 (clear_pending_status_callback, set_pending_status_callback)
2048 (find_status_pending_thread_callback): New functions.
2049 (handle_status): Handle the case of multiple threads having
2050 interesting statuses to report. Report threads' real last signal
2051 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2052 with an interesting thread to report the status for, instead of
2053 always reporting the status of the first thread.
2054
2055 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2056
2057 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2058 * gdbreplay.c (gdbreplay_version): Likewise.
2059
2060 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2061
2062 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2063 iov.iov_len with the real length in use.
2064
2065 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2066
2067 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2068 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2069 for all targets that use win32-low.c.
2070 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2071 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2072
2073 2013-12-13 Pedro Alves <palves@redhat.com>
2074
2075 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2076 if equal to TARGET_WAITKIND_LOADED.
2077 * win32-low.c (cached_status): New static global.
2078 (win32_wait): Add declaration.
2079 (do_initial_child_stuff): Flush all initial pending debug events
2080 up to the initial breakpoint.
2081 (win32_wait): If CACHED_STATUS was set, return that instead
2082 of doing a real wait. Remove the code resuming the execution
2083 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2084 during the initial phase. Also remove the code changing
2085 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2086 TARGET_WAITKIND_STOPPED.
2087
2088 2013-12-11 Yao Qi <yao@codesourcery.com>
2089
2090 * notif.c (handle_notif_ack): Return 0 if no notification
2091 matches.
2092
2093 2013-11-20 Doug Evans <dje@google.com>
2094
2095 * linux-low.c (linux_set_resume_request): Fix comment.
2096
2097 2013-11-20 Doug Evans <dje@google.com>
2098
2099 * linux-low.c (resume_status_pending_p): Tweak comment.
2100
2101 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2102
2103 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2104 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2105 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2106 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2107 (srv_amd64_regobj): Add amd64-mpx.o.
2108 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2109 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2110 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2111 * i387-fp.c (num_pl_bnd_register) Added constant.
2112 (num_pl_bnd_cfg_registers) Added constant.
2113 (struct i387_xsave) Added reserved area and MPX fields.
2114 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2115 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2116 function.
2117 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2118 (init_registers_amd64_mpx_linux): Declare new function.
2119 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2120 (x86_64_regmap): Add MPX registers.
2121 (x86_linux_read_description): Add MPX case.
2122 (initialize_low_arch): Initialize MPX targets.
2123
2124 2013-11-18 Tom Tromey <tromey@redhat.com>
2125
2126 * configure: Rebuild.
2127 * configure.ac: Don't check for stdlib.h.
2128 * gdbreplay.c: Unconditionally include stdlib.h.
2129
2130 2013-11-18 Tom Tromey <tromey@redhat.com>
2131
2132 * config.in: Rebuild.
2133 * configure: Rebuild.
2134 * configure.ac: Don't use AC_HEADER_DIRENT.
2135
2136 2013-11-18 Tom Tromey <tromey@redhat.com>
2137
2138 * server.h: Don't check HAVE_STRING_H.
2139 * gdbreplay.c: Don't check HAVE_STRING_H.
2140 * configure: Rebuild.
2141
2142 2013-11-18 Tom Tromey <tromey@redhat.com>
2143
2144 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2145 LIBGNU.
2146
2147 2013-11-08 Tom Tromey <tromey@redhat.com>
2148
2149 * configure, config.in: Rebuild.
2150 * configure.ac: Remove unused configury.
2151
2152 2013-11-08 Tom Tromey <tromey@redhat.com>
2153
2154 * acinclude.m4: Include common.m4, codeset.m4.
2155 * configure, config.in: Rebuild.
2156 * configure.ac: Use GDB_AC_COMMON.
2157
2158 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2159
2160 * linux-s390-low.c (HWCAP_S390_TE): New define.
2161 (s390_arch_setup): Consider the TE field in the HWCAP for
2162 determining 'have_regset_tdb'.
2163
2164 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2165
2166 PR gdb/16014
2167 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2168 call to sizeof.
2169
2170 2013-10-02 Pedro Alves <palves@redhat.com>
2171
2172 * server.c (process_serial_event): Don't output "GDBserver
2173 exiting" if GDB is connected through stdio.
2174 * target.c (mywait): Likewise, be silent if GDB is connected
2175 through stdio.
2176
2177 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2178
2179 * lynx-low.c (lynx_add_threads_after_attach): New function.
2180 (lynx_attach): Remove call to add_thread. Add call to
2181 lynx_add_threads_after_attach instead.
2182
2183 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2184
2185 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2186 * config.in, configure: Regenerated.
2187
2188 2013-09-18 Yao Qi <yao@codesourcery.com>
2189
2190 PR server/15959
2191 * server.c (start_inferior): Clear 'resume_info'.
2192
2193 2013-09-16 Jiong Wang <jiwang@tilera.com>
2194
2195 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2196 for each register.
2197
2198 2013-09-16 Jiong Wang <jiwang@tilera.com>
2199
2200 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2201 linux-tile-low.o to srv_tgtobj.
2202
2203 2013-09-16 Will Newton <will.newton@linaro.org>
2204
2205 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2206 out regs.
2207
2208 2013-09-06 Pedro Alves <palves@redhat.com>
2209
2210 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2211 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2212 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2213 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2214 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2215 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2216
2217 2013-09-06 Pedro Alves <palves@redhat.com>
2218
2219 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2220 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2221
2222 2013-09-06 Pedro Alves <palves@redhat.com>
2223
2224 * linux-amd64-ipa.c: Include tracepoint.h.
2225 * linux-i386-ipa.c: Include tracepoint.h.
2226
2227 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2228
2229 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2230 (ps_get_thread_area): New function.
2231
2232 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2233
2234 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2235 (initialize_low_arch): Call init_registers_crisv32 rather than
2236 init_register_crisv32.
2237
2238 2013-09-05 Pedro Alves <palves@redhat.com>
2239
2240 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2241 to ...
2242 * hostio.h: ... this new file.
2243 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2244 win32-low.c: Include hostio.h.
2245
2246 2013-09-05 Pedro Alves <palves@redhat.com>
2247
2248 * server.h (gdb_client_data, handler_func, callback_handler_func)
2249 (delete_file_handler, add_file_handler, append_callback_event)
2250 (delete_callback_event, start_event_loop, initialize_event_loop):
2251 Move to event-loop.h and include it.
2252 * event-loop.h: New file.
2253
2254 2013-09-05 Pedro Alves <palves@redhat.com>
2255
2256 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2257 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2258 (loaded_dll, unloaded_dll): Move to ...
2259 * dll.h: ... this new file.
2260 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2261
2262 2013-09-05 Pedro Alves <palves@redhat.com>
2263
2264 * server.h (current_process, get_thread_process, all_processes)
2265 (add_inferior_to_list, for_each_inferior, current_inferior)
2266 (remove_inferior, add_process, remove_process, find_process_pid)
2267 (have_started_inferiors_p, have_attached_inferiors_p)
2268 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2269 (clear_inferiors, find_inferior, find_inferior_id)
2270 (inferior_target_data, set_inferior_target_data)
2271 (inferior_regcache_data, set_inferior_regcache_data): Move to
2272 inferiors.h, and include it.
2273 * inferiors.h: New file.
2274
2275 2013-09-05 Pedro Alves <palves@redhat.com>
2276
2277 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2278 Move ...
2279 * ax.h: ... here.
2280
2281 2013-09-05 Pedro Alves <palves@redhat.com>
2282
2283 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2284 tracepoint.h.
2285 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2286 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2287 (handle_tracepoint_general_set, handle_tracepoint_query)
2288 (tracepoint_finished_step, tracepoint_was_hit)
2289 (release_while_stepping_state_list, current_traceframe)
2290 (in_readonly_region, traceframe_read_mem)
2291 (fetch_traceframe_registers, traceframe_read_sdata)
2292 (traceframe_read_info, struct fast_tpoint_collect_status)
2293 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2294 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2295 (supply_fast_tracepoint_registers)
2296 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2297 (ipa_tdesc, claim_trampoline_space)
2298 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2299 (agent_mem_read, agent_get_trace_state_variable_value)
2300 (agent_set_trace_state_variable_value, agent_tsv_read)
2301 (agent_mem_read_string, get_raw_reg_func_addr)
2302 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2303 * tracepoint.h: ... this new file.
2304
2305 2013-09-05 Pedro Alves <palves@redhat.com>
2306
2307 * server.h (perror_with_name, error, fatal, warning, paddress)
2308 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2309 include it.
2310 * utils.h: New file.
2311
2312 2013-09-05 Pedro Alves <palves@redhat.com>
2313
2314 * server.h (remote_debug, noack_mode, transport_is_reliable)
2315 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2316 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2317 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2318 (write_enn, initialize_async_io, enable_async_io)
2319 (disable_async_io, check_remote_input_interrupt_request)
2320 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2321 (dead_thread_notify, prepare_resume_reply)
2322 (decode_address_to_semicolon, decode_address, decode_m_packet)
2323 (decode_M_packet, decode_X_packet, decode_xfer_write)
2324 (decode_search_memory_packet, unhexify, hexify)
2325 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2326 (look_up_one_symbol, relocate_instruction)
2327 (monitor_output): Move to remote-utils.h, and include it.
2328 * remote-utils.h: New file.
2329
2330 2013-09-05 Pedro Alves <palves@redhat.com>
2331
2332 * server.h (_): Delete.
2333
2334 2013-09-02 Pedro Alves <palves@redhat.com>
2335
2336 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2337 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2338 allocated.
2339 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2340
2341 2013-09-02 Pierre Muller <muller@sourceware.org>
2342
2343 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2344 or WriteProcessMemory complete successfully and handle
2345 ERROR_PARTIAL_COPY error.
2346
2347 2013-09-02 Pedro Alves <palves@redhat.com>
2348
2349 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2350 error instead of EIO.
2351
2352 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2353
2354 PR server/15604
2355 * linux-low.c: Include filestuff.h.
2356 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2357 * lynx-low.c: Include filestuff.h.
2358 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2359 * server.c: Include filestuff.h.
2360 (main): Call notice_open_fds.
2361 * spu-low.c: Include filestuff.h.
2362 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2363
2364 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2365
2366 * Makefile.in: Explain why ../target and ../nat are not
2367 listed as include file search paths.
2368 (linux-waitpid.o): New object file rule.
2369 * configure.srv (srv_native_linux_obj): New variable.
2370 Replace all occurrences of linux native object files with
2371 $srv_native_linux_obj.
2372 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2373 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2374 (linux_enable_event_reporting): Remove declaration.
2375 (my_waitpid): Moved to common/linux-waitpid.c.
2376 (linux_wait_for_event): Pass ptid when calling
2377 linux_enable_event_reporting.
2378 (linux_supports_tracefork_flag): Remove.
2379 (linux_enable_event_reporting): Likewise.
2380 (linux_tracefork_grandchild): Remove.
2381 (STACK_SIZE): Moved to common/linux-ptrace.c.
2382 (linux_tracefork_child): Remove.
2383 (linux_test_for_tracefork): Remove.
2384 (linux_look_up_symbols): Call linux_supports_traceclone.
2385 (initialize_low): Remove call to linux_test_for_tracefork.
2386 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2387 common/linux-ptrace.h.
2388 (PTRACE_TYPE_ARG4): Likewise.
2389 Include linux-ptrace.h.
2390
2391 2013-08-21 Pedro Alves <palves@redhat.com>
2392
2393 * config.in: Renegerate.
2394
2395 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2396
2397 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2398 (SFILES): Remove $(srcdir)/common/target-common.c and
2399 add $(srcdir)/target/waitstatus.c.
2400 (OBS): Remove target-common.o and add waitstatus.o.
2401 (server_h): Remove $(srcdir)/../common/target-common.h and
2402 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2403 and $(srcdir)/../target/waitstatus.h.
2404 (target-common.o): Remove.
2405 (waitstatus.o): New target object file.
2406 * target.h: Do not include target-common.h and
2407 include target/resume.h, target/wait.h and
2408 target/waitstatus.h.
2409
2410 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2411
2412 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2413 to PTRACE_TYPE_ARG3.
2414 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2415 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2416 PTRACE_TYPE_ARG4.
2417 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2418 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2419
2420 2013-07-27 Jie Zhang <jie@codesourcery.com>
2421 Daniel Jacobowitz <dan@codesourcery.com>
2422 Yao Qi <yao@codesourcery.com>
2423
2424 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2425 (mips-linux-watch.o): New rule.
2426 (mips_linux_watch_h): New variable.
2427 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2428 srv_tgtobj.
2429 * linux-mips-low.c: Include mips-linux-watch.h.
2430 (struct arch_process_info, struct arch_lwp_info): New.
2431 (update_watch_registers_callback): New function.
2432 (mips_linux_new_process, mips_linux_new_thread) New functions.
2433 (mips_linux_prepare_to_resume, mips_insert_point): New
2434 functions.
2435 (mips_remove_point, mips_stopped_by_watchpoint): New
2436 functions.
2437 (rsp_bp_type_to_target_hw_bp_type): New function.
2438 (mips_stopped_data_address): New function.
2439 (the_low_target): Add watchpoint support functions.
2440
2441 2013-07-27 Yao Qi <yao@codesourcery.com>
2442
2443 * i386-low.c: Include break-common.h.
2444 (enum target_hw_bp_type): Remove.
2445
2446 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2447
2448 * Makefile.in (SFILES): /common/target-common.c.
2449 (OBS): Add target-common.o.
2450 (server_h): Add $(srcdir)/../common/target-common.h.
2451 (target-common.o): New target.
2452 * server.c (queue_stop_reply_callback): Free
2453 status string after use.
2454 * target.c (target_waitstatus_to_string): Remove.
2455 * target.h: Include target-common.h.
2456 (resume_kind): Likewise.
2457 (target_waitkind): Likewise.
2458 (target_waitstatus): Likewise.
2459 (TARGET_WNOHANG): Likewise.
2460
2461 2013-07-04 Yao Qi <yao@codesourcery.com>
2462
2463 * Makefile.in (host_alias): Use @host_noncanonical@.
2464 (target_alias): Use @target_noncanonical@.
2465 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2466 ACX_NONCANONICAL_HOST.
2467 * configure: Regenerated.
2468
2469 Revert:
2470 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2471
2472 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2473 * configure: Rebuild.
2474 * Makefile.in (version_host, version_target): Get from configure.
2475 (version.c): Use $(version_host) and $(version_target).
2476
2477 2013-07-03 Pedro Alves <palves@redhat.com>
2478
2479 * Makefile.in (config.status): Depend on development.sh.
2480 * acinclude.m4: Include libmcheck.m4.
2481 * configure: Regenerate.
2482
2483 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2484
2485 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2486 attribute inside the parentheses.
2487 (winapi_DebugSetProcessKillOnExit): Ditto.
2488 (winapi_DebugBreakProcess): Ditto.
2489 (winapi_GenerateConsoleCtrlEvent): Ditto.
2490
2491 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2492
2493 * notif.h (notif_event): Add a dummy member to avoid compiler
2494 errors.
2495
2496 2013-07-01 Pedro Alves <palves@redhat.com>
2497
2498 * hostio.c (HOSTIO_PATH_MAX): Define.
2499 (require_filename, handle_open, handle_unlink, handle_readlink):
2500 Use it.
2501
2502 2013-07-01 Pedro Alves <palves@redhat.com>
2503
2504 * server.h: Include "pathmax.h".
2505 * linux-low.c: Don't include sys/param.h.
2506 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2507 MAXPATHLEN.
2508 * win32-low.c: Don't include sys/param.h.
2509 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2510
2511 2013-07-01 Pedro Alves <palves@redhat.com>
2512
2513 * event-loop.c: Don't check HAVE_UNISTD_H before including
2514 <unistd.h>.
2515 * gdbreplay.c: Likewise.
2516 * remote-utils.c: Likewise.
2517 * server.c: Likewise.
2518 * configure.ac: Don't check for unistd.h.
2519 * configure: Regenerate.
2520
2521 2013-06-28 Tom Tromey <tromey@redhat.com>
2522
2523 * Makefile.in (version.c): Use version.in, not
2524 common/version.in.
2525
2526 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2527
2528 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2529 * configure: Rebuild.
2530 * Makefile.in (version_host, version_target): Get from configure.
2531 (version.c): Use $(version_host) and $(version_target).
2532
2533 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2534
2535 Fix trace-status to output user name without trailing colon.
2536 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2537
2538 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2539
2540 Fix trace-status to output proper start-time and stop-time.
2541 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2542 output start time and stop time in hex as gdb expects.
2543
2544 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2545
2546 * tracepoint.c (build_traceframe_info_xml): Output trace state
2547 variables present in the trace buffer.
2548
2549 2013-06-24 Tom Tromey <tromey@redhat.com>
2550
2551 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2552 create-version.sh.
2553 (version.o): Remove.
2554 * gdbreplay.c: Include version.h.
2555 (version, host_name): Don't declare.
2556 * server.h: Include version.h.
2557 (version, host_name): Don't declare.
2558
2559 2013-06-12 Pedro Alves <palves@redhat.com>
2560
2561 * linux-x86-low.c (linux_is_elf64): Delete global.
2562 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2563 with local linux_pid_exe_is_elf_64_file use.
2564
2565 2013-06-11 Pedro Alves <palves@redhat.com>
2566
2567 * linux-low.c (regset_disabled, disable_regset): New functions.
2568 (regsets_fetch_inferior_registers)
2569 (regsets_store_inferior_registers): Use them.
2570 (initialize_regsets_info); Don't allocate the disabled_regsets
2571 array here.
2572 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2573 comment.
2574
2575 2013-06-11 Pedro Alves <palves@redhat.com>
2576
2577 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2578 xmalloc.
2579
2580 2013-06-11 Pedro Alves <palves@redhat.com>
2581
2582 * linux-x86-low.c (initialize_low_arch): Call
2583 init_registers_x32_avx_linux.
2584
2585 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2586
2587 Fix compatibility with Android Bionic.
2588 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2589 it is not empty.
2590
2591 2013-06-07 Pedro Alves <palves@redhat.com>
2592
2593 PR server/14823
2594 * Makefile.in (OBS): Add tdesc.o.
2595 (IPA_OBJS): Add tdesc-ipa.o.
2596 (tdesc-ipa.o): New rule.
2597 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2598 interface.
2599 * linux-low.c (new_inferior): Delete.
2600 (disabled_regsets, num_regsets): Delete.
2601 (linux_add_process): Adjust to set the new per-process
2602 new_inferior flag.
2603 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2604 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2605 was a stop. When calling arch_setup, switch the current inferior
2606 to the thread that got an event.
2607 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2608 (regsets_fetch_inferior_registers)
2609 (regsets_store_inferior_registers): New regsets_info parameter.
2610 Adjust to use it.
2611 (linux_register_in_regsets): New regs_info parameter. Adjust to
2612 use it.
2613 (register_addr, fetch_register, store_register): New usrregs_info
2614 parameter. Adjust to use it.
2615 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2616 parameter regs_info. Adjust to use it.
2617 (linux_fetch_registers): Get the current inferior's regs_info, and
2618 adjust to use it.
2619 (linux_store_registers): Ditto.
2620 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2621 (initialize_low): Don't initialize the target_regsets here. Call
2622 initialize_low_arch.
2623 * linux-low.h (target_regsets): Delete declaration.
2624 (struct regsets_info): New.
2625 (struct usrregs_info): New.
2626 (struct regs_info): New.
2627 (struct process_info_private) <new_inferior>: New field.
2628 (struct linux_target_ops): Delete the num_regs, regmap, and
2629 regset_bitmap fields. New field regs_info.
2630 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2631 * i387-fp.c (num_xmm_registers): Delete.
2632 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2633 calls to new interface.
2634 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2635 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2636 Infer the number of xmm registers from the regcache's target
2637 description.
2638 * i387-fp.h (num_xmm_registers): Delete.
2639 * inferiors.c (add_thread): Don't install the thread's regcache
2640 here.
2641 * proc-service.c (gregset_info): Fetch the current inferior's
2642 regs_info. Adjust to use it.
2643 * regcache.c: Include tdesc.h.
2644 (register_bytes, reg_defs, num_registers)
2645 (gdbserver_expedite_regs): Delete.
2646 (get_thread_regcache): If the thread doesn't have a regcache yet,
2647 create one, instead of aborting gdbserver.
2648 (regcache_invalidate_one): Rename to ...
2649 (regcache_invalidate_thread): ... this.
2650 (regcache_invalidate_one): New.
2651 (regcache_invalidate): Only invalidate registers of the current
2652 process.
2653 (init_register_cache): Add target_desc parameter, and use it.
2654 (new_register_cache): Ditto. Assert the target description has a
2655 non zero registers_size.
2656 (regcache_cpy): Add assertions. Adjust.
2657 (realloc_register_cache, set_register_cache): Delete.
2658 (registers_to_string, registers_from_string): Adjust.
2659 (find_register_by_name, find_regno, find_register_by_number)
2660 (register_cache_size): Add target_desc parameter, and use it.
2661 (free_register_cache_thread, free_register_cache_thread_one)
2662 (regcache_release, register_cache_size): New.
2663 (register_size): Add target_desc parameter, and use it.
2664 (register_data, supply_register, supply_register_zeroed)
2665 (supply_regblock, supply_register_by_name, collect_register)
2666 (collect_register_as_string, collect_register_by_name): Adjust.
2667 * regcache.h (struct target_desc): Forward declare.
2668 (struct regcache) <tdesc>: New field.
2669 (init_register_cache, new_register_cache): Add target_desc
2670 parameter.
2671 (regcache_invalidate_thread): Declare.
2672 (regcache_invalidate_one): Delete declaration.
2673 (regcache_release): Declare.
2674 (find_register_by_number, register_cache_size, register_size)
2675 (find_regno): Add target_desc parameter.
2676 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2677 declarations.
2678 * remote-utils.c: Include tdesc.h.
2679 (outreg, prepare_resume_reply): Adjust.
2680 * server.c: Include tdesc.h.
2681 (gdbserver_xmltarget): Delete declaration.
2682 (get_features_xml, process_serial_event): Adjust.
2683 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2684 declare.
2685 (struct process_info) <tdesc>: New field.
2686 (ipa_tdesc): Declare.
2687 * tdesc.c: New file.
2688 * tdesc.h: New file.
2689 * tracepoint.c: Include tdesc.h.
2690 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2691 (get_context_regcache): Adjust to pass ipa_tdesc down.
2692 (do_action_at_tracepoint): Adjust to get the register cache size
2693 from the context regcache's description.
2694 (traceframe_walk_blocks): Adjust to get the register cache size
2695 from the current trace frame's description.
2696 (traceframe_get_pc): Adjust to get current trace frame's
2697 description and pass it down.
2698 (gdb_collect): Adjust to get the register cache size from the
2699 IPA's description.
2700 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2701 (gdbserver_xmltarget): Delete.
2702 (initialize_low_tracepoint): Set the ipa's target description.
2703 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2704 (initialize_low_tracepoint): Set the ipa's target description.
2705 * linux-x86-low.c: Include tdesc.h.
2706 [__x86_64__] (is_64bit_tdesc): New.
2707 (ps_get_thread_area, x86_get_thread_area): Use it.
2708 (i386_cannot_store_register): Rename to ...
2709 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2710 (i386_cannot_fetch_register): Rename to ...
2711 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2712 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2713 to new interface.
2714 (target_regsets): Rename to ...
2715 (x86_regsets): ... this.
2716 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2717 interface.
2718 (x86_siginfo_fixup): Use is_64bit_tdesc.
2719 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2720 (tdesc_x32_avx_linux, tdesc_x32_linux)
2721 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2722 Declare.
2723 (x86_linux_update_xmltarget): Delete.
2724 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2725 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2726 (AMD64_LINUX_USER64_CS): New.
2727 (x86_linux_read_description): New, based on
2728 x86_linux_update_xmltarget.
2729 (same_process_callback): New.
2730 (x86_arch_setup_process_callback): New.
2731 (x86_linux_update_xmltarget): New.
2732 (x86_regsets_info): New.
2733 (amd64_linux_regs_info): New.
2734 (i386_linux_usrregs_info): New.
2735 (i386_linux_regs_info): New.
2736 (x86_linux_regs_info): New.
2737 (x86_arch_setup): Reimplement.
2738 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2739 (x86_emit_ops): Ditto.
2740 (the_low_target): Adjust. Install x86_linux_regs_info,
2741 x86_cannot_fetch_register, and x86_cannot_store_register.
2742 (initialize_low_arch): New.
2743 * linux-ia64-low.c (tdesc_ia64): Declare.
2744 (ia64_fetch_register): Adjust.
2745 (ia64_usrregs_info, regs_info): New globals.
2746 (ia64_regs_info): New function.
2747 (the_low_target): Adjust.
2748 (initialize_low_arch): New function.
2749 * linux-sparc-low.c (tdesc_sparc64): Declare.
2750 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2751 Adjust.
2752 (sparc_arch_setup): New function.
2753 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2754 (the_low_target): Adjust.
2755 (initialize_low_arch): New function.
2756 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2757 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2758 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2759 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2760 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2761 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2762 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2763 (tdesc_powerpc_isa205_vsx64l): Declare.
2764 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2765 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2766 (ppc_set_pc, ppc_get_hwcap): Adjust.
2767 (ppc_usrregs_info): Forward declare.
2768 (!__powerpc64__) ppc_regmap_adjusted: New global.
2769 (ppc_arch_setup): Adjust to the current process'es target
2770 description.
2771 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2772 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2773 (ppc_store_evrregset): Adjust.
2774 (target_regsets): Rename to ...
2775 (ppc_regsets): ... this, and make static.
2776 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2777 (ppc_regs_info): New function.
2778 (the_low_target): Adjust.
2779 (initialize_low_arch): New function.
2780 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2781 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2782 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2783 (tdesc_s390x_linux64v2): Declare.
2784 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2785 (s390_fill_gregset, s390_store_last_break): Adjust.
2786 (target_regsets): Rename to ...
2787 (s390_regsets): ... this, and make static.
2788 (s390_get_pc, s390_set_pc): Adjust.
2789 (s390_get_hwcap): New target_desc parameter, and use it.
2790 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2791 (s390_arch_setup): Adjust to set the current process'es target
2792 description. Don't adjust the regmap.
2793 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2794 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2795 (regs_info_3264): New globals.
2796 (s390_regs_info): New function.
2797 (the_low_target): Adjust.
2798 (initialize_low_arch): New function.
2799 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2800 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2801 [__mips64] (init_registers_mips_linux)
2802 (init_registers_mips_dsp_linux): Delete defines.
2803 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2804 (have_dsp): New global.
2805 (mips_read_description): New, based on mips_arch_setup.
2806 (mips_arch_setup): Reimplement.
2807 (get_usrregs_info): New function.
2808 (mips_cannot_fetch_register, mips_cannot_store_register)
2809 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2810 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2811 (target_regsets): Rename to ...
2812 (mips_regsets): ... this, and make static.
2813 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2814 (dsp_regs_info, regs_info): New globals.
2815 (mips_regs_info): New function.
2816 (the_low_target): Adjust.
2817 (initialize_low_arch): New function.
2818 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2819 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2820 Declare.
2821 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2822 (arm_read_description): New, with bits factored from
2823 arm_arch_setup.
2824 (arm_arch_setup): Reimplement.
2825 (target_regsets): Rename to ...
2826 (arm_regsets): ... this, and make static.
2827 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2828 (arm_regs_info): New function.
2829 (the_low_target): Adjust.
2830 (initialize_low_arch): New function.
2831 * linux-m68k-low.c (tdesc_m68k): Declare.
2832 (target_regsets): Rename to ...
2833 (m68k_regsets): ... this, and make static.
2834 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2835 (m68k_regs_info): New function.
2836 (m68k_arch_setup): New function.
2837 (the_low_target): Adjust.
2838 (initialize_low_arch): New function.
2839 * linux-sh-low.c (tdesc_sharch): Declare.
2840 (target_regsets): Rename to ...
2841 (sh_regsets): ... this, and make static.
2842 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2843 (sh_regs_info, sh_arch_setup): New functions.
2844 (the_low_target): Adjust.
2845 (initialize_low_arch): New function.
2846 * linux-bfin-low.c (tdesc_bfin): Declare.
2847 (bfin_arch_setup): New function.
2848 (bfin_usrregs_info, regs_info): New globals.
2849 (bfin_regs_info): New function.
2850 (the_low_target): Adjust.
2851 (initialize_low_arch): New function.
2852 * linux-cris-low.c (tdesc_cris): Declare.
2853 (cris_arch_setup): New function.
2854 (cris_usrregs_info, regs_info): New globals.
2855 (cris_regs_info): New function.
2856 (the_low_target): Adjust.
2857 (initialize_low_arch): New function.
2858 * linux-cris-low.c (tdesc_crisv32): Declare.
2859 (cris_arch_setup): New function.
2860 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2861 (cris_regs_info): New function.
2862 (the_low_target): Adjust.
2863 (initialize_low_arch): New function.
2864 * linux-m32r-low.c (tdesc_m32r): Declare.
2865 (m32r_arch_setup): New function.
2866 (m32r_usrregs_info, regs_info): New globals.
2867 (m32r_regs_info): Adjust.
2868 (initialize_low_arch): New function.
2869 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2870 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2871 (tic6x_usrregs_info): Forward declare.
2872 (tic6x_read_description): New function, based on ...
2873 (tic6x_arch_setup): ... this. Reimplement.
2874 (target_regsets): Rename to ...
2875 (tic6x_regsets): ... this, and make static.
2876 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2877 (tic6x_regs_info): New function.
2878 (the_low_target): Adjust.
2879 (initialize_low_arch): New function.
2880 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2881 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2882 (target_regsets): Rename to ...
2883 (xtensa_regsets): ... this, and make static.
2884 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2885 globals.
2886 (xtensa_arch_setup, xtensa_regs_info): New functions.
2887 (the_low_target): Adjust.
2888 (initialize_low_arch): New function.
2889 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2890 (nios2_arch_setup): Set the current process'es tdesc.
2891 (target_regsets): Rename to ...
2892 (nios2_regsets): ... this.
2893 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2894 (nios2_regs_info): New function.
2895 (the_low_target): Adjust.
2896 (initialize_low_arch): New function.
2897 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2898 (aarch64_arch_setup): Set the current process'es tdesc.
2899 (target_regsets): Rename to ...
2900 (aarch64_regsets): ... this.
2901 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2902 (aarch64_regs_info): New function.
2903 (the_low_target): Adjust.
2904 (initialize_low_arch): New function.
2905 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2906 globals.
2907 (target_regsets): Rename to ...
2908 (tile_regsets): ... this.
2909 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2910 (tile_regs_info): New function.
2911 (tile_arch_setup): Set the current process'es tdesc.
2912 (the_low_target): Adjust.
2913 (initialize_low_arch): New function.
2914 * spu-low.c (tdesc_spu): Declare.
2915 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2916 * win32-arm-low.c (tdesc_arm): Declare.
2917 (arm_arch_setup): New function.
2918 (the_low_target): Install arm_arch_setup instead of
2919 init_registers_arm.
2920 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2921 (init_windows_x86): Rename to ...
2922 (i386_arch_setup): ... this. Set `win32_tdesc'.
2923 (the_low_target): Adjust.
2924 * win32-low.c (win32_tdesc): New global.
2925 (child_add_thread): Don't create the thread cache here.
2926 (do_initial_child_stuff): Set the new process'es tdesc.
2927 * win32-low.h (struct target_desc): Forward declare.
2928 (win32_tdesc): Declare.
2929 * lynx-i386-low.c (tdesc_i386): Declare global.
2930 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2931 * lynx-low.c (lynx_tdesc): New global.
2932 (lynx_add_process): Set the new process'es tdesc.
2933 * lynx-low.h (struct target_desc): Forward declare.
2934 (lynx_tdesc): Declare global.
2935 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2936 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2937 * nto-low.c (nto_tdesc): New global.
2938 (do_attach): Set the new process'es tdesc.
2939 * nto-low.h (struct target_desc): Forward declare.
2940 (nto_tdesc): Declare.
2941 * nto-x86-low.c (tdesc_i386): Declare.
2942 (nto_x86_arch_setup): Set `nto_tdesc'.
2943
2944 2013-06-04 Gary Benson <gbenson@redhat.com>
2945
2946 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2947 to qSupported response when appropriate.
2948 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2949 with nonzero-length annex.
2950 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2951 arguments supplied in annex.
2952
2953 2013-05-31 Doug Evans <dje@google.com>
2954
2955 PR server/15594
2956 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2957 64 bits in 64-cross-32 environment.
2958
2959 2013-05-28 Pedro Alves <palves@redhat.com>
2960
2961 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2962 (aarch64-without-fpu.c): Delete rule.
2963 * configure.srv (aarch64*-*-linux*): Remove references to
2964 aarch64-without-fpu.o and aarch64-without-fpu.xml.
2965 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2966 declaration.
2967
2968 2013-05-24 Pedro Alves <palves@redhat.com>
2969
2970 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2971 instead of strchr/decode_address. Error if the range isn't split
2972 with a ','. Don't assume there's be a ':' in the action.
2973
2974 2013-05-23 Yao Qi <yao@codesourcery.com>
2975 Pedro Alves <palves@redhat.com>
2976
2977 * linux-low.c (lwp_in_step_range): New function.
2978 (linux_wait_1): If the thread was range stepping and stopped
2979 outside the stepping range, report the stop to GDB. Otherwise,
2980 continue stepping. Add range stepping debug output.
2981 (linux_set_resume_request): Copy the step range from the resume
2982 request to the lwp.
2983 (linux_supports_range_stepping): New.
2984 (linux_target_ops) <supports_range_stepping>: Set to
2985 linux_supports_range_stepping.
2986 * linux-low.h (struct linux_target_ops)
2987 <supports_range_stepping>: New field.
2988 (struct lwp_info) <step_range_start, step_range_end>: New fields.
2989 * linux-x86-low.c (x86_supports_range_stepping): New.
2990 (the_low_target) <supports_range_stepping>: Set to
2991 x86_supports_range_stepping.
2992 * server.c (handle_v_cont): Handle 'r' action.
2993 (handle_v_requests): Append ";r" if the target supports range
2994 stepping.
2995 * target.h (struct thread_resume) <step_range_start,
2996 step_range_end>: New fields.
2997 (struct target_ops) <supports_range_stepping>:
2998 New field.
2999 (target_supports_range_stepping): New macro.
3000
3001 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3002
3003 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3004 confusion in comment.
3005
3006 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3007
3008 * lynx-low.c (struct process_info_private): New type.
3009 (lynx_add_process): New function.
3010 (lynx_create_inferior, lynx_attach): Replace calls to
3011 add_process by calls to lynx_add_process.
3012 (lynx_resume): If PTID is null, then try using
3013 current_process()->private->last_wait_event_ptid.
3014 Add comments.
3015 (lynx_clear_inferiors): Delete. The contents of that function
3016 has been inlined in lynx_mourn;
3017 (lynx_wait_1): Save the ptid in the process's private data.
3018 (lynx_mourn): Free the process' private data. Replace call
3019 to lynx_clear_inferiors by call to clear_inferiors.
3020
3021 2013-05-17 Yao Qi <yao@codesourcery.com>
3022
3023 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3024 the right place.
3025
3026 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3027
3028 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3029 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3030 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3031 PT_TEXT_END_ADDR guards. Update comments.
3032 (linux_target_op) <read_offsets>: Conditionally define to
3033 linux_read_offsets if the target is UCLIBC and if it defines
3034 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3035
3036 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3037 Andrew Jenner <andrew@codesourcery.com>
3038
3039 * Makefile.in (SFILES): Add linux-nios2-low.c.
3040 (clean): Add action to delete nios2-linux.c.
3041 (nios2-linux.c): New rule.
3042 * configure.srv: Add nios2*-*-linux*.
3043 * linux-nios2-low.c: New.
3044
3045 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3046
3047 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3048
3049 2013-04-25 Hui Zhu <hui@codesourcery.com>
3050
3051 PR gdb/15186
3052 * ax.c (ax_printf): Add fflush.
3053
3054 2013-04-22 Tom Tromey <tromey@redhat.com>
3055
3056 * Makefile.in (SFILES): Add filestuff.c.
3057 (OBS): Add filestuff.o.
3058 (filestuff.o): New target.
3059 * config.in, configure: Rebuild.
3060 * configure.ac: Check for fdwalk, pipe2.
3061
3062 2013-04-17 Pedro Alves <palves@redhat.com>
3063
3064 * configure.ac (USE_THREAD_DB): Delete variable.
3065 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3066 Don't AC_SUBST USE_THREAD_DB.
3067 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3068 * config.in, configure: Regenerate.
3069
3070 2013-04-16 Pedro Alves <palves@redhat.com>
3071
3072 * linux-low.h (struct lwp_info) <thread_known>: Move under
3073 the USE_THREAD_DB #ifdef.
3074
3075 2013-04-16 Pedro Alves <palves@redhat.com>
3076
3077 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3078 (linux-low.o): Delete rule.
3079 * linux-low.h: Always include "gdb_thread_db.h" instead of
3080 conditionally including thread_db.h.
3081 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3082 HAVE_THREAD_DB_H.
3083
3084 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3085
3086 * Makefile.in (install-only): Fix make install regression.
3087
3088 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3089
3090 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3091 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3092 installation.
3093 * gdbserver.1: Remove.
3094
3095 2013-03-22 Pedro Alves <palves@redhat.com>
3096
3097 * linux-low.c (handle_extended_wait): Don't call
3098 linux_enable_event_reporting.
3099
3100 2013-03-15 Tony Theodore <tonyt@logyst.com>
3101
3102 PR build/9098:
3103 * Makefile.in (SHELL): Use @SHELL@.
3104
3105 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3106
3107 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3108 compiler warning.
3109
3110 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3111
3112 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3113 Remove extraneous NULL element.
3114
3115 2013-03-13 Yao Qi <yao@codesourcery.com>
3116
3117 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3118 'V' block in trace frame.
3119
3120 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3121
3122 * target.h (struct target_ops): Add btrace ops.
3123 (target_supports_btrace): New macro.
3124 (target_enable_btrace): New macro.
3125 (target_disable_btrace): New macro.
3126 (target_read_btrace): New macro.
3127 * gdbthread.h (struct thread_info): Add btrace field.
3128 * server.c: Include btrace-common.h.
3129 (handle_btrace_general_set): New function.
3130 (handle_btrace_enable): New function.
3131 (handle_btrace_disable): New function.
3132 (handle_general_set): Call handle_btrace_general_set.
3133 (handle_qxfer_btrace): New function.
3134 (struct qxfer qxfer_packets[]): Add btrace entry.
3135 * inferiors.c (remove_thread): Disable btrace.
3136 * linux-low: Include linux-btrace.h.
3137 (linux_low_enable_btrace): New function.
3138 (linux_low_read_btrace): New function.
3139 (linux_target_ops): Add btrace ops.
3140 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3141 Add srv_linux_btrace=yes.
3142 (x86_64-*-linux*): Add linux-btrace.o.
3143 Add srv_linux_btrace=yes.
3144 * configure.ac: Define HAVE_LINUX_BTRACE.
3145 * config.in: Regenerated.
3146 * configure: Regenerated.
3147
3148 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3149
3150 * server.c (handle_qxfer): Preserve error message if -3 is
3151 returned.
3152 (qxfer): Document the -3 return value.
3153
3154 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3155
3156 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3157 (linux_btrace_h): New variable.
3158 (linux-btrace.o): New rule.
3159
3160 2013-03-08 Stan Shebs <stan@codesourcery.com>
3161 Hafiz Abid Qadeer <abidh@codesourcery.com>
3162
3163 * tracepoint.c (trace_buffer_size): New global.
3164 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3165 (init_trace_buffer): Change to one-argument function. Allocate
3166 trace buffer memory.
3167 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3168 handle QTBuffer:size packet.
3169 (cmd_bigqtbuffer_size): New function.
3170 (initialize_tracepoint): Call init_trace_buffer with
3171 DEFAULT_TRACE_BUFFER_SIZE.
3172 * server.c (handle_query): Add QTBuffer:size in the
3173 supported packets.
3174
3175 2013-03-07 Yao Qi <yao@codesourcery.com>
3176
3177 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3178 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3179 of -1.
3180 (cmd_qtsp): Adjust condition. Do post increment.
3181 Set cur_action and cur_step_action back to 0.
3182
3183 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3184
3185 PR server/15236
3186 * linux-low.c (linux_write_memory): Return early success if LEN is
3187 zero.
3188
3189 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3190
3191 * configure.srv: Add x86_64-*-cygwin* as target.
3192
3193 2013-02-28 Tom Tromey <tromey@redhat.com>
3194
3195 * configure.ac: Invoke AC_SYS_LARGEFILE.
3196 * configure, config.in: Rebuild.
3197
3198 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3199
3200 * win32-low.c: Throughout, fix format strings and casts of
3201 printf-like functions to avoid type related warnings on all
3202 platforms.
3203 (get_child_debug_event): Print dwDebugEventCode as hex since
3204 that's how it's usually documented.
3205
3206 2013-02-28 Yao Qi <yao@codesourcery.com>
3207
3208 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3209 pulongest.
3210
3211 2013-02-27 Jiong Wang <jiwang@tilera.com>
3212
3213 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3214 (reg-tilegx32.c): New rule.
3215 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3216 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3217 different register info initializer according to elf class.
3218 (init_registers_tilgx32): New function. The tilegx32 register info
3219 initializer.
3220 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3221 (tile_store_gregset): Likewise.
3222
3223 2013-02-27 Yao Qi <yao@codesourcery.com>
3224
3225 * server.c (process_point_options): Print debug message when
3226 debug_threads is true.
3227
3228 2013-02-26 Yao Qi <yao@codesourcery.com>
3229
3230 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3231
3232 2013-02-19 Pedro Alves <palves@redhat.com>
3233 Kai Tietz <ktietz@redhat.com>
3234
3235 PR gdb/15161
3236
3237 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3238 instead of strtoul to extract address from packet.
3239 (process_serial_event) <'z'>: Likewise.
3240
3241 2013-02-18 Yao Qi <yao@codesourcery.com>
3242
3243 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3244
3245 2013-02-14 Pedro Alves <palves@redhat.com>
3246
3247 Plug memory leak.
3248
3249 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3250 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3251
3252 2013-02-14 Pedro Alves <palves@redhat.com>
3253
3254 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3255
3256 2013-02-14 Pedro Alves <palves@redhat.com>
3257
3258 * tracepoint.c (save_string): Delete.
3259 (add_tracepoint_action): Use savestring instead of save_string.
3260
3261 2013-02-12 Pedro Alves <palves@redhat.com>
3262
3263 * linux-xtensa-low.c: Ditto.
3264 * xtensa-xtregs.c: Ditto.
3265
3266 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3267
3268 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3269 thread_db.
3270
3271 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3272
3273 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3274 aarch64_num_wp_regs and aarch64_num_bp_regs to
3275 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3276
3277 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3278
3279 * linux-aarch64-low.c (ps_get_thread_area): Replace
3280 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3281
3282 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3283 Marcus Shawcroft <marcus.shawcroft@arm.com>
3284 Nigel Stephens <nigel.stephens@arm.com>
3285 Yufeng Zhang <yufeng.zhang@arm.com>
3286
3287 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3288 (aarch64.c, aarch64-without-fpu.c): New targets.
3289 * configure.srv (aarch64*-*-linux*): New.
3290 * linux-aarch64-low.c: New file.
3291
3292 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3293
3294 * linux-low.c (handle_extended_wait, linux_create_inferior)
3295 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3296 (dequeue_one_deferred_signal, linux_resume_one_thread)
3297 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3298 (linux_tracefork_grandchild, linux_test_for_tracefork)
3299 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3300 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3301 where the argument is 0.
3302
3303 2013-01-25 Yao Qi <yao@codesourcery.com>
3304
3305 * event-loop.c: Include "queue.h".
3306 (gdb_event_p): New typedef.
3307 (struct gdb_event) <next_event>: Remove.
3308 (event_queue): Change to QUEUE(gdb_event_p).
3309 (async_queue_event): Remove.
3310 (gdb_event_xfree): New.
3311 (initialize_event_loop): New.
3312 (process_event): Use API from QUEUE.
3313 (wait_for_event): Likewise.
3314 * server.c (main): Call initialize_event_loop.
3315 * server.h (initialize_event_loop): Declare.
3316
3317 2013-01-18 Yao Qi <yao@codesourcery.com>
3318
3319 * ax.h (struct eval_agent_expr_context): New.
3320 (gdb_eval_agent_expr): Update declaration.
3321 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3322 TFRAME. Add new argument CTX.
3323 * server.h (struct eval_agent_expr_context): Declare.
3324 (agent_mem_read, agent_tsv_read): Update declaration.
3325 (agent_mem_read_string): Likewise.
3326 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3327 (add_traceframe_block): Add new argument TPOINT.
3328 Increase TPOINT->traceframe_usage.
3329 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3330 eval_tracepoint_agent_expr.
3331 (condition_true_at_tracepoint): Likewise.
3332 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3333 (agent_mem_read_string, agent_tsv_read): Likewise.
3334
3335 2013-01-16 Yao Qi <yao@codesourcery.com>
3336
3337 * linux-low.c (linux_resume_one_lwp): Don't check
3338 'lwp->bp_reinsert != 0'.
3339
3340 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3341 Pedro Alves <palves@redhat.com>
3342
3343 * lynx-low.c (ptrace_request_to_str): Define a temporary
3344 macro and use it to simplify this function's implementation.
3345
3346 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3347
3348 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3349 sets errno.
3350
3351 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3352
3353 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3354
3355 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3356
3357 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3358
3359 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3360
3361 * lynx-low.c (lynx_resume): Use the resume_info parameter
3362 to determine the ptid for the lynx_ptrace call, unless
3363 it is equal to minus_one_ptid, in which case we use the
3364 ptid of the current_inferior.
3365 (lynx_wait_1): After having received a thread create/exit
3366 event, resume the inferior's execution using the signaling
3367 thread's ptid, rather than the old ptid.
3368
3369 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3370
3371 * lynx-low.c (lynx_resume): Delete variable ret.
3372
3373 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3374
3375 * gdbreplay.c (gdbreplay_version): Update copyright year.
3376 * server.c (gdbserver_version): Likewise.
3377
3378 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3379
3380 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3381 new thread.
3382
3383 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3384
3385 * lynx-low.c (ptrace_request_to_str): Add handling for
3386 PTRACE_GETTRACESIG.
3387
3388 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3389
3390 * lynx-low.c (lynx_attach): Delete variable new_process.
3391
3392 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3393
3394 * lynx-low.c (lynx_create_inferior): Delete variable
3395 new_process.
3396
3397 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3398
3399 * lynx-low.c (ptrace_request_to_str): Do not handle
3400 PTRACE_GETTHREADLIST if this macro does not exist.
3401
3402 2012-12-15 Yao Qi <yao@codesourcery.com>
3403
3404 * Makefile.in (OBS): Add notif.o.
3405 * notif.c, notif.h: New.
3406 * server.c: Include "notif.h".
3407 (struct vstop_notif) <next>: Remove.
3408 <base>: New field.
3409 (queue_stop_reply): Update.
3410 (push_event, send_next_stop_reply): Remove.
3411 (discard_queued_stop_replies): Update.
3412 (notif_stop): New variable.
3413 (handle_v_stopped): Remove.
3414 (handle_v_requests): Don't call handle_v_stopped. Call
3415 handle_ack_notif instead.
3416 (queue_stop_reply_callback): Call notif_event_enque instead
3417 of queue_stop_reply.
3418 (handle_status): Don't call send_next_stop_reply, call
3419 notif_write_event instead.
3420 (kill_inferior_callback): Likewise.
3421 (detach_or_kill_inferior_callback): Likewise.
3422 (main): Call initialize_notif.
3423 (process_serial_event): Call QUEUE_is_empty.
3424 (handle_target_event): Call notif_push instead of push event.
3425 * server.h (push_event): Remove declaration.
3426
3427 2012-12-10 Tom Tromey <tromey@redhat.com>
3428
3429 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3430 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3431 macros.
3432 (.c.o): Rewrite.
3433 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3434 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3435 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3436 (amd64-linux-ipa.o, ax.o): Rewrite.
3437 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3438 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3439 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3440 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3441 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3442 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3443 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3444 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3445 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3446 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3447 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3448 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3449 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3450 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3451 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3452 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3453 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3454 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3455 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3456 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3457 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3458 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3459 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3460 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3461 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3462 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3463 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3464 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3465 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3466 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3467 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3468 (reg-tilegx.o): Remove.
3469 (all_object_files): New macro.
3470 Include .deps files.
3471 * aclocal.m4, configure: Rebuild.
3472 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3473 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3474 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3475
3476 2012-12-05 Tom Tromey <tromey@redhat.com>
3477
3478 PR gdb/14917:
3479 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3480
3481 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3482
3483 * configure.ac: Check for linux/perf_event.h.
3484 * config.in: Regenerated.
3485 * configure: Regenerated.
3486
3487 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3488
3489 * hostio.c (handle_readlink): Decrease buffer size
3490 parameter passed to readlink by one byte.
3491
3492 2012-11-26 Yao Qi <yao@codesourcery.com>
3493
3494 * configure.ac (build_warnings): Append '-Wempty-body'.
3495 * configure: Regenerated.
3496 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3497 body.
3498
3499 2012-11-15 Pierre Muller <muller@sourceware.org>
3500
3501 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3502 * config.in: Regenerate.
3503 * configure: Regenerate.
3504 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3505 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3506 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3507 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3508 header.
3509 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3510 instead of <sys/wait.h> header.
3511 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3512
3513 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3514
3515 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3516 (various make rules): Remove -DGDBSERVER
3517
3518 2012-11-09 Yao Qi <yao@codesourcery.com>
3519
3520 * spu-low.c (current_ptid): Move it to ..
3521 * gdbthread.h: ... here. New.
3522 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3523 * server.c (myresume, process_serial_event): Likewise.
3524 * thread-db.c (thread_db_find_new_threads): Likewise.
3525 * tracepoint.c (run_inferior_command): Likewise.
3526
3527 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3528
3529 * server.c (handle_search_memory_1): Include access length in
3530 warning message.
3531
3532 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3533
3534 * linux-crisv32-low.c: Fix compile errors.
3535
3536 2012-09-04 Yao Qi <yao@codesourcery.com>
3537
3538 * tracepoint.c (cmd_qtsv): Adjust debug message.
3539 Don't check CUR_TPOINT.
3540
3541 2012-08-28 Yao Qi <yao@codesourcery.com>
3542
3543 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3544 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3545 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3546 Remove declarations of xmalloc, xreallloc, xstrdup and
3547 freeargv.
3548 * Makefile.in (libiberty_h): New.
3549 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3550 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3551
3552 2012-08-23 Yao Qi <yao@codesourcery.com>
3553
3554 * server.h: Remove declaration of 'xsnprintf'.
3555
3556 2012-08-22 Keith Seitz <keiths@redhat.com>
3557
3558 * server.h: Include build-gnulib-gbserver/config.h.
3559 * gdbreplay.c: Likewise.
3560
3561 2012-08-08 Doug Evans <dje@google.com>
3562
3563 * Makefile.in (SFILES): Add gdb_vecs.c.
3564 (OBS): Add gdb_vecs.o.
3565 (gdb_vecs_h, host_defs_h): New variables.
3566 (thread-db.o): Add $(gdb_vecs_h) dependency.
3567 (gdb_vecs.o): New rule.
3568 * thread-db.c: #include "gdb_vecs.h".
3569 (thread_db_load_search): Use a vector to iterate over path elements.
3570 Handle text appearing after "$pdir".
3571
3572 * configure.ac: Add check for strstr.
3573 * config.in: Regenerate.
3574 * configure: Regenerate.
3575
3576 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3577
3578 * hostio.c (handle_pread): If pread fails, fall back to attempting
3579 lseek/read.
3580 (handle_pwrite): Likewise for pwrite.
3581
3582 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3583
3584 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3585 between unsupported TYPE and unimplementable ADDR/LEN combination.
3586 (arm_insert_point): Act on new return value.
3587
3588 2012-07-31 Pedro Alves <palves@redhat.com>
3589
3590 * server.c (process_point_options): Only skip tokens if we find
3591 one that is unrecognized. Don't treat 'X' specially while
3592 skipping unrecognized tokens.
3593
3594 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3595
3596 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3597 to 4-byte-align HW breakpoint addresses for Thumb.
3598
3599 2012-07-27 Yao Qi <yao@codesourcery.com>
3600
3601 PR remote/14161.
3602
3603 * server.h: Declare gdb_agent_about_to_close.
3604 * target.c (kill_inferior): Include "agent.h".
3605 New. Send command 'kill'.
3606 * target.h (kill_inferior): Removed macro.
3607 * tracepoint.c (gdb_agent_about_to_close): New.
3608 (gdb_agent_helper_thread): Handle command 'close'.
3609 Wait endlessly until the inferior stops.
3610 Install gdb_agent_remove_socket to atexit hook.
3611 (agent_socket_name): New static variable.
3612 (gdb_agent_socket_init): Replace local variable 'name' with
3613 'agent_socket_name'.
3614 (gdb_agent_remove_socket): New.
3615
3616 2012-07-27 Yao Qi <yao@codesourcery.com>
3617
3618 * server.c (process_point_options): Stop at 'X' when parsing.
3619
3620 2012-07-19 Michael Eager <eager@eagercon.com>
3621
3622 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3623 to hw_execute.
3624 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3625 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3626 hardware breakpoint.
3627
3628 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3629
3630 * gdbserver/linux-low.c (initialize_low): Call
3631 linux_ptrace_init_warnings.
3632
3633 2012-07-02 Doug Evans <dje@google.com>
3634
3635 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3636 pointer to int.
3637
3638 2012-07-02 Stan Shebs <stan@codesourcery.com>
3639
3640 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3641 (ax.o): Add it to build rule.
3642 (ax-ipa.o): Ditto.
3643 (OBS): Add format.o.
3644 (IPA_OBS): Add format.o.
3645 * server.c (handle_query): Claim support for breakpoint commands.
3646 (process_point_options): Add command case.
3647 (process_serial_event): Leave running if there are printfs in
3648 effect.
3649 * mem-break.h (any_persistent_commands): Declare.
3650 (add_breakpoint_commands): Declare.
3651 (gdb_no_commands_at_breakpoint): Declare.
3652 (run_breakpoint_commands): Declare.
3653 * mem-break.c (struct point_command_list): New struct.
3654 (struct breakpoint): New field command_list.
3655 (any_persistent_commands): New function.
3656 (add_commands_to_breakpoint): New function.
3657 (add_breakpoint_commands): New function.
3658 (gdb_no_commands_at_breakpoint): New function.
3659 (run_breakpoint_commands): New function.
3660 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3661 locally.
3662 * ax.c: Include format.h.
3663 (ax_printf): New function.
3664 (gdb_eval_agent_expr): Add printf opcode.
3665
3666 2012-06-13 Yao Qi <yao@codesourcery.com>
3667
3668 * server.c (start_inferior): Remove duplicated writes to fields
3669 'last_resume_kind' and 'last_status' of 'current_inferior'.
3670
3671 2012-06-12 Yao Qi <yao@codesourcery.com>
3672 Pedro Alves <palves@redhat.com>
3673
3674 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3675 comment.
3676 * server.c (handle_v_cont): Extend comment.
3677
3678 2012-06-11 Yao Qi <yao@codesourcery.com>
3679
3680 * linux-low.c (linux_attach): Add 'static'.
3681
3682 2012-06-06 Yao Qi <yao@codesourcery.com>
3683
3684 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3685
3686 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3687
3688 Fix gcc -flto compilation warning.
3689 * server.c (main): Make variable multi_mode and attach volatile.
3690
3691 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3692
3693 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3694 if the platform doesn't know about it.
3695
3696 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3697
3698 * Makefile.in (SFILES): Add linux-tile-low.c.
3699 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3700 * configure.srv: Handle tilegx-*-linux*.
3701 * linux-tile-low.c: New file.
3702
3703 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3704
3705 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3706
3707 2012-05-24 Pedro Alves <palves@redhat.com>
3708
3709 PR gdb/7205
3710
3711 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3712
3713 2012-05-24 Pedro Alves <palves@redhat.com>
3714
3715 PR gdb/7205
3716
3717 Replace target_signal with gdb_signal throughout.
3718
3719 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3720
3721 * linux-low.c (linux_store_registers): Avoid the copying sequence
3722 when no data has been retrieved by ptrace.
3723
3724 2012-05-22 Will Deacon <will.deacon@arm.com>
3725
3726 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3727 Include asm/ptrace.h.
3728 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3729 already defined.
3730
3731 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3732
3733 * linux-low.c (linux_store_registers): Don't re-retrieve data
3734 with ptrace that has already been obtained from /proc. Always
3735 copy any data retrieved with ptrace to the buffer supplied.
3736
3737 2012-05-11 Yao Qi <yao@codesourcery.com>
3738 Pedro Alves <palves@redhat.com>
3739
3740 * linux-low.c (enum stopping_threads_kind): New.
3741 (stopping_threads): Change type to `enum stopping_threads_kind'.
3742 (handle_extended_wait): If stopping and suspending threads, leave
3743 the new_lwp suspended too.
3744 (linux_wait_for_event): Adjust.
3745 (stop_all_lwps): Set `stopping_threads' to
3746 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3747 whether we're suspending threads or just stopping them. Assert no
3748 recursion happens.
3749
3750 2012-04-29 Yao Qi <yao@codesourcery.com>
3751
3752 * server.h: Move some code to ...
3753 * gdbthread.h: ... here. New.
3754 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3755 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3756 (nto-low.o, win32-low.o): Likewise.
3757 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3758 * regcache.c, remote-utils.c, server.c: Likewise.
3759 * target.c, tracepoint.c, win32-low.c: Likewise.
3760
3761 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3762
3763 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3764 (PTRACE_ARG4_TYPE): Likewise.
3765 (PTRACE_XFER_TYPE): Likewise.
3766 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3767 ptrace to PTRACE_ARG3_TYPE.
3768 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3769 (PTRACE_ARG4_TYPE): Likewise.
3770 (PTRACE_XFER_TYPE): Likewise.
3771 (linux_detach_one_lwp): Cast fourth argument of
3772 ptrace to long then PTRACE_ARG4_TYPE.
3773 (regsets_fetch_inferior_registers): Cast third argument of
3774 ptrace to long then PTRACE_ARG3_TYPE.
3775 (regsets_store_inferior_registers): Likewise.
3776
3777 2012-04-20 Pedro Alves <palves@redhat.com>
3778
3779 * configure: Regenerate.
3780
3781 2012-04-19 Pedro Alves <palves@redhat.com>
3782
3783 * Makefile.in (GNULIB_BUILDDIR): New.
3784 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3785 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3786 (all, install-only, uninstall, clean-info, all-lib, clean): No
3787 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3788 (maintainer-clean realclean distclean): Use subdir_do.
3789 (subdir_do): New.
3790 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3791 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3792 * acinclude.m4: Include acx_configure_dir.m4.
3793 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3794 calls. Call AC_PROG_RANLIB. Configure gnulib using
3795 ACX_CONFIGURE_DIR.
3796 (GNULIB): New.
3797 (GNULIB_STDINT_H): Adjust.
3798 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3799 * gdbreplay.c: Include build-gnulib/config.h.
3800 * server.h: Likewise.
3801 * aclocal.m4: Regenerate.
3802 * config.in: Regenerate.
3803 * configure: Regenerate.
3804
3805 2012-04-19 Pedro Alves <palves@redhat.com>
3806
3807 * Makefile.in (LIBGNU, INCGNU): Adjust.
3808 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3809 (all, install-only, uninstall, clean-info, all-lib, clean)
3810 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3811 * configure.ac: Adjust AC_OUTPUT output.
3812 * aclocal.m4: Regenerate.
3813 * configure: Regenerate.
3814
3815 2012-04-19 Pedro Alves <palves@redhat.com>
3816
3817 * Makefile.in (generated_files): New.
3818 (server_h): Remove the explicit dependency on config.h, and depend
3819 on $generated_files.
3820
3821 2012-04-19 Pedro Alves <palves@redhat.com>
3822
3823 * Makefile.in (INCGNU): Add -Ignulib.
3824
3825 2012-04-19 Pedro Alves <palves@redhat.com>
3826
3827 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3828 (INCGNU): ... this, and spell out -I here.
3829 (GNULIB_LIB): Rename to ...
3830 (LIBGNU): ... this.
3831 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3832
3833 2012-04-19 Pedro Alves <palves@redhat.com>
3834
3835 * config.in: Regenerate.
3836
3837 2012-04-19 Pedro Alves <palves@redhat.com>
3838
3839 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3840 * server.h (memmem): Remove declaration.
3841 * config.in: Regenerate.
3842 * configure: Regenerate.
3843
3844 2012-04-19 Yao Qi <yao@codesourcery.com>
3845
3846 * Makefile.in (SFILES): Add common/vec.c.
3847 (OBS): Add vec.o.
3848 (vec.o): New rule.
3849
3850 2012-04-19 Yao Qi <yao@codesourcery.com>
3851
3852 * remote-utils.c (prepare_resume_reply): Replace with macro
3853 target_core_of_thread.
3854 * server.c (handle_qxfer_threads_proper): Likewise.
3855 * target.h (traget_core_of_thread): New macro.
3856
3857 2012-04-18 Pedro Alves <palves@redhat.com>
3858
3859 * aclocal.m4: Regenerate.
3860 * configure: Regenerate.
3861
3862 2012-04-16 Yao Qi <yao@codesourcery.com>
3863
3864 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3865 duplicated on address.
3866
3867 2012-04-16 Yao Qi <yao@codesourcery.com>
3868
3869 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3870 (struct tracepoint_action_ops) <send>: New field.
3871 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3872 (agent_expr_send, x_tracepoint_action_send): New.
3873 (l_tracepoint_action_send): New.
3874 (cmd_qtdp): Download and install tracepoint
3875 according to `use_agent'.
3876 (run_inferior_command): Add one more parameter `len'.
3877 Update callers.
3878 (tracepoint_send_agent): New.
3879 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3880
3881 2012-04-16 Yao Qi <yao@codesourcery.com>
3882
3883 * tracepoint.c (download_tracepoints): Moved to ...
3884 (cmd_qtstart): ... here.
3885
3886 2012-04-14 Yao Qi <yao@codesourcery.com>
3887
3888 * tracepoint.c: Include inttypes.h.
3889 (struct collect_memory_action): Use sized types.
3890 (struct tracepoint): Likewise.
3891 (cmd_qtdp, stop_tracing): Update print specifiers.
3892 (cmd_qtp, response_tracepoint): Likewise.
3893 (collect_data_at_tracepoint): Likewise.
3894 (collect_data_at_step): Likewise.
3895
3896 2012-04-14 Yao Qi <yao@codesourcery.com>
3897
3898 Import gnulib module inttypes.
3899 * aclocal.m4, config.in, configure: Regenerated.
3900
3901 2012-04-14 Yao Qi <yao@codesourcery.com>
3902
3903 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3904 Makefile and config.status at last.
3905
3906 2012-04-13 Yao Qi <yao@codesourcery.com>
3907
3908 * tracepoint.c: Include stdint.h unconditionally.
3909
3910 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3911
3912 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3913 on BFD_HAVE_SYS_PROCFS_TYPE.
3914 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3915 * configure: Regenerate.
3916 * config.in: Likewise.
3917
3918 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3919
3920 * Makefile.in (clean): Also remove x32.c x32-linux.c
3921 x32-avx.c x32-avx-linux.c.
3922 (x32.o): New target.
3923 (x32.c): Likewise.
3924 (x32-linux.o): Likewise.
3925 (x32-linux.c): Likewise.
3926 (x32-avx.o): Likewise.
3927 (x32-avx.c): Likewise.
3928 (x32-avx-linux.o): Likewise.
3929 (x32-avx-linux.c): Likewise.
3930
3931 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3932 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3933 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3934 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3935 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3936 i386/x32-avx-linux.xml.
3937
3938 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3939 (init_registers_x32_avx_linux): Likwise.
3940 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3941 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3942
3943 2012-04-13 Pedro Alves <palves@redhat.com>
3944
3945 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3946 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3947 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3948 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3949 the sub-make.
3950
3951 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3952
3953 * linux-x86-low.c (compat_x32_clock_t): New.
3954 (compat_x32_siginfo_t): Likewise.
3955 (compat_x32_siginfo_from_siginfo): Likewise.
3956 (siginfo_from_compat_x32_siginfo): Likewise.
3957 (linux_is_elf64): Likewise.
3958 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3959 and siginfo_from_compat_x32_siginfo for x32.
3960 (x86_arch_setup): Set linux_is_elf64.
3961
3962 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3963
3964 PR gdb/13969
3965 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3966 e_machine field.
3967 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3968 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3969 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3970 compatible with process.
3971
3972 2012-04-12 Yao Qi <yao@codesourcery.com>
3973
3974 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3975 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3976 (install-only, install-info, clean): Handle sub dir gnulib.
3977 (all-lib, am--refresh): New targets.
3978 (memmem.o): Remove target.
3979 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3980 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
3981 (AC_REPLACE_FUNCS): Remove memmem.
3982 Invoke gl_INIT and AM_INIT_AUTOMAKE.
3983 (AC_OUTPUT): Generate Makefile in gnulib/.
3984 * aclocal.m4, config.in, configure: Regenerated.
3985
3986 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
3987
3988 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3989
3990 2012-04-05 Pedro Alves <palves@redhat.com>
3991
3992 -Werror=strict-aliasing
3993
3994 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3995 pointer.
3996
3997 2012-04-04 Pedro Alves <palves@redhat.com>
3998
3999 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4000 (sparc_store_gregset_from_stack, sparc_store_gregset)
4001 (sparc_breakpoint_at): Fix formatting.
4002
4003 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4004
4005 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4006 are available.
4007 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4008 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4009 * config.in: Regenerate.
4010 * configure: Likewise.
4011
4012 2012-03-29 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4015 Correct ptrace arguments.
4016
4017 2012-03-28 Pedro Alves <palves@redhat.com>
4018
4019 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4020 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4021 (IA64_FR1_REGNUM): New defines.
4022 (ia64_fetch_register): New.
4023 (the_low_target): Install it.
4024 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4025 field.
4026 * linux-low.c (linux_fetch_registers): Try the
4027 the_low_target.fetch_register hook first.
4028
4029 * linux-arm-low.c (the_low_target): Adjust.
4030 * linux-bfin-low.c (the_low_target): Adjust.
4031 * linux-cris-low.c (the_low_target): Adjust.
4032 * linux-crisv32-low.c (the_low_target): Adjust.
4033 * linux-m32r-low.c (the_low_target): Adjust.
4034 * linux-m68k-low.c (the_low_target): Adjust.
4035 * linux-mips-low.c (the_low_target): Adjust.
4036 * linux-ppc-low.c (the_low_target): Adjust.
4037 * linux-s390-low.c (the_low_target): Adjust.
4038 * linux-sh-low.c (the_low_target): Adjust.
4039 * linux-sparc-low.c (the_low_target): Adjust.
4040 * linux-tic6x-low.c (the_low_target): Adjust.
4041 * linux-x86-low.c (the_low_target): Adjust.
4042 * linux-xtensa-low.c (the_low_target): Adjust.
4043
4044 2012-03-26 Pedro Alves <palves@redhat.com>
4045
4046 * server.c (handle_qxfer_libraries): Don't bail early if
4047 the_target->qxfer_libraries_svr4 is not NULL.
4048
4049 2012-03-26 Pedro Alves <palves@redhat.com>
4050
4051 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4052
4053 2012-03-23 Pedro Alves <palves@redhat.com>
4054
4055 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4056 "library-list-svr4" element's start tag when the the DSO list is
4057 empty.
4058
4059 2012-03-23 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4062 a variable whose type size is the same as the inferior's pointer
4063 size.
4064
4065 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4066
4067 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4068 struct siginfo.
4069 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4070 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4071 * linux-low.h: Include <signal.h>.
4072 (struct siginfo): Remove forward declaration.
4073 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4074 struct siginfo.
4075
4076 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4077
4078 * .gitignore: Ignore more files.
4079
4080 2012-03-19 Pedro Alves <palves@redhat.com>
4081 Jan Kratochvil <jan.kratochvil@redhat.com>
4082
4083 * server.c (cont_thread, general_thread): Add describing comments.
4084 (start_inferior): Clear `cont_thread'.
4085 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4086 of a process.
4087
4088 2012-03-15 Yao Qi <yao@codesourcery.com>
4089
4090 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4091 handling to ...
4092 (cmd_qtdp): ... here.
4093
4094 2012-03-15 Yao Qi <yao@codesourcery.com>
4095
4096 * tracepoint.c (struct tracepoint_action_ops): New.
4097 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4098 (m_tracepoint_action_download): New.
4099 (r_tracepoint_action_download): New.
4100 (x_tracepoint_action_download): New.
4101 (l_tracepoint_action_download): New.
4102 (add_tracepoint_action): Install `action->ops' according type.
4103 (download_tracepoint_1): Move code `download' function pointer
4104 of various tracepoint_action_ops.
4105
4106 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4107
4108 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4109 linux_ptrace_attach_warnings.
4110
4111 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4112
4113 * Makefile.in (linux-ptrace.o): New.
4114 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4115 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4116 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4117 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4118 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4119 of these targets.
4120 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4121
4122 2012-03-08 Yao Qi <yao@codesourcery.com>
4123 Pedro Alves <palves@redhat.com>
4124
4125 Fix PR server/13392.
4126 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4127 offset of JMP insn.
4128 * tracepoint.c (remove_tracepoint): New.
4129 (cmd_qtdp): Call remove_tracepoint when failed to install.
4130
4131 2012-03-07 Pedro Alves <palves@redhat.com>
4132
4133 * linux-low.c (get_detach_signal): New.
4134 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4135 Pass on pending signals to PTRACE_DETACH. Check the result of the
4136 ptrace call.
4137 * server.c (program_signals, program_signals_p): New.
4138 (handle_general_set): Handle QProgramSignals.
4139 * server.h (program_signals, program_signals_p): Declare.
4140
4141 2012-03-05 Pedro Alves <palves@redhat.com>
4142 Jan Kratochvil <jan.kratochvil@redhat.com>
4143
4144 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4145 New comment why.
4146
4147 2012-03-03 Yao Qi <yao@codesourcery.com>
4148
4149 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4150 agent_look_up_symbols.
4151
4152 2012-03-03 Yao Qi <yao@codesourcery.com>
4153
4154 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4155 (linux-x86-low.o): Likewise.
4156 * server.h: Remove in_process_agent_loaded.
4157 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4158 common/agent.c.
4159 Update callers.
4160
4161 2012-03-03 Yao Qi <yao@codesourcery.com>
4162
4163 * tracepoint.c (gdb_agent_capability): New global.
4164 (in_process_agent_loaded_ust): Renamed to
4165 `in_process_agent_supports_ust'.
4166 Update callers.
4167 (in_process_agent_supports_ust): Call agent_capability_check.
4168 (clear_installed_tracepoints): Assert that agent supports
4169 agent.
4170
4171 2012-03-03 Yao Qi <yao@codesourcery.com>
4172
4173 * linux-low.c (linux_supports_agent): New.
4174 (linux_target_ops): Initialize field `supports_agent' with
4175 linux_supports_agent.
4176 * target.h (struct target_ops) <supports_agent>: New.
4177 (target_supports_agent): New macro.
4178 * server.c (handle_general_set): Handle packet 'QAgent'.
4179 (handle_query): Send `QAgent+'.
4180 * Makefile.in (server.o): Depends on agent.h.
4181
4182 2012-03-03 Yao Qi <yao@codesourcery.com>
4183
4184 * Makefile.in (OBS): Add agent.o.
4185 Add new rule for agent.o.
4186 Track dependence of tracepoint.c on agent.h.
4187 * tracepoint.c (run_inferior_command_1):
4188 (run_inferior_command): Call agent_run_command.
4189 (gdb_ust_connect_sync_socket): Deleted. Move it to
4190 common/agent.c.
4191 (resume_thread, stop_thread): Likewise.
4192 (gdb_ust_socket_init): Renamed to ...
4193 (gdb_agent_socket_init): ... New.
4194 (gdb_ust_thread): Renamed to ...
4195 (gdb_agent_helper_thread): ... New.
4196 (gdb_ust_init): Move some code to ...
4197 (gdb_agent_init): ... here. New.
4198 [HAVE_UST]: Call gdb_ust_init.
4199 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4200 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4201 * config.in, configure: Regenerated.
4202
4203 2012-03-02 Pedro Alves <palves@redhat.com>
4204
4205 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4206 * linux-low.c (struct simple_pid_list): New.
4207 (stopped_pids): New a struct simple_pid_list pointer.
4208 (add_to_pid_list, pull_pid_from_list): New.
4209 (handle_extended_wait): Don't assume the first signal new children
4210 report is SIGSTOP. Adjust call to pull_pid_from_list.
4211 (linux_wait_for_lwp): Adjust.
4212
4213 2012-03-02 Yao Qi <yao@codesourcery.com>
4214
4215 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4216 debug log.
4217
4218 2012-03-02 Yao Qi <yao@codesourcery.com>
4219
4220 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4221 `stop_pc' and `tpoint'. Update caller.
4222
4223 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4224
4225 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4226 * linux-low.c (use_linux_regsets): New macro.
4227 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4228 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4229 (linux_register_in_regsets): New function.
4230 (usr_fetch_inferior_registers): Skip registers covered by
4231 regsets.
4232 (usr_store_inferior_registers): Likewise.
4233 (usr_fetch_inferior_registers): New macro.
4234 (usr_store_inferior_registers): Likewise.
4235 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4236 (linux_store_registers): Likewise.
4237 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4238 prototype.
4239 (init_registers_mips64_dsp_linux): Likewise.
4240 (init_registers_mips_linux): New macro.
4241 (init_registers_mips_dsp_linux): Likewise.
4242 (mips_dsp_num_regs): Likewise.
4243 (DSP_BASE, DSP_CONTROL): New fallback macros.
4244 (mips_base_regs): New macro.
4245 (mips_regmap): Use it. Fix the size.
4246 (mips_dsp_regmap): New variable.
4247 (mips_dsp_regset_bitmap): Likewise.
4248 (mips_arch_setup): New function.
4249 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4250 than mips_regmap.
4251 (mips_cannot_store_register): Likewise.
4252 (the_low_target): Update .arch_setup, .num_regs and .regmap
4253 initializers. Add .regset_bitmap initializer.
4254 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4255 initializer.
4256 * linux-bfin-low.c (the_low_target): Likewise.
4257 * linux-cris-low.c (the_low_target): Likewise.
4258 * linux-crisv32-low.c (the_low_target): Likewise.
4259 * linux-ia64-low.c (the_low_target): Likewise.
4260 * linux-m32r-low.c (the_low_target): Likewise.
4261 * linux-m68k-low.c (the_low_target): Likewise.
4262 * linux-ppc-low.c (the_low_target): Likewise.
4263 * linux-s390-low.c (the_low_target): Likewise.
4264 * linux-sh-low.c (the_low_target): Likewise.
4265 * linux-sparc-low.c (the_low_target): Likewise.
4266 * linux-tic6x-low.c (the_low_target): Likewise.
4267 * linux-x86-low.c (the_low_target): Likewise.
4268 * linux-xtensa-low.c (the_low_target): Likewise.
4269 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4270 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4271 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4272 srv_xmlfiles.
4273 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4274 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4275
4276 2012-02-29 Yao Qi <yao@codesourcery.com>
4277 Pedro Alves <palves@redhat.com>
4278
4279 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4280 `step_over_finished' is true.
4281
4282 2012-02-27 Pedro Alves <palves@redhat.com>
4283
4284 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4285 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4286
4287 2012-02-27 Pedro Alves <palves@redhat.com>
4288
4289 PR server/9684
4290 * linux-low.c (pid_is_stopped): New.
4291 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4292
4293 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4294
4295 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4296 of conditions.
4297
4298 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4299
4300 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4301
4302 2012-02-24 Luis Machado <lgustavo@codesourcery>
4303
4304 * server.c (handle_query): Advertise support for target-side
4305 breakpoint condition evaluation.
4306 (process_point_options): New function.
4307 (process_serial_event): When inserting a breakpoint, check for
4308 a target-side condition that should be evaluated.
4309
4310 * mem-break.c: Include regcache.h and ax.h.
4311 (point_cond_list_t): New data structure.
4312 (breakpoint) <cond_list>: New field.
4313 (find_gdb_breakpoint_at): Make non-static.
4314 (delete_gdb_breakpoint_at): Clear any target-side
4315 conditions.
4316 (clear_gdb_breakpoint_conditions): New function.
4317 (add_condition_to_breakpoint): Likewise.
4318 (add_breakpoint_condition): Likewise.
4319 (gdb_condition_true_at_breakpoint): Likewise.
4320 (gdb_breakpoint_here): Return result directly instead
4321 of going through a local variable.
4322
4323 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4324 (clear_gdb_breakpoint_conditions): Likewise.
4325 (add_breakpoint_condition): Likewise.
4326 (gdb_condition_true_at_breakpoint): Likewise.
4327
4328 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4329 (need_step_over_p): Take target-side breakpoint condition into
4330 consideration.
4331
4332 2012-02-24 Luis Machado <lgustavo@codesourcery>
4333
4334 * server.h: Include tracepoint.h.
4335 (agent_mem_read, agent_get_trace_state_variable_value,
4336 agent_set_trace_state_variable_value,
4337 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4338 get_set_tsv_func_addr): New prototypes.
4339
4340 * ax.h: New include file.
4341 * ax.c: New source file.
4342
4343 * tracepoint.c: Include ax.h.
4344 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4345 agent_expr, eval_result_type): Move to ax.h.
4346 (parse_agent_expr): Rename to ...
4347 (gdb_parse_agent_expr): ... this, make it non-static and move
4348 to ax.h.
4349 (unparse_agent_expr) Rename to ...
4350 (gdb_unparse_agent_expr): ... this, make it non-static and move
4351 to ax.h.
4352 (eval_agent_expr): Rename to ...
4353 (eval_tracepoint_agent_expr): ... this.
4354 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4355 forward declarations.
4356 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4357 (agent_get_trace_state_variable_value): New function.
4358 (agent_set_trace_state_variable_value): New function.
4359 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4360 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4361 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4362 (condition_true_at_tracepoint): Likewise.
4363 (parse_agent_expr): Rename to ...
4364 (gdb_parse_agent_expr): ... this and move to ax.c.
4365 (unparse_agent_expr): Rename to ...
4366 (gdb_unparse_agent_expr): ... this and move to ax.c.
4367 (gdb_agent_op_name): Move to ax.c.
4368 (eval_agent_expr): Rename to ...
4369 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4370 and move to ax.c.
4371 (eval_tracepoint_agent_expr): New function.
4372 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4373 non-static.
4374 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4375 ax.c.
4376 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4377 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4378 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4379 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4380 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4381 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4382 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4383 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4384 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4385 (compile_bytecodes): Remove forward declaration.
4386 (is_goto_target): Move to ax.c.
4387 (compile_bytecodes): Move to ax.c and call
4388 agent_get_trace_state_variable_value (...) and
4389 agent_set_trace_state_variable_value (...).
4390
4391 * Makefile.in: Update ax.c and IPA dependencies.
4392
4393 2012-02-24 Pedro Alves <palves@redhat.com>
4394
4395 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4396 (cmd_bigqtbuffer_circular): ... this. Only handle
4397 'QTBuffer:circular:'.
4398 (handle_tracepoint_general_set): Adjust.
4399
4400 2012-02-16 Yao Qi <yao@codesourcery.com>
4401
4402 * inferiors.c: Move code to ...
4403 * dll.c: .... here. New.
4404 * server.h: Declare clear_dlls.
4405 * Makefile.in (SFILES): Add dll.c.
4406 (OBS): Add dll.o
4407 (dll.o): New rule.
4408
4409 2012-02-11 Yao Qi <yao@codesourcery.com>
4410
4411 * server.c: (handle_monitor_command): Add a new parameter
4412 `own_buf'.
4413 (handle_query): Update caller.
4414
4415 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4416
4417 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4418 * configure, config.in: Regenerate.
4419 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4420 is not defined.
4421
4422 2012-02-02 Pedro Alves <palves@redhat.com>
4423
4424 Try SIGKILL first, then PTRACE_KILL.
4425 * linux-low.c (linux_kill_one_lwp): New.
4426 (linux_kill_one_lwp): Rename to ...
4427 (kill_one_lwp_callback): ... this. Use the new
4428 linux_kill_one_lwp.
4429
4430 2012-02-02 Pedro Alves <palves@redhat.com>
4431
4432 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4433 inferior.
4434
4435 2012-01-27 Pedro Alves <palves@redhat.com>
4436
4437 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4438 (elf_64_file_p): Make static.
4439 (linux_pid_exe_is_elf_64_file): New.
4440 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4441 Delete declarations.
4442 (linux_pid_exe_is_elf_64_file): Declare.
4443 * linux-x86-low.c (x86_arch_setup): Use
4444 linux_pid_exe_is_elf_64_file.
4445
4446 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4447
4448 * linux-low.c (linux_wait_for_event_1): Rename to ...
4449 (linux_wait_for_event): ... here and merge it with former
4450 linux_wait_for_event - new variable wait_ptid, use it.
4451 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4452
4453 2012-01-23 Pedro Alves <palves@redhat.com>
4454
4455 * server.c (main): Avoid yet another case of infinite loop while
4456 detaching/killing after a longjmp.
4457
4458 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4459
4460 Code cleanup.
4461 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4462
4463 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4464
4465 * hostio.c (handle_readlink): New function.
4466 (handle_vFile): Call it to handle "vFile:readlink" packets.
4467
4468 2012-01-20 Pedro Alves <palves@redhat.com>
4469 Ulrich Weigand <ulrich.weigand@linaro.org>
4470
4471 * server.c (handle_v_requests): Only support vAttach and vRun to
4472 start multiple processes when in extended protocol mode.
4473
4474 2012-01-17 Pedro Alves <palves@redhat.com>
4475
4476 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4477 memalign plus mprotect to allocate the scratch buffer.
4478
4479 2012-01-13 Pedro Alves <palves@redhat.com>
4480
4481 * server.c (attach_inferior): Clear `cont_thread'.
4482
4483 2012-01-13 Pedro Alves <palves@redhat.com>
4484
4485 * server.c (main): Avoid infinite loop while detaching/killing
4486 after a longjmp.
4487
4488 2012-01-09 Doug Evans <dje@google.com>
4489
4490 * server.c (start_inferior): Set last_ptid in --wrapper case.
4491
4492 2012-01-06 Yao Qi <yao@codesourcery.com>
4493
4494 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4495 defined.
4496 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4497
4498 2012-01-04 Yao Qi <yao@codesourcery.com>
4499
4500 * tracepoint.c (cmd_qtdp): Print debug message
4501 for static tracepoint.
4502
4503 2012-01-04 Yao Qi <yao@codesourcery.com>
4504
4505 * tracepoint.c (trace_vdebug): Differentiate debug message
4506 between gdbserver and IPA.
4507
4508 2012-01-03 Yao Qi <yao@codesourcery.com>
4509
4510 * tracepoint.c (tracepoint_was_hit): Don't collect for
4511 static tracepoint.
4512
4513 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4514
4515 * terminal.h: Reformat copyright header.
4516
4517 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4518
4519 * server.c (gdbserver_version): Update copyright year.
4520 * gdbreplay.c (gdbreplay_version): Likewise.
4521
4522 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4523
4524 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4525
4526 Revert:
4527 2011-12-18 Hui Zhu <teawater@gmail.com>
4528 * linux-low.c (linux_create_inferior): Save return value to ret.
4529
4530 2011-12-18 Hui Zhu <teawater@gmail.com>
4531
4532 * linux-low.c (linux_create_inferior): Save return value to ret.
4533
4534 2011-12-16 Doug Evans <dje@google.com>
4535
4536 * linux-low.c (linux_create_inferior): If stdio connection,
4537 redirect stdin from /dev/null, stdout to stderr.
4538 * remote-utils.c (remote_is_stdio): New static global.
4539 (remote_connection_is_stdio): New function.
4540 (remote_prepare): Handle stdio connection.
4541 (remote_open): Ditto.
4542 (remote_close): Don't close stdin for stdio connections.
4543 (read_prim,write_prim): New functions. Replace all calls to
4544 read/write to these.
4545 * server.c (main): Watch for "-" argument. Move call to
4546 remote_prepare before start_inferior.
4547 * server.h (STDIO_CONNECTION_NAME): New macro.
4548 (remote_connection_is_stdio): Declare.
4549
4550 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4551 in debugging output.
4552
4553 2011-12-15 Yao Qi <yao@codesourcery.com>
4554
4555 * tracepoint.c: Include sys/syscall.h.
4556 (gdb_ust_thread): Remove preprocessor conditional.
4557
4558 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4559
4560 * linux-low.c (linux_detach_one_lwp): Call
4561 the_low_target.prepare_to_resume before detaching.
4562
4563 2011-12-14 Yao Qi <yao@codesourcery.com>
4564
4565 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4566 of write.
4567
4568 2011-12-14 Yao Qi <yao@codesourcery.com>
4569
4570 * i386-low.c (i386_low_stopped_data_address): Initialize local
4571 variable `control'.
4572
4573 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4574
4575 PR remote/13492
4576
4577 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4578 DR_CONTROL unless necessary. Extend comments.
4579 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4580 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4581
4582 2011-12-13 Yao Qi <yao@codesourcery.com>
4583
4584 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4585 macros.
4586 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4587
4588 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4589
4590 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4591 Print new debug message for such case.
4592
4593 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4594
4595 Fix overlapping memcpy.
4596 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4597 the read_inferior_memory transfer.
4598 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4599 write_inferior_memory transfer.
4600 (set_fast_tracepoint_jump): New variable buf. Use it for the
4601 read_inferior_memory and write_inferior_memory transfers.
4602 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4603 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4604 Use it for the write_inferior_memory transfer.
4605 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4606 buffers.
4607
4608 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4609
4610 * linux-low.c (fetch_register, store_register): Make code
4611 consistent, fix formatting.
4612
4613 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4614
4615 * linux-low.c (usr_store_inferior_registers): Factor out code
4616 to handle individual registers into...
4617 (store_register): ... this new function.
4618
4619 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4620
4621 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4622 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4623 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4624 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4625 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4626 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4627 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4628 (srv_xmlfiles): Add new XML files.
4629
4630 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4631 and <sys/uio.h>.
4632 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4633 (init_registers_s390_linux32v1): Add prototype.
4634 (init_registers_s390_linux32v2): Likewise.
4635 (init_registers_s390_linux64v1): Likewise.
4636 (init_registers_s390_linux64v2): Likewise.
4637 (init_registers_s390x_linux64v1): Likewise.
4638 (init_registers_s390x_linux64v2): Likewise.
4639 (s390_num_regs): Increment to 52.
4640 (s390_regmap): Add orig_r2 register.
4641 (s390_num_regs_3264): Increment to 68.
4642 (s390_regmap_3264): Add orig_r2 register.
4643 (s390_collect_ptrace_register): Handle orig_r2 register.
4644 (s390_supply_ptrace_register): Likewise.
4645 (s390_fill_last_break): New function.
4646 (s390_store_last_break): Likewise.
4647 (s390_fill_system_call): New function.
4648 (s390_store_system_call): Likewise.
4649 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4650 register sets.
4651 (s390_check_regset): New function.
4652 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4653 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4654 Update target_regsets for available register sets.
4655
4656 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4657 Jan Kratochvil <jan.kratochvil@redhat.com>
4658
4659 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4660 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4661 New.
4662 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4663 * linux-low.h (struct process_info_private): New member r_debug.
4664 * server.c (handle_qxfer_libraries): Call
4665 the_target->qxfer_libraries_svr4.
4666 (handle_qxfer_libraries_svr4): New function.
4667 (qxfer_packets): New entry "libraries-svr4".
4668 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4669 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4670 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4671 PACKET_qXfer_libraries_svr4.
4672
4673 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4674
4675 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4676 PSW address/mask between 8-byte and 16-byte formats.
4677 (s390_supply_ptrace_register): Likewise.
4678 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4679 basic addressing mode bit.
4680
4681 2011-11-24 Stan Shebs <stan@codesourcery.com>
4682
4683 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4684
4685 2011-11-17 Stan Shebs <stan@codesourcery.com>
4686
4687 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4688 (tracing_start_time): New global.
4689 (tracing_stop_time): New global.
4690 (tracing_user_name): New global.
4691 (tracing_notes): New global.
4692 (tracing_stop_note): New global.
4693 (cmd_qtstart): Set traceframe_usage, start_time.
4694 (stop_tracing): Set stop_time.
4695 (cmd_qtstatus): Report additional status.
4696 (cmd_qtp): New function.
4697 (handle_tracepoint_query): Call it.
4698 (cmd_qtnotes): New function.
4699 (handle_tracepoint_general_set): Call it.
4700 (get_timestamp): Rename from tsv_get_timestamp.
4701
4702 2011-11-14 Stan Shebs <stan@codesourcery.com>
4703 Kwok Cheung Yeung <kcy@codesourcery.com>
4704
4705 * linux-x86-low.c (small_jump_insn): New.
4706 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4707 trampoline and error message, build a trampoline and issue a small
4708 jump instruction to it.
4709 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4710 trampoline and error message.
4711 (x86_get_min_fast_tracepoint_insn_len): New.
4712 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4713 * linux-low.h (struct linux_target_ops): Add arguments to
4714 install_fast_tracepoint_jump_pad operation, add new operation.
4715 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4716 arguments.
4717 (linux_get_min_fast_tracepoint_insn_len): New function.
4718 (linux_target_op): Add new operation.
4719 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4720 (gdb_trampoline_buffer_end): Ditto.
4721 (gdb_trampoline_buffer_error): Ditto.
4722 (struct ipa_sym_addresses): Add fields for new IPA variables.
4723 (symbol_list): Add entries for new IPA variables.
4724 (struct tracepoint): Add fields to hold the address range of the
4725 trampoline used by the tracepoint.
4726 (trampoline_buffer_head): New static variable.
4727 (trampoline_buffer_tail): Ditto.
4728 (claim_trampoline_space): New function.
4729 (have_fast_tracepoint_trampoline_buffer): New function.
4730 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4731 structure.
4732 (install_fast_tracepoint): Ditto, also add error buffer argument.
4733 (cmd_qtminftpilen): New function.
4734 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4735 (fast_tracepoint_from_trampoline_address): New function.
4736 (fast_tracepoint_collecting): Handle trampoline as part of jump
4737 pad space.
4738 (set_trampoline_buffer_space): New function.
4739 (initialize_tracepoint): Initialize new IPA variables.
4740 * target.h (struct target_ops): Add arguments to
4741 install_fast_tracepoint_jump_pad operation, add new
4742 get_min_fast_tracepoint_insn_len operation.
4743 (target_get_min_fast_tracepoint_insn_len): New.
4744 (install_fast_tracepoint_jump_pad): Add arguments.
4745 * server.h (IPA_BUFSIZ): Define.
4746 * linux-i386-ipa.c: Include extra header files.
4747 (initialize_fast_tracepoint_trampoline_buffer): New function.
4748 (initialize_low_tracepoint): Call it.
4749 * server.h (set_trampoline_buffer_space): Declare.
4750 (claim_trampoline_space): Ditto.
4751 (have_fast_tracepoint_trampoline_buffer): Ditto.
4752
4753 2011-11-14 Yao Qi <yao@codesourcery.com>
4754
4755 * server.c (handle_query): Handle InstallInTrace for qSupported.
4756 * tracepoint.c (add_tracepoint): Sort list.
4757 (install_tracepoint, download_tracepoint): New.
4758 (cmd_qtdp): Call them to install and download tracepoints.
4759 (sort_tracepoints): Removed.
4760 (cmd_qtstart): Update.
4761
4762 2011-11-14 Yao Qi <yao@codesourcery.com>
4763
4764 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4765 * mem-break.h: Declare.
4766 * tracepoint.c (cmd_qtstart): Move some code to ...
4767 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4768 New.
4769 (download_tracepoints): Move some code to ...
4770 (download_tracepoint_1): ... here. New.
4771
4772 2011-11-08 Yao Qi <yao@codesourcery.com>
4773
4774 * remote-utils.c (relocate_instruction): A comment fix.
4775
4776 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4777
4778 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4779 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4780 dr_status_mirror and dr_control_mirror from debug_reg_state.
4781 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4782 (i386_initial_stuff): Remove use of deleted globals.
4783 (i386_get_thread_context, i386_set_thread_context,
4784 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4785 from debug_reg_state.
4786
4787 2011-11-05 Yao Qi <yao@codesourcery.com>
4788
4789 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4790 address as TPOINT's.
4791
4792 2011-11-02 Stan Shebs <stan@codesourcery.com>
4793
4794 * tracepoint.c (agent_mem_read_string): New function.
4795 (eval_agent_expr): Call it for tracenz.
4796 * server.c (handle_query): Report support for tracenz.
4797
4798 2011-11-02 Yao Qi <yao@codesourcery.com>
4799
4800 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4801
4802 2011-11-02 Yao Qi <yao@codesourcery.com>
4803
4804 * target.h: Fix a typo in comment.
4805
4806 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4807
4808 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4809 clobber the breakpoints' shadows with fast tracepoint jumps.
4810 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4811 * target.c (write_inferior_memory): Also pass MYADDR down to
4812 check_mem_write.
4813
4814 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4815
4816 * configure.ac: Check support for personality routine.
4817 * configure: Regenerate.
4818 * config.in: Likewise.
4819 * linux-low.c: Include <sys/personality.h>.
4820 Define ADDR_NO_RANDOMIZE if necessary.
4821 (linux_create_inferior): Disable address space randomization when
4822 forking inferior, if requested.
4823 (linux_supports_disable_randomization): New function.
4824 (linux_target_ops): Install it.
4825 * server.h (disable_randomization): Declare.
4826 * server.c (disable_randomization): New global variable.
4827 (handle_general_set): Handle QDisableRandomization.
4828 (handle_query): Likewise for qSupported.
4829 (main): Support --disable-randomization and --no-disable-randomization
4830 command line arguments.
4831 * target.h (struct target_ops): Add supports_disable_randomization.
4832 (target_supports_disable_randomization): New macro.
4833
4834 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4835
4836 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4837 ifdef check.
4838 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4839 [!PT_GETDSBT] (target_loadmap): New definition.
4840 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4841 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4842 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4843 and PT_GETDSBT to LINUX_LOADMAP.
4844 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4845 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4846
4847 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4848
4849 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4850 (arm_linux_hwbp_cap): New static variable.
4851 (arm_linux_get_hwbp_cap): Replace by ...
4852 (arm_linux_init_hwbp_cap): ... this new function.
4853 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4854 (arm_linux_get_hw_watchpoint_count): Likewise.
4855 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4856 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4857 (arm_prepare_to_resume): Use perror_with_name instead of error.
4858
4859 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4860
4861 * linux-arm-low.c: Include <signal.h>.
4862 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4863 (struct arm_linux_hwbp_cap): New data type.
4864 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4865 (struct arm_linux_hw_breakpoint): New data type.
4866 (MAX_BPTS, MAX_WPTS): Define.
4867 (struct arch_process_info, struct arch_lwp_info): New data types.
4868 (arm_linux_get_hwbp_cap): New function.
4869 (arm_linux_get_hw_breakpoint_count): Likewise.
4870 (arm_linux_get_hw_watchpoint_count): Likewise.
4871 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4872 (arm_hwbp_control_initialize): Likewise.
4873 (arm_hwbp_control_is_enabled): Likewise.
4874 (arm_hwbp_control_is_initialized): Likewise.
4875 (arm_hwbp_control_disable): Likewise.
4876 (arm_linux_hw_breakpoint_equal): Likewise.
4877 (arm_linux_hw_point_initialize): Likewise.
4878 (struct update_registers_data): New data structure.
4879 (update_registers_callback: New function.
4880 (arm_insert_point): Likewise.
4881 (arm_remove_point): Likewise.
4882 (arm_stopped_by_watchpoint): Likewise.
4883 (arm_stopped_data_address): Likewise.
4884 (arm_new_process): Likewise.
4885 (arm_new_thread): Likewise.
4886 (arm_prepare_to_resume): Likewise.
4887 (the_low_target): Register arm_insert_point, arm_remove_point,
4888 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4889 arm_new_thread, and arm_prepare_to_resume.
4890
4891 2011-09-15 Stan Shebs <stan@codesourcery.com>
4892
4893 * server.h (struct emit_ops): Add compare-goto fields.
4894 * tracepoint.c (gdb_agent_op_sizes): New table.
4895 (emit_eq_goto): New function.
4896 (emit_ne_goto): New function.
4897 (emit_lt_goto): New function.
4898 (emit_le_goto): New function.
4899 (emit_gt_goto): New function.
4900 (emit_ge_goto): New function.
4901 (is_goto_target): New function.
4902 (compile_bytecodes): Recognize special cases of compare-goto
4903 combinations and call specialized emitters for them.
4904 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4905 (amd64_emit_ne_goto): New function.
4906 (amd64_emit_lt_goto): New function.
4907 (amd64_emit_le_goto): New function.
4908 (amd64_emit_gt_goto): New function.
4909 (amd64_emit_ge_goto): New function.
4910 (amd64_emit_ops): Add the new functions.
4911 (i386_emit_eq_goto): New function.
4912 (i386_emit_ne_goto): New function.
4913 (i386_emit_lt_goto): New function.
4914 (i386_emit_le_goto): New function.
4915 (i386_emit_gt_goto): New function.
4916 (i386_emit_ge_goto): New function.
4917 (i386_emit_ops): Add the new functions.
4918
4919 2011-09-08 Stan Shebs <stan@codesourcery.com>
4920
4921 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4922 (i386_emit_epilogue): Restore %ebx.
4923
4924 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4925
4926 * server.c (step_thread): Remove definition.
4927 (process_serial_event): Don't handle Hs.
4928 * server.h (step_thread): Remove declaration.
4929 * target.c (set_desired_inferior): Remove use of step_thread.
4930
4931 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4932
4933 * linux-low.c: Include linux-procfs.h.
4934 (linux_attach_lwp_1): Update comments.
4935 (linux_attach): Scan for existing threads when attaching to a
4936 process that is the tgid.
4937 * Makefile.in: Update dependencies.
4938
4939 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
4940
4941 * configure.srv: Add linux-procfs.o dependencies.
4942
4943 2011-08-14 Yao Qi <yao@codesourcery.com>
4944
4945 * target.h (struct target_ops): Fix indent.
4946 * win32-low.c (win32_target_ops): Fix comment.
4947
4948 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
4949 Yao Qi <yao@codesourcery.com>
4950
4951 * Makefile.in (clean): Remove tic6x-*.c files.
4952 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4953 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4954 (tic6x-c64xp-linux.c): Likewise.
4955 * configure.srv: Add support for tic6x-*-uclinux.
4956 * linux-tic6x-low.c: New.
4957 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4958
4959 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
4960 Yao Qi <yao@codesourcery.com>
4961
4962 * target.h (struct target_ops): Add read_loadmap.
4963 * linux-low.c (struct target_loadseg): New type.
4964 (struct target_loadmap): New type.
4965 (linux_read_loadmap): New function.
4966 (linux_target_ops): Add linux_read_loadmap.
4967 * server.c (handle_query): Support qXfer:fdpic:read packet.
4968 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4969 to NULL.
4970
4971 2011-08-05 Eli Zaretskii <eliz@gnu.org>
4972
4973 * win32-low.c: Include <stdint.h>.
4974
4975 2011-07-22 Pedro Alves <pedro@codesourcery.com>
4976
4977 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4978 to the inferior here.
4979 (i386_remove_aligned_watchpoint): Ditto.
4980 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4981 fit part of the watchpoint in the debug registers.
4982 (i386_update_inferior_debug_regs): New.
4983 (i386_low_insert_watchpoint): Work on a local mirror of the debug
4984 registers, and only update the inferior on success.
4985 (i386_low_remove_watchpoint): Ditto.
4986
4987 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
4988
4989 * linux-low.c (compare_ints, unique, list_threads, show_process,
4990 linux_core_of_thread): Delete.
4991 (linux_target_ops): Change linux_core_of_thread to
4992 linux_common_core_of_thread.
4993 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4994 * utils.c (malloc_failure): Change type of argument.
4995 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4996 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4997 common/linux-osdata.c, common/ptid.c and common/buffer.c.
4998 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4999 (IPA_OBJS): Add common-utils-ipa.o.
5000 (ptid_h, linux_osdata_h): New macros.
5001 (server_h): Add common/common-utils.h, common/xml-utils.h,
5002 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5003 common/ptid.h.
5004 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5005 ptid.o, buffer.o): New rules.
5006 (linux-low.o): Add common/linux-osdata.h as a dependency.
5007 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5008 * configure.ac: Add AC_HEADER_DIRENT check.
5009 * config.in: Regenerate.
5010 * configure: Regenerate.
5011 * remote-utils.c (xml_escape_text): Delete.
5012 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5013 buffer_xml_printf): Move to common/buffer.c.
5014 * server.c (main): Remove call to initialize_inferiors.
5015 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5016 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5017 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5018 internal_error, gdb_assert, gdb_assert_fail): Delete.
5019 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5020 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5021 common/buffer.h.
5022 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5023 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5024 initialize_inferiors): Delete.
5025
5026 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5027
5028 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5029 symbol error.
5030
5031 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5032
5033 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5034 assertion.
5035 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5036
5037 2011-05-26 Yao Qi <yao@codesourcery.com>
5038
5039 * Makefile.in (thread-db.o): Track dependence to
5040 common/gdb_thread_db.h.
5041 * thread-db.c: include gdb_thread_db.h from right place.
5042
5043 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5044
5045 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5046 __FILE__ and __LINE__ to internal_error.
5047
5048 2011-05-13 Doug Evans <dje@google.com>
5049
5050 * thread-db.c (try_thread_db_load_from_sdir): New function.
5051 (try_thread_db_load_from_dir): New function.
5052 (thread_db_load_search): Handle $sdir, ignore $pdir.
5053 Remove trying of system directories if search of
5054 libthread-db-search-path fails, that is now done via $sdir.
5055
5056 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5057
5058 * server.c (handle_query): Add EnableDisableTracepoints to the list
5059 of supported features.
5060 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5061 tracepoints.
5062 (cmd_qtenable_disable): New.
5063 (cmd_qtstart): Install tracepoints even if disabled.
5064 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5065 receiving a QTEnable or QTDisable packet.
5066 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5067 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5068 tracepoints.
5069 (gdb_probe): Skip data collection if static tracepoint is disabled.
5070
5071 2011-05-10 Doug Evans <dje@google.com>
5072
5073 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5074
5075 2011-05-04 Doug Evans <dje@google.com>
5076
5077 * linux-low.c (linux_join): Skip process lookup.
5078 * spu-low.c (spu_join): Ditto.
5079 * server.c (join_inferiors_callback): Delete.
5080 (process_serial_event): For 'D' packet (detach) call join_inferior
5081 directly.
5082
5083 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5084
5085 * README: Don't mention xscale*-*-linux*.
5086 * configure.srv (xscale*-*-linux*): Don't handle target.
5087
5088 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5089
5090 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5091 casting pointers.
5092 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5093 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5094 (i386_emit_void_call_2): Likewise.
5095
5096 2011-04-26 Yao Qi <yao@codesourcery.com>
5097
5098 * linux-low.c: Move common macros to linux-ptrace.h.
5099 Include linux-ptrace.h.
5100 * Makefile.in (linux_ptrace_h): New.
5101 (linux-low.o): Depends on linux-ptrace.h.
5102
5103 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5104
5105 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5106 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5107 (remote_prepare): New function with most of the TCP code from ...
5108 (remote_open): ... here. Detect PORT here unconditionally. Move also
5109 setting transport_is_reliable.
5110 * server.c (run_once): New variable.
5111 (gdbserver_usage): Document it.
5112 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5113 the first run if RUN_ONCE.
5114 * server.h (run_once, remote_prepare): New declarations.
5115
5116 2011-04-19 Tom Tromey <tromey@redhat.com>
5117
5118 * win32-low.c (handle_load_dll): Remove duplicate "the".
5119
5120 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5121
5122 Remove support for old Cygwin 1.5 versions.
5123 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5124 function to avoid warning.
5125 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5126 warning.
5127
5128 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5129
5130 * gdbserver/server.h (Macro _): Define it if not available.
5131
5132 2011-03-14 Michael Snyder <msnyder@vmware.com>
5133
5134 * hostio.c (handle_close): Remove unnecessary null test.
5135
5136 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5137
5138 * Makefile.in (maintainer-clean realclean distclean): Remove
5139 "make ... subdir_do" command.
5140
5141 2011-03-10 Michael Snyder <msnyder@vmware.com>
5142
5143 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5144
5145 * server.c (handle_v_run): Free alloced buffer on early return.
5146
5147 2011-03-09 Yao Qi <yao@codesourcery.com>
5148
5149 Revert:
5150 2011-03-04 Yao Qi <yao@codesourcery.com>
5151
5152 * Makefile.in: Remove GNU make feature --directory.
5153
5154 2011-03-05 Yao Qi <yao@codesourcery.com>
5155
5156 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5157 (subdir_do): New make target. Copied from gdb/Makefile.
5158 (maintainer-clean, realclean, distclean, clean): Call corresponding
5159 make targets in common/Makefile.
5160
5161 2011-02-11 Yao Qi <yao@codesourcery.com>
5162
5163 * configure.ac: Call AC_PROG_RANLIB.
5164 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5165 * configure: Regenerate.
5166
5167 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5168
5169 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5170
5171 2011-03-06 Yao Qi <yao@codesourcery.com>
5172
5173 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5174
5175 2011-03-05 Yao Qi <yao@codesourcery.com>
5176
5177 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5178 (subdir_do): New make target. Copied from gdb/Makefile.
5179 (maintainer-clean, realclean, distclean, clean): Call corresponding
5180 make targets in common/Makefile.
5181
5182 2011-03-04 Yao Qi <yao@codesourcery.com>
5183
5184 * Makefile.in: Remove GNU make feature --directory.
5185
5186 2011-03-04 Michael Snyder <msnyder@vmware.com>
5187
5188 * server.c (queue_stop_reply): Call xmalloc not malloc.
5189
5190 2011-03-02 Michael Snyder <msnyder@vmware.com>
5191
5192 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5193
5194 2011-02-28 Michael Snyder <msnyder@vmware.com>
5195
5196 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5197 (cmd_qtframe): Ditto.
5198 (cmd_qtbuffer): Ditto.
5199 (cmd_bigqtbuffer): Ditto.
5200
5201 * utils.c (decimal2str): Initialize 'width' to nine, then
5202 don't mess with it.
5203
5204 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5205
5206 * hostio.c (require_data): Free *data, not data.
5207
5208 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5209
5210 * hostio.c (require_data): Use free, not xfree.
5211
5212 2011-02-27 Michael Snyder <msnyder@vmware.com>
5213
5214 * server.c (handle_query): Discard unused value.
5215
5216 * hostio.c (require_data): Free malloc memory before returning
5217 error.
5218
5219 2011-02-26 Michael Snyder <msnyder@vmware.com>
5220
5221 * linux-low.c (list_threads): Call closedir for dirent.
5222
5223 2011-02-27 Michael Snyder <msnyder@vmware.com>
5224
5225 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5226 a case statement falls through.
5227
5228 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5229
5230 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5231 in comparison.
5232
5233 2011-02-26 Michael Snyder <msnyder@vmware.com>
5234
5235 * utils.c (decimal2str): Eliminate dead code and dead param.
5236 (pulongest): Drop dead param from call to decimal2str.
5237 (plongest): Ditto.
5238
5239 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5240
5241 Revert the following patch (not approved yet):
5242 2011-02-21 Hui Zhu <teawater@gmail.com>
5243 * tracepoint.c (tp_printf): New function.
5244 (eval_agent_expr): Handle gdb_agent_op_printf.
5245
5246 2011-02-21 Hui Zhu <teawater@gmail.com>
5247
5248 * tracepoint.c (tp_printf): New function.
5249 (eval_agent_expr): Handle gdb_agent_op_printf.
5250
5251 2011-02-18 Tom Tromey <tromey@redhat.com>
5252
5253 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5254 (tracepoint.o): Likewise.
5255 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5256 (gdb_agent_op_names): Likewise.
5257
5258 2011-02-18 Tom Tromey <tromey@redhat.com>
5259
5260 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5261 gdb_agent_op_rot>: New constants.
5262 (gdb_agent_op_names): Add pick and roll.
5263 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5264 cases.
5265
5266 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5267
5268 * aclocal.m4: Regenerated with aclocal-1.11.1.
5269
5270 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5271
5272 * server.c (handle_qxfer_traceframe_info): New.
5273 (qxfer_packets): Register "traceframe-info".
5274 (handle_query): Report support for qXfer:traceframe-info:read+.
5275 * tracepoint.c (match_blocktype): New.
5276 (traceframe_find_block_type): Rename to ...
5277 (traceframe_walk_blocks): ... this. Add callback filter argument,
5278 and use it.
5279 (traceframe_find_block_type): New, reimplemented on top of
5280 traceframe_walk_blocks.
5281 (build_traceframe_info_xml): New.
5282 (traceframe_read_info): New.
5283 * server.h (traceframe_read_info): Declare.
5284
5285 2011-02-11 Yao Qi <yao@codesourcery.com>
5286
5287 * configure.ac: Call AC_PROG_RANLIB.
5288 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5289 * configure: Regenerate.
5290
5291 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5292
5293 * server.c (gdb_read_memory): Change return semantics to allow
5294 partial transfers.
5295 (handle_search_memory_1): Adjust.
5296 (process_serial_event) <'m' packet>: Handle partial transfers.
5297 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5298
5299 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5300
5301 * regcache.c (init_register_cache): Initialize
5302 regcache->register_status.
5303 (free_register_cache): Release regcache->register_status.
5304 (regcache_cpy): Copy register_status.
5305 (registers_to_string): Print 'x's for unavailable registers.
5306 (supply_register): Mark the register's status valid or
5307 unavailable, depending on whether a buffer was passed in or not.
5308 (supply_register_zeroed): New.
5309 (supply_regblock): Mark the registers' status valid or
5310 unavailable, depending on whether a buffer was passed in or not.
5311 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5312 (struct regcache): New `register_status' field.
5313 (supply_register_zeroed): Declare.
5314 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5315 supply_register_zeroed, rather than passing a NULL buffer to
5316 supply_register.
5317 * tracepoint.c (fetch_traceframe_registers): Update comment.
5318
5319 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5320
5321 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5322 buffer explicit.
5323
5324 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5325
5326 * server.h (decode_xfer_write): Change prototype.
5327 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5328 and don't extract the annex here.
5329 * server.c (decode_xfer_read): Remove `annex' parameter,
5330 and don't extract the annex here.
5331 (decode_xfer): New.
5332 (struct qxfer): New.
5333 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5334 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5335 (handle_qxfer_statictrace): New functions, abstracted out from
5336 handle_query, and made to use the struct qxfer interface.
5337 (handle_threads_qxfer_proper): Rename to ...
5338 (handle_qxfer_threads_proper): ... this.
5339 (handle_threads_qxfer): Rename to ...
5340 (handle_qxfer_threads): ... this. Adjust.
5341 (qxfer_packets): New array.
5342 (handle_qxfer): New function.
5343 (handle_query): Use handle_qxfer.
5344
5345 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5346
5347 * gdbreplay.c: Shorten lines of >= 80 columns.
5348 * linux-low.c: Ditto.
5349 * linux-ppc-low.c: Ditto.
5350 * linux-s390-low.c: Ditto.
5351 * linux-sparc-low.c: Ditto.
5352 * linux-x86-low.c: Ditto.
5353 * linux-xtensa-low.c: Ditto.
5354 * mem-break.c: Ditto.
5355 * nto-low.c: Ditto.
5356 * regcache.h: Ditto.
5357 * remote-utils.c: Ditto.
5358 * server.c: Ditto.
5359 * server.h: Ditto.
5360 * thread-db.c: Ditto.
5361 * tracepoint.c: Ditto.
5362 * utils.c: Ditto.
5363 * win32-low.h: Ditto.
5364
5365 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5366
5367 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5368 update.
5369
5370 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5371
5372 * server.c (gdbserver_version): Update copyright year in version
5373 output.
5374 * gdbreplay.c (gdbreplay_version): Ditto.
5375
5376 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5377
5378 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5379 * linux-bfin-low.c: New file.
5380 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5381 PT_DATA_ADDR for BFIN targets.
5382 * Makefile.in (SFILES): Add linux-bfin-low.c.
5383 (clean): Remove reg-bfin.c.
5384 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5385 * README: Mention supported Blackfin targets.
5386
5387 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5388
5389 * .gitignore: New file.
5390
5391 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5392
5393 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5394
5395 2010-10-22 Jie Zhang <jie@codesourcery.com>
5396
5397 * Makefile.in: Add FLAGS_TO_PASS variable.
5398 (install): Remove dependency of install-only and recursively
5399 invoke make for install-only.
5400
5401 2010-10-04 Doug Evans <dje@google.com>
5402
5403 * Makefile.in (uninstall): Use $(DESTDIR).
5404
5405 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5406
5407 PR gdb/11842
5408
5409 * linux-x86-low.c (compat_siginfo_from_siginfo)
5410 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5411 si_code is < 0. Check for si_code == SI_TIMER before checking for
5412 si_code < 0.
5413
5414 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5415
5416 * lynx-i386-low.c: New file.
5417 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5418
5419 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5420
5421 * lynx-low.c (ptrace_request_to_str): Remove handling for
5422 request values that have been removed in LynxOS 5.x.
5423
5424 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5425
5426 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5427 <ptrace.h>
5428
5429 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5430
5431 * configure.ac: Add --enable-inprocess-agent option.
5432 * configure: Rebuilt.
5433
5434 2010-09-06 Yao Qi <yao@codesourcery.com>
5435
5436 * linux-low.c (linux_kill): Remove unused variable.
5437 (linux_stabilize_threads): Likewise.
5438 * server.c (start_inferior): Likewise.
5439 (queue_stop_reply_callback): Likewise.
5440 * tracepoint.c (do_action_at_tracepoint): Likewise.
5441
5442 2010-09-06 Yao Qi <yao@codesourcery.com>
5443
5444 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5445 on return.
5446
5447 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5448
5449 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5450
5451 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5452
5453 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5454 "$(IPA_DEPFILES)".
5455
5456 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5457
5458 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5459 gdbserver/lynx-ppc-low.c: New files.
5460 * Makefile.in (lynx_low_h): New variable.
5461 (lynx-low.o, lynx-ppc-low.o): New rules.
5462 * configure.ac: On LynxOS, link with -lnetinet.
5463 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5464 * configure: regenerate.
5465
5466 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5467
5468 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5469 * configure.ac: Add check for vasprintf and vsnprintf.
5470 * configure, config.in: Regenerate.
5471 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5472
5473 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5474
5475 * gdbreplay.c: Move include of alloca.h up, next to include of
5476 malloc.h.
5477 * server.h: Add include of malloc.h.
5478 * mem-break.c: Remove include of malloc.h.
5479 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5480
5481 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5482
5483 * Makefile.in (memmem.o): Build with -Wno-error.
5484
5485 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5486
5487 * utils.c (xsnprintf): Make non-static.
5488 * server.h: Add xsnprintf declaration.
5489 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5490 replace calls to snprintf by calls to xsnprintf throughout.
5491
5492 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5493
5494 * configure.ac: Add configure check for alloca.
5495 * configure, config.in: Regenerate.
5496 * server.h: Include alloca.h if it exists.
5497 * gdbreplay.c: Include alloca.h if it exists.
5498
5499 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5500
5501 * linux-low.c (__SIGRTMIN): Define if not already defined.
5502 (linux_create_inferior): Check for __ANDROID__ rather than
5503 __SIGRTMIN.
5504 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5505 are already deferred.
5506 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5507 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5508 stopped and already has a pending signal to report.
5509 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5510 a pending signal to report or is moving out of a jump pad.
5511 (linux_init_signals): Check for __ANDROID__ rather than
5512 __SIGRTMIN.
5513
5514 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5515
5516 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5517 debug_threads check. Avoid a linear search when not doing debug
5518 output.
5519
5520 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5521
5522 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5523 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5524 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5525 (process_event): Change local fd's type to gdb_fildes_t.
5526 (create_file_handler): Adjust prototype.
5527 (delete_file_handler): Adjust prototype.
5528 (handle_file_event): Adjust prototype. Use pfildes.
5529 (create_file_event): Adjsut prototype.
5530 * remote-utils.c (remote_desc, listen_desc): Change type to
5531 gdb_fildes_t.
5532 * server.h: New gdb_fildes_t typedef.
5533 [USE_WIN32API]: Include winsock2.h.
5534 (delete_file_handler, add_file_handler): Adjust prototypes.
5535 (pfildes): Declare.
5536 * utils.c (pfildes): New.
5537
5538 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5539
5540 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5541 * configure: Regenerate.
5542
5543 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5544
5545 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5546 (linux_done_accessing_memory): ... this.
5547 (linux_target_ops): Adjust.
5548 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5549 * nto-low.c (nto_target_ops): Adjust comment.
5550 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5551 * spu-low.c (spu_target_ops): Adjust comment.
5552 * target.h (target_ops): Rename unprepare_to_access_memory field
5553 to done_accessing_memory.
5554 (unprepare_to_access_memory): Rename to ...
5555 (done_accessing_memory): ... this.
5556
5557 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5558
5559 * linux-low.c (linux_prepare_to_access_memory): New.
5560 (linux_unprepare_to_access_memory): New.
5561 (linux_target_ops): Install them.
5562 * server.c (read_memory): Rename to ...
5563 (gdb_read_memory): ... this. Use
5564 prepare_to_access_memory/prepare_to_access_memory.
5565 (write_memory): Rename to ...
5566 (gdb_write_memory): ... this. Use
5567 prepare_to_access_memory/prepare_to_access_memory.
5568 (handle_search_memory_1): Adjust.
5569 (process_serial_event): Adjust.
5570 * target.h (struct target_ops): New fields
5571 prepare_to_access_memory and unprepare_to_access_memory.
5572 (prepare_to_access_memory, unprepare_to_access_memory): New.
5573 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5574 prepare_to_access_memory/prepare_to_access_memory.
5575 * nto-low.c (nto_target_ops): Adjust.
5576 * spu-low.c (spu_target_ops): Adjust.
5577 * win32-low.c (win32_target_ops): Adjust.
5578
5579 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5580
5581 * Makefile.in (WARN_CFLAGS): Get it from configure.
5582 (WERROR_CFLAGS): New.
5583 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5584 * configure.ac: Introduce --enable-werror, which adds -Werror to
5585 the compiler command line. Enabled by default. Disable with
5586 --disable-werror. Add -Wdeclaration-after-statement
5587 Wpointer-arith and -Wformat-nonliteral to warning flags.
5588 * configure: Regenerate.
5589
5590 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5591
5592 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5593
5594 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5595
5596 * gdbreplay.c (remote_error): New.
5597 (gdbchar): New.
5598 (expect): Use gdbchar. Check for error reading from GDB.
5599 Clarify sync error output.
5600 (play): Check for errors writing to GDB.
5601 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5602 * remote-utils.c (getpkt): Check for errors writing to the remote
5603 descriptor.
5604
5605 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5606
5607 * linux-low.c (linux_wait_1): Move non-debugging code out of
5608 `debug_threads' control.
5609
5610 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5611
5612 * linux-low.c (linux_wait_1): Don't set last_status here.
5613 * server.c (push_event, queue_stop_reply_callback): Assert we're
5614 not pushing a TARGET_WAITKIND_IGNORE event.
5615 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5616 (myresume, handle_target_event): Set the thread's last_resume_kind
5617 and last_status from the target returned status.
5618
5619 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5620
5621 PR threads/10729
5622
5623 * linux-x86-low.c (update_debug_registers_callback): New.
5624 (i386_dr_low_set_addr): Use it.
5625 (i386_dr_low_get_addr): New.
5626 (i386_dr_low_set_control): Use update_debug_registers_callback.
5627 (i386_dr_low_get_control): New.
5628 (i386_dr_low_get_status): Adjust.
5629 * linux-low.c (linux_stop_lwp): New.
5630 * linux-low.h (linux_stop_lwp): Declare.
5631
5632 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5633 argument instead of a i386_debug_reg_state.
5634 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5635 a i386_debug_reg_state.
5636 (i386_insert_aligned_watchpoint): Adjust.
5637 (i386_remove_aligned_watchpoint): Adjust.
5638 (i386_low_stopped_data_address): Read the debug registers from the
5639 inferior instead of from the mirrors.
5640 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5641 (i386_dr_low_get_addr): Declare.
5642 (i386_dr_low_get_control): Declare.
5643 (i386_dr_low_get_status): Change prototype.
5644
5645 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5646 (i386_dr_low_get_addr): New.
5647 (i386_dr_low_get_control): New.
5648 (i386_dr_low_get_status): Adjust prototype. Return
5649 dr_status_mirror.
5650 (i386_initial_stuff): Clear dr_status_mirror and
5651 dr_control_mirror.
5652 (i386_get_thread_context): Adjust.
5653 (i386_set_thread_context): Adjust.
5654 (i386_thread_added): Adjust.
5655
5656 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5657
5658 * linux-low.h (linux_thread_area): Delete declaration.
5659
5660 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5661
5662 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5663 after its termination.
5664
5665 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5666
5667 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5668 (gdb_wants_all_stopped): Delete.
5669 (linux_wait_1): Don't call them.
5670 * server.c (handle_v_cont): Tag all threads as want-stopped.
5671 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5672 stopped as "client-wants-stopped".
5673
5674 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5675
5676 * Makefile.in (signals_h): New.
5677 (server_h): Depend on it.
5678 (server.o): Don't depend on $(signals_def).
5679 (signals.o): Depend on $(signals_def).
5680
5681 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5682
5683 * Makefile.in (signals_def): New.
5684 (server_h): Append include/gdb/signals.h and signals_def.
5685 (server.o): Append signals_def.
5686
5687 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5688
5689 * server.c (handle_target_event): Use target_signal_to_host for
5690 resume_info.sig initialization.
5691 * target.h (struct thread_resume) <sig>: New comment.
5692
5693 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5694
5695 * server.c (handle_query): strcpy() the returned string from paddress()
5696 instead of sprintf().
5697 * utils.c (paddress): Return phex_nz().
5698
5699 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5700
5701 * server.c (handle_v_cont): Call mourn_inferior if process
5702 just exited.
5703 (myresume): Likewise.
5704
5705 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5706
5707 Static tracepoints, and integration with UST.
5708
5709 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5710 * mem-break.c (uninsert_all_breakpoints)
5711 (reinsert_all_breakpoints): New.
5712 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5713 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5714 (gdb_agent_ust_loaded, helper_thread_id)
5715 (gdb_agent_helper_thread_id): New macros.
5716 (struct ipa_sym_addresses): Add addr_ust_loaded,
5717 addr_helper_thread_id, addr_cmd_buf.
5718 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5719 (in_process_agent_loaded_ust): New.
5720 (write_e_ust_not_loaded): New.
5721 (maybe_write_ipa_ust_not_loaded): New.
5722 (struct collect_static_trace_data_action): New.
5723 (enum tracepoint_type) <static_tracepoint>: New.
5724 (struct tracepoint) <handle>: Mention static tracepoints.
5725 (struct static_tracepoint_ctx): New.
5726 (CMD_BUF_SIZE): New.
5727 (add_tracepoint_action): Handle static tracepoint actions.
5728 (unprobe_marker_at): New.
5729 (clear_installed_tracepoints): Handle static tracepoints.
5730 (cmd_qtdp): Handle static tracepoints.
5731 (probe_marker_at): New.
5732 (cmd_qtstart): Handle static tracepoints.
5733 (response_tracepoint): Handle static tracepoints.
5734 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5735 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5736 (get_context_regcache): Handle static tracepoints.
5737 (do_action_at_tracepoint): Handle static tracepoint actions.
5738 (traceframe_find_block_type): Handle static trace data blocks.
5739 (traceframe_read_sdata): New.
5740 (download_tracepoints): Download static tracepoint actions.
5741 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5742 (GDB_PROBE_NAME): New.
5743 (ust_ops): New.
5744 (GET_UST_SYM): New.
5745 (USTF): New.
5746 (dlsym_ust): New.
5747 (ust_marker_to_static_tracepoint): New.
5748 (gdb_probe): New.
5749 (collect_ust_data_at_tracepoint): New.
5750 (gdb_ust_probe): New.
5751 (UNIX_PATH_MAX, SOCK_DIR): New.
5752 (gdb_ust_connect_sync_socket): New.
5753 (resume_thread, stop_thread): New.
5754 (run_inferior_command): New.
5755 (init_named_socket): New.
5756 (gdb_ust_socket_init): New.
5757 (cstr_to_hexstr): New.
5758 (next_st): New.
5759 (first_marker, next_marker): New.
5760 (response_ust_marker): New.
5761 (cmd_qtfstm, cmd_qtsstm): New.
5762 (unprobe_marker_at, probe_marker_at): New.
5763 (cmd_qtstmat, gdb_ust_thread): New.
5764 (gdb_ust_init): New.
5765 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5766 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5767 (ST_REGENTRY): New.
5768 (x86_64_st_collect_regmap): New.
5769 (X86_64_NUM_ST_COLLECT_GREGS): New.
5770 (AMD64_RIP_REGNUM): New.
5771 (supply_static_tracepoint_registers): New.
5772 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5773 (ST_REGENTRY): New.
5774 (i386_st_collect_regmap): New.
5775 (i386_NUM_ST_COLLECT_GREGS): New.
5776 (supply_static_tracepoint_registers): New.
5777 * server.c (handle_query): Handle qXfer:statictrace:read.
5778 <qSupported>: Report support for StaticTracepoints, and
5779 qXfer:statictrace:read features.
5780 * server.h (traceframe_read_sdata)
5781 (supply_static_tracepoint_registers): Declare.
5782 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5783 (unpack_varlen_hex): Include in IPA build.
5784 * Makefile.in (ustlibs, ustinc): New.
5785 (IPA_OBJS): Add remote-utils-ipa.o.
5786 ($(IPA_LIB)): Link -ldl and -lpthread.
5787 (UST_CFLAGS): New.
5788 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5789 * config.in, configure: Regenerate.
5790
5791 2010-06-20 Ian Lance Taylor <iant@google.com>
5792 Pedro Alves <pedro@codesourcery.com>
5793
5794 * linux-x86-low.c (always_true): Delete.
5795 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5796 trying to fool the compiler with always_true.
5797
5798 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5799
5800 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5801 conditions in gdbserver.
5802
5803 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5804
5805 * spu-low.c (spu_read_memory): Wrap around local store limit.
5806 (spu_write_memory): Likewise.
5807
5808 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5809
5810 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5811 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5812 LONGEST uses.
5813 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5814 uses.
5815 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5816 uses with LONGEST uses.
5817
5818 2010-06-14 Stan Shebs <stan@codesourcery.com>
5819 Pedro Alves <pedro@codesourcery.com>
5820
5821 Bytecode compiler.
5822
5823 * linux-x86-low.c: Include limits.h.
5824 (add_insns): New.
5825 (always_true): New.
5826 (EMIT_ASM): New.
5827 (EMIT_ASM32): New.
5828 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5829 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5830 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5831 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5832 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5833 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5834 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5835 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5836 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5837 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5838 (amd64_emit_void_call_2): New.
5839 (amd64_emit_ops): New.
5840 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5841 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5842 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5843 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5844 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5845 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5846 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5847 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5848 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5849 (i386_emit_stack_adjust, i386_emit_int_call_1)
5850 (i386_emit_void_call_2): New.
5851 (i386_emit_ops): New.
5852 (x86_emit_ops): New.
5853 (the_low_target): Install x86_emit_ops.
5854 * server.h (struct emit_ops): New.
5855 (get_raw_reg_func_addr): Declare.
5856 (current_insn_ptr, emit_error): Declare.
5857 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5858 (set_trace_state_variable_value): New defines.
5859 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5860 addr_get_trace_state_variable_value and
5861 addr_set_trace_state_variable_value.
5862 (symbol_list): New fields for get_raw_reg,
5863 get_trace_state_variable_value and set_trace_state_variable_value.
5864 (condfn): New typedef.
5865 (struct tracepoint): New field `compiled_cond'.
5866 (do_action_at_tracepoint): Clear compiled_cond.
5867 (get_trace_state_variable_value, set_trace_state_variable_value):
5868 Export in the IPA.
5869 (condition_true_at_tracepoint): If there's a compiled condition,
5870 run that.
5871 (current_insn_ptr, emit_error): New globals.
5872 (struct bytecode_address): New.
5873 (get_raw_reg_func_addr): New.
5874 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5875 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5876 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5877 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5878 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5879 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5880 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5881 (compile_tracepoint_condition, compile_bytecodes): New.
5882 * target.h (emit_ops): Forward declare.
5883 (struct target_ops): New field emit_ops.
5884 (target_emit_ops): New.
5885 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5886 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5887 * linux-low.c (linux_emit_ops): New.
5888 (linux_target_ops): Install it.
5889 * linux-low.h (struct linux_target_ops): New field emit_ops.
5890
5891 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5892
5893 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5894 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5895
5896 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5897 Stan Shebs <stan@codesourcery.com>
5898
5899 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5900 (all): Depend on $(extra_libraries).
5901 (install-only): Install the IPA.
5902 (IPA_OBJS, IPA_LIB): New.
5903 (clean): Remove the IPA lib.
5904 (IPAGENT_CFLAGS): New.
5905 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5906 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5907 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5908 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5909 * configure.ac: Check for atomic builtins support in the compiler.
5910 (IPA_DEPFILES, extra_libraries): Define.
5911 * configure.srv (ipa_obj): Add description.
5912 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5913 (i[34567]86-*-linux*): Set ipa_obj.
5914 (x86_64-*-linux*): Set ipa_obj.
5915 * linux-low.c (stabilizing_threads): New.
5916 (supports_fast_tracepoints): New.
5917 (linux_detach): Stabilize threads before detaching.
5918 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5919 the lwp is either not stabilizing, or is moving out of a jump pad.
5920 (linux_fast_tracepoint_collecting): New.
5921 (maybe_move_out_of_jump_pad): New.
5922 (enqueue_one_deferred_signal): New.
5923 (dequeue_one_deferred_signal): New.
5924 (linux_wait_for_event_1): If moving out of a jump pad, defer
5925 pending signals to later.
5926 (linux_stabilize_threads): New.
5927 (linux_wait_1): Check if threads need moving out of jump pads, and
5928 do it if so.
5929 (stuck_in_jump_pad_callback): New.
5930 (move_out_of_jump_pad_callback): New.
5931 (lwp_running): New.
5932 (linux_resume_one_lwp): Handle moving out of jump pads.
5933 (linux_set_resume_request): Dequeue deferred signals.
5934 (need_step_over_p): Also step over fast tracepoint jumps.
5935 (start_step_over): Also uninsert fast tracepoint jumps.
5936 (finish_step_over): Also reinsert fast tracepoint jumps.
5937 (linux_install_fast_tracepoint_jump): New.
5938 (linux_target_ops): Install linux_stabilize_threads and
5939 linux_install_fast_tracepoint_jump_pad.
5940 * linux-low.h (linux_target_ops) <get_thread_area,
5941 install_fast_tracepoint_jump_pad>: New fields.
5942 (struct lwp_info) <collecting_fast_tracepoint,
5943 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5944 (linux_get_thread_area): Declare.
5945 * linux-x86-low.c (jump_insn): New.
5946 (x86_get_thread_area): New.
5947 (append_insns): New.
5948 (push_opcode): New.
5949 (amd64_install_fast_tracepoint_jump_pad): New.
5950 (i386_install_fast_tracepoint_jump_pad): New.
5951 (x86_install_fast_tracepoint_jump_pad): New.
5952 (the_low_target): Install x86_get_thread_area and
5953 x86_install_fast_tracepoint_jump_pad.
5954 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5955 (struct fast_tracepoint_jump): New.
5956 (fast_tracepoint_jump_insn): New.
5957 (fast_tracepoint_jump_shadow): New.
5958 (find_fast_tracepoint_jump_at): New.
5959 (fast_tracepoint_jump_here): New.
5960 (delete_fast_tracepoint_jump): New.
5961 (set_fast_tracepoint_jump): New.
5962 (uninsert_fast_tracepoint_jumps_at): New.
5963 (reinsert_fast_tracepoint_jumps_at): New.
5964 (set_breakpoint_at): Use write_inferior_memory.
5965 (uninsert_raw_breakpoint): Use write_inferior_memory.
5966 (check_mem_read): Mask out fast tracepoint jumps.
5967 (check_mem_write): Mask out fast tracepoint jumps.
5968 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5969 (set_fast_tracepoint_jump): Declare.
5970 (delete_fast_tracepoint_jump)
5971 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5972 (reinsert_fast_tracepoint_jumps_at): Declare.
5973 * regcache.c: Don't compile many functions when building the
5974 in-process agent library.
5975 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5976 the register buffer in the heap.
5977 (free_register_cache): If the register buffer isn't owned by the
5978 regcache, don't free it.
5979 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5980 pre-existing register caches.
5981 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5982 type.
5983 (convert_ascii_to_int): : Constify `from' parameter type.
5984 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5985 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
5986 the needed buffer in-place.
5987 (relocate_instruction): New.
5988 * server.c (handle_query) <qSymbols>: If the target supports
5989 tracepoints, give it a chance of looking up symbols. Report
5990 support for fast tracepoints.
5991 (handle_status): Stabilize threads.
5992 (process_serial_event): Adjust.
5993 * server.h (struct fast_tracepoint_jump): Forward declare.
5994 (struct process_info) <fast_tracepoint_jumps>: New field.
5995 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5996 (decode_X_packet, decode_M_packet): Adjust.
5997 (relocate_instruction): Declare.
5998 (in_process_agent_loaded): Declare.
5999 (tracepoint_look_up_symbols): Declare.
6000 (struct fast_tpoint_collect_status): Declare.
6001 (fast_tracepoint_collecting): Declare.
6002 (force_unlock_trace_buffer): Declare.
6003 (handle_tracepoint_bkpts): Declare.
6004 (initialize_low_tracepoint)
6005 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6006 * target.h (struct target_ops) <stabilize_threads,
6007 install_fast_tracepoint_jump_pad>: New fields.
6008 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6009 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6010 [HAVE_STDINT_H]: Include stdint.h.
6011 (trace_debug_1): Rename to ...
6012 (trace_vdebug): ... this.
6013 (trace_debug): Rename to ...
6014 (trace_debug_1): ... this. Add `level' parameter.
6015 (trace_debug): New.
6016 (ATTR_USED, ATTR_NOINLINE): New.
6017 (IP_AGENT_EXPORT): New.
6018 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6019 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6020 (about_to_request_buffer_space, trace_buffer_is_full)
6021 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6022 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6023 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6024 (traceframe_write_count, traceframes_created)
6025 (trace_state_variables)
6026 New renaming defines.
6027 (struct ipa_sym_addresses): New.
6028 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6029 (symbol_list): New.
6030 (ipa_sym_addrs): New.
6031 (all_tracepoint_symbols_looked_up): New.
6032 (in_process_agent_loaded): New.
6033 (write_e_ipa_not_loaded): New.
6034 (maybe_write_ipa_not_loaded): New.
6035 (tracepoint_look_up_symbols): New.
6036 (debug_threads) [IN_PROCESS_AGENT]: New.
6037 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6038 (UNKNOWN_SIDE_EFFECTS): New.
6039 (stop_tracing): New.
6040 (flush_trace_buffer): New.
6041 (stop_tracing_bkpt): New.
6042 (flush_trace_buffer_bkpt): New.
6043 (read_inferior_integer): New.
6044 (read_inferior_uinteger): New.
6045 (read_inferior_data_pointer): New.
6046 (write_inferior_data_pointer): New.
6047 (write_inferior_integer): New.
6048 (write_inferior_uinteger): New.
6049 (struct collect_static_trace_data_action): Delete.
6050 (enum tracepoint_type): New.
6051 (struct tracepoint) <type>: New field `type'.
6052 <actions_str, step_actions, step_actions_str>: Only include in
6053 GDBserver.
6054 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6055 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6056 (tracepoints): Use IP_AGENT_EXPORT.
6057 (last_tracepoint): Don't include in the IPA.
6058 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6059 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6060 (alloced_trace_state_variables): New.
6061 (trace_state_variables): Use IP_AGENT_EXPORT.
6062 (traceframe_t): Delete unused variable.
6063 (circular_trace_buffer): Don't include in the IPA.
6064 (trace_buffer_start): Delete.
6065 (struct trace_buffer_control): New.
6066 (trace_buffer_free): Delete.
6067 (struct ipa_trace_buffer_control): New.
6068 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6069 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6070 New.
6071 (trace_buffer_ctrl): New.
6072 (TRACE_BUFFER_CTRL_CURR): New.
6073 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6074 Reimplement as macros.
6075 (trace_buffer_wrap): Delete.
6076 (traceframe_write_count, traceframe_read_count)
6077 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6078 (struct tracepoint_hit_ctx) <type>: New field.
6079 (struct fast_tracepoint_ctx): New.
6080 (memory_barrier): New.
6081 (cmpxchg): New.
6082 (record_tracepoint_error): Update atomically in the IPA.
6083 (clear_inferior_trace_buffer): New.
6084 (about_to_request_buffer_space): New.
6085 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6086 updating the same buffer.
6087 (add_tracepoint): Default the tracepoint's type to trap
6088 tracepoint, and orig_size to -1.
6089 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6090 internal variables.
6091 (create_trace_state_variable): New parameter `gdb'. Handle it.
6092 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6093 (cmd_qtdp): Handle fast tracepoints.
6094 (cmd_qtdv): Adjust.
6095 (max_jump_pad_size): New.
6096 (gdb_jump_pad_head): New.
6097 (get_jump_space_head): New.
6098 (claim_jump_space): New.
6099 (sort_tracepoints): New.
6100 (MAX_JUMP_SIZE): New.
6101 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6102 IPA.
6103 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6104 support. Upload fast traceframes, and delete internal IPA
6105 breakpoints.
6106 (stop_tracing_handler): New.
6107 (flush_trace_buffer_handler): New.
6108 (cmd_qtstop): Upload fast tracepoints.
6109 (response_tracepoint): Handle fast tracepoints.
6110 (tracepoint_finished_step): Upload fast traceframes. Set the
6111 tracepoint hit context's tracepoint type.
6112 (handle_tracepoint_bkpts): New.
6113 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6114 type. Add comment about fast tracepoints.
6115 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6116 non-existing action_str field.
6117 (get_context_regcache): Handle fast tracepoints.
6118 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6119 to the regcache.
6120 (fast_tracepoint_from_jump_pad_address): New.
6121 (fast_tracepoint_from_ipa_tpoint_address): New.
6122 (collecting_t): New.
6123 (force_unlock_trace_buffer): New.
6124 (fast_tracepoint_collecting): New.
6125 (collecting): New.
6126 (gdb_collect): New.
6127 (write_inferior_data_ptr): New.
6128 (target_tp_heap): New.
6129 (target_malloc): New.
6130 (download_agent_expr): New.
6131 (UALIGN): New.
6132 (download_tracepoints): New.
6133 (download_trace_state_variables): New.
6134 (upload_fast_traceframes): New.
6135 (IPA_FIRST_TRACEFRAME): New.
6136 (IPA_NEXT_TRACEFRAME_1): New.
6137 (IPA_NEXT_TRACEFRAME): New.
6138 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6139 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6140 (gdb_jump_pad_buffer_end): New.
6141 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6142 (initialize_tracepoint): Adjust.
6143 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6144 buffer. Initialize the low module.
6145 * utils.c (PREFIX, TOOLNAME): New.
6146 (malloc_failure): Use PREFIX.
6147 (error): In the IPA, an error causes an exit.
6148 (fatal, warning): Use PREFIX.
6149 (internal_error): Use TOOLNAME.
6150 (NUMCELLS): Increase to 10.
6151 * configure, config.in: Regenerate.
6152
6153 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6154
6155 * server.c (handle_query) <qSupported>: Do two passes over the
6156 qSupported string to avoid nesting strtok.
6157
6158 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6159
6160 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6161 (CDEPS): New.
6162 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6163 -Wl,--dynamic-list.
6164 * configure: Regenerate.
6165 * proc-service.list: New.
6166
6167 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6168
6169 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6170 New comment.
6171
6172 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6173
6174 * gdbreplay.c (remote_open): Check error return from socket() call by
6175 its equality to -1 not by it being negative.
6176 * remote-utils.c (remote_open): Likewise.
6177
6178 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6179
6180 * config.h: Regenerate.
6181
6182 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6183
6184 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6185 doesn't provide PTRACE_GET_THREAD_AREA.
6186
6187 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6188
6189 * linux-m68k-low.c: Include <asm/ptrace.h>
6190 (ps_get_thread_area): Implement.
6191
6192 2010-05-03 Doug Evans <dje@google.com>
6193
6194 * event-loop.c (struct callback_event): New struct.
6195 (callback_list): New global.
6196 (append_callback_event, delete_callback_event): New functions.
6197 (process_callback): New function.
6198 (start_event_loop): Call it.
6199 * remote-utils.c (NOT_SCHEDULED): Define.
6200 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6201 moved out of readchar.
6202 (readchar): Rewrite. Call reschedule before returning.
6203 (reset_readchar): New function.
6204 (remote_close): Call it.
6205 (process_remaining, reschedule): New functions.
6206 * server.h (callback_handler_func): New typedef.
6207 (append_callback_event, delete_callback_event): Declare.
6208
6209 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6210
6211 * proc-service.c (ps_pglobal_lookup): Use
6212 thread_db_look_up_one_symbol.
6213 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6214 parameter. Use it instead of all_symbols_looked_up.
6215 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6216 field.
6217 (all_symbols_looked_up): Don't declare.
6218 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6219 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6220 field.
6221 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6222 Set all_symbols_looked_up here.
6223 (thread_db_look_up_one_symbol): New.
6224 (thread_db_get_tls_address): Adjust.
6225 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6226 thread_db object on the heap, and tentatively set it in the
6227 process structure.
6228 (thread_db_init): Don't set all_symbols_looked_up here.
6229 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6230
6231 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6232
6233 * linux-low.c (linux_kill, linux_detach): Adjust.
6234 (status_pending_p_callback): Remove redundant statement. Check
6235 for !TARGET_WAITIKIND_IGNORE, instead of
6236 TARGET_WAITKIND_STOPPED.
6237 (handle_tracepoints): Make sure LWP is locked. Adjust.
6238 (linux_wait_for_event_1): Adjust.
6239 (linux_cancel_breakpoints): New.
6240 (unsuspend_one_lwp): New.
6241 (unsuspend_all_lwps): New.
6242 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6243 (send_sigstop_callback): Change return type to int, add new
6244 `except' parameter and handle it.
6245 (suspend_and_send_sigstop_callback): New.
6246 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6247 pass them down. If SUSPEND, also increment the lwp's suspend
6248 count.
6249 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6250 (need_step_over_p): Don't consider suspended LWPs.
6251 (start_step_over): Adjust.
6252 (proceed_one_lwp): Change return type to int, add new `except'
6253 parameter and handle it.
6254 (unsuspend_and_proceed_one_lwp): New.
6255 (proceed_all_lwps): Use find_inferior instead of
6256 for_each_inferior.
6257 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6258 also decrement the suspend count of LWPs. Pass `except' down,
6259 instead of hacking its suspend count.
6260 (linux_pause_all): Add `freeze' parameter. Adjust.
6261 (linux_unpause_all): New.
6262 (linux_target_ops): Install linux_unpause_all.
6263 * server.c (handle_status): Adjust.
6264 * target.h (struct target_ops): New fields `unpause_all' and
6265 `cancel_breakpoints'. Add new parameter to `pause_all'.
6266 (pause_all): Add new `freeze' parameter.
6267 (unpause_all): New.
6268 (cancel_breakpoints): New.
6269 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6270 cancel breakpoints.
6271 (cmd_qtstart): Pause threads.
6272 (stop_tracing): Pause threads, and cancel breakpoints.
6273 * win32-low.c (win32_target_ops): Adjust.
6274
6275 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6276
6277 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6278 the inferior right away from here...
6279 (linux_wait_1): ... to here, and adjust to check the thread's
6280 last_resume_kind instead of the lwp's step or stop_expected flags.
6281
6282 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6283
6284 * README: Use consistent `GDB' and `GDBserver' spellings.
6285
6286 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6287
6288 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6289 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6290 (linux_detach_one_lwp): Assume the lwp is stopped.
6291 (any_thread_of): Delete.
6292 (linux_detach): Stop all lwps here. Don't blindly delete all
6293 breakpoints.
6294 (delete_lwp_callback): New.
6295 (linux_mourn): Delete all lwps of the process that is gone.
6296 (linux_wait_1): Don't delete the last lwp of the process here.
6297 * mem-break.h (mark_breakpoints_out): Declare.
6298 * mem-break.c (mark_breakpoints_out): New.
6299 (free_all_breakpoints): Use it.
6300 * server.c (handle_target_event): If the process is gone, mark
6301 breakpoints out.
6302 * thread-db.c (struct thread_db) <create_bp>: New field.
6303 (thread_db_enable_reporting): Fix prototype. Store a thread event
6304 breakpoint reference in the thread_db struct.
6305 (thread_db_load_search): Clear the thread_db object.
6306 (try_thread_db_load_1): Ditto.
6307 (switch_to_process): New.
6308 (disable_thread_event_reporting): Use it.
6309 (remove_thread_event_breakpoints): New.
6310 (thread_db_detach, thread_db_mourn): Use it.
6311
6312 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6313
6314 * linux-low.c (linux_enable_event_reporting): New.
6315 (linux_wait_for_event_1, handle_extended_wait): Use it.
6316
6317 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6318
6319 * linux-low.c (linux_kill_one_lwp, linux_kill)
6320 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6321 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6322 SIGSTOP even if the LWP is stopped.
6323 (send_sigstop_callback): New.
6324 (stop_all_lwps): Use send_sigstop_callback instead.
6325 (linux_resume_one_thread): Adjust.
6326 (proceed_one_lwp): Still proceed an LWP that the client has
6327 requested to stop, if we haven't reported it as stopped yet. Make
6328 sure that LWPs the client want stopped, have a pending SIGSTOP.
6329
6330 2010-04-26 Doug Evans <dje@google.com>
6331
6332 * server.c (handle_general_set): Make static.
6333
6334 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6335 Print received char after testing for error/eof instead of before.
6336 (input_interrupt): Tweak comment.
6337
6338 2010-04-23 Doug Evans <dje@google.com>
6339
6340 * server.c (start_inferior): Print inferior argv if --debug.
6341
6342 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6343
6344 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6345 * nto-x86-low.c: Include server.h
6346
6347 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6348
6349 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6350 be consistent with other sources of this directory.
6351 (init_registers_amd64): Correct name of source file of this function
6352 in the comment.
6353
6354 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6355
6356 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6357 64-bit executables.
6358
6359 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6360
6361 * win32-i386-low.c: Add 64-bit support.
6362 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6363 (init_registers_amd64): Declare.
6364 (mappings): Add 64-bit version of array.
6365 (init_windows_x86): New function.
6366 (the_low_target): Change init_arch field to init_windows_x86.
6367
6368 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6369
6370 * win32-low.c: Adapt to support also 64-bit architecture.
6371 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6372 (get_image_name): Use SIZE_T type for local variable `done'.
6373 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6374 (toolhelp_get_dll_name): Idem.
6375 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6376 Use uintptr_t typecast to avoid warning.
6377 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6378 (handle_exception): Use phex_nz to avoid warning.
6379 (win32_wait): Remove unused local variable `process'.
6380
6381 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6382
6383 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6384 `amd64-avx.o'.
6385
6386 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6387
6388 * configure.ac: Use `ws2_32' library for srv_mingw.
6389 * configure: Regenerate.
6390 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6391 * remote-utils.c: Likewise.
6392
6393 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6394
6395 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6396 if __x86_64__ is defined.
6397
6398 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6399
6400 * configure: Regenerate.
6401
6402 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6403
6404 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6405 * target.h (target_ops): New get_tib_address field.
6406 * win32-low.h (win32_thread_info): Add thread_local_base field.
6407 * win32-low.c (child_add_thread): Add tlb argument.
6408 Set thread_local_base field to TLB.
6409 (get_child_debug_event): Adapt to child_add_thread change.
6410 (win32_get_tib_address): New function.
6411 (win32_target_ops): Set get_tib_address field to
6412 win32_get_tib_address.
6413 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6414
6415 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6416
6417 * linux-low.c (linux_mourn): Also remove the process.
6418 * server.c (handle_target_event): Don't remove the process here.
6419 * nto-low.c (nto_mourn): New.
6420 (nto_target_ops): Install it.
6421 * spu-low.c (spu_mourn): New.
6422 (spu_target_ops): Install it.
6423 * win32-low.c (win32_mourn): New.
6424 (win32_target_ops): Install it.
6425
6426 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6427
6428 * server.h (buffer_xml_printf): Remove redundant `;'.
6429
6430 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6431
6432 * regcache.c (set_register_cache): Invalidate regcaches before
6433 changing the register cache layout.
6434 (regcache_invalidate_one): Allow a NULL regcache.
6435 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6436 regcaches before changing the register cache layout or the target
6437 regsets.
6438
6439 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6440
6441 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6442 variable warning on Linux/x86-64.
6443
6444 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6445
6446 GDBserver disconnected tracing support.
6447
6448 * linux-low.c (linux_remove_process): Delete.
6449 (add_lwp): Don't set last_resume_kind here.
6450 (linux_kill): Use `mourn'.
6451 (linux_detach): Use `thread_db_detach', and `mourn'.
6452 (linux_mourn): New.
6453 (linux_attach_lwp_1): Adjust comment.
6454 (linux_attach): last_resume_kind moved the thread_info; adjust.
6455 (status_pending_p_callback): Adjust.
6456 (linux_wait_for_event_1): Adjust.
6457 (count_events_callback, select_singlestep_lwp_callback)
6458 (select_event_lwp_callback, cancel_breakpoints_callback)
6459 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6460 (proceed_one_lwp): Adjust.
6461 (linux_async): Add debug output.
6462 (linux_thread_stopped): New.
6463 (linux_pause_all): New.
6464 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6465 linux_pause_all.
6466 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6467 (thread_db_free): Delete declaration.
6468 (thread_db_detach, thread_db_mourn): Declare.
6469 * thread-db.c (thread_db_init): Use thread_db_mourn.
6470 (thread_db_free): Delete, split in two.
6471 (disable_thread_event_reporting): New.
6472 (thread_db_detach): New.
6473 (thread_db_mourn): New.
6474
6475 * server.h (struct thread_info) <last_resume_kind>: New field.
6476 <attached>: Add comment.
6477 <gdb_detached>: New field.
6478 (handler_func): Change return type to int.
6479 (handle_serial_event, handle_target_event): Ditto.
6480 (gdb_connected): Declare.
6481 (tracing): Delete.
6482 (disconnected_tracing): Declare.
6483 (stop_tracing): Declare.
6484
6485 * server.c (handle_query) <qSupported>: Report support for
6486 disconnected tracing.
6487 (queue_stop_reply_callback): Account for running threads.
6488 (gdb_wants_thread_stopped): New.
6489 (gdb_wants_all_threads_stopped): New.
6490 (gdb_reattached_process): New.
6491 (handle_status): Clear the `gdb_detached' flag of all processes.
6492 In all-stop, stop all threads.
6493 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6494 (process_serial_event): If the remote connection breaks, or if an
6495 exit was forced with "monitor exit", force an event loop exit.
6496 Handle disconnected tracing on detach.
6497 (handle_serial_event): Adjust.
6498 (handle_target_event): If GDB isn't connected, forward events back
6499 to the inferior, unless the last process exited, in which case,
6500 exit gdbserver. Adjust interface.
6501
6502 * remote-utils.c (remote_open): Don't block in accept. Instead
6503 register an event loop source on the listen socket file
6504 descriptor. Refactor bits into ...
6505 (listen_desc): ... this new global.
6506 (gdb_connected): ... this new function.
6507 (enable_async_notification): ... this new function.
6508 (handle_accept_event): ... this new function.
6509 (remote_close): Clear remote_desc.
6510
6511 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6512
6513 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6514 New fields.
6515 (mourn_inferior): Define.
6516 (target_process_qsupported): Avoid the dangling else problem.
6517 (thread_stopped): Define.
6518 (pause_all): Define.
6519 (target_waitstatus_to_string): Declare.
6520 * target.c (target_waitstatus_to_string): New.
6521
6522 * tracepoint.c (tracing): Make extern.
6523 (disconnected_tracing): New.
6524 (stop_tracing): Make extern. Handle tracing stops due to GDB
6525 disconnecting.
6526 (cmd_qtdisconnected): New.
6527 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6528 (handle_tracepoint_general_set): Handle QTDisconnected.
6529
6530 * event-loop.c (event_handler_func): Change return type to int.
6531 (process_event): Bail out if the event handler wants the event
6532 loop to stop.
6533 (handle_file_event): Ditto.
6534 (start_event_loop): Bail out if the event handler wants the event
6535 loop to stop.
6536
6537 * nto-low.c (nto_target_ops): Adjust.
6538 * spu-low.c (spu_wait): Don't remove the process here.
6539 (spu_target_ops): Adjust.
6540 * win32-low.c (win32_wait): Don't remove the process here.
6541 (win32_target_ops): Adjust.
6542
6543 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6544
6545 * regcache.c (realloc_register_cache): Invalidate inferior's
6546 regcache before recreating it.
6547
6548 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6549
6550 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6551
6552 2010-04-09 Stan Shebs <stan@codesourcery.com>
6553 Pedro Alves <pedro@codesourcery.com>
6554
6555 * server.h (LONGEST): New.
6556 (struct thread_info) <while_stepping>: New field.
6557 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6558 Declare.
6559 (initialize_tracepoint, handle_tracepoint_general_set)
6560 (handle_tracepoint_query, tracepoint_finished_step)
6561 (tracepoint_was_hit, release_while_stepping_state_list):
6562 (current_traceframe): Declare.
6563 * server.c (handle_general_set): Handle tracepoint packets.
6564 (read_memory): New.
6565 (write_memory): New.
6566 (handle_search_memory_1): Use read_memory.
6567 (handle_query): Report support for conditional tracepoints, trace
6568 state variables, and tracepoint sources. Handle tracepoint
6569 queries.
6570 (main): Initialize the tracepoints module.
6571 (process_serial_event): Handle traceframe reads/writes.
6572
6573 * linux-low.c (handle_tracepoints): New.
6574 (linux_wait_1): Call it.
6575 (linux_resume_one_lwp): Handle while-stepping.
6576 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6577 (linux_target_ops): Install them.
6578 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6579 New field.
6580 * linux-x86-low.c (x86_supports_tracepoints): New.
6581 (the_low_target). Install it.
6582
6583 * mem-break.h (delete_breakpoint): Declare.
6584 * mem-break.c (delete_breakpoint): Make external.
6585
6586 * target.h (struct target_ops): Add `supports_tracepoints',
6587 `read_pc', and `write_pc' fields.
6588 (target_supports_tracepoints): Define.
6589 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6590 (phex_nz): New.
6591
6592 * regcache.h (struct regcache) <registers_owned>: New field.
6593 (init_register_cache, regcache_cpy): Declare.
6594 (regcache_read_pc, regcache_write_pc): Declare.
6595 (register_cache_size): Declare.
6596 (supply_regblock): Declare.
6597 * regcache.c (init_register_cache): New.
6598 (new_register_cache): Use it.
6599 (regcache_cpy): New.
6600 (register_cache_size): New.
6601 (supply_regblock): New.
6602 (regcache_read_pc, regcache_write_pc): New.
6603
6604 * tracepoint.c: New.
6605
6606 * Makefile.in (OBS): Add tracepoint.o.
6607 (tracepoint.o): New rule.
6608
6609 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6610
6611 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6612 (i386-mmx.o): New.
6613 (i386-mmx.c): Likewise.
6614 (i386-mmx-linux.o): Likewise.
6615 (i386-mmx-linux.c): Likewise.
6616
6617 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6618 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6619 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6620 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6621
6622 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6623 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6624 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6625
6626 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6627
6628 * Makefile.in (clean): Updated.
6629 (i386-avx.o): New.
6630 (i386-avx.c): Likewise.
6631 (i386-avx-linux.o): Likewise.
6632 (i386-avx-linux.c): Likewise.
6633 (amd64-avx.o): Likewise.
6634 (amd64-avx.c): Likewise.
6635 (amd64-avx-linux.o): Likewise.
6636 (amd64-avx-linux.c): Likewise.
6637
6638 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6639 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6640 (srv_amd64_regobj): Add amd64-avx.o.
6641 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6642 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6643 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6644 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6645 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6646 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6647 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6648
6649 * i387-fp.c: Include "i386-xstate.h".
6650 (i387_xsave): New.
6651 (i387_cache_to_xsave): Likewise.
6652 (i387_xsave_to_cache): Likewise.
6653 (x86_xcr0): Likewise.
6654
6655 * i387-fp.h (i387_cache_to_xsave): Likewise.
6656 (i387_xsave_to_cache): Likewise.
6657 (x86_xcr0): Likewise.
6658
6659 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6660 * linux-crisv32-low.c (target_regsets): Likewise.
6661 * linux-m68k-low.c (target_regsets): Likewise.
6662 * linux-mips-low.c (target_regsets): Likewise.
6663 * linux-ppc-low.c (target_regsets): Likewise.
6664 * linux-s390-low.c (target_regsets): Likewise.
6665 * linux-sh-low.c (target_regsets): Likewise.
6666 * linux-sparc-low.c (target_regsets): Likewise.
6667 * linux-xtensa-low.c (target_regsets): Likewise.
6668
6669 * linux-low.c: Include <sys/uio.h>.
6670 (regsets_fetch_inferior_registers): Support nt_type.
6671 (regsets_store_inferior_registers): Likewise.
6672 (linux_process_qsupported): New.
6673 (linux_target_ops): Add linux_process_qsupported.
6674
6675 * linux-low.h (regset_info): Add nt_type.
6676 (linux_target_ops): Add process_qsupported.
6677
6678 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6679 and <sys/uio.h>.
6680 (init_registers_i386_avx_linux): New.
6681 (init_registers_amd64_avx_linux): Likewise.
6682 (xmltarget_i386_linux_no_xml): Likewise.
6683 (xmltarget_amd64_linux_no_xml): Likewise.
6684 (PTRACE_GETREGSET): Likewise.
6685 (PTRACE_SETREGSET): Likewise.
6686 (x86_fill_xstateregset): Likewise.
6687 (x86_store_xstateregset): Likewise.
6688 (use_xml): Likewise.
6689 (x86_linux_update_xmltarget): Likewise.
6690 (x86_linux_process_qsupported): Likewise.
6691 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6692 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6693 init_registers_i386_linux here. Call
6694 x86_linux_update_xmltarget.
6695 (the_low_target): Add x86_linux_process_qsupported.
6696
6697 * server.c (handle_query): Call target_process_qsupported.
6698
6699 * target.h (target_ops): Add process_qsupported.
6700 (target_process_qsupported): New.
6701
6702 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6703
6704 * inferiors.c (add_thread): Set last_status kind to
6705 TARGET_WAITKIND_IGNORE.
6706 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6707 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6708 (linux_wait_1): Move `thread' local definition to block that uses
6709 it. Don't NULL initialize `event_child'.
6710 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6711 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6712 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6713
6714 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6715
6716 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6717 an extended waitstatus, or by a watchpoint.
6718 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6719 thread was stepping or has been stopped by a watchpoint.
6720
6721 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6722
6723 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6724 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6725 of another, then delete the previous, and validate all
6726 breakpoints.
6727 (validate_inserted_breakpoint): New.
6728 (delete_disabled_breakpoints): New.
6729 (validate_breakpoints): New.
6730 (check_mem_read): Validate breakpoints before trusting their
6731 shadow. Delete disabled breakpoints.
6732 (check_mem_write): Validate breakpoints before trusting they
6733 should be inserted. Delete disabled breakpoints.
6734 * mem-break.h (validate_breakpoints):
6735 * server.c (handle_query): Validate breakpoints when we see a
6736 qSymbol query.
6737
6738 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6739
6740 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6741 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6742 if we could tell there's a GDB breakpoint at stop_pc.
6743 (need_step_over_p): Don't do a step over if we find a GDB
6744 breakpoint at the resume PC.
6745
6746 * mem-break.c (struct raw_breakpoint): New.
6747 (enum bkpt_type): New type `gdb_breakpoint'.
6748 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6749 fields. New field `raw'.
6750 (find_raw_breakpoint_at): New.
6751 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6752 breakpoint instead.
6753 (set_breakpoint_at): Adjust.
6754 (delete_raw_breakpoint): New.
6755 (release_breakpoint): New.
6756 (delete_breakpoint): Rename to...
6757 (delete_breakpoint_1): ... this. Add proc parameter. Use
6758 release_breakpoint. Return ENOENT.
6759 (delete_breakpoint): Reimplement.
6760 (find_breakpoint_at): Delete.
6761 (find_gdb_breakpoint_at): New.
6762 (delete_breakpoint_at): Delete.
6763 (set_gdb_breakpoint_at): New.
6764 (delete_gdb_breakpoint_at): New.
6765 (gdb_breakpoint_here): New.
6766 (set_reinsert_breakpoint): Use release_breakpoint.
6767 (uninsert_breakpoint): Rename to ...
6768 (uninsert_raw_breakpoint): ... this.
6769 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6770 (reinsert_raw_breakpoint): Change parameter type to
6771 raw_breakpoint.
6772 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6773 instead.
6774 (check_breakpoints): Adjust. Use release_breakpoint.
6775 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6776 (breakpoint_inserted_here): Ditto.
6777 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6778 Don't trust the breakpoint's shadow if it is not inserted.
6779 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6780 (delete_all_breakpoints): Adjust.
6781 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6782 use delete_breakpoint_1.
6783
6784 * mem-break.h (breakpoints_supported): Delete declaration.
6785 (set_gdb_breakpoint_at): Declare.
6786 (gdb_breakpoint_here): Declare.
6787 (delete_breakpoint_at): Delete.
6788 (delete_gdb_breakpoint_at): Declare.
6789
6790 * server.h (struct raw_breakpoint): Forward declare.
6791 (struct process_info): New field `raw_breakpoints'.
6792
6793 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6794 breakpoints.
6795
6796 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6797
6798 * linux-low.c (status_pending_p_callback): Fix comment.
6799 (linux_wait_for_event_1): Move most of the internal breakpoint
6800 handling from here...
6801 (linux_wait_1): ... to here.
6802 (count_events_callback): New.
6803 (select_singlestep_lwp_callback): New.
6804 (select_event_lwp_callback): New.
6805 (cancel_breakpoints_callback): New.
6806 (select_event_lwp): New.
6807 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6808 priority to all LWPs that have had events that should be reported
6809 to the client. Cancel breakpoints when about to reporting the
6810 event to the client, not while stopping lwps. No longer cancel
6811 finished single-steps here.
6812 (cancel_finished_single_step): Delete.
6813 (cancel_finished_single_steps): Delete.
6814
6815 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6816
6817 * mem-break.c (enum bkpt_type): New.
6818 (struct breakpoint): New field `type'.
6819 (set_breakpoint_at): Change return type to struct breakpoint
6820 pointer. Set type to `other_breakpoint' by default.
6821 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6822 in the breakpoint list.
6823 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6824 (reinsert_breakpoint): Rename to ...
6825 (reinsert_raw_breakpoint): ... this.
6826 (reinsert_breakpoints_at): Adjust.
6827 * mem-break.h (struct breakpoint): Declare.
6828 (set_breakpoint_at): Change return type to struct breakpoint
6829 pointer.
6830
6831 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6832
6833 * server.c (handle_query): Assign, not compare.
6834
6835 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6836
6837 Teach linux gdbserver to step-over-breakpoints.
6838
6839 * linux-low.c (can_hardware_single_step): New.
6840 (supports_breakpoints): New.
6841 (handle_extended_wait): If stopping threads, read the stop pc of
6842 the new cloned LWP.
6843 (get_pc): New.
6844 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6845 low target doesn't support retrieving the PC.
6846 (add_lwp): Set last_resume_kind to resume_continue.
6847 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6848 (linux_attach): Don't clear stop_expected. Set the lwp's
6849 last_resume_kind to resume_stop.
6850 (linux_detach_one_lwp): Don't check for removed breakpoints.
6851 (check_removed_breakpoint): Delete.
6852 (status_pending_p): Rename to ...
6853 (status_pending_p_callback): ... this. Don't check for removed
6854 breakpoints. Don't consider threads that are stopped from GDB's
6855 perspective.
6856 (linux_wait_for_lwp): Always read the stop_pc here.
6857 (cancel_breakpoint): New.
6858 (step_over_bkpt): New global.
6859 (linux_wait_for_event_1): Implement stepping over breakpoints.
6860 (gdb_wants_lwp_stopped): New.
6861 (gdb_wants_all_stopped): New.
6862 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6863 single-step traps here. Store the thread's last reported target
6864 wait status.
6865 (send_sigstop): Don't clear stop_expected. Always set it,
6866 instead.
6867 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6868 (cancel_finished_single_step): New.
6869 (cancel_finished_single_steps): New.
6870 (wait_for_sigstop): Don't cancel finished single-step traps here.
6871 (linux_resume_one_lwp): Don't check for removed breakpoints.
6872 Don't set `step' on non-hardware step archs.
6873 (linux_set_resume_request): Ignore resume_stop requests if already
6874 stopping or stopped. Set the lwp's last_resume_kind.
6875 (resume_status_pending_p): Don't check for removed breakpoints.
6876 (need_step_over_p): New.
6877 (start_step_over): New.
6878 (finish_step_over): New.
6879 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6880 requests. Clear the thread's last reported target waitstatus.
6881 Don't use the `suspended' flag. Don't consider pending breakpoints.
6882 (linux_resume): Start a step-over if necessary.
6883 (proceed_one_lwp): New.
6884 (proceed_all_lwps): New.
6885 (unstop_all_lwps): New.
6886 * linux-low.h (struct lwp_info): Rewrite comment for the
6887 `suspended' flag. Add the `stop_pc' field. Delete the
6888 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6889 Add `'last_resume_kind' and `need_step_over' fields.
6890 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6891 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6892 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6893 (set_raw_breakpoint_at): New.
6894 (set_breakpoint_at): Rewrite to use it.
6895 (reinsert_breakpoint_handler): Delete.
6896 (set_reinsert_breakpoint): New.
6897 (reinsert_breakpoint_by_bp): Delete.
6898 (delete_reinsert_breakpoints): New.
6899 (uninsert_breakpoint): Rewrite.
6900 (uninsert_breakpoints_at): New.
6901 (reinsert_breakpoint): Rewrite.
6902 (reinsert_breakpoints_at): New.
6903 (check_breakpoints): Rewrite.
6904 (breakpoint_here): New.
6905 (breakpoint_inserted_here): New.
6906 (check_mem_read): Adjust.
6907 * mem-break.h (breakpoints_supported, breakpoint_here)
6908 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6909 (reinsert_breakpoint_by_bp): Delete declaration.
6910 (delete_reinsert_breakpoints): Declare.
6911 (reinsert_breakpoint): Delete declaration.
6912 (reinsert_breakpoints_at): Declare.
6913 (uninsert_breakpoint): Delete declaration.
6914 (uninsert_breakpoints_at): Declare.
6915 (check_breakpoints): Adjust prototype.
6916 * server.h: Adjust include order.
6917 (struct thread_info): Declare here. Add a `last_status' field.
6918
6919 2010-03-23 Michael Snyder <msnyder@vmware.com>
6920
6921 * server.c (crc32): New function.
6922 (handle_query): Add handling for 'qCRC:' request.
6923
6924 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6925
6926 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6927 lwp had been stopped by a watchpoint.
6928
6929 2010-03-16 Pedro Alves <pedro@codesourcery.com>
6930
6931 * server.h (internal_error): Declare.
6932 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6933 * utils.c (internal_error): New function.
6934
6935 2010-03-15 Andreas Schwab <schwab@redhat.com>
6936
6937 * configure.srv: Fix typo setting srv_regobj.
6938
6939 2010-03-15 Pedro Alves <pedro@codesourcery.com>
6940
6941 * linux-low.c (fetch_register): Avoid passing a non string literal
6942 format to `error'.
6943 (usr_store_inferior_registers): Ditto.
6944
6945 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6946
6947 * linux-low.c (linux_write_memory): Bail out early if peeking
6948 memory failed.
6949
6950 2010-03-14 Pedro Alves <pedro@codesourcery.com>
6951
6952 * linux-low.h (struct lwp_info): New fields
6953 `stopped_by_watchpoint' and `stopped_data_address'.
6954 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6955 here, and cache them in the lwp object.
6956 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6957 directly.
6958 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6959 field.
6960 (linux_stopped_by_watchpoint): Rewrite.
6961 (linux_stopped_data_address): Rewrite.
6962
6963 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
6964
6965 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6966 switching the current inferior, not before.
6967
6968 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
6969
6970 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6971 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6972 i386-linux.c and amd64-linux.c.
6973 (reg-i386.o): Removed.
6974 (reg-i386.c): Likewise.
6975 (reg-i386-linux.o): Likewise.
6976 (reg-i386-linux.c): Likewise.
6977 (reg-x86-64.o): Likewise.
6978 (reg-x86-64.c): Likewise.
6979 (reg-x86-64-linux.o): Likewise.
6980 (reg-x86-64-linux.c): Likewise.
6981 (i386.o): New.
6982 (i386.c): Likewise.
6983 (i386-linux.o): Likewise.
6984 (i386-linux.c): Likewise.
6985 (amd64.o): Likewise.
6986 (amd64.c): Likewise.
6987 (amd64-linux.o): Likewise.
6988 (amd64-linux.c): Likewise.
6989
6990 * configure.srv (srv_i386_regobj): New.
6991 (srv_i386_linux_regobj): Likewise.
6992 (srv_amd64_regobj): Likewise.
6993 (srv_amd64_linux_regobj): Likewise.
6994 (srv_i386_32bit_xmlfiles): Likewise.
6995 (srv_i386_64bit_xmlfiles): Likewise.
6996 (srv_i386_xmlfiles): Likewise.
6997 (srv_amd64_xmlfiles): Likewise.
6998 (srv_i386_linux_xmlfiles): Likewise.
6999 (srv_amd64_linux_xmlfiles): Likewise.
7000 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7001 srv_xmlfiles to $srv_i386_xmlfiles.
7002 (i[34567]86-*-mingw32ce*): Likewise.
7003 (i[34567]86-*-mingw*): Likewise.
7004 (i[34567]86-*-nto*): Likewise.
7005 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7006 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7007 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7008 (x86_64-*-linux*): Likewise.
7009
7010 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7011 (init_registers_amd64_linux): New.
7012 (x86_arch_setup): Replace init_registers_x86_64_linux with
7013 init_registers_amd64_linux.
7014
7015 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7016
7017 * configure.ac: Check for libdl. If it is not available link against
7018 static libthread_db.
7019 * configure: Regenerate.
7020
7021 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7022
7023 PR9605
7024
7025 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7026 handing a read watchpoint.
7027 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7028
7029 2010-02-12 Doug Evans <dje@google.com>
7030
7031 * linux-low.c (linux_supports_tracefork_flag): Document.
7032 (linux_look_up_symbols): Add comment.
7033
7034 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7035
7036 * regcache.c (supply_register): Clear regcache if buf is NULL.
7037
7038 2010-02-02 Nicolas Roche <roche@sourceware.org>
7039 Joel Brobecker <brobecker@adacore.com>
7040
7041 * inferiors.c (find_inferior): Add function documentation.
7042 (unloaded_dll): Handle the case where the unloaded dll has not
7043 been previously registered in the dll list.
7044
7045 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7046
7047 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7048 (thumb2_breakpoint): New.
7049 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7050
7051 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7052
7053 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7054 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7055 breakpoints.
7056
7057 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7058
7059 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7060
7061 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7062
7063 * linux-s390-low.c (s390_collect_ptrace_register)
7064 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7065
7066 2010-01-21 Doug Evans <dje@google.com>
7067
7068 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7069 (PTRACE_ARG4_TYPE): New macro.
7070 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7071 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7072 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7073 (usr_store_inferior_registers): Ditto.
7074 (linux_read_memory, linux_write_memory): Ditto.
7075 (linux_test_for_tracefork): Ditto.
7076
7077 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7078 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7079
7080 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7081
7082 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7083 target.
7084
7085 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7086
7087 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7088 prototype to take a regcache. Adjust.
7089
7090 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7091
7092 * regcache.h (struct thread_info): Forward declare.
7093 (struct regcache): New.
7094 (new_register_cache): Adjust prototype.
7095 (get_thread_regcache): Declare.
7096 (free_register_cache): Adjust prototype.
7097 (registers_to_string, registers_from_string): Ditto.
7098 (supply_register, supply_register_by_name, collect_register)
7099 (collect_register_as_string, collect_register_by_name): Ditto.
7100 * regcache.c (struct inferior_regcache_data): Delete.
7101 (get_regcache): Rename to ...
7102 (get_thread_regcache): ... this. Adjust. Switch inferior before
7103 fetching registers.
7104 (regcache_invalidate_one): Adjust.
7105 (regcache_invalidate): Fix prototype.
7106 (new_register_cache): Return the new register cache.
7107 (free_register_cache): Change prototype.
7108 (realloc_register_cache): Adjust.
7109 (registers_to_string): Change prototype to take a regcache. Adjust.
7110 (registers_from_string): Ditto.
7111 (register_data): Ditto.
7112 (supply_register): Ditto.
7113 (supply_register_by_name): Ditto.
7114 (collect_register): Ditto.
7115 (collect_register_as_string): Ditto.
7116 (collect_register_by_name): Ditto.
7117 * server.c (process_serial_event): Adjust.
7118 * linux-low.h (regset_fill_func, regset_store_func): Change
7119 prototype.
7120 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7121 Change prototype.
7122 * linux-low.c (get_stop_pc): Adjust.
7123 (check_removed_breakpoint): Adjust.
7124 (linux_wait_for_event): Adjust.
7125 (linux_resume_one_lwp): Adjust.
7126 (fetch_register): Add regcache parameter. Adjust.
7127 (usr_store_inferior_registers): Ditto.
7128 (regsets_fetch_inferior_registers): Ditto.
7129 (regsets_store_inferior_registers): Ditto.
7130 (linux_fetch_registers, linux_store_registers): Ditto.
7131 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7132 regcache. Adjust.
7133 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7134 Ditto.
7135 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7136 prototype to take a regcache.
7137 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7138 * remote-utils.c (convert_ascii_to_int, outreg)
7139 (prepare_resume_reply): Change prototype to take a regcache.
7140 Adjust.
7141 * target.h (struct target_ops) <fetch_registers, store_registers>:
7142 Change prototype to take a regcache.
7143 (fetch_inferior_registers, store_inferior_registers): Change
7144 prototype to take a regcache. Adjust.
7145 * proc-service.c (ps_lgetregs): Adjust.
7146 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7147 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7148 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7149 take a regcache. Adjust.
7150 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7151 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7152 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7153 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7154 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7155 (cris_cannot_fetch_register):
7156 (cris_breakpoint_at): Change prototype to take a regcache.
7157 Adjust.
7158 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7159 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7160 to take a regcache. Adjust.
7161 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7162 Adjust.
7163 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7164 take a regcache. Adjust.
7165 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7166 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7167 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7168 * linux-mips-low.c (mips_get_pc):
7169 (mips_set_pc): Change prototype to take a regcache. Adjust.
7170 (mips_reinsert_addr): Adjust.
7171 (mips_collect_register): Change prototype to take a regcache.
7172 Adjust.
7173 (mips_supply_register):
7174 (mips_collect_register_32bit, mips_supply_register_32bit)
7175 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7176 (mips_store_fpregset): Ditto.
7177 * linux-ppc-low.c (ppc_supply_ptrace_register)
7178 (ppc_supply_ptrace_register): Ditto.
7179 (parse_spufs_run): Adjust.
7180 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7181 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7182 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7183 take a regcache. Adjust.
7184 * linux-s390-low.c (s390_collect_ptrace_register)
7185 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7186 (s390_set_pc): Change prototype to take a regcache. Adjust.
7187 (s390_arch_setup): Adjust.
7188 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7189 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7190 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7191 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7192 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7193 regcache. Adjust.
7194 (sparc_breakpoint_at): Adjust.
7195 * linux-xtensa-low.c (xtensa_fill_gregset):
7196 (xtensa_store_gregset):
7197 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7198 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7199 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7200 prototype to take a regcache. Adjust.
7201 * win32-arm-low.c (arm_fetch_inferior_register)
7202 (arm_store_inferior_register): Change prototype to take a
7203 regcache. Adjust.
7204 * win32-i386-low.c (i386_fetch_inferior_register)
7205 (i386_store_inferior_register): Change prototype to take a
7206 regcache. Adjust.
7207 * win32-low.c (child_fetch_inferior_registers)
7208 (child_store_inferior_registers): Change prototype to take a
7209 regcache. Adjust.
7210 (win32_wait): Adjust.
7211 (win32_fetch_inferior_registers): Change prototype to take a
7212 regcache. Adjust.
7213 (win32_store_inferior_registers): Adjust.
7214 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7215 store_inferior_register>: Change prototype to take a regcache.
7216
7217 2010-01-20 Doug Evans <dje@google.com>
7218
7219 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7220 #ifdef.
7221 (linux_wait_for_event1, linux_init_signals): Ditto.
7222 (W_STOPCODE): Provide definition if missing.
7223
7224 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7225
7226 * linux-low.c (linux_core_of_thread): New.
7227 (compare_ints, show_process, list_threads): New.
7228 (linux_qxfer_osdata): Report threads and cores.
7229 (linux_target_op): Register linux_core_of_thread.
7230 * remote-utils.c (prepare_resume_reply): Report the core.
7231 (buffer_xml_printf): Support %d specifier.
7232 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7233 New.
7234 (handle_query): Handle qXfer:threads. Announce availability
7235 thereof.
7236 * target.h (struct target_ops): New field core_of_thread.
7237
7238 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7239
7240 * Makefile.in (clean): Remove new generated files.
7241 (reg-s390.o, reg-s390.c): Remove rules.
7242 (reg-s390x.o, reg-s390x.c): Likewise.
7243 (s390-linux32.o, s390-linux32.c): Add rules.
7244 (s390-linux64.o, s390-linux64.c): Likewise.
7245 (s390x-linux64.o, s390x-linux64.c): Likewise.
7246 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7247 * linux-s390-low.c: Include <elf.h>.
7248 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7249 (init_registers_s390): Remove prototype.
7250 (init_registers_s390x): Likewise.
7251 (init_registers_s390_linux32): Add prototype.
7252 (init_registers_s390_linux64): Likewise.
7253 (init_registers_s390x_linux64): Likewise.
7254 (s390_num_regs_3264): New define.
7255 (s390_regmap_3264): New global variable.
7256 (s390_cannot_fetch_register): Remove obsolete check.
7257 (s390_cannot_store_register): Likewise.
7258 (s390_collect_ptrace_register): Handle upper/lower register halves.
7259 (s390_supply_ptrace_register): Likewise.
7260 (s390_fill_gregset): Update to register number changes.
7261 (s390_get_hwcap): New routine.
7262 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7263 Install appropriate regmap and register set.
7264
7265 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7266
7267 * server.c (gdbserver_version): Update copyright year to 2010.
7268 * gdbreplay.c (gdbreplay_version): Likewise.
7269
7270 2009-12-28 Doug Evans <dje@google.com>
7271
7272 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7273 elf/external.h. Include <elf.h> instead but only if necessary.
7274
7275 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7276
7277 * linux-low.c (linux_remove_process): Remove `detaching'
7278 parameter. Don't release/detach from thread_db here.
7279 (linux_kill): Release/detach from thread_db here, ...
7280 (linux_detach): ... and here, before actually detaching.
7281 (linux_wait_1): ... and here, when a process exits.
7282 * thread-db.c (any_thread_of): New.
7283 (thread_db_free): Switch the current inferior to a thread of the
7284 passed in process.
7285
7286 2009-12-21 Doug Evans <dje@google.com>
7287
7288 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7289
7290 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7291 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7292 warning ifndef __NR_tkill. Move setting of errno there too.
7293 Delete unnecessary resetting of errno after syscall.
7294 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7295
7296 * configure.ac: Check for dladdr.
7297 * config.in: Regenerate.
7298 * configure: Regenerate.
7299 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7300 (try_thread_db_load): Update.
7301
7302 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7303
7304 2009-12-18 Doug Evans <dje@google.com>
7305
7306 * event-loop.c: Include unistd.h if it exists.
7307
7308 * linux-low.c (my_waitpid): Move definition away from being in
7309 between linux_tracefork_child/linux_test_for_tracefork.
7310
7311 * gdb_proc_service.h (psaddr_t): Fix type.
7312 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7313 signature to match glibc.
7314
7315 2009-12-16 Doug Evans <dje@google.com>
7316
7317 * linux-low.c (linux_read_memory): Fix argument to read.
7318
7319 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7320
7321 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7322 events, don't leave current_inferior pointing at null.
7323
7324 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7325
7326 * win32-low.c (LOG): Delete.
7327 (OUTMSG): Output to stderr.
7328 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7329 on compile time LOG macro.
7330 (win32_wait): Fix debug output.
7331
7332 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7333
7334 * win32-low.c (win32_add_one_solib): If the dll name is
7335 "ntdll.dll", prepend the system directory to the dll path.
7336
7337 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7338
7339 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7340
7341 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7342 Vladimir Prus <vladimir@codesourcery.com>
7343
7344 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7345 * configure.ac: Check for __mcoldfire__ and set
7346 gdb_cv_m68k_is_coldfire.
7347 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7348 reg-cf.o and reg-m68k.o.
7349 * configure: Regenerated.
7350
7351 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7352
7353 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7354 Pass it to thread_db_free.
7355 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7356 proper `detaching' argument to linux_remove_process.
7357 * linux-low.h (thread_db_free): Add `detaching' parameter.
7358 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7359 to thread_db_free.
7360 (thread_db_free): Add `detaching' parameter. Only
7361 call td_ta_clear_event if detaching from process.
7362
7363 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7364
7365 * thread-db.c (thread_db_free): Fix typo.
7366
7367 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7368
7369 PR gdb/10838
7370 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7371
7372 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7373
7374 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7375 with an i686 compiler.
7376 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7377 needed.
7378 * configure: Rebuilt.
7379
7380 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7381
7382 PR gdb/10783
7383
7384 * server.c (handle_search_memory_1): Correct read_addr initialization
7385 in loop for searching subsequent chunks.
7386
7387 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7388
7389 * configure.ac: New --with-libthread-db option.
7390 * thread-db.c: Allow direct dependence on libthread_db.
7391 (thread_db_free): Adjust.
7392 * config.in: Regenerate.
7393 * configure: Likewise.
7394
7395 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7396
7397 PR gdb/10757
7398 * thread-db.c (attach_thread): New function.
7399 (maybe_attach_thread): Return success/failure.
7400 (find_new_threads_callback): Adjust.
7401 (thread_db_find_new_threads): Loop until no new threads.
7402
7403 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7404
7405 * proc-service.c (ps_lgetregs): Formatting.
7406
7407 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7408
7409 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7410 * configure.ac: Adjust.
7411 * linux-low.h (struct process_info_private): Move members to struct
7412 thread_db.
7413 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7414 * linux-low.c (linux_remove_process): Adjust.
7415 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7416 * server.c (handle_query): Move code ...
7417 (handle_monitor_command): ... here. New function.
7418 * target.h (struct target_ops): New member.
7419 * thread-db.c (struct thread_db): New.
7420 (libthread_db_search_path): New variable.
7421 (thread_db_create_event, thread_db_enable_reporting)
7422 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7423 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7424 (try_thread_db_load_1, dladdr_to_soname): New functions.
7425 (try_thread_db_load, thread_db_load_search): New functions.
7426 (thread_db_init): Search for libthread_db.
7427 (thread_db_free): New function.
7428 (thread_db_handle_monitor_command): Likewise.
7429 * config.in: Regenerate.
7430 * configure: Regenerate.
7431
7432 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7433
7434 * spu-low.c (spu_kill): Wait for inferior to terminate.
7435 Call clear_inferiors.
7436 (spu_detach): Call clear_inferiors.
7437
7438 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7439
7440 * aclocal.m4: Regenerate.
7441 * config.in: Likewise.
7442 * configure: Likewise.
7443
7444 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7445
7446 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7447 (parse_spufs_run): New function.
7448 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7449 (ppc_breakpoint_at): Handle SPU breakpoints.
7450
7451 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7452
7453 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7454 (SPUFS_MAGIC): Define.
7455 (spu_enumerate_spu_ids): New function.
7456 (linux_qxfer_spu): New function.
7457 (linux_target_ops): Install linux_qxfer_spu.
7458
7459 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7460
7461 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7462 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7463 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7464 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7465 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7466 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7467 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7468 (init_registers_powerpc_cell32l): Add prototype.
7469 (init_registers_powerpc_cell64l): Likewise.
7470 (ppc_arch_setup): Detect Cell/B.E. architecture.
7471
7472 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7473
7474 * Makefile.in (datarootdir): New variable.
7475
7476 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7477
7478 * linux-low.c (linux_write_memory): Update debugging output.
7479 * Makefile.in (clean): Add new descriptions.
7480 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7481 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7482 * configure.srv: Add new files for arm*-*-linux*.
7483 * linux-arm-low.c: Add new declarations.
7484 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7485 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7486 (HWCAP_VFPv3D16): New.
7487 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7488 instead of __IWMMXT__.
7489 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7490 (arm_arch_setup): New.
7491 (target_regsets): Remove #ifdef. Add VFP regset.
7492 (the_low_target): Use arm_arch_setup.
7493
7494 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7495
7496 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7497 the main thread again.
7498
7499 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7500
7501 Adding Neutrino gdbserver.
7502 * configure: Regenerated.
7503 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7504 * configure.srv (i[34567]86-*-nto*): New target.
7505 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7506 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7507 (nto_comctrl) [__QNX__]: New function.
7508 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7509
7510 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7511
7512 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7513 srv_tgtobj.
7514
7515 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7516 Pedro Alves <pedro@codesourcery.com>
7517
7518 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7519 don't support CONTEXT_EXTENDED_REGISTERS.
7520 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7521 (the_low_target): Install them.
7522 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7523 failing with ERROR_PIPE_NOT_CONNECTED.
7524
7525 2009-06-30 Doug Evans <dje@google.com>
7526 Pierre Muller <muller@ics.u-strasbg.fr>
7527
7528 Add h/w watchpoint support to x86-linux, win32-i386.
7529 * Makefile.in (SFILES): Add i386-low.c
7530 (i386_low_h): Define.
7531 (i386-low.o): Add dependencies.
7532 (linux-x86-low.o): Add i386-low.h dependency.
7533 (win32-i386-low.o): Ditto.
7534 * i386-low.c: New file.
7535 * i386-low.h: New file.
7536 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7537 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7538 * linux-low.c (linux_add_process): Initialize arch_private.
7539 (linux_remove_process): Free arch_private.
7540 (add_lwp): Initialize arch_private.
7541 (delete_lwp): Free arch_private.
7542 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7543 provided.
7544 * linux-low.h (process_info_private): New member arch_private.
7545 (lwp_info): New member arch_private.
7546 (linux_target_ops): New members new_process, new_thread,
7547 prepare_to_resume.
7548 (ptid_of): New macro.
7549 * linux-x86-low.c: Include stddef.h, i386-low.h.
7550 (arch_process_info): New struct.
7551 (arch_lwp_info): New struct.
7552 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7553 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7554 (i386_dr_low_get_status): New function.
7555 (x86_insert_point, x86_remove_point): New functions.
7556 (x86_stopped_by_watchpoint): New function.
7557 (x86_stopped_data_address): New function.
7558 (x86_linux_new_process, x86_linux_new_thread): New functions.
7559 (x86_linux_prepare_to_resume): New function.
7560 (the_low_target): Add entries for insert_point, remove_point,
7561 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7562 prepare_to_resume.
7563 * server.c (debug_hw_points): New global.
7564 (monitor_show_help): Document set debug-hw-points.
7565 (handle_query): Process "set debug-hw-points".
7566 * server.h (debug_hw_points): Declare.
7567 (paddress): Declare.
7568 * utils.c (NUMCELLS, CELLSIZE): New macros.
7569 (get_sell, xsnprintf, paddress): New functions.
7570 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7571 remove_point, stopped_by_watchpoint, stopped_data_address.
7572 * win32-i386-low.c: Include i386-low.h.
7573 (debug_reg_state): Replaces dr.
7574 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7575 (i386_dr_low_get_status): New function.
7576 (i386_insert_point, i386_remove_point): New functions.
7577 (i386_stopped_by_watchpoint): New function.
7578 (i386_stopped_data_address): New function.
7579 (i386_initial_stuff): Update.
7580 (get_thread_context,set_thread_context,i386_thread_added): Update.
7581 (the_low_target): Add entries for insert_point,
7582 remove_point, stopped_by_watchpoint, stopped_data_address.
7583 * win32-low.c (win32_insert_watchpoint): New function.
7584 (win32_remove_watchpoint): New function.
7585 (win32_stopped_by_watchpoint): New function.
7586 (win32_stopped_data_address): New function.
7587 (win32_target_ops): Add entries for insert_watchpoint,
7588 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7589 * win32-low.h (win32_target_ops): New members insert_point,
7590 remove_point, stopped_by_watchpoint, stopped_data_address.
7591
7592 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7593
7594 * server.c (process_serial_event): Re-return unsupported, not
7595 error, if the type isn't recognized. Re-allow supporting only
7596 insert or remove packets. Also call require_running for
7597 breakpoints. Add missing break statement to default case. Tidy.
7598 * target.h (struct target_ops): Rename insert_watchpoint to
7599 insert_point, and remove_watchpoint to remove_point.
7600
7601 * linux-low.h (struct linux_target_ops): Likewise.
7602 * linux-low.c (linux_insert_watchpoint): Rename to ...
7603 (linux_insert_point): ... this. Adjust.
7604 (linux_remove_watchpoint): Rename to ...
7605 (linux_remove_point): ... this. Adjust.
7606 (linux_target_ops): Adjust.
7607 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7608 (cris_insert_point): ... this.
7609 (cris_remove_watchpoint): Rename to ...
7610 (cris_remove_point): ... this.
7611 (the_low_target): Adjust.
7612
7613 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7614
7615 * server.c (handle_v_kill): Pass signal_pid to
7616 kill_inferior if multi_process is zero.
7617
7618 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7619
7620 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7621 * target.h (target_ops): Comment for *_watchpoint to make it clear
7622 the functions can get types '0' and '1'.
7623
7624 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7625
7626 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7627 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7628 * regcache.c (get_regcache): Likewise.
7629 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7630 * win32-low.c (child_fetch_inferior_registers): Remove check for
7631 regno 0.
7632
7633 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7634 Pedro Alves <pedro@codesourcery.com>
7635
7636 * target.h (struct target_ops) <supports_multi_process>: New
7637 callback.
7638 (target_supports_multi_process): New.
7639 * server.c (handle_query): Even if GDB reports support, only
7640 enable multi-process if the target also supports it. Report
7641 multi-process support only if the target backend supports it.
7642 * linux-low.c (linux_supports_multi_process): New function.
7643 (linux_target_ops): Install it as target_supports_multi_process
7644 callback.
7645
7646 2009-05-24 Doug Evans <dje@google.com>
7647
7648 Global renaming of find_thread_pid to find_thread_ptid.
7649 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7650 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7651 All callers updated.
7652
7653 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7654 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7655 directly.
7656
7657 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7658 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7659 (linux_resume_one_lwp): Ditto.
7660
7661 2009-05-23 Doug Evans <dje@google.com>
7662
7663 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7664 from struct inferior_list_entry * to struct lwp_info *.
7665 All callers updated.
7666
7667 2009-05-13 Doug Evans <dje@google.com>
7668
7669 * linux-x86-low.c: Don't include assert.h.
7670 (x86_siginfo_fixup): Use fatal, not assert.
7671 (x86_arch_setup): Fix comment.
7672
7673 2009-05-12 Doug Evans <dje@google.com>
7674
7675 Biarch support for i386/amd64 gdbserver.
7676 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7677 Add linux-x86-low.c.
7678 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7679 (linux-x86-low.o): Add.
7680 * linux-x86-64-low.c: Delete.
7681 * linux-i386-low.c: Delete.
7682 * linux-x86-low.c: New file.
7683 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7684 linux-x86-low.o.
7685 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7686 linux-x86-low.o.
7687 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7688 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7689 (linux_child_pid_to_exec_file): New function.
7690 (elf_64_header_p, elf_64_file_p): New functions.
7691 (siginfo_fixup): New function.
7692 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7693 give target a chance to convert layout.
7694 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7695 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7696
7697 2009-05-07 Doug Evans <dje@google.com>
7698
7699 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7700 (regsets_store_inferior_registers): Ditto.
7701
7702 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7703
7704 PR server/10048
7705
7706 * linux-low.c (must_set_ptrace_flags): Delete.
7707 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7708 of the global.
7709 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7710 `lwp->must_set_ptrace_flags' instead.
7711 (linux_wait_for_event_1): Set ptrace options here.
7712 (linux_wait_1): ... not here.
7713
7714 2009-04-30 Doug Evans <dje@google.com>
7715
7716 * inferiors.c (started_inferior_callback): New function.
7717 (attached_inferior_callback): New function.
7718 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7719 * server.c (print_started_pid, print_attached_pid): New functions.
7720 (detach_or_kill_for_exit): New function.
7721 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7722 * server.h (have_started_inferiors_p): Declare.
7723 (have_attached_inferiors_p): Declare.
7724
7725 * inferiors.c (remove_process): Fix memory leak, free process.
7726 * linux-low.c (linux_remove_process): New function.
7727 (linux_kill): Call it instead of remove_process.
7728 (linux_detach, linux_wait_1): Ditto.
7729
7730 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7731
7732 * configure.srv: Add x86 Windows CE target.
7733
7734 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7735
7736 * inferiors.c (get_thread_process): Make global.
7737 * server.h (get_thread_process): Add prototype.
7738 * thread-db.c (find_one_thread): Use get_thread_process
7739 instead of current_process.
7740 (thread_db_get_tls_address): Do not crash if called when
7741 thread layer is not yet initialized.
7742
7743 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7744
7745 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7746 * spu-low.c (current_tid): Rename to ...
7747 (current_ptid): ... this.
7748 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7749 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7750 ptid_get_lwp (current_ptid) instead of current_tid.
7751 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7752 instead of current_tid. Use find_process_pid to verify pid
7753 argument is valid. Pass proper argument to remove_process.
7754 (spu_thread_alive): Compare current_ptid instead of current_tid.
7755 (spu_resume): Likewise.
7756
7757 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7758
7759 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7760 variable.
7761
7762 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7763
7764 Implement the multiprocess extensions, and add linux multiprocess
7765 support.
7766
7767 * server.h (ULONGEST): Declare.
7768 (struct ptid, ptid_t): New.
7769 (minus_one_ptid, null_ptid): Declare.
7770 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7771 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7772 (struct inferior_list_entry): Change `id' type from unsigned from
7773 to ptid_t.
7774 (struct sym_cache, struct breakpoint, struct
7775 process_info_private): Forward declare.
7776 (struct process_info): Declare.
7777 (current_process): Declare.
7778 (all_processes): Declare.
7779 (initialize_inferiors): Declare.
7780 (add_thread): Adjust to use ptid_t.
7781 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7782 (add_process, remove_process, find_thread_pid): Declare.
7783 (find_inferior_id): Adjust to use ptid_t.
7784 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7785 (multi_process): Declare.
7786 (push_event): Adjust to use ptid_t.
7787 (read_ptid, write_ptid): Declare.
7788 (prepare_resume_reply): Adjust to use ptid_t.
7789 (clear_symbol_cache): Declare.
7790 * inferiors.c (all_processes): New.
7791 (null_ptid, minus_one_ptid): New.
7792 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7793 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7794 (add_thread): Change unsigned long to ptid. Remove gdb_id
7795 parameter. Adjust.
7796 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7797 (gdb_id_to_thread): Rename to ...
7798 (find_thread_pid): ... this. Change unsigned long to ptid.
7799 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7800 (loaded_dll, pull_pid_from_list): Adjust.
7801 (add_process, remove_process, find_process_pid)
7802 (get_thread_process, current_process, initialize_inferiors): New.
7803 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7804 (struct target_waitstatus) <related_pid>: Ditto.
7805 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7806 return type to int.
7807 (struct target_ops) <join>: Add `pid' argument.
7808 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7809 (struct target_ops) <wait>: Add `ptid' field. Change return type
7810 to ptid.
7811 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7812 (mywait): Add `ptid' argument. Change return type to ptid_t.
7813 (target_pid_to_str): Declare.
7814 * target.c (set_desired_inferior): Adjust to use ptids.
7815 (mywait): Add new `ptid' argument. Adjust.
7816 (target_pid_to_str): New.
7817 * mem-break.h (free_all_breakpoints): Declare.
7818 * mem-break.c (breakpoints): Delelete.
7819 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7820 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7821 to use per-process breakpoint list.
7822 (free_all_breakpoints): New.
7823 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7824 (symbol_cache, all_symbols_looked_up): Delete.
7825 (hexchars): New.
7826 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7827 read_ptid): New.
7828 (prepare_resume_reply): Change ptid argument's type from unsigned
7829 long to ptid_t. Adjust. Implement W;process and X;process.
7830 (free_sym_cache, clear_symbol_cache): New.
7831 (look_up_one_symbol): Adjust to per-process symbol cache. *
7832 * server.c (cont_thread, general_thread, step_thread): Change type
7833 to ptid_t.
7834 (attached): Delete.
7835 (multi_process): New.
7836 (last_ptid): Change type to ptid_t.
7837 (struct vstop_notif) <ptid>: Change type to ptid_t.
7838 (queue_stop_reply, push_event): Change `ptid' argument's type to
7839 ptid_t.
7840 (discard_queued_stop_replies): Add `pid' argument.
7841 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7842 changes. Don't reference the `attached' global.
7843 (attach_inferior): Adjust to mywait interface changes.
7844 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7845 features. Handle and report "multiprocess+". Handle
7846 "qAttached:PID".
7847 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7848 changes.
7849 (handle_v_kill): New.
7850 (handle_v_stopped): Adjust to use target_pid_to_str.
7851 (handle_v_requests): Allow multiple attaches and runs when
7852 multiprocess extensions are in effect. Handle "vKill".
7853 (myresume): Adjust to use ptids.
7854 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7855 (handle_status): Adjust to discard_queued_stop_replies interface
7856 change.
7857 (first_thread_of, kill_inferior_callback)
7858 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7859 (main): Call initialize_inferiors. Adjust to use ptids, killing
7860 and detaching from all inferiors. Handle multiprocess packet
7861 variants.
7862 * linux-low.h: Include gdb_proc_service.h.
7863 (struct process_info_private): New.
7864 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7865 <lwpid_of>: Use ptid_get_lwp.
7866 (get_lwp_thread): Adjust.
7867 (struct lwp_info): Add `dead' member.
7868 (find_lwp_pid): Declare.
7869 * linux-low.c (thread_db_active): Delete.
7870 (new_inferior): Adjust comment.
7871 (inferior_pid): Delete.
7872 (linux_add_process): New.
7873 (handle_extended_wait): Adjust.
7874 (add_lwp): Change unsigned long to ptid.
7875 (linux_create_inferior): Add process to processes table. Adjust
7876 to use ptids. Don't set new_inferior here.
7877 (linux_attach_lwp): Rename to ...
7878 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7879 it. Adjust to use ptids.
7880 (linux_attach_lwp): New.
7881 (linux_attach): Add process to processes table. Don't set
7882 new_inferior here.
7883 (struct counter): New.
7884 (second_thread_of_pid_p, last_thread_of_process_p): New.
7885 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7886 multiple processes.
7887 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7888 processes. Remove process from process table.
7889 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7890 to multiple processes.
7891 (any_thread_of): New.
7892 (linux_detach): Add `pid' argument, and handle it. Remove process
7893 from processes table.
7894 (linux_join): Add `pid' argument. Handle it.
7895 (linux_thread_alive): Change unsighed long argument to ptid_t.
7896 Consider dead lwps as not being alive.
7897 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7898 threads we're not interested in.
7899 (same_lwp, find_lwp_pid): New.
7900 (linux_wait_for_lwp): Change `pid' argument's type from int to
7901 ptid_t. Adjust.
7902 (linux_wait_for_event): Rename to ...
7903 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7904 from int to ptid_t. Adjust.
7905 (linux_wait_for_event): New.
7906 (linux_wait_1): Add `ptid' argument. Change return type to
7907 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7908 that exit from the process table.
7909 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7910 Adjust.
7911 (mark_lwp_dead): New.
7912 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7913 stopping all threads, mark its main lwp as dead.
7914 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7915 ptids.
7916 (fetch_register, usr_store_inferior_registers)
7917 (regsets_fetch_inferior_registers)
7918 (regsets_store_inferior_registers, linux_read_memory)
7919 (linux_write_memory): Inline `inferior_pid'.
7920 (linux_look_up_symbols): Adjust to use per-process
7921 `thread_db_active'.
7922 (linux_request_interrupt): Adjust to use ptids.
7923 (linux_read_auxv): Inline `inferior_pid'.
7924 (initialize_low): Don't reference thread_db_active.
7925 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7926 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7927 (ps_getpid): Return the pid of the current inferior.
7928 * thread-db.c (proc_handle, thread_agent): Delete.
7929 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7930 per-process data.
7931 (find_one_thread): Change argument type to ptid_t. Adjust to
7932 per-process data.
7933 (maybe_attach_thread): Adjust to per-process data and ptids.
7934 (thread_db_find_new_threads): Ditto.
7935 (thread_db_init): Ditto.
7936 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7937 processes table. Adjust to use ptids.
7938 (spu_kill, spu_detach): Adjust interface. Remove process from
7939 processes table.
7940 (spu_join, spu_thread_alive): Adjust interface.
7941 (spu_wait): Adjust interface. Remove process from processes
7942 table. Adjust to use ptids.
7943 * win32-low.c (current_inferior_tid): Delete.
7944 (current_inferior_ptid): New.
7945 (debug_event_ptid): New.
7946 (thread_rec): Take a ptid. Adjust.
7947 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7948 (child_delete_thread): Ditto.
7949 (do_initial_child_stuff): Add `attached' argument. Add process to
7950 processes table.
7951 (child_fetch_inferior_registers, child_store_inferior_registers):
7952 Adjust.
7953 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7954 (win32_attach): Pass 1 to do_initial_child_stuff.
7955 (win32_kill): Adjust interface. Remove process from processes
7956 table.
7957 (win32_detach): Ditto.
7958 (win32_join): Adjust interface.
7959 (win32_thread_alive): Take a ptid.
7960 (win32_resume): Adjust to use ptids.
7961 (get_child_debug_event): Ditto.
7962 (win32_wait): Adjust interface. Remove exiting process from
7963 processes table.
7964
7965 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7966
7967 Non-stop mode support.
7968
7969 * server.h (non_stop): Declare.
7970 (gdb_client_data, handler_func): Declare.
7971 (delete_file_handler, add_file_handler, start_event_loop):
7972 Declare.
7973 (handle_serial_event, handle_target_event, push_event)
7974 (putpkt_notif): Declare.
7975 * target.h (enum resume_kind): New.
7976 (struct thread_resume): Replace `step' field by `kind' field.
7977 (TARGET_WNOHANG): Define.
7978 (struct target_ops) <wait>: Add `options' argument.
7979 <supports_non_stop, async, start_non_stop>: New fields.
7980 (target_supports_non_stop, target_async): New.
7981 (start_non_stop): Declare.
7982 (mywait): Add `options' argument.
7983 * target.c (mywait): Add `options' argument. Print child exit
7984 notifications here.
7985 (start_non_stop): New.
7986 * server.c (non_stop, own_buf, mem_buf): New globals.
7987 (struct vstop_notif): New.
7988 (notif_queue): New global.
7989 (queue_stop_reply, push_event, discard_queued_stop_replies)
7990 (send_next_stop_reply): New.
7991 (start_inferior): Adjust to use resume_kind. Adjust to mywait
7992 interface changes.
7993 (attach_inferior): In non-stop mode, don't wait for the target
7994 here.
7995 (handle_general_set): Handle QNonStop.
7996 (handle_query): When handling qC, return the current general
7997 thread, instead of the first thread of the list.
7998 (handle_query): If the backend supports non-stop mode, include
7999 QNonStop+ in the qSupported query response.
8000 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8001 and non-stop mode.
8002 (handle_v_attach, handle_v_run): Handle non-stop mode.
8003 (handle_v_stopped): New.
8004 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8005 (myresume): Adjust to use resume_kind. Handle non-stop.
8006 (queue_stop_reply_callback): New.
8007 (handle_status): Handle non-stop mode.
8008 (main): Clear non_stop flag on reconnection. Use the event-loop.
8009 Refactor serial protocol handling from here ...
8010 (process_serial_event): ... to this new function. When GDB
8011 selects any thread, select one here. In non-stop mode, wait until
8012 GDB acks all pending events before exiting.
8013 (handle_serial_event, handle_target_event): New.
8014 * remote-utils.c (remote_open): Install remote_desc in the event
8015 loop.
8016 (remote_close): Remove remote_desc from the event loop.
8017 (putpkt_binary): Rename to...
8018 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8019 (putpkt_binary): New as wrapper around putpkt_binary_1.
8020 (putpkt_notif): New.
8021 (prepare_resume_reply): In non-stop mode, don't change the
8022 general_thread.
8023 * event-loop.c: New.
8024 * Makefile.in (OBJ): Add event-loop.o.
8025 (event-loop.o): New rule.
8026
8027 * linux-low.h (pid_of): Moved here.
8028 (lwpid_of): New.
8029 (get_lwp_thread): Use lwpid_of.
8030 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8031 * linux-low.c (pid_of): Delete.
8032 (inferior_pid): Use lwpid_of.
8033 (linux_event_pipe): New.
8034 (target_is_async_p): New.
8035 (delete_lwp): New.
8036 (handle_extended_wait): Use lwpid_of.
8037 (add_lwp): Don't set lwpid field.
8038 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8039 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8040 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8041 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8042 first. Adjust to linux_wait_for_event interface changes. Use
8043 lwpid_of.
8044 (linux_detach): Don't delete the main lwp here.
8045 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8046 (status_pending_p): Don't consider explicitly suspended lwps.
8047 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8048 pointer. Add OPTIONS argument. Change return type to int. Use
8049 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8050 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8051 pointer. Add status pointer argument. Return a pid instead of a
8052 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8053 changes. In non-stop mode, don't switch to a random thread.
8054 (linux_wait): Rename to...
8055 (linux_wait_1): ... this. Add target_options argument, and handle
8056 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8057 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8058 clean exit and signal exit code. Don't stop all threads in
8059 non-stop mode. In all-stop mode, only stop all threads when
8060 reporting a stop to GDB. Handle explicit thread stop requests.
8061 (async_file_flush, async_file_mark): New.
8062 (linux_wait): New.
8063 (send_sigstop): Use lwpid_of.
8064 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8065 interface changes. In non-stop mode, don't switch to a random
8066 thread.
8067 (linux_resume_one_lwp): Use lwpid_of.
8068 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8069 (linux_resume_one_thread): ... this. Handle resume_stop. In
8070 non-stop mode, don't look for pending flag in all threads.
8071 (resume_status_pending_p): Don't consider explicitly suspended
8072 threads.
8073 (my_waitpid): Reimplement. Emulate __WALL.
8074 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8075 Use lwpid_of.
8076 (sigchld_handler, linux_supports_non_stop, linux_async)
8077 (linux_start_non_stop): New.
8078 (linux_target_ops): Register linux_supports_non_stop, linux_async
8079 and linux_start_non_stop.
8080 (initialize_low): Install SIGCHLD handler.
8081 * thread-db.c (thread_db_create_event, find_one_thread)
8082 (thread_db_get_tls_address): Use lwpid_of.
8083 * win32-low.c (win32_detach): Adjust to use resume_kind.
8084 (win32_wait): Add `options' argument.
8085 * spu-low.c (spu_resume): Adjust to use resume_kind.
8086 (spu_wait): Add `options' argument.
8087
8088 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8089
8090 Decouple target code from remote protocol.
8091
8092 * target.h (enum target_waitkind): New.
8093 (struct target_waitstatus): New.
8094 (struct target_ops) <wait>: Return an unsigned long. Take a
8095 target_waitstatus pointer instead of a char pointer.
8096 (mywait): Likewise.
8097 * target.c (mywait): Change prototype to return an unsigned long.
8098 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8099 * server.h (thread_from_wait, old_thread_from_wait): Delete
8100 declarations.
8101 (prepare_resume_reply): Change prototype to take a
8102 target_waitstatus.
8103 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8104 (last_status, last_ptid): New.
8105 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8106 pid instead of a signal.
8107 (attach_inferior): Remove "status" and "signal" parameters.
8108 Adjust.
8109 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8110 not as an address.
8111 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8112 (handle_v_requests, myresume): Remove "status" and "signal"
8113 parameters. Adjust.
8114 (handle_status): New.
8115 (main): Delete local `status'. Adjust.
8116 * remote-utils.c: Include target.h.
8117 (prepare_resume_reply): Change prototype to take a
8118 target_waitstatus. Adjust.
8119
8120 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8121 interface.
8122 * spu-low.c (spu_wait): Adjust.
8123 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8124 Delete.
8125 (win32_wait): Adjust.
8126
8127 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8128
8129 * target.h (struct thread_resume): Delete leave_stopped member.
8130 (struct target_ops): Add a `n' argument to the `resume' callback.
8131 * server.c (start_inferior): Adjust.
8132 (handle_v_cont, myresume): Adjust.
8133 * linux-low.c (check_removed_breakpoint): Adjust to resume
8134 interface change, and to removed leave_stopped field.
8135 (resume_ptr): Delete.
8136 (struct thread_resume_array): New.
8137 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8138 resume interface change.
8139 (linux_continue_one_thread, linux_queue_one_thread)
8140 (resume_status_pending_p): Check if the resume field is NULL
8141 instead of checking the leave_stopped member.
8142 (linux_resume): Adjust to the target resume interface change.
8143 * spu-low.c (spu_resume): Adjust to the target resume interface
8144 change.
8145 * win32-low.c (win32_detach, win32_resume): Ditto.
8146
8147 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8148
8149 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8150 flag.
8151 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8152 pending.
8153 (linux_continue_one_thread): Only preserve the stepping flag if
8154 there's a pending breakpoint.
8155
8156 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8157
8158 * server.c (main): After the inferior having exited, call
8159 remote_close before exiting gdbserver.
8160
8161 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8162
8163 Fix size of FPSCR in Power 7 processors.
8164 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8165 (PPC_FEATURE_HAS_DFP): New #define.
8166 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8167 size of the FPSCR.
8168
8169 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8170
8171 * server.c (handle_query) Whitespace and formatting.
8172
8173 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8174
8175 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8176 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8177 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8178 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8179 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8180 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8181 Makefile.in, configure.ac: Fix whitespace throughout.
8182 * configure: Regenerate.
8183
8184 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8185
8186 * inferiors.c (find_inferior): Make it safe for the callback
8187 function to delete the currently iterated inferior.
8188
8189 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8190
8191 * Makefile.in (linuw_low_h): Move higher.
8192 (thread-db.o): Depend on $(linux_low_h).
8193
8194 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8195
8196 Rename "process" to "lwp" throughout.
8197
8198 * linux-low.c (all_processes): Rename to...
8199 (all_lwps): ... this.
8200 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8201 (add_process): Rename to ...
8202 (add_lwp): ... this. Adjust.
8203 (linux_create_inferior): Adjust.
8204 (linux_attach_lwp): Adjust.
8205 (linux_attach): Adjust.
8206 (linux_kill_one_process): Rename to ...
8207 (linux_kill_one_lwp): ... this. Adjust.
8208 (linux_kill): Adjust.
8209 (linux_detach_one_process): Rename to ...
8210 (linux_detach_one_lwp): ... this. Adjust.
8211 (linux_detach): Adjust.
8212 (check_removed_breakpoint): Adjust.
8213 (status_pending_p): Adjust.
8214 (linux_wait_for_process): Rename to ...
8215 (linux_wait_for_lwp): ... this. Adjust.
8216 (linux_wait_for_event): Adjust.
8217 (send_sigstop): Adjust.
8218 (wait_for_sigstop): Adjust.
8219 (stop_all_processes): Rename to ...
8220 (stop_all_lwps): ... this.
8221 (linux_resume_one_process): Rename to ...
8222 (linux_resume_one_lwp): ... this. Adjust.
8223 (linux_set_resume_request, linux_continue_one_thread)
8224 (linux_queue_one_thread, resume_status_pending_p)
8225 (usr_store_inferior_registers, regsets_store_inferior_registers)
8226 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8227 Adjust.
8228 * linux-low.h (get_process): Rename to ...
8229 (get_lwp): ... this. Adjust.
8230 (get_thread_process): Rename to ...
8231 (get_thread_lwp): ... this. Adjust.
8232 (get_process_thread): Rename to ...
8233 (get_lwp_thread): ... this. Adjust.
8234 (struct process_info): Rename to ...
8235 (struct lwp_info): ... this.
8236 (all_processes): Rename to ...
8237 (all_lwps): ... this.
8238 * proc-service.c (ps_lgetregs): Adjust.
8239 * thread-db.c (thread_db_create_event, find_one_thread)
8240 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8241
8242 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8243
8244 * server.c (handle_query): Handle "qAttached".
8245
8246 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8247
8248 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8249 GPLv3, update license URL.
8250
8251 2009-03-01 Doug Evans <dje@google.com>
8252
8253 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8254 (server_h): Add gdb_signals.h.
8255 (signals.o): Update.
8256 * server.h (target_signal_from_host,target_signal_to_host_p)
8257 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8258
8259 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8260
8261 * remote-utils.c (getpkt): Also generate remote-debug
8262 information if noack_mode is set.
8263
8264 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8265
8266 * server.c (handle_query): Report qXfer:siginfo:read and
8267 qXfer:siginfo:write as supported and handle them.
8268 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8269 * linux-low.c (linux_xfer_siginfo): New.
8270 (linux_target_ops): Set it.
8271
8272 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8273
8274 * server.c (gdbserver_usage): Mention --remote-debug.
8275 (main): Accept '--remote-debug' switch.
8276
8277 2009-01-18 Doug Evans <dje@google.com>
8278
8279 * regcache.c (new_register_cache): No need to check result of xcalloc.
8280 * server.c (handle_search_memory): Back out calls to xmalloc,
8281 result is checked and error is returned to user upon failure.
8282 (handle_query): Ditto. Add more checks for result of malloc.
8283 (handle_v_cont): Check result of malloc, report error back to
8284 user upon failure.
8285 (handle_v_run): Ditto. Call freeargv.
8286 * server.h (freeargv): Declare.
8287 * utils.c (freeargv): New fn.
8288
8289 2009-01-15 Doug Evans <dje@google.com>
8290
8291 * gdbreplay.c (perror_with_name): Make arg const char *.
8292 * server.h (target_signal_to_name): Make return type const char *.
8293 * thread-db.c (thread_db_err_str): Make return type const char *.
8294 * utils.c (perror_with_name): Make arg const char *.
8295
8296 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8297
8298 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8299 when handling a EXIT_PROCESS_DEBUG_EVENT.
8300
8301 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8302
8303 * gdbreplay.c (gdbreplay_version): Update copyright year.
8304 * server.c (gdbserver_version): Likewise.
8305
8306 2009-01-05 Doug Evans <dje@google.com>
8307
8308 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8309 (handle_extended_wait): Improve comment.
8310
8311 2008-12-13 Doug Evans <dje@google.com>
8312
8313 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8314 * server.h (ATTR_MALLOC): New macro.
8315 (xmalloc,xcalloc,xstrdup): Declare.
8316 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8317 * inferiors.c: Ditto.
8318 * linux-low.c: Ditto.
8319 * mem-break.c: Ditto.
8320 * regcache.c: Ditto.
8321 * remote-utils.c: Ditto.
8322 * server.c: Ditto.
8323 * target.c: Ditto.
8324 * win32-low.c: Ditto.
8325
8326 2008-12-12 Doug Evans <dje@google.com>
8327
8328 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8329 in debugging printf.
8330
8331 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8332
8333 2008-12-09 Doug Evans <dje@google.com>
8334
8335 * linux-low.h (struct process_info): Delete member tid, unused.
8336 * thread-db.c (find_one_thread): Update.
8337 (maybe_attach_thread): Update.
8338
8339 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8340
8341 * target.h (struct target_ops): Add qxfer_osdata member.
8342 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8343 and dirent.h.
8344 (linux_qxfer_osdata): New functions.
8345 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8346 callback.
8347 * server.c (handle_query): Handle "qXfer:osdata:read:".
8348 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8349 (buffer_xml_printf): New functions.
8350 * server.h (struct buffer): New.
8351 (buffer_grow_str, buffer_grow_str0): New macros.
8352 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8353 (buffer_xml_printf): Declare.
8354
8355 2008-11-24 Doug Evans <dje@google.com>
8356
8357 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8358
8359 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8360
8361 * server.c (handle_v_run): Always use the supplied argument list.
8362
8363 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8364
8365 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8366 (xtensa_regmap_table): Add entry for scompare1.
8367
8368 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8369
8370 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8371 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8372 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8373 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8374 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8375 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8376 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8377 XML target descriptions.
8378 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8379 when inferior is running on an ISA 2.05 or later processor. Add
8380 special case to return offset for full 64-bit slot of FPSCR when
8381 in 32-bits.
8382
8383 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8384
8385 * Makefile.in (SFILES, clean): Added sparc64 files.
8386 (reg-sparc64.o, reg-sparc64.c): New.
8387 * configure.srv (sparc*-*-linux*): New configuration.
8388 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8389 syscall arguments for SPARC.
8390 (regsets_store_inferior_registers): Likewise.
8391 * linux-sparc-low.c: New file.
8392
8393 2008-10-21 Doug Evans <dje@google.com>
8394
8395 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8396 (READLINE_DIR,READLINE_DEP): Delete.
8397 (INTERNAL_CFLAGS): Update.
8398 (LINTFLAGS): Update.
8399
8400 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8401
8402 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8403 whole argv from the last run, not just argv[0].
8404
8405 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8406
8407 * regcache.c (new_register_cache): Return NULL if the register
8408 cache size isn't known yet.
8409 (free_register_cache): Avoid dereferencing a NULL regcache.
8410
8411 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8412
8413 * configure.srv: Merge MIPS and MIPS64.
8414
8415 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8416
8417 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8418
8419 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8420
8421 * Makefile.in: Add required vsx dependencies.
8422
8423 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8424 Declare init_registers_powerpc_vsx32l.
8425 Declare init_registers_powerpc_vsx64l.
8426 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8427 (ppc_arch_setup): Check for VSX in hwcap.
8428 (ppc_fill_vsxregset): New function.
8429 (ppc_store_vsxregset): New function.
8430 Add new VSX entry in regset_info target_regsets.
8431
8432 * configure.srv: Add new VSX dependencies.
8433
8434 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8435
8436 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8437 (remote_open): Set or clear transport_is_reliable.
8438 (putpkt_binary): Don't expect acks in noack mode.
8439 (getpkt): Don't send ack/nac in noack mode.
8440 * server.c (handle_general_set): Handle QStartNoAckMode.
8441 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8442 qSupported.
8443 (main): Reset noack_mode on every connection.
8444 * server.h (noack_mode): Declare.
8445
8446 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8447
8448 * Makefile.in (GDBREPLAY_OBS): New variable.
8449 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8450
8451 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8452 Daniel Jacobowitz <dan@codesourcery.com>
8453
8454 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8455 (usr_store_inferior_registers): Likewise.
8456 (regsets_store_inferior_registers): Likewise.
8457
8458 2008-07-31 Rolf Jansen <rj@surtec.com>
8459 Pedro Alves <pedro@codesourcery.com>
8460
8461 * configure.ac: Check for memmem declaration.
8462 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8463 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8464 (disable_packet_qfThreadInfo): Unconditionally compile.
8465 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8466 * configure, config.in: Regenerate.
8467
8468 2008-07-28 Doug Kwan <dougkwan@google.com>
8469
8470 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8471 (linux_write_memory): Remove declaration of errno.
8472
8473 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8474
8475 * linux-low.c (handle_extended_wait): Do not use "status"
8476 variable uninitialized.
8477
8478 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8479
8480 * server.c (handle_v_attach): Inhibit reporting dll changes.
8481
8482 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8483
8484 * remote-utils.c (prepare_resume_reply): If requested, don't
8485 output "thread:TID" in the T stop reply.
8486
8487 * server.c (disable_packet_vCont, disable_packet_Tthread)
8488 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8489 (handle_query): If requested, disable support for qC, qfThreadInfo
8490 and qsThreadInfo.
8491 (handle_v_requests): If requested, disable support for vCont.
8492 (gdbserver_show_disableable): New.
8493 (main): Handle --disable-packet and --disable-packet=LIST.
8494
8495 * server.h (disable_packet_vCont, disable_packet_Tthread)
8496 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8497
8498 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8499
8500 * server.c (gdbserver_usage): Mention --version.
8501
8502 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8503
8504 * Makefile.in (gdbreplay.o): New rule.
8505
8506 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8507
8508 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8509 message, not gdbserver.
8510
8511 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8512 Nathan Sidwell <nathan@codesourcery.com>
8513 Joseph Myers <joseph@codesourcery.com>
8514
8515 * acinclude.m4: Include ../../config/acx.m4.
8516 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8517 * configure, config.in: Regenerate.
8518 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8519 * server.c (gdbserver_version): Print PKGVERSION.
8520 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8521 (main): Adjust gdbserver_usage calls.
8522 * gdbreplay.c (version, host_name): Add declarations.
8523 (gdbreplay_version, gdbreplay_usage): New.
8524 (main): Accept --version and --help options.
8525
8526 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8527
8528 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8529 (arm_breakpoint_at): Handle Thumb.
8530 (the_low_target): Add comment.
8531
8532 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8533
8534 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8535
8536 2008-05-09 Doug Evans <dje@google.com>
8537
8538 * server.h (decode_search_memory_packet): Declare.
8539 * remote-utils.c (decode_search_memory_packet): New fn.
8540 * server.c (handle_search_memory_1): New fn.
8541 (handle_search_memory): New fn.
8542 (handle_query): Process qSearch:memory packets.
8543
8544 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8545
8546 * regcache.c (registers_length): Remove.
8547 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8548 full register packet.
8549 * regcache.h (registers_length): Remove prototype.
8550 * server.h (PBUFSIZ): Define to 16384.
8551
8552 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8553
8554 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8555 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8556 powerpc-64l.o, and powerpc-altivec64l.o.
8557 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8558 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8559 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8560 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8561 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8562 to srv_xmlfiles.
8563
8564 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8565 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8566 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8567 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8568 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8569 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8570 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8571 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8572 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8573 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8574 (clean): Update.
8575
8576 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8577 (init_registers_powerpc_32l): ... this new prototype.
8578 (init_registers_powerpc_32): Remove, replace by ...
8579 (init_registers_powerpc_altivec32l): ... this new prototype.
8580 (init_registers_powerpc_e500): Remove, replace by ...
8581 (init_registers_powerpc_e500l): ... this new prototype.
8582 (init_registers_ppc64): Remove, replace by ...
8583 (init_registers_powerpc_64l): ... this new prototype.
8584 (init_registers_powerpc_64): Remove, replace by ...
8585 (init_registers_powerpc_altivec64l): ... this new prototype.
8586 (ppc_num_regs): Set to 73.
8587 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8588 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8589 (ppc_cannot_store_register): Handle orig_r3 and trap.
8590 (ppc_arch_setup): Update init_registers_... calls.
8591 (ppc_fill_gregset): Handle orig_r3 and trap.
8592
8593 * inferiors.c (clear_inferiors): Reset current_inferior.
8594
8595 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8596
8597 * acinclude.m4: Add override.m4.
8598 * configure: Regenerate.
8599
8600 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8601
8602 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8603 initial call to init_register_ppc64.
8604
8605 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8606
8607 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8608 single powerpc*-*-linux* case.
8609 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8610
8611 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8612
8613 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8614 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8615 from reg_xmlfiles.
8616 * linux-ppc-low.c: Include <elf.h>.
8617 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8618 (ppc_hwcap): New global variable.
8619 (ppc_regmap): Remove __SPE__ #ifdef sections.
8620 (ppc_regmap_e500): New global variable.
8621 (ppc_cannot_store_register): Update __SPE__ special case.
8622 (ppc_get_hwcap): New function.
8623 (ppc_arch_setup): Use it to determine whether inferior supports
8624 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8625 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8626 Do not access registers if target does not support AltiVec.
8627 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8628 Do not access registers if target does not support SPE.
8629 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8630
8631 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8632
8633 * linux-low.c (disabled_regsets, num_regsets): New.
8634 (use_regsets_p): Delete.
8635 (linux_wait_for_process): Clear disabled_regsets.
8636 (regsets_fetch_inferior_registers): Check and set it.
8637 (regsets_store_inferior_registers): Likewise.
8638 (linux_fetch_registers, linux_store_registers): Do not use
8639 use_regsets_p.
8640 (initialize_low): Allocate disabled_regsets.
8641
8642 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8643
8644 * Makefile.in (LIBOBJS): New.
8645 (OBS): Use LIBOBJS.
8646 (memmem.o): New rule.
8647 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8648 * configure: Regenerated.
8649
8650 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8651
8652 * server.c (handle_query): Never return "unsupported" for
8653 qXfer:features:read queries.
8654
8655 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8656
8657 * server.c (get_features_xml): Fix inverted condition.
8658 (handle_query): Always support qXfer:feature:read.
8659
8660 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8661
8662 * server.c (wrapper_argv): New.
8663 (start_inferior): Handle wrapper_argv. If set, expect an extra
8664 trap.
8665 (gdbserver_usage): Document --wrapper.
8666 (main): Parse --wrapper.
8667
8668 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8669
8670 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8671 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8672 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8673 (ppc_set_pc): Likewise.
8674 (ppc_arch_setup): New function.
8675 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8676 of collect_register.
8677 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8678
8679 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8680
8681 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8682 instead of linux-ppc64-low.o.
8683 * linux-ppc64-low.c: Remove file.
8684 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8685 (linux-ppc64-low.o): Remove rule.
8686
8687 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8688 (init_registers_powerpc_64): Likewise.
8689 (ppc_regmap): Conditionally define depending on __powerpc64__.
8690 (ppc_cannot_store_register): Do not special-case "fpscr" when
8691 compiled on __powerpc64__.
8692 (ppc_collect_ptrace_register): New function.
8693 (ppc_supply_ptrace_register): New function.
8694 (ppc_breakpoint): Change type to "unsigned int".
8695 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8696 (the_low_target): Conditionally provide initializers for the
8697 arch_setup member depending on __powerpc64__. Install
8698 collect_ptrace_register and supply_ptrace_register members.
8699
8700 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8701
8702 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8703 * server.c (gdbserver_xmltarget): Define.
8704 (get_features_xml): Use it to replace "target.xml" and arch_string.
8705
8706 * configure.srv: Remove srv_xmltarget. Add XML files that were
8707 mentioned there to srv_xmlfiles instead. Remove conditional tests
8708 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8709 srv_xmlfiles and srv_regobj to include all possible choices.
8710 * configure.ac (srv_xmltarget): Remove.
8711 (srv_xmlfiles): Do not add "target.xml".
8712 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8713 checks for supplementary target information.
8714 * configure: Regenerate.
8715 * Makefile.in (XML_TARGET): Remove.
8716 (target.xml): Remove rule.
8717 (clean): Do not clean up target.xml.
8718 (.PRECIOUS): Do not mention target.xml.
8719
8720 * target.h (struct target_ops): Remove arch_string member.
8721 * linux-low.c (linux_arch_string): Remove.
8722 (linux_target_ops): Remove arch_string initializer.
8723 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8724 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8725 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8726 * spu-low.c (spu_arch_string): Remove.
8727 (spu_target_ops): Remove arch_string initializer.
8728 * win32-low.c (win32_arch_string): Remove.
8729 (win32_target_ops): Remove arch_string initializer.
8730 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8731 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8732 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8733
8734 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8735
8736 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8737 by collect_ptrace_register and supply_ptrace_register hooks.
8738 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8739 instead of checking for the_low_target.left_pad_xfer.
8740 (usr_store_inferior_registers): Use collect_ptrace_register callback
8741 instead of checking for the_low_target.left_pad_xfer.
8742
8743 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8744 (s390_supply_ptrace_register): Likewise.
8745 (s390_fill_gregset): Call s390_collect_ptrace_register.
8746 (the_low_target): Update.
8747
8748 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8749 (ppc_supply_ptrace_register): Likewise.
8750 (the_low_target): Update.
8751
8752 * linux-i386-low.c (the_low_target): Update.
8753 * linux-x86-64-low.c (the_low_target): Update.
8754
8755 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8756
8757 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8758 reg-s390.o and reg-s390x.o.
8759
8760 * linux-low.c (new_inferior): New global variable.
8761 (linux_create_inferior, linux_attach): Set it.
8762 (linux_wait_for_process): Call the_low_target.arch_setup after the
8763 target has stopped for the first time.
8764 (initialize_low): Do not call the_low_target.arch_setup.
8765
8766 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8767 (s390_set_pc): Likewise.
8768 (s390_arch_setup): New function.
8769 (the_low_target): Use s390_arch_setup as arch_setup routine.
8770
8771 * regcache.c (realloc_register_cache): New function.
8772 (set_register_cache): Call it for each existing regcache.
8773
8774 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8775
8776 * server.h (init_registers): Remove prototype.
8777
8778 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8779 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8780 instead of init_registers ().
8781 * linux-arm-low.c (init_registers_arm): Add prototype.
8782 (init_registers_arm_with_iwmmxt): Likewise.
8783 (the_low_target): Add initializer for arch_setup field.
8784 * linux-cris-low.c (init_registers_cris): Add prototype.
8785 (the_low_target): Add initializer for arch_setup field.
8786 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8787 (the_low_target): Add initializer for arch_setup field.
8788 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8789 (the_low_target): Add initializer for arch_setup field.
8790 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8791 (the_low_target): Add initializer for arch_setup field.
8792 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8793 (the_low_target): Add initializer for arch_setup field.
8794 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8795 (the_low_target): Add initializer for arch_setup field.
8796 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8797 (init_registers_mips64_linux): Likewise.
8798 (the_low_target): Add initializer for arch_setup field.
8799 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8800 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8801 (the_low_target): Add initializer for arch_setup field.
8802 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8803 (init_registers_powerpc_64): Likewise.
8804 (the_low_target): Add initializer for arch_setup field.
8805 * linux-s390-low.c (init_registers_s390): Add prototype.
8806 (init_registers_s390x): Likewise.
8807 (the_low_target): Add initializer for arch_setup field.
8808 * linux-sh-low.c (init_registers_sh): Add prototype.
8809 (the_low_target): Add initializer for arch_setup field.
8810 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8811 (the_low_target): Add initializer for arch_setup field.
8812 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8813 (the_low_target): Add initializer for arch_setup field.
8814
8815 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8816 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8817 instead of init_registers ().
8818 * win32-arm-low.c (init_registers_arm): Add prototype.
8819 (the_low_target): Add initializer for arch_setup field.
8820 * win32-i386-low.c (init_registers_i386): Add prototype.
8821 (the_low_target): Add initializer for arch_setup field.
8822
8823 * spu-low.c (init_registers_spu): Add prototype.
8824 (initialize_low): Call initialie_registers_spu () instead of
8825 initialize_registers ().
8826
8827 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8828
8829 * server.c (handle_v_requests): When handling the vRun and vAttach
8830 packets, if already debugging a process, don't kill it. Return an
8831 error instead.
8832
8833 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8834
8835 * server.c (handle_query): Correct length check.
8836
8837 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8838
8839 * win32-low.c (do_initial_child_stuff): Add process handle
8840 parameter. Set current_process_handle and current_process_id from the
8841 parameters. Clear globals.
8842 (win32_create_inferior): Don't set current_process_handle and
8843 current_process_id here. Instead pass them on the call to
8844 do_initial_child_stuff.
8845 (win32_attach): Likewise.
8846 (win32_clear_inferiors): New.
8847 (win32_kill): Don't close the current process handle or the
8848 current thread handle here. Instead call win32_clear_inferiors.
8849 (win32_detach): Don't open a new handle to the process. Call
8850 win32_clear_inferiors.
8851 (win32_join): Don't rely on current_process_handle; open a new
8852 handle using the process id.
8853 (win32_wait): Call win32_clear_inferiors when the inferior process
8854 has exited.
8855
8856 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8857
8858 * server.c (monitor_show_help): Add "exit".
8859
8860 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8861
8862 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8863 (clean): Add reg-xtensa.c.
8864 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8865 * configure.srv (xtensa*-*-linux*) New target.
8866 * linux-xtensa-low.c: New.
8867 * xtensa-xtregs.c: New.
8868
8869 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8870
8871 * hostio.c: Don't include errno.h.
8872 (errno_to_fileio_errno): Move to hostio-errno.
8873 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8874 error number outputting to the target->hostio_last_error callback.
8875 (hostio_packet_error): Use FILEIO_EINVAL directly.
8876 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8877 calls to hostio_error.
8878 * hostio-errno.c: New.
8879 * server.h (hostio_last_error_from_errno): Declare.
8880 * target.h (target_ops): Add hostio_last_error member.
8881 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8882 as hostio_last_error handler.
8883 * spu-low.c (spu_target_ops): Likewise.
8884 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8885 (wince_hostio_last_error): New functions.
8886 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8887 as hostio_last_error handler.
8888 (win32_target_ops) [!_WIN32_WCE]: Register
8889 hostio_last_error_from_errno as hostio_last_error handler.
8890 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8891 (hostio-errno.o): New rule.
8892 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8893 * configure.srv (srv_hostio_err_objs): New variable. Default to
8894 hostio-errno.o.
8895 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8896 * configure: Regenerate.
8897
8898 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8899
8900 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8901 (linux_kill, linux_detach): Clean up the process list.
8902 * remote-utils.c (remote_open): Improve port number parsing.
8903 (putpkt_binary, input_interrupt): Only send interrupts if the target
8904 is running.
8905 * server.c (extended_protocol): Make static.
8906 (attached): Define earlier.
8907 (exit_requested, response_needed, program_argv): New variables.
8908 (target_running): New.
8909 (start_inferior): Clear attached here.
8910 (attach_inferior): Set attached here.
8911 (require_running): Define.
8912 (handle_query): Use require_running and target_running. Implement
8913 "monitor exit".
8914 (handle_v_attach, handle_v_run): New.
8915 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8916 (gdbserver_usage): Update.
8917 (main): Redo argument parsing. Handle --debug and --multi. Handle
8918 --attach along with other options or after the port. Save
8919 program_argv. Support no initial program. Resynchronize
8920 communication with GDB after an error. Handle "monitor exit".
8921 Use require_running and target_running. Always allow the extended
8922 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8923 restart in extended mode.
8924 * README: Refer to the GDB manual. Update --attach usage.
8925
8926 2007-12-20 Andreas Schwab <schwab@suse.de>
8927
8928 * linux-low.c (STACK_SIZE): Define.
8929 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8930 (linux_test_for_tracefork): Likewise.
8931
8932 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8933
8934 * linux-low.c (linux_wait_for_event): Update messages. Do not
8935 reinsert auto-delete breakpoints.
8936 * mem-break.c (struct breakpoint): Change return type of handler to
8937 int.
8938 (set_breakpoint_at): Update handler type.
8939 (reinsert_breakpoint_handler): Return 1 instead of calling
8940 delete_breakpoint.
8941 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8942 setting a new one.
8943 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8944 * mem-break.h (set_breakpoint_at): Update handler type.
8945 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8946 * win32-low.c (auto_delete_breakpoint): New.
8947 (get_child_debug_event): Use it.
8948
8949 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8950
8951 * configure.ac: Check for pread and pwrite.
8952 * hostio.c (handle_pread): Fall back to lseek and read.
8953 (handle_pwrite): Fall back to lseek and write.
8954 * config.in, configure: Regenerated.
8955
8956 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8957
8958 * server.c (myresume): Add own_buf argument.
8959 (main): Update calls.
8960
8961 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8962
8963 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8964 * remote-utils.c (remote_open): Do not call disable_async_io.
8965 (block_async_io): Delete.
8966 (unblock_async_io): Make static.
8967 (initialize_async_io): New.
8968 * server.c (handle_v_cont): Handle async I/O here.
8969 (myresume): Likewise. Move other common resume tasks here...
8970 (main): ... from here. Call initialize_async_io. Disable async
8971 I/O before the main loop.
8972 * server.h (initialize_async_io): Declare.
8973 (block_async_io, unblock_async_io): Delete prototypes.
8974 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8975
8976 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
8977
8978 * remote-utils.c (readchar): Allow binary data in received messages.
8979
8980 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8981
8982 * win32-low.c (attaching): New global.
8983 (win32_create_inferior): Clear the `attaching' global.
8984 (win32_attach): Set the `attaching' global.
8985 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8986 attaching. Only set a breakpoint at the entry point if not
8987 attaching.
8988
8989 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8990
8991 * server.c (main): Don't report dll events on the initial
8992 connection on attaches.
8993
8994 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
8995
8996 * server.c (main): Relax numerical bases supported for the pid of
8997 the --attach command line argument.
8998
8999 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9000
9001 * win32-low.c (win32_attach): Call OpenProcess before
9002 DebugActiveProcess, not after. Add last error output to error
9003 call.
9004
9005 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9006
9007 * win32-low.c (win32_get_thread_context)
9008 (win32_set_thread_context): New functions.
9009 (thread_rec): Use win32_get_thread_context.
9010 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9011 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9012 field.
9013
9014 2007-12-03 Leo Zayas
9015 Pedro Alves <pedro_alves@portugalmail.pt>
9016
9017 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9018 global variables.
9019 (child_add_thread): Minor cleanup.
9020 (child_continue): Resume artificially suspended threads before
9021 calling ContinueDebugEvent.
9022 (suspend_one_thread): New.
9023 (fake_breakpoint_event): New.
9024 (get_child_debug_event): Change return type to int. Check here if
9025 gdb sent an interrupt request. If a soft interrupt was requested,
9026 fake a breakpoint event. Return 0 if there is no event to handle,
9027 and 1 otherwise.
9028 (win32_wait): Don't check here if gdb sent an interrupt request.
9029 Ensure there is a valid event to handle.
9030 (win32_request_interrupt): Add soft interruption method as last
9031 resort.
9032
9033 2007-12-03 Leo Zayas
9034 Pedro Alves <pedro_alves@portugalmail.pt>
9035
9036 * win32-low.h (win32_thread_info): Add descriptions to the
9037 structure members. Replace `suspend_count' counter by a
9038 `suspended' flag.
9039 * win32-low.c (thread_rec): Update condition of when to get the
9040 context from the inferior. Rely on ContextFlags being set if it
9041 has already been retrieved. Only suspend the inferior thread if
9042 we haven't already. Warn if that fails.
9043 (continue_one_thread): s/suspend_count/suspended/. Only call
9044 ResumeThread once. Warn if that fails.
9045
9046 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9047
9048 * win32-low.c (win32_wait): Don't read from the inferior when it
9049 has already exited.
9050
9051 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9052
9053 * Makefile.in (win32_low_h): New variable.
9054 (win32-low.o): Add dependency on $(win32_low_h).
9055 (win32-arm-low.o, win32-i386-low.o): New rules.
9056
9057 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9058
9059 * hostio.c: Correct copyright year.
9060
9061 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9062
9063 * Makefile.in (OBS): Add hostio.o.
9064 (hostio.o): New rule.
9065 * server.h (handle_vFile): Declare.
9066 * hostio.c: New file.
9067 * server.c (handle_v_requests): Take packet_len and new_packet_len
9068 for binary packets. Call handle_vFile.
9069 (main): Update call to handle_v_requests.
9070
9071 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9072
9073 * linux-low.c: Include <sched.h>.
9074
9075 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9076
9077 * linux-low.c (linux_tracefork_grandchild): New.
9078 (linux_tracefork_child): Use clone.
9079 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9080
9081 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9082
9083 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9084
9085 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9086
9087 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9088
9089 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9090
9091 * inferiors.c (change_inferior_id): Delete.
9092 (add_pid_to_list, pull_pid_from_list): New.
9093 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9094 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9095 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9096 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9097 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9098 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9099 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9100 (using_threads): Always set to 1.
9101 (handle_extended_wait): New.
9102 (add_process): Do not set TID.
9103 (linux_create_inferior): Set must_set_ptrace_flags.
9104 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9105 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9106 (linux_thread_alive): Rename TID argument to LWPID.
9107 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9108 (linux_wait_for_event): Do not use TID or check using_threads. Update
9109 call to dead_thread_notify. Call handle_extended_wait.
9110 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9111 (send_sigstop): Delete sigstop_sent.
9112 (wait_for_sigstop): Avoid TID.
9113 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9114 (linux_test_for_tracefork): New.
9115 (linux_lookup_signals): Use thread_db_active and
9116 linux_supports_tracefork_flag.
9117 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9118 * linux-low.h (get_process_thread): Avoid TID.
9119 (struct process_ifo): Move thread_known and tid to the end. Remove
9120 sigstop_sent.
9121 (linux_attach_lwp, thread_db_init): Update prototypes.
9122 * server.h (change_inferior_id): Delete prototype.
9123 (add_pid_to_list, pull_pid_from_list): New prototypes.
9124 * thread-db.c (thread_db_use_events): New.
9125 (find_first_thread): Rename to...
9126 (find_one_thread): ...this. Update callers and messages. Do not
9127 call fatal. Check thread_db_use_events. Do not call
9128 change_inferior_id or new_thread_notify.
9129 (maybe_attach_thread): Update. Do not call new_thread_notify.
9130 (thread_db_init): Set thread_db_use_events. Check use_events.
9131 * utils.c (fatal, warning): Correct message prefix.
9132
9133 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9134
9135 * Makefile.in (clean): Remove new files.
9136 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9137 (powerpc-64.o, powerpc-64.c): New rules.
9138 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9139 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9140 with SPE.
9141 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9142 SPE targets.
9143 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9144 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9145 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9146 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9147 (target_regsets): Add AltiVec and SPE register sets.
9148 * configure.ac: Check for AltiVec and SPE.
9149 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9150 (ppc_fill_vrregset, ppc_store_vrregset): New.
9151 (target_regsets): Add AltiVec register set.
9152 * configure: Regenerated.
9153
9154 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9155
9156 * linux-low.c (O_LARGEFILE): Define.
9157 (linux_read_memory): Use /proc/PID/mem.
9158 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9159 * configure, config.in: Regenerated.
9160
9161 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9162
9163 * linux-low.c (linux_wait_for_event): Do not pass signals while
9164 single-stepping.
9165
9166 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9167
9168 * win32-low.c (create_process): New.
9169 (win32_create_inferior): Use create_process instead of
9170 CreateProcess. If create_process failed retry appending an ".exe"
9171 suffix. Store the GetLastError result immediatelly after
9172 create_process calls and use it on the call to error.
9173
9174 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9175
9176 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9177
9178 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9179
9180 * configure.ac: Switch license to GPLv3.
9181
9182 2007-08-01 Michael Snyder <msnyder@access-company.com>
9183
9184 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9185
9186 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9187
9188 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9189 typedef.
9190 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9191 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9192 CloseToolhelp32Snapshot.
9193 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9194 CloseToolhelp32Snapshot.
9195
9196 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9197
9198 * server.c (main): Check for inferior exit before main loop.
9199
9200 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9201
9202 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9203 instead of on tmp_desc.
9204
9205 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9206 Daniel Jacobowitz <dan@codesourcery.com>
9207
9208 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9209 (add_thread): Minor cleanups.
9210 (clear_inferiors): Move lower in the file. Clear the DLL
9211 list.
9212 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9213 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9214 (xml_escape_text): New.
9215 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9216 for qSupported.
9217 (handle_v_cont): Report errors.
9218 (gdbserver_version): Update.
9219 (main): Correct size of own_buf. Do not report initial DLL events.
9220 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9221 (unloaded_dll, xml_escape_text): New.
9222 * win32-low.c (enum target_waitkind): Update comments.
9223 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9224 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9225 (win32_EnumProcessModules, win32_GetModuleInformation)
9226 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9227 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9228 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9229 (win32_Module32First, win32_Module32Next, load_toolhelp)
9230 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9231 (get_child_debug_event): Handle DLL events.
9232 (win32_wait): Likewise.
9233
9234 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9235
9236 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9237 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9238
9239 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9240
9241 * win32-low.c (handle_output_debug_string): Ignore event if not
9242 waiting.
9243
9244 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9245
9246 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9247
9248 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9249
9250 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9251
9252 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9253
9254 * inferiors.c (change_inferior_id): Add comment.
9255 * linux-low.c (check_removed_breakpoint): Add an early
9256 prototype. Improve debug output.
9257 (linux_attach): Doc update.
9258 (linux_detach_one_process, linux_detach): Clean up before releasing
9259 each process.
9260 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9261 * linux-low.h (struct process_info): Doc improvement.
9262 * mem-break.c (delete_all_breakpoints): New.
9263 * mem-break.h (delete_all_breakpoints): New prototype.
9264 * thread-db.c (find_first_thread): New.
9265 (thread_db_create_event): Call it instead of
9266 thread_db_find_new_threads. Clean up unused variables.
9267 (maybe_attach_thread): Remove first thread handling.
9268 (thread_db_find_new_threads): Use find_first_thread.
9269 (thread_db_get_tls_address): Likewise.
9270
9271 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9272
9273 * thread-db.c (thread_db_find_new_threads): Add prototype.
9274 (thread_db_create_event): Check for the main thread before adding
9275 a new thread.
9276 (maybe_attach_thread): Only enable event reporting if TID == 0.
9277 (thread_db_get_tls_address): Check for new threads.
9278
9279 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9280
9281 * linux-low.c (linux_create_inferior): Try execv before execvp.
9282 * spu-low.c (spu_create_inferior): Likewise.
9283
9284 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9285
9286 * linux-low.c (linux_create_inferior): Change execv to execvp.
9287 * spu-low.c (spu_create_inferior): Likewies.
9288
9289 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9290
9291 * Makefile.in (clean): Clean new files instead of deleted ones.
9292 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9293 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9294 rules.
9295 * configure.srv: Specify XML files and new regformats for MIPS and
9296 MIPS64 GNU/Linux.
9297 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9298 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9299 an entry for the restart register.
9300 (mips_cannot_fetch_register, mips_cannot_store_register)
9301 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9302 register names to match the XML descriptions.
9303 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9304 restart register instead of $0.
9305
9306 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9307 Markus Deuling <deuling@de.ibm.com>
9308
9309 * remote-utils.c (decode_xfer_write): New function.
9310 * server.h (decode_xfer_write): Add prototype.
9311 * server.c (handle_query): Add PACKET_LEN argument. Support
9312 qXfer:spu:read and qXfer:spu:write packets.
9313 (main): Pass packet_len to handle_query.
9314 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9315 * target.h (target_ops): Add qxfer_spu.
9316
9317 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9318
9319 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9320 accessing non-seekable spufs files.
9321
9322 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9323
9324 * server.c (handle_query): Add reply for qC packet.
9325
9326 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9327 Leo Zayas <lerele@champenstudios@com>
9328
9329 * server.h (check_remote_input_interrupt_request): New function.
9330 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9331 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9332 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9333 (check_remote_input_interrupt_request): New function.
9334 * server.h (check_remote_input_interrupt_request): Declare.
9335 * win32-low.c (winapi_DebugBreakProcess,
9336 winapi_GenerateConsoleCtrlEvent): New typedefs.
9337 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9338 to 250 ms.
9339 (win32_wait): Check for remote interrupt request
9340 with check_remote_input_interrupt_request.
9341 (win32_request_interrupt): New function.
9342 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9343
9344 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9345
9346 * win32-low.c (debug_registers_changed,
9347 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9348 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9349 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9350 (thread_rec): Get context using the low target.
9351 (child_add_thread): Call thread_added on the low target,
9352 which does the same thing.
9353 (regptr): Delete.
9354 (do_initial_child_stuff): Remove debug registers references.
9355 Set context using the low target. Resume threads after
9356 setting the contexts.
9357 (child_continue): Remove dead variable. Remove debug
9358 registers references.
9359 (child_fetch_inferior_registers): Go through the low target.
9360 (do_child_store_inferior_registers): Remove.
9361 (child_store_inferior_registers): Go through the low target.
9362 (win32_resume): Remove debug registers references.
9363 Set context using the low target.
9364 (handle_exception): Change return type to void. Don't record
9365 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9366 first chance exception.
9367 (get_child_debug_event): Change return type to void. Remove
9368 goto loop. Always return after waiting for debug event.
9369 (win32_wait): Convert to switch statement. Handle spurious
9370 events.
9371
9372 * win32-i386-low.c (debug_registers_changed,
9373 debug_registers_used): New.
9374 (initial_stuff): Rename to ...
9375 (i386_initial_stuff): ... this. Clear debug registers
9376 state variables.
9377 (store_debug_registers): Delete.
9378 (i386_get_thread_context): New.
9379 (load_debug_registers): Delete.
9380 (i386_set_thread_context): New.
9381 (i386_thread_added): New.
9382 (single_step): Rename to ...
9383 (i386_single_step): ... this.
9384 (do_fetch_inferior_registers): Rename to ...
9385 (i386_fetch_inferior_register): ... this.
9386 (i386_store_inferior_register): New.
9387 (the_low_target): Adapt to new interface.
9388
9389 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9390 (arm_get_thread_context): New.
9391 (arm_set_thread_context): New.
9392 (regptr): New.
9393 (do_fetch_inferior_registers): Rename to ...
9394 (arm_fetch_inferior_register): ... this.
9395 (arm_store_inferior_register): New.
9396 (arm_wince_breakpoint): Reimplement as unsigned long.
9397 (arm_wince_breakpoint_len): Define.
9398 (the_low_target): Adapt to new interface.
9399
9400 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9401 load_debug_registers. Add get_thread_context, set_thread_context,
9402 thread_added and store_inferior_register. Rename
9403 fetch_inferior_registers to fetch_inferior_register.
9404 (regptr): Remove declaration.
9405
9406 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9407
9408 * linux-low.c (linux_detach): Change return type to int. Return 0.
9409 * spu-low.c (spu_detach): Likewise.
9410
9411 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9412
9413 * target.h (target_ops): Change return type of detach to int.
9414 Add join.
9415 (join_inferior): New.
9416 * server.c (main): Don't skip detach support on mingw32.
9417 If the inferior doesn't support detaching return error.
9418 Call join_inferior instead of using waitpid.
9419 * linux-low.c (linux_join): New.
9420 (linux_target_op): Add linux_join.
9421 * spu-low.c (spu_join): New.
9422 (spu_target_ops): Add spu_join.
9423 * win32-low.c (win32_detach): Adapt to new interface.
9424 Reopen current_process_handle before detaching. Issue a child
9425 resume before detaching.
9426 (win32_join): New.
9427 (win32_target_op): Add win32_join.
9428
9429 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9430
9431 * win32-low.c (win32-attach): Fix return value.
9432 * target.h (target_ops): Describe ATTACH return values.
9433
9434 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9435
9436 * win32-low.c (GETPROCADDRESS): Define.
9437 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9438 (winapi_DebugSetProcessKillOnExit): Likewise.
9439 (win32_create_inferior): Force usage of ansi CreateProcessA.
9440 (win32_attach): Use GETPROCADDRESS.
9441 (win32_detach): Likewise.
9442
9443 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9444
9445 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9446
9447 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9448
9449 * win32-low.c: Commit leftover changes from 2007-03-29.
9450
9451 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9452
9453 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9454 fields short instead of int. Add explicit padding.
9455 (i387_cache_to_fsave): Remove unnecessary casts.
9456 (i387_fsave_to_cache): Doc fix.
9457 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9458
9459 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9460
9461 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9462 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9463
9464 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9465
9466 * configure.srv (arm*-*-mingw32ce*): Move near the other
9467 arm targets.
9468
9469 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9470
9471 * configure.ac: Add errno checking.
9472 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9473 sys/file.h and malloc.h.
9474 (AC_CHECK_DECLS): Add perror.
9475 (srv_mingwce): Handle.
9476 * configure.srv (i[34567]86-*-cygwin*): Add
9477 win32-i386-low.o to srv_tgtobj.
9478 (i[34567]86-*-mingw*): Likewise.
9479 (arm*-*-mingw32ce*): Add case.
9480 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9481 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9482 [__MINGW32CE__] (strerror): New function.
9483 [__MINGW32CE__] (errno): Define to GetLastError.
9484 [__MINGW32CE__] (COUNTOF): New macro.
9485 (remote_open): Remove extra close call.
9486 * mem-break.c (delete_breakpoint_at): New function.
9487 * mem-break.h (delete_breakpoint_at): Declare.
9488 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9489 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9490 [USE_WIN32API] (read, write): Add char* casts.
9491 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9492 * server.h: Include wincecompat.h on Windows CE.
9493 [HAVE_ERRNO_H]: Check.
9494 (perror): Declare if not declared.
9495 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9496 (perror_with_name): Remove errno declaration.
9497 * wincecompat.h: New.
9498 * wincecompat.c: New.
9499 * win32-low.h: New.
9500 * win32-arm-low.c: New.
9501 * win32-i386-low.c: New.
9502 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9503 (OUTMSG2): Make it safe.
9504 (_T): New macro.
9505 (COUNTOF): New macro.
9506 (NUM_REGS): Get it from the low target.
9507 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9508 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9509 (thread_rec): Let low target handle debug registers.
9510 (child_add_thread): Likewise.
9511 (child_init_thread_list): Likewise.
9512 (continue_one_thread): Likewise.
9513 (regptr): New.
9514 (do_child_fetch_inferior_registers): Move to ...
9515 * win32-i386-low.c: ... here, and rename to ...
9516 (do_fetch_inferior_registers): ... this.
9517 * win32-low.c (child_fetch_inferior_registers):
9518 Go through the low target.
9519 (do_child_store_inferior_registers): Use regptr.
9520 (strwinerror): New function.
9521 (win32_create_inferior): Handle Windows CE.
9522 Use strwinerror instead of strerror on Windows error
9523 codes. Add program to the error output.
9524 Don't close the main thread handle on Windows CE.
9525 (win32_attach): Use coredll.dll on Windows CE.
9526 (win32_kill): Close current process and current
9527 thread handles.
9528 (win32_detach): Use coredll.dll on Windows CE.
9529 (win32_resume): Let low target handle debug registers, and
9530 step request.
9531 (handle_exception): Add/Remove initial breakpoint. Avoid
9532 non-existant WSTOPSIG on Windows CE.
9533 (win32_read_inferior_memory): Cast to remove warning.
9534 (win32_arch_string): Go through the low target.
9535 (initialize_low): Call set_breakpoint_data with the low
9536 target's breakpoint.
9537 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9538 FOP_REGNUM, mappings): Move to ...
9539 * win32-i386-low.c: ... here.
9540 * win32-low.c (win32_thread_info): Move to ...
9541 * win32-low.h: ... here.
9542 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9543 win32-arm-low.c and wincecompat.c.
9544 (all:): Add $EXEEXT.
9545 (install-only:): Likewise.
9546 (gdbserver:): Likewise.
9547 (gdbreplay:): Likewise.
9548 * config.in: Regenerate.
9549 * configure: Regenerate.
9550
9551 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9552
9553 * win32-low.c: Rename typedef thread_info to
9554 win32_thread_info throughout.
9555
9556 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9557
9558 * win32-i386-low.c: Rename to ...
9559 * win32-low.c: ... this.
9560 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9561 * Makefile.in: Likewise.
9562
9563 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9564
9565 * remote-utils.c (monitor_output): Constify msg parameter.
9566 * server.h (monitor_output): Likewise.
9567 * win32-i386-low.c (handle_output_debug_string): New.
9568 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9569 handle_output_debug_string.
9570 (get_child_debug_event): Likewise.
9571
9572 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9573
9574 * server.c (main): Correct strtoul check.
9575
9576 2007-03-27 Jon Ringle <jon@ringle.org>
9577
9578 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9579
9580 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9581
9582 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9583
9584 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9585
9586 * terminal.h: Check HAVE_SGTTY_H.
9587
9588 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9589
9590 * remote-utils.c (remote_open): Print out the assigned port number.
9591
9592 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9593
9594 * remote-utils.c (monitor_output): New function.
9595 * server.c (debug_threads): Define here.
9596 (monitor_show_help): New function.
9597 (handle_query): Handle qRcmd.
9598 (main): Do not handle 'd' packet.
9599 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9600 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9601 of debug_threads.
9602
9603 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9604
9605 * Makefile.in (EXEEXT): New.
9606 (clean): Use $(EXEEXT).
9607
9608 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9609
9610 * target.h (target_ops): Rename send_signal to request_interrupt,
9611 and remove enum target_signal parameter.
9612 * linux-low.c (linux_request_interrupt): Rename from
9613 linux_send_signal, and always send SIGINT.
9614 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9615 and always send SIGINT.
9616 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9617 of send_signal.
9618 (input_interrupt): Likewise.
9619
9620 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9621
9622 * server.c (get_features_xml): Check if target implemented
9623 arch_string.
9624 * win32-i386-low.c (win32_arch_string): New.
9625 (win32_target_ops): Add win32_arch_string as arch_string member.
9626
9627 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9628
9629 * spu-low.c (spu_arch_string): New.
9630 (spu_target_ops): Add spu_arch_string.
9631
9632 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9633
9634 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9635 * configure.ac: Do not check for terminal.h.
9636 * configure, config.in: Regenerated.
9637
9638 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9639
9640 * Makefile.in (OBS): Add $(XML_BUILTIN).
9641 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9642 (clean): Update.
9643 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9644 (arm-with-iwmmxt.c): New.
9645 * config.in, configure: Regenerate.
9646 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9647 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9648 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9649 (arm*-*-linux*): Add iWMMXt and regset support.
9650 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9651 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9652 (arm_store_wmmxregset, target_regsets): New.
9653 * server.c (get_features_xml): Take annex argument. Check builtin
9654 XML documents.
9655 (handle_query): Handle multiple annexes.
9656
9657 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9658
9659 * remote-utils.c [USE_WIN32API] (read, write): Define.
9660 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9661 write.
9662
9663 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9664
9665 * linux-i386-low.c (the_low_target): Set arch_string.
9666 * linux-x86-64-low.c (the_low_target): Likewise.
9667 * linux-low.c (linux_arch_string): New.
9668 (linux_target_ops): Add it.
9669 * linux-low.h (struct linux_target_ops): Add arch_string.
9670 * server.c (write_qxfer_response): Use const void * for DATA.
9671 (get_features_xml): New.
9672 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9673 * target.h (struct target_ops): Add arch_string method.
9674
9675 2007-01-03 Denis Pilat <denis.pilat@st.com>
9676 Daniel Jacobowitz <dan@codesourcery.com>
9677
9678 * linux-low.c (linux_kill): Handle being called with no threads.
9679 * win32-i386-low.c (win32_kill): Likewise.
9680 (get_child_debug_event): Clear current_process_handle.
9681
9682 2006-12-30 Denis PILAT <denis.pilat@st.com>
9683 Daniel Jacobowitz <dan@codesourcery.com>
9684
9685 * remote-utils.c (remote_open): Check the type of specified
9686 serial port devices before opening them.
9687 * server.c (main): Kill the inferior if an error occurs during
9688 the first remote_open.
9689
9690 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9691
9692 * README: Update supported targets.
9693
9694 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9695
9696 * Makefile.in (clean): Remove reg-mips64.c.
9697 (reg-mips64.c, reg-mips64.o): New rules.
9698 * configure.srv: Handle mips64. Include regset support for mips.
9699 * linux-mips-low.c (union mips_register): New.
9700 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9701 (mips_breakpoint, mips_breakpoint_at): Use int.
9702 (mips_collect_register, mips_supply_register)
9703 (mips_collect_register_32bit, mips_supply_register_32bit)
9704 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9705 (mips_store_fpregset, target_regsets): New.
9706 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9707
9708 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9709
9710 * configure.srv: Add target "spu*-*-*".
9711 * Makefile.in (clean): Remove reg-spu.c.
9712 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9713 * spu-low.c: New file.
9714
9715 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9716
9717 * configure.ac: Correct td_thr_tls_get_addr test.
9718 * configure: Regenerated.
9719
9720 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9721
9722 * linux-low.c (linux_wait_for_event): Reformat. Use the
9723 pass_signals array.
9724 * remote-utils.c (decode_address_to_semicolon): New.
9725 * server.c (pass_signals, handle_general_set): New.
9726 (handle_query): Mention QPassSignals for qSupported.
9727 (main): Call handle_general_set.
9728 * server.h (pass_signals, decode_address_to_semicolon): New.
9729
9730 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9731
9732 * server.c (handle_query): Correct error handling for read_auxv.
9733
9734 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9735
9736 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9737 and srv_linux_thread_db to yes.
9738 * linux-s390-low.c (s390_fill_gregset): New function.
9739 (target_regsets): Define data structure.
9740
9741 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9744 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9745 * config.in, configure: Regenerated.
9746 * inferiors.c (gdb_id_to_thread): New function.
9747 (gdb_id_to_thread_id): Use it.
9748 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9749 * linux-low.h (struct process_info): Add th member.
9750 (thread_db_get_tls_address): New prototype.
9751 * remote-utils.c (decode_address): Make non-static.
9752 * server.c (handle_query): Handle qGetTLSAddr.
9753 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9754 * target.h (struct target_ops): Add get_tls_address.
9755 * thread-db.c (maybe_attach_thread): Save the thread handle.
9756 (thread_db_get_tls_address): New.
9757
9758 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9759
9760 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9761 (linux_resume_one_process): Take a siginfo_t *. Update all
9762 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9763 (struct pending_signals): Add a siginfo_t.
9764 (linux_wait_for_process): Always set last_status.
9765 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9766 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9767 * linux-low.h (struct process_info): Add last_status.
9768
9769 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9770
9771 * remote-utils.c (try_rle): New function.
9772 (putpkt_binary): Use it.
9773
9774 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9777 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9778 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9779 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9780 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9781 point registers.
9782
9783 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9784
9785 * server.c (terminal_fd): New variable.
9786 (old_foreground_pgrp): Likewise.
9787 (restore_old_foreground_pgrp): New function.
9788 (start_inferior): Record the terminal file descriptor in terminal_fd
9789 and its original foreground group in old_foreground_pgrp. Register
9790 restore_old_foreground_pgrp with atexit().
9791
9792 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9793
9794 * server.c (handle_query): Correct qPart to qXfer.
9795
9796 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9797
9798 * configure.ac: Check for more headers which are missing on
9799 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9800 * configure.srv: Add Cygwin and mingw32.
9801 * remote-utils.c: Don't include headers unconditionally which
9802 are missing on mingw32. Include <winsock.h> for mingw32.
9803 (remote_open): Adjust for mingw32 support. Flush
9804 standard error after writing to it.
9805 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9806 (unblock_async_io, enable_async_io, disable_async_io)
9807 (readchar, getpkt): Update for Winsock support.
9808 (prepare_resume_reply): Expect a protocol signal number.
9809 * server.c: Disable <sys/wait.h> on mingw32.
9810 (start_inferior): Adjust for mingw32 support. Flush
9811 standard error after writing to it.
9812 (attach_inferior): Likewise. Use protocol signal
9813 numbers.
9814 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9815 and names.
9816 * win32-i386-low.c: New file.
9817 * Makefile.in (XM_CLIBS): Set.
9818 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9819 (win32-i386-low.o): New dependency rule.
9820 * linux-low.c (linux_wait): Use target signal numbers.
9821 * target.h (struct target_ops): Doc fix.
9822 * server.h (target_signal_to_name): New prototype.
9823 * gdbreplay.c: Don't include headers unconditionally which
9824 are missing on mingw32. Include <winsock.h> for mingw32.
9825 (remote_close, remote_open): Adjust for Winsock support.
9826 * configure, config.in: Regenerated.
9827
9828 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9829
9830 * server.c (decode_xfer_read, write_qxfer_response): New.
9831 (handle_query): Take a packet length argument. Handle
9832 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9833 the qSupported response.
9834 (main): Update call to handle_query.
9835
9836 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9837
9838 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9839 (putpkt_binary): Renamed from putpkt and adjusted for binary
9840 data.
9841 (putpkt): New wrapper for putpkt_binary.
9842 (readchar): Don't mask off the high bit.
9843 (decode_X_packet): New function.
9844 * server.c (main): Call putpkt_binary if a handler sets the packet
9845 length. Save the length of the incoming packet. Handle 'X'.
9846 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9847
9848 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * server.c (handle_query): Handle qSupported.
9851
9852 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9853
9854 * remote-utils.c (all_symbols_looked_up): New variable.
9855 (look_up_one_symbol): Check it.
9856 * server.h (look_up_one_symbol): New declaration.
9857 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9858
9859 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * Makefile.in (linux-arm-low.o): Update dependencies.
9862 * linux-arm-low.c: Include "gdb_proc_service.h".
9863 (PTRACE_GET_THREAD_AREA): Define.
9864 (ps_get_thread_area): New function.
9865
9866 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9867
9868 * configure.srv (m68k*-*-uclinux*): New target.
9869 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9870 (linux_resume_one_process): Remove extraneous cast.
9871 (linux_read_offsets): New.
9872 (linux_target_op): Add linux_read_offsets on mmuless systems.
9873 * server.c (handle_query): Add qOffsets logic.
9874 * target.h (struct target_ops): Add read_offsets.
9875
9876 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9877
9878 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9879 (PTRACE_GET_THREAD_AREA): Define.
9880 (ps_get_thread_area): New function.
9881 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9882 (linux-x86-64-low.o): Update.
9883
9884 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9885
9886 * configure.ac: Remove checks for prfpregset_t.
9887 * gdb_proc_service.h: New file.
9888 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9889 new "gdb_proc_service.h".
9890 * proc-service.c: Likewise.
9891 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9892 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9893 * Makefile.in (gdb_proc_service_h): Updated.
9894 * configure, config.in: Regenerated.
9895
9896 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9897
9898 * remote-utils.c (prepare_resume_reply): Move declaration
9899 of gdb_id_from_wait to the top of the block.
9900
9901 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9902
9903 * linux-low.c (regsets_store_inferior_registers): Read the regset
9904 from the target before filling it.
9905
9906 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9907
9908 * server.c (attach_inferior): Return SIGTRAP for a successful
9909 attach.
9910
9911 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9912
9913 * Makefile.in (OBS): Add version.o.
9914 (STAGESTUFF): Delete.
9915 (version.o): Add dependencies.
9916 (version.c): Replace rule.
9917 (clean): Remove version.c.
9918 * server.c (gdbserver_version): New.
9919 (gdbserver_usage): Use printf.
9920 (main): Handle --version and --help.
9921 * server.h (version, host_name): Add declarations.
9922
9923 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9924
9925 * linux-arm-low.c:
9926 * linux-arm-low.c:
9927 * inferiors.c:
9928 * i387-fp.h:
9929 * i387-fp.c:
9930 * gdbreplay.c:
9931 * regcache.c:
9932 * proc-service.c:
9933 * mem-break.h:
9934 * mem-break.c:
9935 * linux-x86-64-low.c:
9936 * linux-sh-low.c:
9937 * linux-s390-low.c:
9938 * linux-ppc64-low.c:
9939 * linux-ppc-low.c:
9940 * linux-mips-low.c:
9941 * linux-m68k-low.c:
9942 * linux-m32r-low.c:
9943 * linux-low.h:
9944 * linux-low.c:
9945 * linux-ia64-low.c:
9946 * linux-i386-low.c:
9947 * linux-crisv32-low.c:
9948 * thread-db.c:
9949 * terminal.h:
9950 * target.h:
9951 * target.c:
9952 * server.h:
9953 * server.c:
9954 * remote-utils.c:
9955 * regcache.h:
9956 * utils.c:
9957 * Makefile.in:
9958 * configure.ac:
9959 * gdbserver.1: Add (C) after Copyright. Update the FSF
9960 address.
9961
9962 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9965 (arm_breakpoint_at): Recognize both breakpoints.
9966 (the_low_target): Use the correct breakpoint instruction.
9967
9968 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
9969
9970 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9971 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9972 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9973 (the_low_target): Update.
9974
9975 2005-10-25 Andreas Schwab <schwab@suse.de>
9976
9977 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9978
9979 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9980 (ia64_num_regs): Reduce to 462.
9981
9982 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
9983
9984 * acinclude.m4: Correct quoting.
9985 * aclocal.m4: Regenerated.
9986
9987 Suggested by SZOKOVACS Robert <szo@ies.hu>:
9988 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9989 (thread_db_init): Call thread_db_err_str.
9990 * configure.ac: Check for TD_VERSION.
9991 * config.in, configure: Regenerated.
9992
9993 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9994
9995 * server.h (error, fatal, warning): Add ATTR_FORMAT.
9996
9997 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10000 is not available. Define HAVE_PTRACE_GETREGS if it is.
10001 * config.in, configure: Regenerated.
10002 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10003 * linux-i386-low.c, linux-m68k-low.c: Update to use
10004 HAVE_PTRACE_GETREGS.
10005 * linux-low.c (regsets_fetch_inferior_registers)
10006 (regsets_store_inferior_registers): Only return 0 if we processed
10007 GENERAL_REGS.
10008 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10009 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10010
10011 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10012
10013 * inferiors.c (struct thread_info): Add gdb_id.
10014 (add_thread): Add gdb_id argument.
10015 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10016 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10017 calls to add_thread.
10018 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10019 * server.c (handle_query): Use thread_to_gdb_id.
10020 (handle_v_cont, main): Use gdb_id_to_thread_id.
10021 * server.h (add_thread): Update prototype.
10022 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10023 prototypes.
10024
10025 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10026
10027 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10028 left-padded registers.
10029 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10030 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10031
10032 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10033
10034 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10035 * configure: Regenerate.
10036 * config.in: Regenerate.
10037 * server.h (NEED_DECLARATION_STRERROR):
10038 Replace with !HAVE_DECL_STRERROR.
10039
10040 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10041
10042 * linux-low.c (linux_wait, linux_send_signal): Don't test
10043 an unsigned long variable for > 0 if it could be MAX_ULONG.
10044 * server.c (myresume): Likewise.
10045 * target.c (set_desired_inferior): Likewise.
10046
10047 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10048
10049 * configure.ac: Simplify and improve check for socklen_t.
10050 * configure, config.in: Regenerate.
10051
10052 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * acconfig.h: Remove.
10055 * configure.ac: Add a test for socklen_t. Use three-argument
10056 AC_DEFINE throughout.
10057 * config.in: Regenerated using autoheader 2.59.
10058 * configure: Regenerated.
10059
10060 * gdbreplay.c (socklen_t): Provide a default.
10061 (remote_open): Use socklen_t.
10062 * remote-utils.c (socklen_t): Provide a default.
10063 (remote_open): Use socklen_t.
10064 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10065 unsigned char.
10066
10067 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10068 char for buffers.
10069 * linux-low.c (linux_read_memory, linux_write_memory)
10070 (linux_read_auxv): Likewise.
10071 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10072 (check_mem_write): Likewise.
10073 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10074 Likewise.
10075 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10076 (registers_from_string, register_data): Likewise.
10077 * server.c (handle_query, main): Likewise.
10078 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10079 (decode_M_packet): Likewise.
10080 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10081 * target.h (struct target_ops): Update read_memory, write_memory,
10082 and read_auxv.
10083 (read_inferior_memory, write_inferior_memory): Update.
10084 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10085 to unsigned char *.
10086 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10087 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10088 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10089 linux-s390-low.c, linux-sh-low.c: Update for changes in
10090 read_inferior_memory and the_low_target->breakpoint.
10091
10092 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10093
10094 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10095 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10096 * configure.srv: Add powerpc64-*-linux*.
10097 * linux-ppc64-low.c: New file.
10098
10099 2005-05-23 Orjan Friberg <orjanf@axis.com>
10100
10101 * linux-cris-low.c: New file with support for CRIS.
10102 * linux-crisv32-low.c: Ditto for CRISv32.
10103 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10104 (clean): Add reg-cris.c and reg-crisv32.c.
10105 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10106 reg-crisv32.o, and reg-crisv32.c to make rules.
10107 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10108 recognized targets.
10109
10110 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10111
10112 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10113 of sizeof (PTRACE_XFER_TYPE).
10114 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10115
10116 2005-05-12 Orjan Friberg <orjanf@axis.com>
10117
10118 * target.h (struct target_ops): Add insert_watchpoint,
10119 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10120 pointers for hardware watchpoint support.
10121 * linux-low.h (struct linux_target_ops): Ditto.
10122 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10123 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10124 to linux_target_ops.
10125 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10126 reply packet.
10127 * server.c (main): Recognize 'Z' and 'z' packets.
10128
10129 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10130
10131 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10132 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10133 (the_low_target): Add new members.
10134
10135 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10136
10137 * proc-service.c (ps_lgetregs): Search all_processes instead of
10138 all_threads.
10139
10140 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10141
10142 * server.c (start_inferior): Change return type to int.
10143 (attach_inferior): Change sigptr to int *.
10144 (handle_v_cont, handle_v_requests): Change signal to int *.
10145 (main): Change signal to int.
10146
10147 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10148
10149 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10150 * configure.srv: Add m32r*-*-linux*.
10151 * linux-m32r-low.c: New file.
10152
10153 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10154
10155 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10156
10157 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10158
10159 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10160 Take unsigned long arguments for PIDs.
10161 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10162 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10163 (wait_for_sigstop, linux_resume_one_process)
10164 (regsets_fetch_inferior_registers, linux_send_signal)
10165 (linux_read_auxv): Likewise. Update the types of variables holding
10166 PIDs. Update format string specifiers.
10167 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10168 * remote-utils.c (prepare_resume_reply): Likewise.
10169 * server.c (cont_thread, general_thread, step_thread)
10170 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10171 unsigned long.
10172 (handle_query): Update format specifiers.
10173 (handle_v_cont, main): Use strtoul for thread IDs.
10174 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10175 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10176 (general_thread, step_thread, thread_from_wait)
10177 (old_thread_from_wait): Update.
10178 * target.h (struct thread_resume): Use unsigned long for THREAD.
10179 (struct target_ops): Use unsigned long for arguments to attach and
10180 thread_alive.
10181
10182 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10183
10184 * acinclude.m4: Include bfd/bfd.m4 directly.
10185 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10186 <agriffis@toolchain.org>.
10187 * aclocal.m4, configure: Regenerated.
10188
10189 2005-01-07 Andrew Cagney <cagney@gnu.org>
10190
10191 * configure.ac: Rename configure.in, require autoconf 2.59.
10192 * configure: Re-generate.
10193
10194 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10195
10196 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10197 LIBS when finished.
10198 * aclocal.m4: Regenerated.
10199 * configure: Regenerated.
10200
10201 2004-11-21 Andreas Schwab <schwab@suse.de>
10202
10203 * linux-m68k-low.c (m68k_num_gregs): Define.
10204 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10205 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10206 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10207 (m68k_breakpoint_at): New. Add to the_low_target.
10208
10209 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10210 srv_linux_thread_db to yes.
10211
10212 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10213
10214 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10215 (ARCH_SET_FS): Likewise.
10216 (ARCH_GET_FS): Likewise.
10217 (ARCH_GET_GS): Likewise.
10218
10219 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10220
10221 * linux-i386-low.c (ps_get_thread_area): New.
10222 * linux-x86-64-low.c (ps_get_thread_area): New.
10223 * linux-low.c: Include <sys/syscall.h>.
10224 (linux_kill_one_process): Don't kill the first thread here.
10225 (linux_kill): Kill the first thread here.
10226 (kill_lwp): New function.
10227 (send_sigstop, linux_send_signal): Use it.
10228 * proc-service.c: Clean up #ifdefs.
10229 (fpregset_info): Delete.
10230 (ps_lgetregs): Update and enable implementation.
10231 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10232 implementations.
10233 * remote-utils.c (struct sym_cache, symbol_cache): New.
10234 (input_interrupt): Print a clearer message.
10235 (async_io_enabled): New variable.
10236 (enable_async_io, disable_async_io): Use it. Update comments.
10237 (look_up_one_symbol): Use the symbol cache.
10238 * thread-db.c (thread_db_look_up_symbols): New function.
10239 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10240
10241 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10242
10243 * configure.in: Test for -rdynamic.
10244 * configure: Regenerated.
10245 * Makefile (INTERNAL_LDFLAGS): New.
10246 (gdbserver, gdbreplay): Use it.
10247
10248 2004-09-02 Andrew Cagney <cagney@gnu.org>
10249
10250 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10251
10252 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10253
10254 * linux-low.c (linux_wait): Clear all_processes list also.
10255
10256 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10257
10258 * linux-low.c: Include <errno.h>. Remove extern declaration of
10259 errno.
10260
10261 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10262
10263 * gdbreplay.c, server.h, utils.c: Update copyright years.
10264
10265 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10266
10267 * server.c (main): Print child status or termination signal from
10268 variable 'signal', not 'sig'.
10269
10270 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10271
10272 * linux-low.c (linux_read_memory): Change return type to
10273 int. Check for and return error from ptrace().
10274 * target.c (read_inferior_memory): Change return type to int. Pass
10275 back return status from the_target->read_memory().
10276 * target.h (struct target_ops): Adapt *read_memory() prototype.
10277 Update comment.
10278 (read_inferior_memory): Adapt prototype.
10279 * server.c (main): Return an error packet if
10280 read_inferior_memory() returns an error.
10281
10282 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10283
10284 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10285 Unify with other clean targets.
10286
10287 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10288
10289 * server.c (handle_v_cont): Call set_desired_inferior.
10290
10291 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10292
10293 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10294
10295 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10296
10297 * linux-low.c (linux_wait): Unblock async I/O.
10298 (linux_resume): Block and enable async I/O.
10299 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10300 * server.h (block_async_io, unblock_async_io): Add prototypes.
10301
10302 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10303
10304 * remote-utils.c (remote_open): Print a status notice after
10305 opening a TCP port.
10306 * server.c (attach_inferior): Print a status notice after
10307 attaching.
10308
10309 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10310
10311 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10312
10313 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10314
10315 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10316 error packet.
10317 * server.c, target.h: Update copyright years.
10318
10319 2004-02-25 Roland McGrath <roland@redhat.com>
10320
10321 * target.h (struct target_ops): New member `read_auxv'.
10322 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10323 * linux-low.c (linux_read_auxv): New function.
10324 (linux_target_ops): Initialize `read_auxv' member to that.
10325
10326 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10327
10328 Committed by Jim Blandy <jimb@redhat.com>.
10329
10330 * linux-s390-low.c (s390_num_regs): Update.
10331 (s390_regmap): Remove control registers. Use __s390x__ predefine
10332 instead of GPR_SIZE to distiguish s390 and s390x targets.
10333
10334 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10335
10336 * linux-low.c: Update copyright year.
10337 (check_removed_breakpoint): Clear pending_is_breakpoint.
10338 (linux_set_resume_request, linux_queue_one_thread)
10339 (resume_status_pending_p): New functions.
10340 (linux_continue_one_thread): Use process->resume.
10341 (linux_resume): Only resume threads if there are no pending events.
10342 * linux-low.h (struct process_info): Add resume request
10343 pointer.
10344
10345 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10346
10347 * regcache.c (new_register_cache): Clear the allocated register
10348 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10349
10350 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10351
10352 * linux-low.c (linux_resume): Take a struct thread_resume *
10353 argument.
10354 (linux_wait): Update call.
10355 (resume_ptr): New static variable.
10356 (linux_continue_one_thread): Renamed from
10357 linux_continue_one_process. Use resume_ptr.
10358 (linux_resume): Use linux_continue_one_thread.
10359 * server.c (handle_v_cont, handle_v_requests): New functions.
10360 (myresume): New function.
10361 (main): Handle 'v' case.
10362 * target.h (struct thread_resume): New type.
10363 (struct target_ops): Change argument of "resume" to struct
10364 thread_resume *.
10365 (myresume): Delete macro.
10366
10367 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10368
10369 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10370 (uninstall): Support DESTDIR.
10371
10372 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10373
10374 * configure.srv: Add xscale*linux copy of arm*linux entry.
10375
10376 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10377
10378 * linux-arm-low.c (arm_reinsert_addr): New function.
10379 (the_low_target): Add arm_reinsert_addr.
10380
10381 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10382
10383 * mem-break.c: Remove whitespace at end of file.
10384
10385 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10386
10387 * configure.in: Check whether we need to prototype strerror.
10388 * server.h: Optionally prototype strerror.
10389 * gdbreplay.c (perror_with_name): Use strerror.
10390 * linux-low.c (linux_attach_lwp): Use strerror.
10391 * utils.c (perror_with_name): Use strerror.
10392 * config.in, configure: Regenerated.
10393
10394 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10395
10396 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10397 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10398
10399 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10400
10401 * Makefile.in (SFILES): Update.
10402 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10403 low-sun3.c: Remove files.
10404
10405 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10406
10407 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10408 (linux_detach_one_process, linux_detach): New functions.
10409 (linux_target_ops): Add linux_detach.
10410 * server.c (main): Handle 'D' packet.
10411 * target.h (struct target_ops): Add "detach" member.
10412 (detach_inferior): Define.
10413
10414 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10415
10416 From Kelley Cook <kelleycook@wideopenwest.com>:
10417 * configure.srv: Accept i[34567]86 variants.
10418
10419 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10420
10421 * linux-low.c (linux_wait_for_event): Correct comment typos.
10422 (linux_resume_one_process): Call check_removed_breakpoint.
10423 (linux_send_signal): New function.
10424 (linux_target_ops): Add linux_send_signal.
10425 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10426 of kill.
10427 * target.h (struct target_ops): Add send_signal.
10428
10429 2003-05-29 Jim Blandy <jimb@redhat.com>
10430
10431 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10432 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10433 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10434 away part of the register's value.
10435
10436 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10437
10438 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10439 (linux_wait_for_event, linux_init_signals): Likewise.
10440
10441 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10442
10443 * configure.in: Check for stdlib.h.
10444 * configure: Regenerated.
10445 * config.in: Regenerated.
10446
10447 2003-01-04 Andreas Schwab <schwab@suse.de>
10448
10449 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10450
10451 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10452
10453 * Makefile.in: Remove obsolete code.
10454
10455 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10456
10457 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10458 defined(PT_FPR0_HI).
10459
10460 2002-11-17 Stuart Hughes <seh@zee2.com>
10461
10462 * linux-arm-low.c (arm_num_regs): Increase.
10463 (arm_regmap): Include status register.
10464
10465 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10466
10467 * linux-low.c (register_addr): Remove incorrect -1 check.
10468
10469 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10470
10471 * linux-low.c (linux_create_inferior): Call setpgid. Return
10472 the new PID.
10473 (unstopped_p, linux_signal_pid): Remove.
10474 (linux_target_ops): Remove linux_signal_pid.
10475 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10476 global instead of target method.
10477 * target.h (struct target_ops): Remove signal_pid. Update comment
10478 for create_inferior.
10479 * server.c (signal_pid): New variable.
10480 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10481 gdbserver. Set the child to be the foreground process group.
10482 (attach_inferior): Set signal_pid.
10483
10484 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10485
10486 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10487
10488 2002-08-20 Jim Blandy <jimb@redhat.com>
10489
10490 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10491 default for this.
10492
10493 2002-08-01 Andrew Cagney <cagney@redhat.com>
10494
10495 * Makefile.in: Make chill references obsolete.
10496
10497 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10498
10499 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10500 * configure: Regenerate.
10501 * config.in: Regenerate.
10502
10503 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10504
10505 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10506 (perror_with_name, remote_close, remote_open, expect, play): Static.
10507
10508 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10509
10510 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10511 byte offsets instead of an array of indexes.
10512 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10513
10514 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10515
10516 * regcache.c: Add comment.
10517
10518 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10519
10520 * thread-db.c: New file.
10521 * proc-service.c: New file.
10522 * acinclude.m4: New file.
10523 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10524 proc-service.o, and thread-db.o.
10525 (linux-low.o): Add USE_THREAD_DB.
10526 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10527 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10528 * aclocal.m4: Regenerated.
10529 * config.in: Regenerated.
10530 * configure: Regenerated.
10531 * configure.in: Check for proc_service.h, sys/procfs.h,
10532 thread_db.h, and linux/elf.h headrs.
10533 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10534 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10535 Check for -lthread_db and thread support.
10536 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10537 PowerPC, and SuperH.
10538 * i387-fp.c: Constify arguments.
10539 * i387-fp.h: Likewise.
10540 * inferiors.c: (struct thread_info): Renamed from
10541 `struct inferior_info'. Remove PID member. Use generic inferior
10542 list header. All uses updated.
10543 (inferiors, signal_pid): Removed.
10544 (all_threads): New variable.
10545 (get_thread): Define.
10546 (add_inferior_to_list): New function.
10547 (for_each_inferior): New function.
10548 (change_inferior_id): New function.
10549 (add_inferior): Removed.
10550 (remove_inferior): New function.
10551 (add_thread): New function.
10552 (free_one_thread): New function.
10553 (remove_thread): New function.
10554 (clear_inferiors): Use for_each_inferior and free_one_thread.
10555 (find_inferior): New function.
10556 (find_inferior_id): New function.
10557 (inferior_target_data): Update argument type.
10558 (set_inferior_target_data): Likewise.
10559 (inferior_regcache_data): Likewise.
10560 (set_inferior_regcache_data): Likewise.
10561 * linux-low.c (linux_bp_reinsert): Remove.
10562 (all_processes, stopping_threads, using_thrads)
10563 (struct pending_signals, debug_threads, pid_of): New.
10564 (inferior_pid): Replace with macro.
10565 (struct inferior_linux_data): Remove.
10566 (get_stop_pc, add_process): New functions.
10567 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10568 Use add_process and add_thread.
10569 (linux_attach_lwp): New function, based on old linux_attach. Use
10570 add_process and add_thread. Set stop_expected for new threads.
10571 (linux_attach): New function.
10572 (linux_kill_one_process): New function.
10573 (linux_kill): Kill all LWPs.
10574 (linux_thread_alive): Use find_inferior_id.
10575 (check_removed_breakpoints, status_pending_p): New functions.
10576 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10577 Update. Use WNOHANG. Wait for cloned processes also. Update process
10578 struct for the found process.
10579 (linux_wait_for_event): New function.
10580 (linux_wait): Use it. Support LWPs.
10581 (send_sigstop, wait_for_sigstop, stop_all_processes)
10582 (linux_resume_one_process, linux_continue_one_process): New functions.
10583 (linux_resume): Support LWPs.
10584 (REGISTER_RAW_SIZE): Remove.
10585 (fetch_register): Use register_size instead. Call supply_register.
10586 (usr_store_inferior_registers): Likewise. Call collect_register.
10587 Fix recursive case.
10588 (regsets_fetch_inferior_registers): Improve error message.
10589 (regsets_store_inferior_registers): Add debugging.
10590 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10591 (unstopped_p, linux_signal_pid): New functions.
10592 (linux_target_ops): Add linux_signal_pid.
10593 (linux_init_signals): New function.
10594 (initialize_low): Call it. Initialize using_threads.
10595 * regcache.c (inferior_regcache_data): Add valid
10596 flag.
10597 (get_regcache): Fetch registers lazily. Add fetch argument
10598 and update all callers.
10599 (regcache_invalidate_one, regcache_invalidate): New
10600 functions.
10601 (new_register_cache): Renamed from create_register_cache.
10602 Return the new regcache.
10603 (free_register_cache): Change argument to a void *.
10604 (registers_to_string, registers_from_string): Call get_regcache
10605 with fetch flag set.
10606 (register_data): Make static. Pass fetch flag to get_regcache.
10607 (supply_register): Call get_regcache with fetch flag clear.
10608 (collect_register): Call get_regcache with fetch flag set.
10609 (collect_register_as_string): New function.
10610 * regcache.h: Update.
10611 * remote-utils.c (putpkt): Flush after debug output and use
10612 stderr.
10613 Handle input interrupts while waiting for an ACK.
10614 (input_interrupt): Use signal_pid method.
10615 (getpkt): Flush after debug output and use stderr.
10616 (outreg): Use collect_register_as_string.
10617 (new_thread_notify, dead_thread_notify): New functions.
10618 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10619 and general_thread.
10620 (look_up_one_symbol): Flush after debug output.
10621 * server.c (step_thread, server_waiting): New variables.
10622 (start_inferior): Don't use signal_pid. Update call to mywait.
10623 (attach_inferior): Update call to mywait.
10624 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10625 (main): Don't fetch/store registers explicitly. Use
10626 set_desired_inferior. Support proposed ``Hs'' packet. Update
10627 calls to mywait.
10628 * server.h: Update.
10629 (struct inferior_list, struct_inferior_list_entry): New.
10630 * target.c (set_desired_inferior): New.
10631 (write_inferior_memory): Constify.
10632 (mywait): New function.
10633 * target.h: Update.
10634 (struct target_ops): New signal_pid method.
10635 (mywait): Removed macro, added prototype.
10636
10637 * linux-low.h (regset_func): Removed.
10638 (regset_fill_func, regset_store_func): New.
10639 (enum regset_type): New.
10640 (struct regset_info): Add type field. Use new operation types.
10641 (struct linux_target_ops): stop_pc renamed to get_pc.
10642 Add decr_pc_after_break and breakpoint_at.
10643 (get_process, get_thread_proess, get_process_thread)
10644 (strut process_info, all_processes, linux_attach_lwp)
10645 (thread_db_init): New.
10646
10647 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10648 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10649 (the_low_target): Add new members.
10650 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10651 (i386_store_fpxregset): Constify.
10652 (target_regsets): Add new kind identifier.
10653 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10654 (i386_set_pc): Add debugging.
10655 (i386_breakpoint_at): New function.
10656 (the_low_target): Add new members.
10657 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10658 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10659 (mips_breakpoint_at): New.
10660 (the_low_target): Add new members.
10661 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10662 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10663 (the_low_target): Add new members.
10664 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10665 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10666 (the_low_target): Add new members.
10667 * linux-x86-64-low.c (target_regsets): Add new kind
10668 identifier.
10669
10670 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10671
10672 From Martin Pool <mbp@samba.org>:
10673 * server.c (gdbserver_usage): New function.
10674 (main): Call it.
10675
10676 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10677
10678 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10679 stop_at -> stop_pc.
10680
10681 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10682
10683 * Makefile.in: Remove obsolete code.
10684
10685 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10686
10687 * linux-low.c (regsets_fetch_inferior_registers),
10688 (regsets_store_inferior_registers): Removed cast to int from
10689 ptrace() calls.
10690 * regcache.h: Added declaration of struct inferior_info.
10691
10692 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10693
10694 * inferiors.c (struct inferior_info): Add regcache_data.
10695 (add_inferior): Call create_register_cache.
10696 (clear_inferiors): Call free_register_cache.
10697 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10698 * regcache.c (struct inferior_regcache_data): New.
10699 (registers): Remove.
10700 (get_regcache): New function.
10701 (create_register_cache, free_register_cache): New functions.
10702 (set_register_cache): Don't initialize the register cache here.
10703 (registers_to_string, registers_from_string, register_data): Call
10704 get_regcache.
10705 * regcache.h: Add prototypes.
10706 * server.h: Likewise.
10707
10708 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10709
10710 * mem-break.c: New file.
10711 * mem-break.h: New file.
10712 * Makefile.in: Add mem-break.o rule; update server.h
10713 dependencies.
10714 * inferiors.c (struct inferior_info): Add target_data
10715 member.
10716 (clear_inferiors): Free target_data member if set.
10717 (inferior_target_data, set_inferior_target_data): New functions.
10718 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10719 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10720 * linux-low.c (linux_bp_reinsert): New variable.
10721 (struct inferior_linux_data): New.
10722 (linux_create_inferior): Use set_inferior_target_data.
10723 (linux_attach): Likewise. Call add_inferior.
10724 (linux_wait_for_one_inferior): New function.
10725 (linux_wait): Call it.
10726 (linux_write_memory): Add const.
10727 (initialize_low): Call set_breakpoint_data.
10728 * linux-low.h (struct linux_target_ops): Add breakpoint
10729 handling members.
10730 * server.c (attach_inferior): Remove extra add_inferior
10731 call.
10732 * server.h: Include mem-break.h. Update inferior.c
10733 prototypes.
10734 * target.c (read_inferior_memory)
10735 (write_inferior_memory): New functions.
10736 * target.h (read_inferior_memory)
10737 (write_inferior_memory): Change macros to prototypes.
10738 (struct target_ops): Update comments. Add const to write_memory
10739 definition.
10740
10741 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10742
10743 * linux-low.c (usr_store_inferior_registers): Support
10744 registers which are allowed to fail to store.
10745 * linux-low.h (linux_target_ops): Likewise.
10746 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10747 (ppc_cannot_store_register): FPSCR may not be storable.
10748
10749 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10750
10751 * server.h: Include <string.h> if HAVE_STRING_H.
10752 * ChangeLog: Correct paths in last ChangeLog entry.
10753
10754 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10755
10756 * linux-low.h: Remove obsolete prototypes.
10757 (struct linux_target_ops): New.
10758 (extern the_low_target): New.
10759 * linux-low.c (num_regs, regmap): Remove declarations.
10760 (register_addr): Use the_low_target explicitly.
10761 (fetch_register): Likewise.
10762 (usr_fetch_inferior_registers): Likewise.
10763 (usr_store_inferior_registers): Likewise.
10764 * linux-arm-low.c (num_regs): Remove.
10765 (arm_num_regs): Define.
10766 (arm_regmap): Renamed from regmap, made static.
10767 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10768 made static.
10769 (arm_cannot_store_register): Renamed from cannot_store_register,
10770 made static.
10771 (the_low_target): New.
10772 * linux-i386-low.c (num_regs): Remove.
10773 (i386_num_regs): Define.
10774 (i386_regmap): Renamed from regmap, made static.
10775 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10776 made static.
10777 (i386_cannot_store_register): Renamed from cannot_store_register,
10778 made static.
10779 (the_low_target): New.
10780 * linux-ia64-low.c (num_regs): Remove.
10781 (ia64_num_regs): Define.
10782 (ia64_regmap): Renamed from regmap, made static.
10783 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10784 made static.
10785 (ia64_cannot_store_register): Renamed from cannot_store_register,
10786 made static.
10787 (the_low_target): New.
10788 * linux-m68k-low.c (num_regs): Remove.
10789 (m68k_num_regs): Define.
10790 (m68k_regmap): Renamed from regmap, made static.
10791 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10792 made static.
10793 (m68k_cannot_store_register): Renamed from cannot_store_register,
10794 made static.
10795 (the_low_target): New.
10796 * linux-mips-low.c (num_regs): Remove.
10797 (mips_num_regs): Define.
10798 (mips_regmap): Renamed from regmap, made static.
10799 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10800 made static.
10801 (mips_cannot_store_register): Renamed from cannot_store_register,
10802 made static.
10803 (the_low_target): New.
10804 * linux-ppc-low.c (num_regs): Remove.
10805 (ppc_num_regs): Define.
10806 (ppc_regmap): Renamed from regmap, made static.
10807 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10808 made static.
10809 (ppc_cannot_store_register): Renamed from cannot_store_register,
10810 made static.
10811 (the_low_target): New.
10812 * linux-s390-low.c (num_regs): Remove.
10813 (s390_num_regs): Define.
10814 (s390_regmap): Renamed from regmap, made static.
10815 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10816 made static.
10817 (s390_cannot_store_register): Renamed from cannot_store_register,
10818 made static.
10819 (the_low_target): New.
10820 * linux-sh-low.c (num_regs): Remove.
10821 (sh_num_regs): Define.
10822 (sh_regmap): Renamed from regmap, made static.
10823 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10824 made static.
10825 (sh_cannot_store_register): Renamed from cannot_store_register,
10826 made static.
10827 (the_low_target): New.
10828 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10829 (the_low_target): New.
10830
10831 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10832
10833 * Makefile.in: Add stamp-h target.
10834 * configure.in: Create stamp-h.
10835 * configure: Regenerated.
10836
10837 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10838
10839 * inferiors.c: New file.
10840 * target.c: New file.
10841 * target.h: New file.
10842 * Makefile.in: Add target.o and inferiors.o. Update
10843 dependencies.
10844 * linux-low.c (inferior_pid): New static variable,
10845 moved from server.c.
10846 (linux_create_inferior): Renamed from create_inferior.
10847 Call add_inferior. Return 0 on success instead of a PID.
10848 (linux_attach): Renamed from myattach.
10849 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10850 (linux_thread_alive): Renamed from mythread_alive.
10851 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10852 child dies.
10853 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10854 (regsets_store_inferior_registers): Correct error message.
10855 Add missing ``return 0''.
10856 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10857 (linux_store_registers): Renamed from store_inferior_registers.
10858 (linux_read_memory): Renamed from read_inferior_memory.
10859 (linux_write_memory): Renamed from write_inferior_memory.
10860 (linux_target_ops): New structure.
10861 (initialize_low): Call set_target_ops ().
10862 * remote-utils.c (unhexify): New function.
10863 (hexify): New function.
10864 (input_interrupt): Send signals to ``signal_pid''.
10865 * server.c (inferior_pid): Remove.
10866 (start_inferior): Update create_inferior call.
10867 (attach_inferior): Call add_inferior.
10868 (handle_query): New function.
10869 (main): Call handle_query for `q' packets.
10870 * server.h: Include "target.h". Remove obsolete prototypes.
10871 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10872
10873 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10874
10875 * Makefile.in: Add WARN_CFLAGS. Update configury
10876 dependencies.
10877 * configure.in: Check for <string.h>
10878 * configure: Regenerate.
10879 * config.in: Regenerate.
10880 * gdbreplay.c: Include needed system headers.
10881 (remote_open): Remove strchr prototype.
10882 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10883 * regcache.c (supply_register): Change buf argument to const void *.
10884 (supply_register_by_name): Likewise.
10885 (collect_register): Change buf argument to void *.
10886 (collect_register_by_name): Likewise.
10887 * regcache.h: Add missing prototypes.
10888 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10889 * server.c (handle_query): New function.
10890 (attached): New static variable, moved out of main.
10891 (main): Quiet longjmp clobber warnings.
10892 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10893 * utils.c (error): Remove NORETURN.
10894 (fatal): Likewise.
This page took 0.277538 seconds and 5 git commands to generate.