]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/ChangeLog
Fix race exposed by gdb.threads/killed.exp
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-03-19 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (linux_resume_one_lwp): Rename to ...
4 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5 instead call perror_with_name.
6 (check_ptrace_stopped_lwp_gone): New function.
7 (linux_resume_one_lwp): Reimplement as wrapper around
8 linux_resume_one_lwp_throw that swallows errors if the LWP is
9 gone.
10
11 2015-03-19 Pedro Alves <palves@redhat.com>
12
13 * linux-low.c (count_events_callback, select_event_lwp_callback):
14 No longer check whether the thread has resume_stop as last resume
15 kind.
16
17 2015-03-19 Pedro Alves <palves@redhat.com>
18
19 * linux-low.c (count_events_callback, select_event_lwp_callback):
20 Use the lwp's status_pending_p field, not the thread's.
21
22 2015-03-19 Pedro Alves <palves@redhat.com>
23
24 * linux-low.c (select_event_lwp_callback): Update comments to
25 no longer mention SIGTRAP.
26
27 2015-03-18 Gary Benson <gbenson@redhat.com>
28
29 * server.c (handle_query): Do not report vFile:fstat as supported.
30
31 2015-03-11 Gary Benson <gbenson@redhat.com>
32
33 * hostio.c (sys/types.h): New include.
34 (sys/stat.h): Likewise.
35 (common-remote-fileio.h): Likewise.
36 (handle_fstat): New function.
37 (handle_vFile): Handle vFile:fstat packets.
38
39 2015-03-11 Gary Benson <gbenson@redhat.com>
40
41 * configure.ac (AC_CHECK_MEMBERS): Add checks for
42 struct stat.st_blocks and struct stat.st_blksize.
43 * configure: Regenerate.
44 * config.in: Likewise.
45 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
46 (OBS): Add common-remote-fileio.o.
47 (common-remote-fileio.o): New rule.
48
49 2015-03-09 Pedro Alves <palves@redhat.com>
50
51 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
52 'struct sockaddr' pointer in 'accept' call.
53
54 2015-03-09 Pedro Alves <palves@redhat.com>
55
56 Revert:
57 2015-03-07 Pedro Alves <palves@redhat.com>
58 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
59 or <winsock2.h> here. Instead include "gdb_socket.h".
60 (remote_open): Use union gdb_sockaddr_u.
61 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
62 or <winsock2.h> here. Instead include "gdb_socket.h".
63 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
64 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
65 or <sys/un.h>.
66 (init_named_socket, gdb_agent_helper_thread): Use union
67 gdb_sockaddr_u.
68
69 2015-03-07 Pedro Alves <palves@redhat.com>
70
71 * configure.ac (build_warnings): Move
72 -Wdeclaration-after-statement to the C-specific set.
73 * configure: Regenerate.
74
75 2015-03-07 Pedro Alves <palves@redhat.com>
76
77 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
78 or <winsock2.h> here. Instead include "gdb_socket.h".
79 (remote_open): Use union gdb_sockaddr_u.
80 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
81 or <winsock2.h> here. Instead include "gdb_socket.h".
82 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
83 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
84 or <sys/un.h>.
85 (init_named_socket, gdb_agent_helper_thread): Use union
86 gdb_sockaddr_u.
87
88 2015-03-07 Pedro Alves <palves@redhat.com>
89
90 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
91 instead.
92
93 2015-03-06 Yao Qi <yao.qi@linaro.org>
94
95 * linux-aarch64-low.c (aarch64_insert_point): Use
96 show_debug_regs as a boolean.
97 (aarch64_remove_point): Likewise.
98
99 2015-03-05 Pedro Alves <palves@redhat.com>
100
101 * lynx-low.c (lynx_target_ops): Install NULL hooks for
102 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
103 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
104 * nto-low.c (nto_target_ops): Likewise.
105 * spu-low.c (spu_target_ops): Likewise.
106 * win32-low.c (win32_target_ops): Likewise.
107
108 2015-03-04 Pedro Alves <palves@redhat.com>
109
110 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
111 Decide whether a breakpoint triggered based on the SIGTRAP's
112 siginfo.si_code.
113 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
114 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
115 (linux_low_filter_event): Check for breakpoints before checking
116 watchpoints.
117 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
118 siginfo.si_code.
119 (linux_stopped_by_sw_breakpoint)
120 (linux_supports_stopped_by_sw_breakpoint)
121 (linux_stopped_by_hw_breakpoint)
122 (linux_supports_stopped_by_hw_breakpoint): New functions.
123 (linux_target_ops): Install new target methods.
124
125 2015-03-04 Pedro Alves <palves@redhat.com>
126
127 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
128 * server.c (swbreak_feature, hwbreak_feature): New globals.
129 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
130 (captured_main): Clear swbreak_feature and hwbreak_feature.
131 * server.h (swbreak_feature, hwbreak_feature): Declare.
132 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
133 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
134 supports_stopped_by_hw_breakpoint>: New fields.
135 (target_supports_stopped_by_sw_breakpoint)
136 (target_stopped_by_sw_breakpoint)
137 (target_supports_stopped_by_hw_breakpoint)
138 (target_stopped_by_hw_breakpoint): Declare.
139
140 2015-03-04 Pedro Alves <palves@redhat.com>
141
142 enum lwp_stop_reason -> enum target_stop_reason
143 * linux-low.c (check_stopped_by_breakpoint): Adjust.
144 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
145 (linux_wait_1, stuck_in_jump_pad_callback)
146 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
147 (linux_stopped_by_watchpoint):
148 * linux-low.h (enum lwp_stop_reason): Delete.
149 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
150 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
151
152 2015-03-04 Yao Qi <yao.qi@linaro.org>
153
154 * Makefile.in (SFILES): Add linux-aarch64-low.c.
155
156 2015-03-03 Gary Benson <gbenson@redhat.com>
157
158 * hostio.c (handle_vFile): Fix prefix lengths.
159
160 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
161
162 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
163 ptr_bits.
164
165 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
166
167 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
168 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
169 (clean): Add "rm -f" for above C files.
170 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
171 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
172 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
173 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
174 * linux-s390-low.c (HWCAP_S390_VX): New macro.
175 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
176 (init_registers_s390x_vx_linux64)
177 (init_registers_s390x_tevx_linux64)
178 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
179 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
180 declarations.
181 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
182 (s390_store_vxrs_high): New functions.
183 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
184 NT_S390_VXRS_HIGH.
185 (s390_arch_setup): Add logic for selecting one of the new target
186 descriptions. Activate the new vector regsets if applicable.
187 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
188 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
189 and init_registers_s390x_tevx_linux64.
190
191 2015-03-01 Pedro Alves <palves@redhat.com>
192
193 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
194 parameter.
195
196 2015-02-27 Pedro Alves <palves@redhat.com>
197
198 * linux-x86-low.c (u_debugreg_offset): New function.
199 (x86_linux_dr_get, x86_linux_dr_set): Use it.
200
201 2015-02-27 Pedro Alves <palves@redhat.com>
202
203 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
204 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
205 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
206 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
207 (ps_lsetfpregs, ps_getpid)
208 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
209 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
210 (ps_lsetxregs, ps_plog): Declare.
211
212 2015-02-27 Pedro Alves <palves@redhat.com>
213
214 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
215 IP_AGENT_EXPORT_FUNC.
216 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
217 IP_AGENT_EXPORT_FUNC.
218 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
219 (IP_AGENT_EXPORT): Delete.
220 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
221 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
222 (gdb_trampoline_buffer_error, collecting, gdb_collect)
223 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
224 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
225 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
226 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
227 (traceframe_read_count, traceframe_write_count)
228 (traceframes_created, trace_state_variables, get_raw_reg)
229 (get_trace_state_variable_value, set_trace_state_variable_value)
230 (ust_loaded, helper_thread_id, cmd_buf): Use
231 IPA_SYM_EXPORTED_NAME.
232 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
233 (tracepoints) Use IP_AGENT_EXPORT_VAR.
234 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
235 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
236 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
237 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
238 EXTERN_C_PUSH/EXTERN_C_POP.
239 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
240 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
241 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
242 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
243 (traceframe_write_count, traceframe_read_count)
244 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
245 (about_to_request_buffer_space, get_trace_state_variable_value)
246 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
247 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
248 EXTERN_C_PUSH/EXTERN_C_POP.
249 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
250 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
251 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
252 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
253 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
254 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
255 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
256 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
257 Define.
258 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
259 (IP_AGENT_EXPORT_VAR_DECL): Define.
260 (tracing): Declare.
261 (gdb_agent_get_raw_reg): Declare.
262
263 2015-02-27 Tom Tromey <tromey@redhat.com>
264 Pedro Alves <palves@redhat.com>
265
266 Rename symbols whose names are reserved C++ keywords throughout.
267
268 2015-02-27 Pedro Alves <palves@redhat.com>
269
270 * Makefile.in (COMPILER): New, get it from autoconf.
271 (CXX): Get from autoconf instead.
272 (COMPILE.pre): Use COMPILER.
273 (CC-LD): Rename to ...
274 (CC_LD): ... this. Use COMPILER.
275 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
276 (CXX_FOR_TARGET): Default to g++ instead of gcc.
277 * acinclude.m4: Include build-with-cxx.m4.
278 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
279 Disable -Werror by default if building in C++ mode.
280 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
281 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
282 the C++ compiler. Save/restore CXXFLAGS too.
283 * configure: Regenerate.
284
285 2015-02-27 Pedro Alves <palves@redhat.com>
286
287 * acinclude.m4: Include libiberty.m4.
288 * configure.ac: Call libiberty_INIT.
289 * config.in, configure: Regenerate.
290
291 2015-02-26 Pedro Alves <palves@redhat.com>
292
293 * linux-low.c (linux_wait_1): When incrementing the PC past a
294 program breakpoint always use the_low_target.breakpoint_len as
295 increment, rather than the maximum between that and
296 the_low_target.decr_pc_after_break.
297
298 2015-02-23 Pedro Alves <palves@redhat.com>
299
300 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
301 thread was doing a step-over; always adjust the PC if
302 we stepped over a permanent breakpoint.
303 (linux_wait_1): If we stepped over breakpoint that was on top of a
304 permanent breakpoint, manually advance the PC past it.
305
306 2015-02-23 Pedro Alves <palves@redhat.com>
307
308 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
309 modes.
310 (x86_fill_gregset, x86_store_gregset): Use it when handling
311 $orig_eax.
312
313 2015-02-20 Pedro Alves <palves@redhat.com>
314
315 * thread-db.c: Include "nat/linux-procfs.h".
316 (thread_db_init): Skip listing new threads if the kernel supports
317 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
318
319 2015-02-20 Pedro Alves <palves@redhat.com>
320
321 * linux-low.c (status_pending_p_callback): Use ptid_match.
322
323 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
324
325 PR breakpoints/16812
326 * linux-low.c (wstatus_maybe_breakpoint): Remove.
327 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
328 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
329
330 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
331
332 PR breakpoints/15956
333 * tracepoint.c (cmd_qtinit): Add check for current_thread.
334
335 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
336
337 * linux-low.c (linux_low_btrace_conf): Print size.
338 * server.c (handle_btrace_conf_general_set): New.
339 (hanle_general_set): Call handle_btrace_conf_general_set.
340 (handle_query): Report Qbtrace-conf:bts:size as supported.
341
342 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
343
344 * linux-low.c (linux_low_enable_btrace): Update parameters.
345 (linux_low_btrace_conf): New.
346 (linux_target_ops)<to_btrace_conf>: Initialize.
347 * server.c (current_btrace_conf): New.
348 (handle_btrace_enable): Rename to ...
349 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
350 to target_enable_btrace. Update comment. Update users.
351 (handle_qxfer_btrace_conf): New.
352 (qxfer_packets): Add btrace-conf entry.
353 (handle_query): Report qXfer:btrace-conf:read as supported packet.
354 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
355 (target_ops)<read_btrace_conf>: New.
356 (target_enable_btrace): Update parameters.
357 (target_read_btrace_conf): New.
358
359 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
360
361 * server.c (handle_btrace_general_set): Remove call to
362 target_supports_btrace.
363 (supported_btrace_packets): New.
364 (handle_query): Call supported_btrace_packets.
365 * target.h: include btrace-common.h.
366 (btrace_target_info): Removed.
367 (supports_btrace, target_supports_btrace): Update parameters.
368
369 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
370
371 * Makefile.in (SFILES): Add common/btrace-common.c.
372 (OBS): Add common/btrace-common.o.
373 (btrace-common.o): Add build rules.
374 * linux-low: Include btrace-common.h.
375 (linux_low_read_btrace): Use struct btrace_data. Call
376 btrace_data_init and btrace_data_fini.
377
378 2015-02-06 Pedro Alves <palves@redhat.com>
379
380 * thread-db.c (find_new_threads_callback): Add debug output.
381
382 2015-02-04 Pedro Alves <palves@redhat.com>
383
384 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
385 (resume_stopped_resumed_lwps): New function.
386 (linux_wait_for_event_filtered): Use it.
387
388 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
389
390 * Makefile.in (SFILES): Add linux-personality.c.
391 (linux-personality.o): New rule.
392 * configure.srv (srv_linux_obj): Add linux-personality.o to the
393 list of objects to be built.
394 * linux-low.c: Include nat/linux-personality.h.
395 (linux_create_inferior): Remove code to disable address space
396 randomization (moved to ../nat/linux-personality.c). Create
397 cleanup to disable address space randomization.
398
399 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
400
401 * Makefile.in (posix-strerror.o): New rule.
402 (mingw-strerror.o): Likewise.
403 * configure: Regenerated.
404 * configure.ac: Source file ../common/common.host. Initialize new
405 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
406
407 2015-01-14 Yao Qi <yao@codesourcery.com>
408
409 * Makefile.in (SFILES): Add nat/ppc-linux.c.
410 (ppc-linux.o): New rule.
411 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
412 * configure.ac: AC_CHECK_FUNCS(getauxval).
413 * config.in: Re-generated.
414 * configure: Re-generated.
415 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
416 ppc64_64bit_inferior_p
417
418 2015-01-14 Yao Qi <yao@codesourcery.com>
419
420 * linux-ppc-low.c: Include "nat/ppc-linux.h".
421 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
422 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
423 (PT_ORIG_R3, PT_TRAP): Likewise.
424 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
425 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
426 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
427
428 2015-01-10 Joel Brobecker <brobecker@adacore.com>
429
430 * i387-fp.c (i387_cache_to_xsave): In look over
431 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
432 zmmh_low_space field by use of zmmh_high_space.
433
434 2015-01-09 Pedro Alves <palves@redhat.com>
435
436 * linux-low.c (step_over_bkpt): Move higher up in the file.
437 (handle_extended_wait): Don't store the stop_pc here.
438 (get_stop_pc): Adjust comments and rename to ...
439 (check_stopped_by_breakpoint): ... this. Record whether the LWP
440 stopped for a software breakpoint or hardware breakpoint.
441 (thread_still_has_status_pending_p): New function.
442 (status_pending_p_callback): Use
443 thread_still_has_status_pending_p. If the event is no longer
444 interesting, resume the LWP.
445 (handle_tracepoints): Add assert.
446 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
447 (wstatus_maybe_breakpoint): New function.
448 (cancel_breakpoint): Delete function.
449 (check_stopped_by_watchpoint): New function, factored out from
450 linux_low_filter_event.
451 (lp_status_maybe_breakpoint): Delete function.
452 (linux_low_filter_event): Remove filter_ptid argument.
453 Leave thread group exits pending here. Store the LWP's stop PC.
454 Always leave events pending.
455 (linux_wait_for_event_filtered): Pull all events out of the
456 kernel, and leave them all pending.
457 (count_events_callback, select_event_lwp_callback): Consider all
458 events.
459 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
460 (select_event_lwp): Only give preference to the stepping LWP in
461 all-stop mode. Adjust comments.
462 (ignore_event): New function.
463 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
464 references to cancel_breakpoints. Adjust to renames. Also give
465 equal priority to all LWPs that have had events in non-stop mode.
466 If reporting a software breakpoint event, unadjust the LWP's PC.
467 (linux_wait): If linux_wait_1 returned an ignored event, retry.
468 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
469 Adjust.
470 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
471 (resume_status_pending_p): Use thread_still_has_status_pending_p.
472 (linux_stopped_by_watchpoint): Adjust.
473 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
474 * linux-low.h (enum lwp_stop_reason): New.
475 (struct lwp_info) <stop_pc>: Adjust comment.
476 <stopped_by_watchpoint>: Delete field.
477 <stop_reason>: New field.
478 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
479 * mem-break.c (software_breakpoint_inserted_here)
480 (hardware_breakpoint_inserted_here): New function.
481 * mem-break.h (software_breakpoint_inserted_here)
482 (hardware_breakpoint_inserted_here): Declare.
483 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
484 (cancel_breakpoints): Delete.
485 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
486 (upload_fast_traceframes): Remove references to
487 cancel_breakpoints.
488
489 2015-01-09 Pedro Alves <palves@redhat.com>
490
491 * thread-db.c (find_new_threads_callback): Ignore thread if the
492 kernel thread ID is -1.
493
494 2015-01-09 Pedro Alves <palves@redhat.com>
495
496 * linux-low.c (linux_attach_fail_reason_string): Move to
497 nat/linux-ptrace.c, and rename.
498 (linux_attach_lwp): Update comment.
499 (attach_proc_task_lwp_callback): New function.
500 (linux_attach): Adjust to rename and use
501 linux_proc_attach_tgid_threads.
502 (linux_attach_fail_reason_string): Delete declaration.
503
504 2015-01-01 Joel Brobecker <brobecker@adacore.com>
505
506 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
507 * server.c (gdbserver_version): Likewise.
508
509 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
510
511 * remote-utils.c: Include ctype.h.
512 (input_interrupt): Explicitly handle the case when the char
513 received is the NUL byte. Improve the printing of non-ASCII
514 characters.
515
516 2014-12-16 Joel Brobecker <brobecker@adacore.com>
517
518 * linux-low.c (linux_low_filter_event): Update call to
519 linux_enable_event_reporting following the addition of
520 a new parameter to that function.
521
522 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
523
524 PR server/17457
525 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
526 (AARCH64_FPCR_REGNO): Likewise.
527 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
528 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
529 (aarch64_store_fpregset): Likewise.
530
531 2014-12-15 Joel Brobecker <brobecker@adacore.com>
532
533 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
534 Remove FIXME comment about assumption about N.
535
536 2014-12-13 Joel Brobecker <brobecker@adacore.com>
537
538 * configure.ac: If large-file support is disabled in GDBserver,
539 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
540 * configure: Regenerate.
541
542 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
543
544 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
545 warning upon ENODATA from ptrace.
546 * linux-s390-low.c (s390_store_tdb): New.
547 (s390_regsets): Add regset for NT_S390_TDB.
548
549 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
550
551 * linux-low.c (regsets_store_inferior_registers): Skip regsets
552 without a fill_function.
553 * linux-s390-low.c (s390_fill_last_break): Remove.
554 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
555 (s390_arch_setup): Use regset's size instead of fill_function for
556 loop end condition.
557
558 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
559
560 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
561 the regset's store function when ptrace returned an error.
562 * regcache.c (get_thread_regcache): Invalidate register cache
563 before fetching inferior's registers.
564
565 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
566
567 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
568 while-loop as for-loop.
569 (regsets_store_inferior_registers): Likewise.
570
571 2014-11-28 Yao Qi <yao@codesourcery.com>
572
573 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
574 * config.in, configure: Re-generate.
575 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
576 is defined.
577
578 2014-11-21 Yao Qi <yao@codesourcery.com>
579
580 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
581 (AC_CHECK_HEADERS): Remove malloc.h.
582 * configure: Re-generated.
583 * config.in: Re-generated.
584 * server.h: Don't include alloca.h and malloc.h.
585 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
586 Don't include malloc.h.
587
588 2014-11-17 Joel Brobecker <brobecker@adacore.com>
589
590 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
591 corresponding ERRNO check in same block.
592
593 2014-11-12 Pedro Alves <palves@redhat.com>
594
595 * server.c (cont_thread): Update comment.
596 (start_inferior, attach_inferior): No longer clear cont_thread.
597 (handle_v_cont): No longer set cont_thread.
598 (captured_main): Clear cont_thread each time a GDB connects.
599
600 2014-11-12 Pedro Alves <palves@redhat.com>
601
602 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
603 thread, and don't resume all threads if the Hc thread has exited.
604
605 2014-11-12 Pedro Alves <palves@redhat.com>
606
607 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
608 the process group instead of to a specific LWP.
609
610 2014-10-15 Pedro Alves <palves@redhat.com>
611
612 PR server/17487
613 * win32-arm-low.c (arm_set_thread_context): Remove current_event
614 parameter.
615 (arm_set_thread_context): Delete.
616 (the_low_target): Adjust.
617 * win32-i386-low.c (debug_registers_changed)
618 (debug_registers_used): Delete.
619 (update_debug_registers_callback): New function.
620 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
621 needing to update their debug registers.
622 (win32_get_current_dr): New function.
623 (x86_dr_low_get_addr, x86_dr_low_get_control)
624 (x86_dr_low_get_status): Fetch the debug register from the thread
625 record's context.
626 (i386_initial_stuff): Adjust.
627 (i386_get_thread_context): Remove current_event parameter. Don't
628 clear debug_registers_changed nor copy DR values to
629 debug_reg_state.
630 (i386_set_thread_context): Delete.
631 (i386_prepare_to_resume): New function.
632 (i386_thread_added): Mark the thread as needing to update irs
633 debug registers.
634 (the_low_target): Remove i386_set_thread_context and install
635 i386_prepare_to_resume.
636 * win32-low.c (win32_get_thread_context): Adjust.
637 (win32_set_thread_context): Use SetThreadContext
638 directly.
639 (win32_prepare_to_resume): New function.
640 (win32_require_context): New function, factored out from ...
641 (thread_rec): ... this.
642 (continue_one_thread): Call win32_prepare_to_resume on each thread
643 we're about to continue.
644 (win32_resume): Call win32_prepare_to_resume on the event thread.
645 * win32-low.h (struct win32_thread_info)
646 <debug_registers_changed>: New field.
647 (struct win32_target_ops): Change prototype of set_thread_context,
648 delete set_thread_context and add prepare_to_resume.
649 (win32_require_context): New declaration.
650
651 2014-10-08 Gary Benson <gbenson@redhat.com>
652
653 * server.h: Do not include common-exceptions.h.
654
655 2014-10-08 Gary Benson <gbenson@redhat.com>
656
657 * server.h: Do not include cleanups.h.
658
659 2014-09-30 James Hogan <james.hogan@imgtec.com>
660
661 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
662 mips64-dsp-linux.c.
663
664 2014-09-23 Yao Qi <yao@codesourcery.com>
665
666 * linux-low.c (lp_status_maybe_breakpoint): New function.
667 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
668 (count_events_callback): Likewise.
669 (select_event_lwp_callback): Likewise.
670 (cancel_breakpoints_callback): Likewise.
671
672 2014-09-19 Don Breazeal <donb@codesourcery.com>
673
674 * linux-low.c (handle_extended_wait): Call
675 linux_ptrace_get_extended_event.
676 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
677 linux_is_extended_waitstatus.
678
679 2014-09-16 Joel Brobecker <brobecker@adacore.com>
680
681 * Makefile.in (CPPFLAGS): Define.
682 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
683 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
684
685 2014-09-16 Gary Benson <gbenson@redhat.com>
686
687 * inferiors.h (current_inferior): Renamed as...
688 (current_thread): New variable. All uses updated.
689 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
690 (maybe_move_out_of_jump_pad): Likewise.
691 (cancel_breakpoint): Likewise.
692 (linux_low_filter_event): Likewise.
693 (wait_for_sigstop): Likewise.
694 (linux_resume_one_lwp): Likewise.
695 (need_step_over_p): Likewise.
696 (start_step_over): Likewise.
697 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
698 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
699 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
700 and save_inferior as saved_thread.
701 * regcache.c (get_thread_regcache): Renamed saved_inferior as
702 saved_thread.
703 (regcache_invalidate_thread): Likewise.
704 * remote-utils.c (prepare_resume_reply): Likewise.
705 * thread-db.c (thread_db_get_tls_address): Likewise.
706 (disable_thread_event_reporting): Likewise.
707 (remove_thread_event_breakpoints): Likewise.
708 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
709 as saved_thread.
710 * target.h (set_desired_inferior): Renamed as...
711 (set_desired_thread): New declaration. All uses updated.
712 * server.c (myresume): Updated comment to reference thread instead
713 of inferior.
714 (handle_serial_event): Likewise.
715 (handle_target_event): Likewise.
716
717 2014-09-12 Tom Tromey <tromey@redhat.com>
718 Gary Benson <gbenson@redhat.com>
719
720 * regcache.h: Include common-regcache.h.
721 (regcache_read_pc): Don't declare.
722 * regcache.c (get_thread_regcache_for_ptid): New function.
723
724 2014-09-11 Tom Tromey <tromey@redhat.com>
725 Gary Benson <gbenson@redhat.com>
726
727 * symbol.c: New file.
728 * Makefile.in (SFILES): Add symbol.c.
729 (OBS): Add symbol.o.
730
731 2014-09-11 Gary Benson <gbenson@redhat.com>
732
733 * target.c (target_stop_ptid, target_continue_ptid): New
734 functions.
735
736 2014-09-11 Tom Tromey <tromey@redhat.com>
737 Gary Benson <gbenson@redhat.com>
738
739 * target.h: Include target/target.h.
740 * target.c (target_read_memory, target_read_uint32)
741 (target_write_memory): New functions.
742
743 2014-09-11 Gary Benson <gbenson@redhat.com>
744
745 * server.h (debug_hw_points): Don't declare.
746 * server.c (debug_hw_points): Don't define. Replace all uses
747 with show_debug_regs.
748 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
749 all uses with show_debug_regs.
750
751 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
752
753 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
754 endianness into account.
755 (ppc_supply_ptrace_register): Likewise.
756
757 2014-09-03 James Hogan <james.hogan@imgtec.com>
758
759 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
760 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
761
762 2014-09-03 Gary Benson <gbenson@redhat.com>
763
764 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
765 ALL_DEBUG_ADDRESS_REGISTERS.
766
767 2014-09-02 Gary Benson <gbenson@redhat.com>
768
769 * i386-low.h: Renamed as...
770 * x86-low.h: New file. All type, function and variable name
771 prefixes changed from "i386_" to "x86_". All references updated.
772 * i386-low.c: Renamed as...
773 * x86-low.c: New file. All type, function and variable name
774 prefixes changed from "i386_" to "x86_". All references updated.
775
776 2014-09-02 Gary Benson <gbenson@redhat.com>
777
778 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
779 (x86_linux_new_thread): Likewise.
780
781 2014-08-29 Gary Benson <gbenson@redhat.com>
782
783 * server.h (setjmp.h): Do not include.
784 (toplevel): Do not declare.
785 (common-exceptions.h): Include.
786 (cleanups.h): Likewise.
787 * server.c (toplevel): Do not define.
788 (exit_code): New static global.
789 (detach_or_kill_for_exit_cleanup): New function.
790 (main): New function. Original main renamed to...
791 (captured_main): New function.
792 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
793
794 2014-08-29 Gary Benson <gbenson@redhat.com>
795
796 * Makefile.in (SFILES): Add common/common-exceptions.c.
797 (OBS): Add common-exceptions.o.
798 (common-exceptions.o): New rule.
799 * utils.c (prepare_to_throw_exception): New function.
800
801 2014-08-29 Gary Benson <gbenson@redhat.com>
802
803 * config.in: Regenerate.
804 * configure: Likewise.
805
806 2014-08-29 Gary Benson <gbenson@redhat.com>
807
808 * Makefile.in (SFILES): Add common/cleanups.c.
809 (OBS): cleanups.o.
810 (cleanups.o): New rule.
811
812 2014-08-29 Gary Benson <gbenson@redhat.com>
813
814 * utils.c (internal_vwarning): New function.
815
816 2014-08-28 Gary Benson <gbenson@redhat.com>
817
818 * utils.h (fatal): Remove declaration.
819 * utils.c (fatal): Remove function.
820
821 2014-08-28 Gary Benson <gbenson@redhat.com>
822
823 * tracepoint.c (gdb_agent_init): Replace fatal with
824 perror_with_name.
825 (initialize_tracepoint): Likewise.
826
827 2014-08-28 Gary Benson <gbenson@redhat.com>
828
829 * remote-utils.c (remote_prepare): Replace fatal with error.
830
831 2014-08-28 Gary Benson <gbenson@redhat.com>
832
833 * linux-low.c (linux_async): Replace fatal with warning.
834 Tidy up and return.
835 (linux_start_non_stop): Return -1 if linux_async failed.
836
837 2014-08-28 Gary Benson <gbenson@redhat.com>
838
839 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
840 gdb_assert.
841 (i386_dr_low_get_addr): Remove vague comment.
842 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
843 gdb_assert.
844
845 2014-08-28 Gary Benson <gbenson@redhat.com>
846
847 * inferiors.c (get_thread_process): Replace check with gdb_assert.
848 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
849 internal_error.
850 (linux_resume_one_lwp): Likewise.
851 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
852 gdb_assert.
853 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
854 with internal_error.
855 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
856 (init_register_cache): Replace fatal with gdb_assert_not_reached.
857 (find_register_by_name): Replace fatal with internal_error.
858 (find_regno): Likewise.
859 * tdesc.c (init_target_desc): Replace check with gdb_assert.
860 * thread-db.c (thread_db_create_event): Likewise.
861 (thread_db_load_search): Likewise.
862 (try_thread_db_load_1): Likewise.
863 * tracepoint.c (get_jump_space_head): Replace fatal with
864 internal_error.
865 (claim_trampoline_space): Likewise.
866 (have_fast_tracepoint_trampoline_buffer): Likewise.
867 (cmd_qtstart): Likewise.
868 (stop_tracing): Likewise.
869 (fast_tracepoint_collecting): Likewise.
870 (target_malloc): Likewise.
871 (download_tracepoint): Likewise.
872 (download_trace_state_variables): Replace check with gdb_assert.
873 (upload_fast_traceframes): Replace fatal with internal_error.
874
875 2014-08-19 Tom Tromey <tromey@redhat.com>
876 Gary Benson <gbenson@redhat.com>
877
878 * Makefile.in (SFILES): Add common/common-debug.c.
879 (OBS): Add common-debug.o.
880 (common-debug.o): New rule.
881 * debug.h (debug_printf): Don't declare.
882 * debug.c (debug_printf): Renamed and rewritten as...
883 (debug_vprintf): New function.
884
885 2014-08-19 Gary Benson <gbenson@redhat.com>
886
887 * utils.h: Do not include print-utils.h.
888
889 2014-08-19 Tom Tromey <tromey@redhat.com>
890 Gary Benson <gbenson@redhat.com>
891
892 * server.h: Add static assertion.
893 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
894
895 2014-08-19 Tom Tromey <tromey@redhat.com>
896 Gary Benson <gbenson@redhat.com>
897
898 * Makefile.in (SFILES): Add common/errors.c.
899 (OBS): Add errors.o.
900 (IPA_OBS): Add errors-ipa.o.
901 (errors.o): New rule.
902 (errors-ipa.o): Likewise.
903 * utils.h (perror_with_name, error, warning): Don't declare.
904 * utils.c (warning): Renamed and rewritten as...
905 (vwarning): New function.
906 (error): Renamed and rewritten as...
907 (verror): New function.
908 (internal_error): Renamed and rewritten as...
909 (internal_verror): New function.
910
911 2014-08-07 Gary Benson <gbenson@redhat.com>
912
913 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
914 * configure: Regenerate.
915 * config.in: Likewise.
916 * server.h: Do not include errno.h.
917 * event-loop.c: Likewise.
918 * hostio-errno.c: Likewise.
919 * linux-low.c: Likewise.
920 * remote-utils.c: Likewise.
921 * spu-low.c: Likewise.
922 * utils.c: Likewise.
923 * gdbreplay.c: Unconditionally include errno.h.
924
925 2014-08-07 Gary Benson <gbenson@redhat.com>
926
927 * server.h: Do not include string.h.
928 * event-loop.c: Likewise.
929 * linux-low.c: Likewise.
930 * regcache.c: Likewise.
931 * remote-utils.c: Likewise.
932 * spu-low.c: Likewise.
933 * utils.c: Likewise.
934
935 2014-08-07 Gary Benson <gbenson@redhat.com>
936
937 * server.h: Do not include gdb_assert.h.
938
939 2014-08-07 Gary Benson <gbenson@redhat.com>
940
941 * server.h: Do not include common-utils.h.
942
943 2014-08-07 Gary Benson <gbenson@redhat.com>
944
945 * server.h: Do not include ptid.h.
946 * notif.h: Likewise.
947
948 2014-08-07 Gary Benson <gbenson@redhat.com>
949
950 * server.h: Do not include gdb_locale.h.
951
952 2014-08-07 Gary Benson <gbenson@redhat.com>
953
954 * server.h: Do not include gdb/signals.h.
955 * win32-low.c: Likewise.
956
957 2014-08-07 Gary Benson <gbenson@redhat.com>
958
959 * server.h: Do not include pathmax.h.
960
961 2014-08-07 Gary Benson <gbenson@redhat.com>
962
963 * server.h: Do not include libiberty.h.
964 * linux-bfin-low.c: Likewise.
965
966 2014-08-07 Gary Benson <gbenson@redhat.com>
967
968 * server.h: Do not include ansidecl.h.
969
970 2014-08-07 Gary Benson <gbenson@redhat.com>
971
972 * linux-x86-low.c: Do not include stddef.h.
973 * lynx-ppc-low.c: Likewise.
974 * tracepoint.c: Likewise.
975
976 2014-08-07 Gary Benson <gbenson@redhat.com>
977
978 * server.h: Do not include stdarg.h.
979 * nto-low.c: Likewise.
980
981 2014-08-07 Gary Benson <gbenson@redhat.com>
982
983 * server.h: Do not include stdlib.h.
984 * inferiors.c: Likewise.
985 * linux-low.c: Likewise.
986 * regcache.c: Likewise.
987 * spu-low.c: Likewise.
988 * tracepoint.c: Likewise.
989 * utils.c: Likewise.
990
991 2014-08-07 Gary Benson <gbenson@redhat.com>
992
993 * server.h: Do not include stdio.h.
994 * linux-low.c: Likewise.
995 * remote-utils.c: Likewise.
996 * spu-low.c: Likewise.
997 * utils.c: Likewise.
998 * wincecompat.c: Likewise.
999
1000 2014-08-06 Gary Benson <gbenson@redhat.com>
1001
1002 * regcache.c (init_register_cache): Move conditionals inside if.
1003
1004 2014-08-06 Gary Benson <gbenson@redhat.com>
1005
1006 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1007
1008 2014-07-31 Gary Benson <gbenson@redhat.com>
1009
1010 * ax.h: Do not include server.h.
1011 * gdbthread.h: Likewise.
1012 * lynx-low.h: Likewise.
1013 * notif.h: Likewise.
1014
1015 2014-07-30 Gary Benson <gbenson@redhat.com>
1016
1017 * server.h: Include common-defs.h.
1018 Do not include config.h or build-gnulib-gdbserver/config.h.
1019
1020 2014-07-30 Gary Benson <gbenson@redhat.com>
1021
1022 * hostio-errno.c: Move server.h to top of includes list.
1023 * inferiors.c: Likewise.
1024 * linux-x86-low.c: Likewise.
1025 * notif.c: Include server.h.
1026
1027 2014-07-24 Tom Tromey <tromey@redhat.com>
1028 Gary Benson <gbenson@redhat.com>
1029
1030 * server.h (CORE_ADDR): Now unsigned.
1031
1032 2014-07-16 Pedro Alves <palves@redhat.com>
1033
1034 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1035
1036 2014-07-15 Pedro Alves <palves@redhat.com>
1037
1038 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1039 copy.
1040
1041 2014-07-11 Pedro Alves <palves@redhat.com>
1042
1043 * linux-low.c (kill_wait_lwp): New function, based on
1044 kill_one_lwp_callback, but use my_waitpid directly.
1045 (kill_one_lwp_callback, linux_kill): Use it.
1046
1047 2014-06-23 Pedro Alves <palves@redhat.com>
1048
1049 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1050 before setting DR0..DR3.
1051
1052 2014-06-20 Gary Benson <gbenson@redhat.com>
1053
1054 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1055 * configure: Regenerated.
1056 * config.in: Likewise.
1057
1058 2014-06-20 Gary Benson <gbenson@redhat.com>
1059
1060 * Makefile.in (SFILES): Update locations for files moved
1061 from common to nat.
1062 (object file files): Reordered.
1063
1064 2014-06-20 Gary Benson <gbenson@redhat.com>
1065
1066 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1067 (i386_dr_low_set_addr): Likewise.
1068 (i386_dr_low_get_addr): Likewise.
1069 (i386_dr_low_can_set_control): Likewise.
1070 (i386_dr_low_set_control): Likewise.
1071 (i386_dr_low_get_control): Likewise.
1072 (i386_dr_low_get_status): Likewise.
1073 (i386_get_debug_register_length): Likewise.
1074 * linux-x86-low.c (i386_dr_low_set_addr):
1075 Changed signature. Made static.
1076 (i386_dr_low_get_addr): Likewise.
1077 (i386_dr_low_set_control): Likewise.
1078 (i386_dr_low_get_control): Likewise.
1079 (i386_dr_low_get_status): Likewise.
1080 (i386_dr_low): New global variable.
1081 * win32-i386-low.c (i386_dr_low_set_addr):
1082 Changed signature. Made static.
1083 (i386_dr_low_get_addr): Likewise.
1084 (i386_dr_low_set_control): Likewise.
1085 (i386_dr_low_get_control): Likewise.
1086 (i386_dr_low_get_status): Likewise.
1087 (i386_dr_low): New global variable.
1088
1089 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1090
1091 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1092 * Makefile.in (AR, AR_FLAGS): Define.
1093 * configure: Regenerate.
1094
1095 2014-06-19 Gary Benson <gbenson@redhat.com>
1096
1097 * Makefile.in (i386-dregs.o): New rule.
1098 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1099 * i386-low.c (target.h): Remove include.
1100 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1101 (DR_CONTROL_SHIFT): Likewise.
1102 (DR_CONTROL_SIZE): Likewise.
1103 (DR_RW_EXECUTE): Likewise.
1104 (DR_RW_WRITE): Likewise.
1105 (DR_RW_READ): Likewise.
1106 (DR_RW_IORW): Likewise.
1107 (DR_LEN_1): Likewise.
1108 (DR_LEN_2): Likewise.
1109 (DR_LEN_4): Likewise.
1110 (DR_LEN_8): Likewise.
1111 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1112 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1113 (DR_ENABLE_SIZE): Likewise.
1114 (DR_LOCAL_SLOWDOWN): Likewise.
1115 (DR_GLOBAL_SLOWDOWN): Likewise.
1116 (DR_CONTROL_RESERVED): Likewise.
1117 (I386_DR_CONTROL_MASK): Likewise.
1118 (I386_DR_VACANT): Likewise.
1119 (I386_DR_LOCAL_ENABLE): Likewise.
1120 (I386_DR_GLOBAL_ENABLE): Likewise.
1121 (I386_DR_DISABLE): Likewise.
1122 (I386_DR_SET_RW_LEN): Likewise.
1123 (I386_DR_GET_RW_LEN): Likewise.
1124 (I386_DR_WATCH_HIT): Likewise.
1125 (i386_wp_op_t): Likewise.
1126 (i386_show_dr): Likewise.
1127 (i386_length_and_rw_bits): Likewise.
1128 (i386_insert_aligned_watchpoint): Likewise.
1129 (i386_remove_aligned_watchpoint): Likewise.
1130 (i386_handle_nonaligned_watchpoint): Likewise.
1131 i386_update_inferior_debug_regs(): Likewise.
1132 (i386_dr_insert_watchpoint): Likewise.
1133 (i386_dr_remove_watchpoint): Likewise.
1134 (i386_dr_region_ok_for_watchpoint): Likewise.
1135 (i386_dr_stopped_data_address): Likewise.
1136 (i386_dr_stopped_by_watchpoint): Likewise.
1137
1138 2014-06-19 Gary Benson <gbenson@redhat.com>
1139
1140 * i386-low.c (i386_dr_show): Renamed to
1141 i386_show_dr and made static. All uses updated.
1142 (i386_dr_length_and_rw_bits): Renamed to
1143 i386_length_and_rw_bits and made static.
1144 All uses updated.
1145 (i386_dr_insert_aligned_watchpoint): Renamed to
1146 i386_insert_aligned_watchpoint and made static.
1147 All uses updated.
1148 (i386_dr_remove_aligned_watchpoint): Renamed to
1149 i386_remove_aligned_watchpoint and made static.
1150 All uses updated.
1151 (i386_dr_update_inferior_debug_regs): Renamed to
1152 i386_update_inferior_debug_regs and made static.
1153 All uses updated.
1154
1155 2014-06-18 Gary Benson <gbenson@redhat.com>
1156
1157 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1158 (i386_dr_low_can_set_control): Likewise.
1159 (i386_get_debug_register_length): Likewise.
1160 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1161 (i386_dr_low_can_set_control): Likewise.
1162 (i386_get_debug_register_length): Likewise.
1163
1164 2014-06-17 Gary Benson <gbenson@redhat.com>
1165
1166 * i386-low.h (i386-dregs.h): New include.
1167 (DR_FIRSTADDR): Now in i386-dregs.h.
1168 (DR_LASTADDR): Likewise.
1169 (DR_NADDR): Likewise.
1170 (DR_STATUS): Likewise.
1171 (DR_CONTROL): Likewise.
1172 (i386_debug_reg_state): Likewise.
1173 (i386_dr_insert_watchpoint): Likewise.
1174 (i386_dr_remove_watchpoint): Likewise.
1175 (i386_dr_region_ok_for_watchpoint): Likewise.
1176 (i386_dr_stopped_data_address): Likewise.
1177 (i386_dr_stopped_by_watchpoint): Likewise.
1178 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1179
1180 2014-06-18 Gary Benson <gbenson@redhat.com>
1181
1182 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1183 i386_dr_insert_watchpoint.
1184 (i386_low_remove_watchpoint): Renamed to
1185 i386_dr_remove_watchpoint.
1186 (i386_low_region_ok_for_watchpoint): Renamed to
1187 i386_dr_region_ok_for_watchpoint.
1188 (i386_low_stopped_data_address): Renamed to
1189 i386_dr_stopped_data_address.
1190 (i386_low_stopped_by_watchpoint): Renamed to
1191 i386_dr_stopped_by_watchpoint.
1192 * i386-low.c (i386_show_dr): Renamed to
1193 i386_dr_show and made nonstatic. All uses updated.
1194 (i386_length_and_rw_bits): Renamed to
1195 i386_dr_length_and_rw_bits and made nonstatic.
1196 All uses updated.
1197 (i386_insert_aligned_watchpoint): Renamed to
1198 i386_dr_insert_aligned_watchpoint and made nonstatic.
1199 All uses updated.
1200 (i386_remove_aligned_watchpoint): Renamed to
1201 i386_dr_remove_aligned_watchpoint and made nonstatic.
1202 All uses updated.
1203 (i386_update_inferior_debug_regs): Renamed to
1204 i386_dr_update_inferior_debug_regs and made nonstatic.
1205 All uses updated.
1206 (i386_low_insert_watchpoint): Renamed to
1207 i386_dr_insert_watchpoint. All uses updated.
1208 (i386_low_remove_watchpoint): Renamed to
1209 i386_dr_remove_watchpoint. All uses updated.
1210 (i386_low_region_ok_for_watchpoint): Renamed to
1211 i386_dr_region_ok_for_watchpoint. All uses updated.
1212 (i386_low_stopped_data_address): Renamed to
1213 i386_dr_stopped_data_address. All uses updated.
1214 (i386_low_stopped_by_watchpoint): Renamed to
1215 i386_dr_stopped_by_watchpoint. All uses updated.
1216
1217 2014-06-18 Gary Benson <gbenson@redhat.com>
1218
1219 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1220 (i386_dr_low_can_set_control): Likewise.
1221 (i386_insert_aligned_watchpoint): New check.
1222
1223 2014-06-18 Gary Benson <gbenson@redhat.com>
1224
1225 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1226 Renamed to state.
1227
1228 2014-06-18 Gary Benson <gbenson@redhat.com>
1229
1230 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1231 instead of fatal and error.
1232 (i386_handle_nonaligned_watchpoint): Likewise.
1233
1234 2014-06-18 Gary Benson <gbenson@redhat.com>
1235
1236 * i386-low.c (i386_get_debug_register_length): New macro.
1237 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1238 (i386_show_dr): Use debug_printf instead of fprintf. Use
1239 phex to format values.
1240
1241 2014-06-18 Gary Benson <gbenson@redhat.com>
1242
1243 * i386-low.h: Comment changes.
1244 * i386-low.c: Likewise.
1245
1246 2014-06-18 Gary Benson <gbenson@redhat.com>
1247
1248 * i386-low.c: Whitespace changes.
1249
1250 2014-06-12 Tom Tromey <tromey@redhat.com>
1251
1252 * utils.c (freeargv): Remove.
1253
1254 2014-06-12 Tom Tromey <tromey@redhat.com>
1255
1256 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1257 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1258 (parse_debug_format_options): Likewise.
1259 (gdbserver_usage): Likewise.
1260 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1261 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1262 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1263 against libiberty.
1264 ($(LIBGNU)): Depend on libiberty.
1265 (all-lib): Recurse into all subdirs.
1266 (install-only): Invoke "install" target in subdirs.
1267 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1268 targets.
1269 * configure: Rebuild.
1270 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1271 for vasprintf, vsnprintf, or gettimeofday.
1272 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1273 srv_tgtobj.
1274
1275 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1276
1277 * development.sh: Delete.
1278 * Makefile.in (config.status): Adjust dependency on development.sh.
1279 * configure.ac: Adjust development.sh source call.
1280 * configure: Regenerate.
1281
1282 2014-06-02 Pedro Alves <palves@redhat.com>
1283
1284 * ax.c (gdb_free_agent_expr): New function.
1285 * ax.h (gdb_free_agent_expr): New declaration.
1286 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1287 list.
1288 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1289 static.
1290 (clear_breakpoint_conditions_and_commands): New function.
1291 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1292 (clear_breakpoint_conditions_and_commands): New declaration.
1293
1294 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1295
1296 * linux-aarch64-low.c (asm/ptrace.h): Include.
1297
1298 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1299
1300 Fix TLS access for -static -pthread.
1301 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1302 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1303 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1304
1305 2014-05-20 Pedro Alves <palves@redhat.com>
1306
1307 * linux-aarch64-low.c (aarch64_insert_point)
1308 (aarch64_remove_point): No longer check whether the type is
1309 supported here. Adjust to new interface.
1310 (the_low_target): Install aarch64_supports_z_point_type as
1311 supports_z_point_type method.
1312 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1313 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1314 instead of a Z packet char. Adjust.
1315 (arm_supports_z_point_type): New function.
1316 (arm_insert_point, arm_remove_point): Adjust to new interface.
1317 (the_low_target): Install arm_supports_z_point_type.
1318 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1319 (cris_insert_point, cris_remove_point): Adjust to new interface.
1320 Don't check whether the type is supported here.
1321 (the_low_target): Install cris_supports_z_point_type.
1322 * linux-low.c (linux_supports_z_point_type): New function.
1323 (linux_insert_point, linux_remove_point): Adjust to new interface.
1324 * linux-low.h (struct linux_target_ops) <insert_point,
1325 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1326 raw_breakpoint pointer parameter.
1327 <supports_z_point_type>: New method.
1328 * linux-mips-low.c (mips_supports_z_point_type): New function.
1329 (mips_insert_point, mips_remove_point): Adjust to new interface.
1330 Use mips_supports_z_point_type.
1331 (the_low_target): Install mips_supports_z_point_type.
1332 * linux-ppc-low.c (the_low_target): Install NULL as
1333 supports_z_point_type method.
1334 * linux-s390-low.c (the_low_target): Install NULL as
1335 supports_z_point_type method.
1336 * linux-sparc-low.c (the_low_target): Install NULL as
1337 supports_z_point_type method.
1338 * linux-x86-low.c (x86_supports_z_point_type): New function.
1339 (x86_insert_point): Adjust to new insert_point interface. Use
1340 insert_memory_breakpoint. Adjust to new
1341 i386_low_insert_watchpoint interface.
1342 (x86_remove_point): Adjust to remove_point interface. Use
1343 remove_memory_breakpoint. Adjust to new
1344 i386_low_remove_watchpoint interface.
1345 (the_low_target): Install x86_supports_z_point_type.
1346 * lynx-low.c (lynx_target_ops): Install NULL as
1347 supports_z_point_type callback.
1348 * nto-low.c (nto_supports_z_point_type): New.
1349 (nto_insert_point, nto_remove_point): Adjust to new interface.
1350 (nto_target_ops): Install nto_supports_z_point_type.
1351 * mem-break.c: Adjust intro comment.
1352 (struct raw_breakpoint) <raw_type, size>: New fields.
1353 <inserted>: Update comment.
1354 <shlib_disabled>: Delete field.
1355 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1356 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1357 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1358 (raw_bkpt_type_to_target_hw_bp_type): New function.
1359 (find_enabled_raw_code_breakpoint_at): New function.
1360 (find_raw_breakpoint_at): New type and size parameters. Use them.
1361 (insert_memory_breakpoint): New function, based off
1362 set_raw_breakpoint_at.
1363 (remove_memory_breakpoint): New function.
1364 (set_raw_breakpoint_at): Reimplement.
1365 (set_breakpoint): New, based on set_breakpoint_at.
1366 (set_breakpoint_at): Reimplement.
1367 (delete_raw_breakpoint): Go through the_target->remove_point
1368 instead of assuming memory breakpoints.
1369 (find_gdb_breakpoint_at): Delete.
1370 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1371 (find_gdb_breakpoint): New function.
1372 (set_gdb_breakpoint_at): Delete.
1373 (z_type_supported): New function.
1374 (set_gdb_breakpoint_1): New function, loosely based off
1375 set_gdb_breakpoint_at.
1376 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1377 (delete_gdb_breakpoint_at): Delete.
1378 (delete_gdb_breakpoint_1): New function, loosely based off
1379 delete_gdb_breakpoint_at.
1380 (delete_gdb_breakpoint): New function.
1381 (clear_gdb_breakpoint_conditions): Rename to ...
1382 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1383 breakpoint.
1384 (add_condition_to_breakpoint): Make static.
1385 (add_breakpoint_condition): Take a struct breakpoint pointer
1386 instead of an address. Adjust.
1387 (gdb_condition_true_at_breakpoint): Rename to ...
1388 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1389 z_type parameter.
1390 (gdb_condition_true_at_breakpoint): Reimplement.
1391 (add_breakpoint_commands): Take a struct breakpoint pointer
1392 instead of an address. Adjust.
1393 (gdb_no_commands_at_breakpoint): Rename to ...
1394 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1395 parameter. Return true if no breakpoint was found. Change debug
1396 output.
1397 (gdb_no_commands_at_breakpoint): Reimplement.
1398 (run_breakpoint_commands): Rename to ...
1399 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1400 and change return type to boolean.
1401 (run_breakpoint_commands): New function.
1402 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1403 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1404 breakpoint. Go through the_target->remove_point instead of
1405 assuming memory breakpoint.
1406 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1407 software and hardware breakpoints.
1408 (reinsert_raw_breakpoint): Go through the_target->insert_point
1409 instead of assuming memory breakpoint.
1410 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1411 software and hardware breakpoints.
1412 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1413 Check both software and hardware breakpoints.
1414 (validate_inserted_breakpoint): Assert the breakpoint is a
1415 software breakpoint. Set the inserted flag to -1 instead of
1416 setting shlib_disabled.
1417 (delete_disabled_breakpoints): Adjust.
1418 (validate_breakpoints): Only validate software breakpoints.
1419 Adjust to inserted flag change.
1420 (check_mem_read, check_mem_write): Skip breakpoint types other
1421 than software breakpoints. Adjust to inserted flag change.
1422 * mem-break.h (enum raw_bkpt_type): New enum.
1423 (raw_breakpoint, struct process_info): Forward declare.
1424 (Z_packet_to_target_hw_bp_type): Delete declaration.
1425 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1426 (set_gdb_breakpoint, delete_gdb_breakpoint)
1427 (clear_breakpoint_conditions): New declarations.
1428 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1429 (breakpoint_inserted_here): Update comment.
1430 (add_breakpoint_condition, add_breakpoint_commands): Replace
1431 address parameter with a breakpoint pointer parameter.
1432 (gdb_breakpoint_here): Update comment.
1433 (delete_gdb_breakpoint_at): Delete.
1434 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1435 * server.c (process_point_options): Take a struct breakpoint
1436 pointer instead of an address. Adjust.
1437 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1438 delete_gdb_breakpoint.
1439 * spu-low.c (spu_target_ops): Install NULL as
1440 supports_z_point_type method.
1441 * target.h: Include mem-break.h.
1442 (struct target_ops) <prepare_to_access_memory>: Update comment.
1443 <supports_z_point_type>: New field.
1444 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1445 instead of a char. Also take a raw breakpoint pointer.
1446 * win32-arm-low.c (the_low_target): Install NULL as
1447 supports_z_point_type.
1448 * win32-i386-low.c (i386_supports_z_point_type): New function.
1449 (i386_insert_point, i386_remove_point): Adjust to new interface.
1450 (the_low_target): Install i386_supports_z_point_type.
1451 * win32-low.c (win32_supports_z_point_type): New function.
1452 (win32_insert_point, win32_remove_point): Adjust to new interface.
1453 (win32_target_ops): Install win32_supports_z_point_type.
1454 * win32-low.h (struct win32_target_ops):
1455 <supports_z_point_type>: New method.
1456 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1457 instead of a char. Also take a raw breakpoint pointer.
1458
1459 2014-05-20 Pedro Alves <palves@redhat.com>
1460
1461 * mem-break.h: Include break-common.h.
1462 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1463 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1464 (Z_packet_to_target_hw_bp_type): New declaration.
1465 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1466 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1467 (Z_PACKET_ACCESS_WP): Delete macros.
1468 (Z_packet_to_hw_type): Delete function.
1469 * i386-low.h: Don't include break-common.h here.
1470 (Z_packet_to_hw_type): Delete declaration.
1471 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1472 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1473 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1474 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1475 * linux-aarch64-low.c: Don't include break-common.h here.
1476 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1477 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1478 (Z_packet_to_target_hw_bp_type): Delete function.
1479 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1480 function.
1481 (mips_insert_point, mips_remove_point): Use
1482 Z_packet_to_target_hw_bp_type.
1483
1484 2014-05-20 Pedro Alves <palves@redhat.com>
1485
1486 * linux-aarch64-low.c: Include break-common.h.
1487 (enum target_point_type): Delete.
1488 (Z_packet_to_point_type): Rename to ...
1489 (Z_packet_to_target_hw_bp_type): ... this, and return a
1490 target_hw_bp_type instead.
1491 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1492 instead of an enum target_point_type.
1493 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1494 breakpoint type.
1495 (aarch64_dr_state_insert_one_point)
1496 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1497 (aarch64_handle_aligned_watchpoint)
1498 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1499 Take an enum target_hw_bp_type instead of an enum
1500 target_point_type.
1501 (aarch64_supports_z_point_type): New function.
1502 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1503 use Z_packet_to_target_hw_bp_type.
1504
1505 2014-05-20 Joel Brobecker <brobecker@adacore.com>
1506
1507 * configure.ac: Only use -Werror by default when DEVELOPMENT
1508 is true.
1509 * configure: Regenerate.
1510
1511 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1512
1513 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1514 * linux-x86-low.c (X86_64_USER_REGS): New.
1515 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1516
1517 2014-04-28 Yao Qi <yao@codesourcery.com>
1518
1519 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1520 name.
1521
1522 2014-04-25 Pedro Alves <palves@redhat.com>
1523
1524 PR server/16255
1525 * linux-low.c (linux_attach_fail_reason_string): New function.
1526 (linux_attach_lwp): Delete.
1527 (linux_attach_lwp_1): Rename to ...
1528 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1529 argument. Remove "initial" parameter. Return int instead of
1530 void. Don't error or warn here.
1531 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1532 failure to attach to the tgid. Call warning when failing to
1533 attach to an lwp.
1534 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1535 argument. Remove "initial" parameter. Return int instead of
1536 void. Don't error or warn here.
1537 (linux_attach_fail_reason_string): New declaration.
1538 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1539 interface change. Use linux_attach_fail_reason_string.
1540
1541 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
1542 Walfred Tedeschi <walfred.tedeschi@intel.com>
1543
1544 * Makefile.in: Added rules to handle new files
1545 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1546 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1547 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1548 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1549 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1550 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1551 x32-avx512-linux.o.
1552 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1553 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1554 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1555 i386/x32-avx512.xml.
1556 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1557 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1558 i386/x32-avx512-linux.xml.
1559 * i387-fp.c (num_avx512_k_registers): New constant for number
1560 of K registers.
1561 (num_avx512_zmmh_low_registers): New constant for number of
1562 lower ZMM registers (0-15).
1563 (num_avx512_zmmh_high_registers): New constant for number of
1564 higher ZMM registers (16-31).
1565 (num_avx512_ymmh_registers): New contant for number of higher
1566 YMM registers (ymm16-31 added by avx521 on x86_64).
1567 (num_avx512_xmm_registers): New constant for number of higher
1568 XMM registers (xmm16-31 added by AVX512 on x86_64).
1569 (struct i387_xsave): Add space for AVX512 registers.
1570 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1571 Add code to handle AVX512 registers.
1572 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1573 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1574 prototypei from generated file.
1575 (tdesc_amd64_avx512_linux): Likewise.
1576 (init_registers_x32_avx512_linux): Likewise.
1577 (tdesc_x32_avx512_linux): Likewise.
1578 (init_registers_i386_avx512_linux): Likewise.
1579 (tdesc_i386_avx512_linux): Likewise.
1580 (x86_64_regmap): Add AVX512 registers.
1581 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1582 mask.
1583 (initialize_low_arch): Add code to initialize AVX512 registers.
1584
1585 2014-04-23 Pedro Alves <palves@redhat.com>
1586
1587 * mem-break.c (find_gdb_breakpoint_at): Make static.
1588 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1589
1590 2014-04-23 Pedro Alves <palves@redhat.com>
1591
1592 * i386-low.c: Don't include break-common.h here.
1593 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1594 prototype to take target_hw_bp_type as argument instead of a Z
1595 packet char.
1596 * i386-low.h: Include break-common.h here.
1597 (Z_packet_to_hw_type): Declare.
1598 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1599 prototypes.
1600 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1601 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1602 (x86_remove_point): Convert the packet number to a
1603 target_hw_bp_type before calling i386_low_remove_watchpoint.
1604 * win32-i386-low.c (i386_insert_point): Convert the packet number
1605 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1606 (i386_remove_point): Convert the packet number to a
1607 target_hw_bp_type before calling i386_low_remove_watchpoint.
1608
1609 2014-04-23 Pedro Alves <palves@redhat.com>
1610
1611 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1612
1613 2014-04-10 Pedro Alves <palves@redhat.com>
1614
1615 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1616 Check if the condition or command is NULL before checking if the
1617 breakpoint is known. On success, return true.
1618 * mem-break.h (add_breakpoint_condition): Document return.
1619 (add_breakpoint_commands): Add describing comment.
1620 * server.c (skip_to_semicolon): New function.
1621 (process_point_options): Use it.
1622
1623 2014-04-09 Pedro Alves <palves@redhat.com>
1624
1625 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1626 to lwpid_of.
1627
1628 2014-02-27 Pedro Alves <palves@redhat.com>
1629
1630 PR 12702
1631 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1632 macros.
1633 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1634 output.
1635 (last_thread_of_process_p): Take a PID argument instead of a
1636 thread pointer.
1637 (linux_wait_for_lwp): Delete.
1638 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1639 functions.
1640 (linux_low_filter_event): New function, party factored out from
1641 linux_wait_for_event.
1642 (linux_wait_for_event): Rename to ...
1643 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1644 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1645 sigsuspend. Check for zombie leaders.
1646 (linux_wait_for_event): Reimplement as wrapper around
1647 linux_wait_for_event_filtered.
1648 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1649 a normal or signal exit is seen, it's the whole process exiting.
1650 (wait_for_sigstop): No longer a for_each_inferior callback.
1651 Rewrite on top of linux_wait_for_event_filtered.
1652 (stop_all_lwps): Call wait_for_sigstop directly.
1653 * server.c (resume, handle_target_event): Handle
1654 TARGET_WAITKIND_NO_RESUMED.
1655
1656 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1657
1658 * win32-low.c (psapi_get_dll_name,
1659 * win32_CreateToolhelp32Snapshot): Delete.
1660 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1661 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1662 Delete.
1663 (handle_load_dll): Add function description.
1664 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1665
1666 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1667
1668 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1669 Add comment.
1670 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1671 base address when calling win32_add_one_solib.
1672 (handle_load_dll): Delete local variable load_addr.
1673 Remove 0x1000 offset applied to DLL base address when calling
1674 win32_add_one_solib.
1675 (handle_unload_dll): Add comment.
1676
1677 2014-02-26 Joel Brobecker <brobecker@adacore.com>
1678
1679 * win32-low.c (win32_add_all_dlls): Renames
1680 win32_ensure_ntdll_loaded. Rewrite function documentation.
1681 Adjust implementation to always load all DLLs.
1682 Add 0x1000 offset to DLL base address when calling
1683 win32_add_one_solib.
1684 (child_initialization_done): New static global.
1685 (do_initial_child_stuff): Set child_initialization_done to
1686 zero during child initialization, and 1 after. Replace call
1687 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1688 Add comment.
1689 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1690 (handle_unload_dll): Add function documentation.
1691 (get_child_debug_event): Ignore load and unload DLL events
1692 during child initialization.
1693
1694 2014-02-20 Doug Evans <dje@google.com>
1695
1696 Remove global all_lwps.
1697 * inferiors.h (ptid_of): Move here from linux-low.h.
1698 (pid_of, lwpid_of): Ditto.
1699 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1700 parameter is a struct thread_info * now.
1701 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1702 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1703 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1704 directly.
1705 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1706 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1707 * linux-arm-low.c (update_registers_callback): Update, "entry"
1708 parameter is a struct thread_info * now.
1709 Fetch lwpid from current_inferior directly.
1710 (arm_insert_point): Pass &all_threads to find_inferior instead of
1711 &all_lwps.
1712 (arm_remove_point): Ditto.
1713 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1714 (arm_prepare_to_resume): Fetch pid from thread.
1715 (arm_read_description): Fetch lwpid from current_inferior directly.
1716 * linux-low.c (all_lwps): Delete.
1717 (delete_lwp): Delete call to remove_inferior.
1718 (handle_extended_wait): Fetch lwpid from thread.
1719 (add_lwp): Don't set lwp->entry.id. Remove call to
1720 add_inferior_to_list.
1721 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1722 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1723 (kill_one_lwp_callback): Ditto.
1724 (linux_kill): Don't dereference NULL pointer.
1725 Fetch ptid,lwpid from thread.
1726 (get_detach_signal): Fetch ptid from thread.
1727 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1728 Simplify call to regcache_invalidate_thread.
1729 (delete_lwp_callback): Update, "entry" parameter is a
1730 struct thread_info * now. Fetch pid from thread.
1731 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1732 (status_pending_p_callback): Update, "entry" parameter is a
1733 struct thread_info * now. Fetch ptid from thread.
1734 (find_lwp_pid): Update, "entry" parameter is a
1735 struct thread_info * now.
1736 (linux_wait_for_lwp): Fetch pid from thread.
1737 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1738 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1739 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1740 (dequeue_one_deferred_signal): Ditto.
1741 (cancel_breakpoint): Fetch ptid from current_inferior.
1742 (linux_wait_for_event): Pass &all_threads to find_inferior,
1743 not &all_lwps. Fetch ptid, lwpid from thread.
1744 (count_events_callback): Update, "entry" parameter is a
1745 struct thread_info * now.
1746 (select_singlestep_lwp_callback): Ditto.
1747 (select_event_lwp_callback): Ditto.
1748 (cancel_breakpoints_callback): Ditto.
1749 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1750 not &all_lwps.
1751 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1752 (unsuspend_one_lwp): Update, "entry" parameter is a
1753 struct thread_info * now.
1754 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1755 not &all_lwps.
1756 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1757 Fetch lwpid from thread, not lwp.
1758 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1759 Pass &all_threads to find_inferior, not &all_lwps.
1760 (send_sigstop): Fetch lwpid from thread, not lwp.
1761 (send_sigstop_callback): Update, "entry" parameter is a
1762 struct thread_info * now.
1763 (suspend_and_send_sigstop_callback): Ditto.
1764 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1765 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1766 struct thread_info * now.
1767 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1768 from thread, lwp.
1769 (lwp_running): Update, "entry" parameter is a
1770 struct thread_info * now.
1771 (stop_all_lwps): Fetch ptid from thread.
1772 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1773 (linux_resume_one_lwp): Fetch lwpid from thread.
1774 (linux_set_resume_request): Update, "entry" parameter is a
1775 struct thread_info * now. Fetch pid, lwpid from thread.
1776 (resume_status_pending_p): Update, "entry" parameter is a
1777 struct thread_info * now.
1778 (need_step_over_p): Ditto. Fetch lwpid from thread.
1779 (start_step_over): Fetch lwpid from thread.
1780 (linux_resume_one_thread): Update, "entry" parameter is a
1781 struct thread_info * now. Fetch lwpid from thread.
1782 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1783 (proceed_one_lwp): Update, "entry" parameter is a
1784 struct thread_info * now. Fetch lwpid from thread.
1785 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1786 struct thread_info * now.
1787 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1788 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1789 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1790 directly.
1791 (regsets_store_inferior_registers): Ditto.
1792 (fetch_register, store_register): Ditto.
1793 (linux_read_memory, linux_write_memory): Ditto.
1794 (linux_request_interrupt): Ditto.
1795 (linux_read_auxv): Ditto.
1796 (linux_xfer_siginfo): Ditto.
1797 (linux_qxfer_spu): Ditto.
1798 (linux_qxfer_libraries_svr4): Ditto.
1799 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1800 moved to inferiors.h.
1801 (get_lwp): Delete.
1802 (get_thread_lwp): Update.
1803 (struct lwp_info): Delete member "entry". Simplify comment for
1804 member "thread".
1805 (all_lwps): Delete.
1806 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1807 current_inferior directly.
1808 (update_watch_registers_callback): Update, "entry" parameter is a
1809 struct thread_info * now. Fetch pid from thread.
1810 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1811 (mips_insert_point): Fetch lwpid from current_inferior.
1812 Pass &all_threads to find_inferior, not &all_lwps.
1813 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1814 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1815 directly.
1816 (mips_stopped_data_address): Ditto.
1817 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1818 directly.
1819 * linux-tile-low.c (tile_arch_setup): Ditto.
1820 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1821 (update_debug_registers_callback): Update, "entry" parameter is a
1822 struct thread_info * now. Fetch pid from thread.
1823 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1824 Pass &all_threads to find_inferior, not &all_lwps.
1825 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1826 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1827 Pass &all_threads to find_inferior, not &all_lwps.
1828 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1829 (i386_dr_low_get_status): Ditto.
1830 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1831 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1832 (x86_linux_read_description): Ditto.
1833 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1834
1835 2014-02-20 Doug Evans <dje@google.com>
1836
1837 * inferiors.c (get_first_inferior): Fix buglet.
1838
1839 2014-02-19 Doug Evans <dje@google.com>
1840
1841 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1842 * inferiors.c (add_thread): Change result type to struct thread_info *.
1843 All callers updated.
1844 (add_lwp): Call add_thread here instead of in callers.
1845 All callers updated.
1846 * linux-low.h (get_lwp_thread): Rewrite.
1847 (struct lwp_info): New member "thread".
1848
1849 2014-02-19 Doug Evans <dje@google.com>
1850
1851 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1852 All callers updated.
1853
1854 2014-02-19 Doug Evans <dje@google.com>
1855
1856 * inferiors.c (add_thread): Fix whitespace.
1857
1858 2014-02-19 Doug Evans <dje@google.com>
1859
1860 * dll.c (clear_dlls): Replace accessing list implemention details
1861 with API function.
1862 * gdbthread.h (get_first_thread): Declare.
1863 * inferiors.c (for_each_inferior_with_data): New function.
1864 (get_first_thread): New function.
1865 (find_thread_ptid): Simplify.
1866 (get_first_inferior): New function.
1867 (clear_list): Delete.
1868 (one_inferior_p): New function.
1869 (clear_inferior_list): New function.
1870 (clear_inferiors): Update.
1871 * inferiors.h (for_each_inferior_with_data): Declare.
1872 (clear_inferior_list): Declare.
1873 (one_inferior_p): Declare.
1874 (get_first_inferior): Declare.
1875 * linux-low.c (linux_wait_for_event): Replace accessing list
1876 implemention details with API function.
1877 * server.c (target_running): Ditto.
1878 (accumulate_file_name_length): New function.
1879 (emit_dll_description): New function.
1880 (handle_qxfer_libraries): Replace accessing list implemention
1881 details with API function.
1882 (handle_qxfer_threads_worker): New function.
1883 (handle_qxfer_threads_proper): Replace accessing list implemention
1884 details with API function.
1885 (handle_query): Ditto.
1886 (visit_actioned_threads_callback_ftype): New typedef.
1887 (visit_actioned_threads_data): New struct.
1888 (visit_actioned_threads): Rewrite to be find_inferior callback.
1889 (resume): Call find_inferior.
1890 (handle_status): Replace accessing list implemention
1891 details with API function.
1892 (process_serial_event): Replace accessing list implemention details
1893 with API function.
1894 * target.c (set_desired_inferior): Replace accessing list implemention
1895 details with API function.
1896 * tracepoint.c (same_process_p): New function.
1897 (gdb_agent_about_to_close): Replace accessing list implemention
1898 details with API function.
1899 * win32-low.c (child_delete_thread): Replace accessing list
1900 implemention details with API function.
1901 (match_dll_by_basename): New function.
1902 (dll_is_loaded_by_basename): New function.
1903 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1904 details call to dll_is_loaded_by_basename.
1905
1906 2014-02-19 Doug Evans <dje@google.com>
1907
1908 * dll.h (struct dll_info): Add comment.
1909 * gdbthread.h (struct thread_info): Add comment.
1910 (current_ptid): Simplify.
1911 * inferiors.c (add_process): Update.
1912 (remove_process): Update.
1913 * inferiors.h (struct process_info): Rename member "head" to "entry".
1914 * linux-low.c (delete_lwp): Update.
1915 (add_lwp): Update.
1916 (last_thread_of_process_p): Update.
1917 (kill_one_lwp_callback, linux_kill): Update.
1918 (status_pending_p_callback): Update.
1919 (wait_for_sigstop): Update. Simplify read of ptid.
1920 (start_step_over): Update.
1921 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1922 (get_lwp_thread): Update.
1923 (struct lwp_info): Rename member "head" to "entry".
1924 * regcache.h (inferior_list_entry): Delete.
1925 * server.c (kill_inferior_callback): Update.
1926 (detach_or_kill_inferior_callback): Update.
1927 (print_started_pid): Update.
1928 (print_attached_pid): Update.
1929 (process_serial_event): Simplify read of ptid.
1930 * thread-db.c (thread_db_create_event): Update.
1931 (thread_db_get_tls_address): Update.
1932 * win32-low.c (current_inferior_ptid): Simplify.
1933
1934 2014-02-19 Tom Tromey <tromey@redhat.com>
1935
1936 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1937 argument.
1938 (target_supports_btrace): Update.
1939
1940 2014-02-14 Yao Qi <yao@codesourcery.com>
1941
1942 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1943 (rsp-low-ipa.o): New target.
1944
1945 2014-02-12 Tom Tromey <tromey@redhat.com>
1946
1947 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1948 convert_ascii_to_int.
1949 * regcache.c (registers_to_string): Likewise.
1950 * remote-utils.c (decode_M_packet): Likewise.
1951 * server.c (process_serial_event): Likewise.
1952
1953 2014-02-12 Tom Tromey <tromey@redhat.com>
1954
1955 * server.c (handle_query, handle_v_run): Use hex2bin, not
1956 unhexify.
1957 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1958
1959 2014-02-12 Tom Tromey <tromey@redhat.com>
1960
1961 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1962 convert_int_to_ascii.
1963 * regcache.c (registers_to_string, collect_register_as_string):
1964 Likewise.
1965 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1966 Likewise.
1967 * server.c (process_serial_event): Likewise.
1968 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1969 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1970
1971 2014-02-12 Tom Tromey <tromey@redhat.com>
1972
1973 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1974 bin2hex, not hexify.
1975 * tracepoint.c (cmd_qtstatus): Likewise.
1976
1977 2014-02-12 Tom Tromey <tromey@redhat.com>
1978
1979 * remote-utils.c (monitor_output): Pass explicit length to
1980 hexify.
1981
1982 2014-02-12 Tom Tromey <tromey@redhat.com>
1983
1984 * tracepoint.c: Include rsp-low.h.
1985 * server.c: Include rsp-low.h.
1986 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1987 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1988 declare.
1989 * remote-utils.c: Include rsp-low.h.
1990 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1991 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1992 (convert_int_to_ascii, convert_ascii_to_int): Move to
1993 common/rsp-low.c.
1994 * regcache.c: Include rsp-low.h.
1995 * ax.c: Include rsp-low.h.
1996 * Makefile.in (SFILES): Add common/rsp-low.c.
1997 (OBS): Add rsp-low.o.
1998 (rsp-low.o): New target.
1999
2000 2014-02-12 Tom Tromey <tromey@redhat.com>
2001
2002 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2003 Include print-utils.h.
2004 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2005 (plongest, thirty_two, phex_nz): Remove.
2006 * Makefile.in (SFILES): Add common/print-utils.c.
2007 (OBS): Add print-utils.o.
2008 (print-utils-ipa.o): New target.
2009 (print-utils.o): New target.
2010 (IPA_OBJS): Add print-utils-ipa.o.
2011
2012 2014-02-06 Tom Tromey <tromey@redhat.com>
2013
2014 * Makefile.in (SFILES): Fix indentation.
2015
2016 2014-02-05 Doug Evans <dje@google.com>
2017
2018 * linux-low.c (linux_wait_for_event): Improve comment.
2019 (linux_wait_1): Keep current_inferior in sync with event_child.
2020
2021 2014-01-22 Doug Evans <dje@google.com>
2022
2023 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2024
2025 2014-01-22 Doug Evans <dje@google.com>
2026
2027 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2028 * configure: Regenerate.
2029 * config.in: Regenerate.
2030 * Makefile.in (SFILES): Add debug.c.
2031 (OBS): Add debug.o.
2032 * debug.c: New file.
2033 * debug.h: New file.
2034 * linux-aarch64-low.c (*): Update all debugging printfs to use
2035 debug_printf instead of fprintf.
2036 * linux-arm-low.c (*): Ditto.
2037 * linux-cris-low.c (*): Ditto.
2038 * linux-crisv32-low.c (*): Ditto.
2039 * linux-m32r-low.c (*): Ditto.
2040 * linux-sparc-low.c (*): Ditto.
2041 * linux-x86.c (*): Ditto.
2042 * linux-low.c (*): Ditto.
2043 (linux_wait_1): Add calls to debug_enter, debug_exit.
2044 (linux_wait): Remove redundant debugging printf.
2045 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2046 (linux_resume, unstop_all_lwps): Ditto.
2047 * mem-break.c (*): Update all debugging printfs to use
2048 debug_printf instead of fprintf.
2049 * remote-utils.c (*): Ditto.
2050 * thread-db.c (*): Ditto.
2051 * server.c #include <ctype.h>, "gdb_vecs.h".
2052 (debug_threads): Moved to debug.c.
2053 (*): Update all debugging printfs to use debug_printf instead of
2054 fprintf.
2055 (start_inferior): Replace call to fflush with call to debug_flush.
2056 (monitor_show_help): Mention set debug-format.
2057 (parse_debug_format_options): New function.
2058 (handle_monitor_command): Handle "monitor set debug-format".
2059 (gdbserver_usage): Mention --debug-format.
2060 (main): Parse --debug-format.
2061 * server.h (debug_threads): Declaration moved to debug.h.
2062 #include "debug.h".
2063 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2064 trace_debug_1 that uses debug_printf.
2065 (tracepoint_look_up_symbols): Update all debugging printfs to use
2066 debug_printf instead of fprintf.
2067
2068 2014-01-20 Baruch Siach <baruch@tkos.co.il>
2069
2070 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2071 sys/ptrace.h.
2072
2073 2014-01-17 Pedro Alves <palves@redhat.com>
2074
2075 PR build/16445
2076 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2077 defined after including gdb_proc_service.h.
2078
2079 2014-01-16 Doug Evans <dje@google.com>
2080
2081 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2082 (match_dll): Use it.
2083
2084 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2085
2086 * target.h (target_ops) <read_btrace>: Change parameters and
2087 return type to allow error reporting.
2088 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2089 trace reading errors on.
2090 * linux-low.c (linux_low_read_btrace): Pass trace reading
2091 errors on.
2092 (linux_low_disable_btrace): New.
2093
2094 2014-01-15 Doug Evans <dje@google.com>
2095
2096 * inferiors.c (thread_id_to_gdb_id): Delete.
2097 * inferiors.h (thread_id_to_gdb_id): Delete.
2098
2099 2014-01-13 Eli Zaretskii <eliz@gnu.org>
2100
2101 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2102 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2103 versions.
2104
2105 2014-01-08 Pedro Alves <palves@redhat.com>
2106
2107 * server.c (handle_status): Don't discard previous queued stop
2108 replies or thread's pending status here.
2109 (main) <disconnection>: Do it here instead.
2110
2111 2014-01-08 Pedro Alves <palves@redhat.com>
2112
2113 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2114 * server.c (visit_actioned_threads, handle_pending_status): New
2115 function.
2116 (handle_v_cont): Factor out parts to ...
2117 (resume): ... this new function. If in all-stop, and a thread
2118 being resumed has a pending status, report it without actually
2119 resuming.
2120 (myresume): Adjust to use the new 'resume' function.
2121 (clear_pending_status_callback, set_pending_status_callback)
2122 (find_status_pending_thread_callback): New functions.
2123 (handle_status): Handle the case of multiple threads having
2124 interesting statuses to report. Report threads' real last signal
2125 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2126 with an interesting thread to report the status for, instead of
2127 always reporting the status of the first thread.
2128
2129 2014-01-01 Joel Brobecker <brobecker@adacore.com>
2130
2131 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2132 * gdbreplay.c (gdbreplay_version): Likewise.
2133
2134 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2135
2136 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2137 iov.iov_len with the real length in use.
2138
2139 2013-12-13 Joel Brobecker <brobecker@adacore.com>
2140
2141 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2142 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2143 for all targets that use win32-low.c.
2144 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2145 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2146
2147 2013-12-13 Pedro Alves <palves@redhat.com>
2148
2149 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2150 if equal to TARGET_WAITKIND_LOADED.
2151 * win32-low.c (cached_status): New static global.
2152 (win32_wait): Add declaration.
2153 (do_initial_child_stuff): Flush all initial pending debug events
2154 up to the initial breakpoint.
2155 (win32_wait): If CACHED_STATUS was set, return that instead
2156 of doing a real wait. Remove the code resuming the execution
2157 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2158 during the initial phase. Also remove the code changing
2159 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2160 TARGET_WAITKIND_STOPPED.
2161
2162 2013-12-11 Yao Qi <yao@codesourcery.com>
2163
2164 * notif.c (handle_notif_ack): Return 0 if no notification
2165 matches.
2166
2167 2013-11-20 Doug Evans <dje@google.com>
2168
2169 * linux-low.c (linux_set_resume_request): Fix comment.
2170
2171 2013-11-20 Doug Evans <dje@google.com>
2172
2173 * linux-low.c (resume_status_pending_p): Tweak comment.
2174
2175 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2176
2177 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2178 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2179 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2180 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2181 (srv_amd64_regobj): Add amd64-mpx.o.
2182 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2183 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2184 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2185 * i387-fp.c (num_pl_bnd_register) Added constant.
2186 (num_pl_bnd_cfg_registers) Added constant.
2187 (struct i387_xsave) Added reserved area and MPX fields.
2188 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2189 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2190 function.
2191 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2192 (init_registers_amd64_mpx_linux): Declare new function.
2193 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2194 (x86_64_regmap): Add MPX registers.
2195 (x86_linux_read_description): Add MPX case.
2196 (initialize_low_arch): Initialize MPX targets.
2197
2198 2013-11-18 Tom Tromey <tromey@redhat.com>
2199
2200 * configure: Rebuild.
2201 * configure.ac: Don't check for stdlib.h.
2202 * gdbreplay.c: Unconditionally include stdlib.h.
2203
2204 2013-11-18 Tom Tromey <tromey@redhat.com>
2205
2206 * config.in: Rebuild.
2207 * configure: Rebuild.
2208 * configure.ac: Don't use AC_HEADER_DIRENT.
2209
2210 2013-11-18 Tom Tromey <tromey@redhat.com>
2211
2212 * server.h: Don't check HAVE_STRING_H.
2213 * gdbreplay.c: Don't check HAVE_STRING_H.
2214 * configure: Rebuild.
2215
2216 2013-11-18 Tom Tromey <tromey@redhat.com>
2217
2218 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2219 LIBGNU.
2220
2221 2013-11-08 Tom Tromey <tromey@redhat.com>
2222
2223 * configure, config.in: Rebuild.
2224 * configure.ac: Remove unused configury.
2225
2226 2013-11-08 Tom Tromey <tromey@redhat.com>
2227
2228 * acinclude.m4: Include common.m4, codeset.m4.
2229 * configure, config.in: Rebuild.
2230 * configure.ac: Use GDB_AC_COMMON.
2231
2232 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2233
2234 * linux-s390-low.c (HWCAP_S390_TE): New define.
2235 (s390_arch_setup): Consider the TE field in the HWCAP for
2236 determining 'have_regset_tdb'.
2237
2238 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2239
2240 PR gdb/16014
2241 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2242 call to sizeof.
2243
2244 2013-10-02 Pedro Alves <palves@redhat.com>
2245
2246 * server.c (process_serial_event): Don't output "GDBserver
2247 exiting" if GDB is connected through stdio.
2248 * target.c (mywait): Likewise, be silent if GDB is connected
2249 through stdio.
2250
2251 2013-10-01 Joel Brobecker <brobecker@adacore.com>
2252
2253 * lynx-low.c (lynx_add_threads_after_attach): New function.
2254 (lynx_attach): Remove call to add_thread. Add call to
2255 lynx_add_threads_after_attach instead.
2256
2257 2013-09-28 Mike Frysinger <vapier@gentoo.org>
2258
2259 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2260 * config.in, configure: Regenerated.
2261
2262 2013-09-18 Yao Qi <yao@codesourcery.com>
2263
2264 PR server/15959
2265 * server.c (start_inferior): Clear 'resume_info'.
2266
2267 2013-09-16 Jiong Wang <jiwang@tilera.com>
2268
2269 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2270 for each register.
2271
2272 2013-09-16 Jiong Wang <jiwang@tilera.com>
2273
2274 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2275 linux-tile-low.o to srv_tgtobj.
2276
2277 2013-09-16 Will Newton <will.newton@linaro.org>
2278
2279 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2280 out regs.
2281
2282 2013-09-06 Pedro Alves <palves@redhat.com>
2283
2284 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2285 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2286 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2287 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2288 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2289 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2290
2291 2013-09-06 Pedro Alves <palves@redhat.com>
2292
2293 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2294 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2295
2296 2013-09-06 Pedro Alves <palves@redhat.com>
2297
2298 * linux-amd64-ipa.c: Include tracepoint.h.
2299 * linux-i386-ipa.c: Include tracepoint.h.
2300
2301 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2302
2303 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2304 (ps_get_thread_area): New function.
2305
2306 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
2307
2308 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2309 (initialize_low_arch): Call init_registers_crisv32 rather than
2310 init_register_crisv32.
2311
2312 2013-09-05 Pedro Alves <palves@redhat.com>
2313
2314 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2315 to ...
2316 * hostio.h: ... this new file.
2317 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2318 win32-low.c: Include hostio.h.
2319
2320 2013-09-05 Pedro Alves <palves@redhat.com>
2321
2322 * server.h (gdb_client_data, handler_func, callback_handler_func)
2323 (delete_file_handler, add_file_handler, append_callback_event)
2324 (delete_callback_event, start_event_loop, initialize_event_loop):
2325 Move to event-loop.h and include it.
2326 * event-loop.h: New file.
2327
2328 2013-09-05 Pedro Alves <palves@redhat.com>
2329
2330 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2331 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2332 (loaded_dll, unloaded_dll): Move to ...
2333 * dll.h: ... this new file.
2334 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2335
2336 2013-09-05 Pedro Alves <palves@redhat.com>
2337
2338 * server.h (current_process, get_thread_process, all_processes)
2339 (add_inferior_to_list, for_each_inferior, current_inferior)
2340 (remove_inferior, add_process, remove_process, find_process_pid)
2341 (have_started_inferiors_p, have_attached_inferiors_p)
2342 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2343 (clear_inferiors, find_inferior, find_inferior_id)
2344 (inferior_target_data, set_inferior_target_data)
2345 (inferior_regcache_data, set_inferior_regcache_data): Move to
2346 inferiors.h, and include it.
2347 * inferiors.h: New file.
2348
2349 2013-09-05 Pedro Alves <palves@redhat.com>
2350
2351 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2352 Move ...
2353 * ax.h: ... here.
2354
2355 2013-09-05 Pedro Alves <palves@redhat.com>
2356
2357 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2358 tracepoint.h.
2359 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2360 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2361 (handle_tracepoint_general_set, handle_tracepoint_query)
2362 (tracepoint_finished_step, tracepoint_was_hit)
2363 (release_while_stepping_state_list, current_traceframe)
2364 (in_readonly_region, traceframe_read_mem)
2365 (fetch_traceframe_registers, traceframe_read_sdata)
2366 (traceframe_read_info, struct fast_tpoint_collect_status)
2367 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2368 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2369 (supply_fast_tracepoint_registers)
2370 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2371 (ipa_tdesc, claim_trampoline_space)
2372 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2373 (agent_mem_read, agent_get_trace_state_variable_value)
2374 (agent_set_trace_state_variable_value, agent_tsv_read)
2375 (agent_mem_read_string, get_raw_reg_func_addr)
2376 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2377 * tracepoint.h: ... this new file.
2378
2379 2013-09-05 Pedro Alves <palves@redhat.com>
2380
2381 * server.h (perror_with_name, error, fatal, warning, paddress)
2382 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2383 include it.
2384 * utils.h: New file.
2385
2386 2013-09-05 Pedro Alves <palves@redhat.com>
2387
2388 * server.h (remote_debug, noack_mode, transport_is_reliable)
2389 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2390 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2391 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2392 (write_enn, initialize_async_io, enable_async_io)
2393 (disable_async_io, check_remote_input_interrupt_request)
2394 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2395 (dead_thread_notify, prepare_resume_reply)
2396 (decode_address_to_semicolon, decode_address, decode_m_packet)
2397 (decode_M_packet, decode_X_packet, decode_xfer_write)
2398 (decode_search_memory_packet, unhexify, hexify)
2399 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2400 (look_up_one_symbol, relocate_instruction)
2401 (monitor_output): Move to remote-utils.h, and include it.
2402 * remote-utils.h: New file.
2403
2404 2013-09-05 Pedro Alves <palves@redhat.com>
2405
2406 * server.h (_): Delete.
2407
2408 2013-09-02 Pedro Alves <palves@redhat.com>
2409
2410 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2411 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2412 allocated.
2413 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2414
2415 2013-09-02 Pierre Muller <muller@sourceware.org>
2416
2417 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2418 or WriteProcessMemory complete successfully and handle
2419 ERROR_PARTIAL_COPY error.
2420
2421 2013-09-02 Pedro Alves <palves@redhat.com>
2422
2423 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2424 error instead of EIO.
2425
2426 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2427
2428 PR server/15604
2429 * linux-low.c: Include filestuff.h.
2430 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2431 * lynx-low.c: Include filestuff.h.
2432 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2433 * server.c: Include filestuff.h.
2434 (main): Call notice_open_fds.
2435 * spu-low.c: Include filestuff.h.
2436 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2437
2438 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
2439
2440 * Makefile.in: Explain why ../target and ../nat are not
2441 listed as include file search paths.
2442 (linux-waitpid.o): New object file rule.
2443 * configure.srv (srv_native_linux_obj): New variable.
2444 Replace all occurrences of linux native object files with
2445 $srv_native_linux_obj.
2446 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2447 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2448 (linux_enable_event_reporting): Remove declaration.
2449 (my_waitpid): Moved to common/linux-waitpid.c.
2450 (linux_wait_for_event): Pass ptid when calling
2451 linux_enable_event_reporting.
2452 (linux_supports_tracefork_flag): Remove.
2453 (linux_enable_event_reporting): Likewise.
2454 (linux_tracefork_grandchild): Remove.
2455 (STACK_SIZE): Moved to common/linux-ptrace.c.
2456 (linux_tracefork_child): Remove.
2457 (linux_test_for_tracefork): Remove.
2458 (linux_look_up_symbols): Call linux_supports_traceclone.
2459 (initialize_low): Remove call to linux_test_for_tracefork.
2460 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2461 common/linux-ptrace.h.
2462 (PTRACE_TYPE_ARG4): Likewise.
2463 Include linux-ptrace.h.
2464
2465 2013-08-21 Pedro Alves <palves@redhat.com>
2466
2467 * config.in: Renegerate.
2468
2469 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
2470
2471 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2472 (SFILES): Remove $(srcdir)/common/target-common.c and
2473 add $(srcdir)/target/waitstatus.c.
2474 (OBS): Remove target-common.o and add waitstatus.o.
2475 (server_h): Remove $(srcdir)/../common/target-common.h and
2476 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2477 and $(srcdir)/../target/waitstatus.h.
2478 (target-common.o): Remove.
2479 (waitstatus.o): New target object file.
2480 * target.h: Do not include target-common.h and
2481 include target/resume.h, target/wait.h and
2482 target/waitstatus.h.
2483
2484 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
2485
2486 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2487 to PTRACE_TYPE_ARG3.
2488 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2489 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2490 PTRACE_TYPE_ARG4.
2491 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2492 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2493
2494 2013-07-27 Jie Zhang <jie@codesourcery.com>
2495 Daniel Jacobowitz <dan@codesourcery.com>
2496 Yao Qi <yao@codesourcery.com>
2497
2498 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2499 (mips-linux-watch.o): New rule.
2500 (mips_linux_watch_h): New variable.
2501 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2502 srv_tgtobj.
2503 * linux-mips-low.c: Include mips-linux-watch.h.
2504 (struct arch_process_info, struct arch_lwp_info): New.
2505 (update_watch_registers_callback): New function.
2506 (mips_linux_new_process, mips_linux_new_thread) New functions.
2507 (mips_linux_prepare_to_resume, mips_insert_point): New
2508 functions.
2509 (mips_remove_point, mips_stopped_by_watchpoint): New
2510 functions.
2511 (rsp_bp_type_to_target_hw_bp_type): New function.
2512 (mips_stopped_data_address): New function.
2513 (the_low_target): Add watchpoint support functions.
2514
2515 2013-07-27 Yao Qi <yao@codesourcery.com>
2516
2517 * i386-low.c: Include break-common.h.
2518 (enum target_hw_bp_type): Remove.
2519
2520 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
2521
2522 * Makefile.in (SFILES): /common/target-common.c.
2523 (OBS): Add target-common.o.
2524 (server_h): Add $(srcdir)/../common/target-common.h.
2525 (target-common.o): New target.
2526 * server.c (queue_stop_reply_callback): Free
2527 status string after use.
2528 * target.c (target_waitstatus_to_string): Remove.
2529 * target.h: Include target-common.h.
2530 (resume_kind): Likewise.
2531 (target_waitkind): Likewise.
2532 (target_waitstatus): Likewise.
2533 (TARGET_WNOHANG): Likewise.
2534
2535 2013-07-04 Yao Qi <yao@codesourcery.com>
2536
2537 * Makefile.in (host_alias): Use @host_noncanonical@.
2538 (target_alias): Use @target_noncanonical@.
2539 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2540 ACX_NONCANONICAL_HOST.
2541 * configure: Regenerated.
2542
2543 Revert:
2544 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2545
2546 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2547 * configure: Rebuild.
2548 * Makefile.in (version_host, version_target): Get from configure.
2549 (version.c): Use $(version_host) and $(version_target).
2550
2551 2013-07-03 Pedro Alves <palves@redhat.com>
2552
2553 * Makefile.in (config.status): Depend on development.sh.
2554 * acinclude.m4: Include libmcheck.m4.
2555 * configure: Regenerate.
2556
2557 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2558
2559 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2560 attribute inside the parentheses.
2561 (winapi_DebugSetProcessKillOnExit): Ditto.
2562 (winapi_DebugBreakProcess): Ditto.
2563 (winapi_GenerateConsoleCtrlEvent): Ditto.
2564
2565 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2566
2567 * notif.h (notif_event): Add a dummy member to avoid compiler
2568 errors.
2569
2570 2013-07-01 Pedro Alves <palves@redhat.com>
2571
2572 * hostio.c (HOSTIO_PATH_MAX): Define.
2573 (require_filename, handle_open, handle_unlink, handle_readlink):
2574 Use it.
2575
2576 2013-07-01 Pedro Alves <palves@redhat.com>
2577
2578 * server.h: Include "pathmax.h".
2579 * linux-low.c: Don't include sys/param.h.
2580 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2581 MAXPATHLEN.
2582 * win32-low.c: Don't include sys/param.h.
2583 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2584
2585 2013-07-01 Pedro Alves <palves@redhat.com>
2586
2587 * event-loop.c: Don't check HAVE_UNISTD_H before including
2588 <unistd.h>.
2589 * gdbreplay.c: Likewise.
2590 * remote-utils.c: Likewise.
2591 * server.c: Likewise.
2592 * configure.ac: Don't check for unistd.h.
2593 * configure: Regenerate.
2594
2595 2013-06-28 Tom Tromey <tromey@redhat.com>
2596
2597 * Makefile.in (version.c): Use version.in, not
2598 common/version.in.
2599
2600 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2601
2602 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2603 * configure: Rebuild.
2604 * Makefile.in (version_host, version_target): Get from configure.
2605 (version.c): Use $(version_host) and $(version_target).
2606
2607 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2608
2609 Fix trace-status to output user name without trailing colon.
2610 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2611
2612 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2613
2614 Fix trace-status to output proper start-time and stop-time.
2615 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2616 output start time and stop time in hex as gdb expects.
2617
2618 2013-06-26 Pedro Alves <pedro@codesourcery.com>
2619
2620 * tracepoint.c (build_traceframe_info_xml): Output trace state
2621 variables present in the trace buffer.
2622
2623 2013-06-24 Tom Tromey <tromey@redhat.com>
2624
2625 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2626 create-version.sh.
2627 (version.o): Remove.
2628 * gdbreplay.c: Include version.h.
2629 (version, host_name): Don't declare.
2630 * server.h: Include version.h.
2631 (version, host_name): Don't declare.
2632
2633 2013-06-12 Pedro Alves <palves@redhat.com>
2634
2635 * linux-x86-low.c (linux_is_elf64): Delete global.
2636 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2637 with local linux_pid_exe_is_elf_64_file use.
2638
2639 2013-06-11 Pedro Alves <palves@redhat.com>
2640
2641 * linux-low.c (regset_disabled, disable_regset): New functions.
2642 (regsets_fetch_inferior_registers)
2643 (regsets_store_inferior_registers): Use them.
2644 (initialize_regsets_info); Don't allocate the disabled_regsets
2645 array here.
2646 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2647 comment.
2648
2649 2013-06-11 Pedro Alves <palves@redhat.com>
2650
2651 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2652 xmalloc.
2653
2654 2013-06-11 Pedro Alves <palves@redhat.com>
2655
2656 * linux-x86-low.c (initialize_low_arch): Call
2657 init_registers_x32_avx_linux.
2658
2659 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2660
2661 Fix compatibility with Android Bionic.
2662 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2663 it is not empty.
2664
2665 2013-06-07 Pedro Alves <palves@redhat.com>
2666
2667 PR server/14823
2668 * Makefile.in (OBS): Add tdesc.o.
2669 (IPA_OBJS): Add tdesc-ipa.o.
2670 (tdesc-ipa.o): New rule.
2671 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2672 interface.
2673 * linux-low.c (new_inferior): Delete.
2674 (disabled_regsets, num_regsets): Delete.
2675 (linux_add_process): Adjust to set the new per-process
2676 new_inferior flag.
2677 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2678 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2679 was a stop. When calling arch_setup, switch the current inferior
2680 to the thread that got an event.
2681 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2682 (regsets_fetch_inferior_registers)
2683 (regsets_store_inferior_registers): New regsets_info parameter.
2684 Adjust to use it.
2685 (linux_register_in_regsets): New regs_info parameter. Adjust to
2686 use it.
2687 (register_addr, fetch_register, store_register): New usrregs_info
2688 parameter. Adjust to use it.
2689 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2690 parameter regs_info. Adjust to use it.
2691 (linux_fetch_registers): Get the current inferior's regs_info, and
2692 adjust to use it.
2693 (linux_store_registers): Ditto.
2694 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2695 (initialize_low): Don't initialize the target_regsets here. Call
2696 initialize_low_arch.
2697 * linux-low.h (target_regsets): Delete declaration.
2698 (struct regsets_info): New.
2699 (struct usrregs_info): New.
2700 (struct regs_info): New.
2701 (struct process_info_private) <new_inferior>: New field.
2702 (struct linux_target_ops): Delete the num_regs, regmap, and
2703 regset_bitmap fields. New field regs_info.
2704 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2705 * i387-fp.c (num_xmm_registers): Delete.
2706 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2707 calls to new interface.
2708 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2709 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2710 Infer the number of xmm registers from the regcache's target
2711 description.
2712 * i387-fp.h (num_xmm_registers): Delete.
2713 * inferiors.c (add_thread): Don't install the thread's regcache
2714 here.
2715 * proc-service.c (gregset_info): Fetch the current inferior's
2716 regs_info. Adjust to use it.
2717 * regcache.c: Include tdesc.h.
2718 (register_bytes, reg_defs, num_registers)
2719 (gdbserver_expedite_regs): Delete.
2720 (get_thread_regcache): If the thread doesn't have a regcache yet,
2721 create one, instead of aborting gdbserver.
2722 (regcache_invalidate_one): Rename to ...
2723 (regcache_invalidate_thread): ... this.
2724 (regcache_invalidate_one): New.
2725 (regcache_invalidate): Only invalidate registers of the current
2726 process.
2727 (init_register_cache): Add target_desc parameter, and use it.
2728 (new_register_cache): Ditto. Assert the target description has a
2729 non zero registers_size.
2730 (regcache_cpy): Add assertions. Adjust.
2731 (realloc_register_cache, set_register_cache): Delete.
2732 (registers_to_string, registers_from_string): Adjust.
2733 (find_register_by_name, find_regno, find_register_by_number)
2734 (register_cache_size): Add target_desc parameter, and use it.
2735 (free_register_cache_thread, free_register_cache_thread_one)
2736 (regcache_release, register_cache_size): New.
2737 (register_size): Add target_desc parameter, and use it.
2738 (register_data, supply_register, supply_register_zeroed)
2739 (supply_regblock, supply_register_by_name, collect_register)
2740 (collect_register_as_string, collect_register_by_name): Adjust.
2741 * regcache.h (struct target_desc): Forward declare.
2742 (struct regcache) <tdesc>: New field.
2743 (init_register_cache, new_register_cache): Add target_desc
2744 parameter.
2745 (regcache_invalidate_thread): Declare.
2746 (regcache_invalidate_one): Delete declaration.
2747 (regcache_release): Declare.
2748 (find_register_by_number, register_cache_size, register_size)
2749 (find_regno): Add target_desc parameter.
2750 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2751 declarations.
2752 * remote-utils.c: Include tdesc.h.
2753 (outreg, prepare_resume_reply): Adjust.
2754 * server.c: Include tdesc.h.
2755 (gdbserver_xmltarget): Delete declaration.
2756 (get_features_xml, process_serial_event): Adjust.
2757 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2758 declare.
2759 (struct process_info) <tdesc>: New field.
2760 (ipa_tdesc): Declare.
2761 * tdesc.c: New file.
2762 * tdesc.h: New file.
2763 * tracepoint.c: Include tdesc.h.
2764 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2765 (get_context_regcache): Adjust to pass ipa_tdesc down.
2766 (do_action_at_tracepoint): Adjust to get the register cache size
2767 from the context regcache's description.
2768 (traceframe_walk_blocks): Adjust to get the register cache size
2769 from the current trace frame's description.
2770 (traceframe_get_pc): Adjust to get current trace frame's
2771 description and pass it down.
2772 (gdb_collect): Adjust to get the register cache size from the
2773 IPA's description.
2774 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2775 (gdbserver_xmltarget): Delete.
2776 (initialize_low_tracepoint): Set the ipa's target description.
2777 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2778 (initialize_low_tracepoint): Set the ipa's target description.
2779 * linux-x86-low.c: Include tdesc.h.
2780 [__x86_64__] (is_64bit_tdesc): New.
2781 (ps_get_thread_area, x86_get_thread_area): Use it.
2782 (i386_cannot_store_register): Rename to ...
2783 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2784 (i386_cannot_fetch_register): Rename to ...
2785 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2786 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2787 to new interface.
2788 (target_regsets): Rename to ...
2789 (x86_regsets): ... this.
2790 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2791 interface.
2792 (x86_siginfo_fixup): Use is_64bit_tdesc.
2793 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2794 (tdesc_x32_avx_linux, tdesc_x32_linux)
2795 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2796 Declare.
2797 (x86_linux_update_xmltarget): Delete.
2798 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2799 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2800 (AMD64_LINUX_USER64_CS): New.
2801 (x86_linux_read_description): New, based on
2802 x86_linux_update_xmltarget.
2803 (same_process_callback): New.
2804 (x86_arch_setup_process_callback): New.
2805 (x86_linux_update_xmltarget): New.
2806 (x86_regsets_info): New.
2807 (amd64_linux_regs_info): New.
2808 (i386_linux_usrregs_info): New.
2809 (i386_linux_regs_info): New.
2810 (x86_linux_regs_info): New.
2811 (x86_arch_setup): Reimplement.
2812 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2813 (x86_emit_ops): Ditto.
2814 (the_low_target): Adjust. Install x86_linux_regs_info,
2815 x86_cannot_fetch_register, and x86_cannot_store_register.
2816 (initialize_low_arch): New.
2817 * linux-ia64-low.c (tdesc_ia64): Declare.
2818 (ia64_fetch_register): Adjust.
2819 (ia64_usrregs_info, regs_info): New globals.
2820 (ia64_regs_info): New function.
2821 (the_low_target): Adjust.
2822 (initialize_low_arch): New function.
2823 * linux-sparc-low.c (tdesc_sparc64): Declare.
2824 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2825 Adjust.
2826 (sparc_arch_setup): New function.
2827 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2828 (the_low_target): Adjust.
2829 (initialize_low_arch): New function.
2830 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2831 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2832 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2833 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2834 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2835 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2836 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2837 (tdesc_powerpc_isa205_vsx64l): Declare.
2838 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2839 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2840 (ppc_set_pc, ppc_get_hwcap): Adjust.
2841 (ppc_usrregs_info): Forward declare.
2842 (!__powerpc64__) ppc_regmap_adjusted: New global.
2843 (ppc_arch_setup): Adjust to the current process'es target
2844 description.
2845 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2846 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2847 (ppc_store_evrregset): Adjust.
2848 (target_regsets): Rename to ...
2849 (ppc_regsets): ... this, and make static.
2850 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2851 (ppc_regs_info): New function.
2852 (the_low_target): Adjust.
2853 (initialize_low_arch): New function.
2854 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2855 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2856 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2857 (tdesc_s390x_linux64v2): Declare.
2858 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2859 (s390_fill_gregset, s390_store_last_break): Adjust.
2860 (target_regsets): Rename to ...
2861 (s390_regsets): ... this, and make static.
2862 (s390_get_pc, s390_set_pc): Adjust.
2863 (s390_get_hwcap): New target_desc parameter, and use it.
2864 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2865 (s390_arch_setup): Adjust to set the current process'es target
2866 description. Don't adjust the regmap.
2867 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2868 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2869 (regs_info_3264): New globals.
2870 (s390_regs_info): New function.
2871 (the_low_target): Adjust.
2872 (initialize_low_arch): New function.
2873 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2874 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2875 [__mips64] (init_registers_mips_linux)
2876 (init_registers_mips_dsp_linux): Delete defines.
2877 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2878 (have_dsp): New global.
2879 (mips_read_description): New, based on mips_arch_setup.
2880 (mips_arch_setup): Reimplement.
2881 (get_usrregs_info): New function.
2882 (mips_cannot_fetch_register, mips_cannot_store_register)
2883 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2884 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2885 (target_regsets): Rename to ...
2886 (mips_regsets): ... this, and make static.
2887 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2888 (dsp_regs_info, regs_info): New globals.
2889 (mips_regs_info): New function.
2890 (the_low_target): Adjust.
2891 (initialize_low_arch): New function.
2892 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2893 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2894 Declare.
2895 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2896 (arm_read_description): New, with bits factored from
2897 arm_arch_setup.
2898 (arm_arch_setup): Reimplement.
2899 (target_regsets): Rename to ...
2900 (arm_regsets): ... this, and make static.
2901 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2902 (arm_regs_info): New function.
2903 (the_low_target): Adjust.
2904 (initialize_low_arch): New function.
2905 * linux-m68k-low.c (tdesc_m68k): Declare.
2906 (target_regsets): Rename to ...
2907 (m68k_regsets): ... this, and make static.
2908 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2909 (m68k_regs_info): New function.
2910 (m68k_arch_setup): New function.
2911 (the_low_target): Adjust.
2912 (initialize_low_arch): New function.
2913 * linux-sh-low.c (tdesc_sharch): Declare.
2914 (target_regsets): Rename to ...
2915 (sh_regsets): ... this, and make static.
2916 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2917 (sh_regs_info, sh_arch_setup): New functions.
2918 (the_low_target): Adjust.
2919 (initialize_low_arch): New function.
2920 * linux-bfin-low.c (tdesc_bfin): Declare.
2921 (bfin_arch_setup): New function.
2922 (bfin_usrregs_info, regs_info): New globals.
2923 (bfin_regs_info): New function.
2924 (the_low_target): Adjust.
2925 (initialize_low_arch): New function.
2926 * linux-cris-low.c (tdesc_cris): Declare.
2927 (cris_arch_setup): New function.
2928 (cris_usrregs_info, regs_info): New globals.
2929 (cris_regs_info): New function.
2930 (the_low_target): Adjust.
2931 (initialize_low_arch): New function.
2932 * linux-cris-low.c (tdesc_crisv32): Declare.
2933 (cris_arch_setup): New function.
2934 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2935 (cris_regs_info): New function.
2936 (the_low_target): Adjust.
2937 (initialize_low_arch): New function.
2938 * linux-m32r-low.c (tdesc_m32r): Declare.
2939 (m32r_arch_setup): New function.
2940 (m32r_usrregs_info, regs_info): New globals.
2941 (m32r_regs_info): Adjust.
2942 (initialize_low_arch): New function.
2943 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2944 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2945 (tic6x_usrregs_info): Forward declare.
2946 (tic6x_read_description): New function, based on ...
2947 (tic6x_arch_setup): ... this. Reimplement.
2948 (target_regsets): Rename to ...
2949 (tic6x_regsets): ... this, and make static.
2950 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2951 (tic6x_regs_info): New function.
2952 (the_low_target): Adjust.
2953 (initialize_low_arch): New function.
2954 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2955 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2956 (target_regsets): Rename to ...
2957 (xtensa_regsets): ... this, and make static.
2958 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2959 globals.
2960 (xtensa_arch_setup, xtensa_regs_info): New functions.
2961 (the_low_target): Adjust.
2962 (initialize_low_arch): New function.
2963 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2964 (nios2_arch_setup): Set the current process'es tdesc.
2965 (target_regsets): Rename to ...
2966 (nios2_regsets): ... this.
2967 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2968 (nios2_regs_info): New function.
2969 (the_low_target): Adjust.
2970 (initialize_low_arch): New function.
2971 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2972 (aarch64_arch_setup): Set the current process'es tdesc.
2973 (target_regsets): Rename to ...
2974 (aarch64_regsets): ... this.
2975 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2976 (aarch64_regs_info): New function.
2977 (the_low_target): Adjust.
2978 (initialize_low_arch): New function.
2979 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2980 globals.
2981 (target_regsets): Rename to ...
2982 (tile_regsets): ... this.
2983 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2984 (tile_regs_info): New function.
2985 (tile_arch_setup): Set the current process'es tdesc.
2986 (the_low_target): Adjust.
2987 (initialize_low_arch): New function.
2988 * spu-low.c (tdesc_spu): Declare.
2989 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2990 * win32-arm-low.c (tdesc_arm): Declare.
2991 (arm_arch_setup): New function.
2992 (the_low_target): Install arm_arch_setup instead of
2993 init_registers_arm.
2994 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2995 (init_windows_x86): Rename to ...
2996 (i386_arch_setup): ... this. Set `win32_tdesc'.
2997 (the_low_target): Adjust.
2998 * win32-low.c (win32_tdesc): New global.
2999 (child_add_thread): Don't create the thread cache here.
3000 (do_initial_child_stuff): Set the new process'es tdesc.
3001 * win32-low.h (struct target_desc): Forward declare.
3002 (win32_tdesc): Declare.
3003 * lynx-i386-low.c (tdesc_i386): Declare global.
3004 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3005 * lynx-low.c (lynx_tdesc): New global.
3006 (lynx_add_process): Set the new process'es tdesc.
3007 * lynx-low.h (struct target_desc): Forward declare.
3008 (lynx_tdesc): Declare global.
3009 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3010 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3011 * nto-low.c (nto_tdesc): New global.
3012 (do_attach): Set the new process'es tdesc.
3013 * nto-low.h (struct target_desc): Forward declare.
3014 (nto_tdesc): Declare.
3015 * nto-x86-low.c (tdesc_i386): Declare.
3016 (nto_x86_arch_setup): Set `nto_tdesc'.
3017
3018 2013-06-04 Gary Benson <gbenson@redhat.com>
3019
3020 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3021 to qSupported response when appropriate.
3022 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3023 with nonzero-length annex.
3024 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3025 arguments supplied in annex.
3026
3027 2013-05-31 Doug Evans <dje@google.com>
3028
3029 PR server/15594
3030 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3031 64 bits in 64-cross-32 environment.
3032
3033 2013-05-28 Pedro Alves <palves@redhat.com>
3034
3035 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3036 (aarch64-without-fpu.c): Delete rule.
3037 * configure.srv (aarch64*-*-linux*): Remove references to
3038 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3039 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3040 declaration.
3041
3042 2013-05-24 Pedro Alves <palves@redhat.com>
3043
3044 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3045 instead of strchr/decode_address. Error if the range isn't split
3046 with a ','. Don't assume there's be a ':' in the action.
3047
3048 2013-05-23 Yao Qi <yao@codesourcery.com>
3049 Pedro Alves <palves@redhat.com>
3050
3051 * linux-low.c (lwp_in_step_range): New function.
3052 (linux_wait_1): If the thread was range stepping and stopped
3053 outside the stepping range, report the stop to GDB. Otherwise,
3054 continue stepping. Add range stepping debug output.
3055 (linux_set_resume_request): Copy the step range from the resume
3056 request to the lwp.
3057 (linux_supports_range_stepping): New.
3058 (linux_target_ops) <supports_range_stepping>: Set to
3059 linux_supports_range_stepping.
3060 * linux-low.h (struct linux_target_ops)
3061 <supports_range_stepping>: New field.
3062 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3063 * linux-x86-low.c (x86_supports_range_stepping): New.
3064 (the_low_target) <supports_range_stepping>: Set to
3065 x86_supports_range_stepping.
3066 * server.c (handle_v_cont): Handle 'r' action.
3067 (handle_v_requests): Append ";r" if the target supports range
3068 stepping.
3069 * target.h (struct thread_resume) <step_range_start,
3070 step_range_end>: New fields.
3071 (struct target_ops) <supports_range_stepping>:
3072 New field.
3073 (target_supports_range_stepping): New macro.
3074
3075 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3076
3077 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3078 confusion in comment.
3079
3080 2013-05-17 Joel Brobecker <brobecker@adacore.com>
3081
3082 * lynx-low.c (struct process_info_private): New type.
3083 (lynx_add_process): New function.
3084 (lynx_create_inferior, lynx_attach): Replace calls to
3085 add_process by calls to lynx_add_process.
3086 (lynx_resume): If PTID is null, then try using
3087 current_process()->private->last_wait_event_ptid.
3088 Add comments.
3089 (lynx_clear_inferiors): Delete. The contents of that function
3090 has been inlined in lynx_mourn;
3091 (lynx_wait_1): Save the ptid in the process's private data.
3092 (lynx_mourn): Free the process' private data. Replace call
3093 to lynx_clear_inferiors by call to clear_inferiors.
3094
3095 2013-05-17 Yao Qi <yao@codesourcery.com>
3096
3097 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3098 the right place.
3099
3100 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
3101
3102 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3103 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3104 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3105 PT_TEXT_END_ADDR guards. Update comments.
3106 (linux_target_op) <read_offsets>: Conditionally define to
3107 linux_read_offsets if the target is UCLIBC and if it defines
3108 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3109
3110 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3111 Andrew Jenner <andrew@codesourcery.com>
3112
3113 * Makefile.in (SFILES): Add linux-nios2-low.c.
3114 (clean): Add action to delete nios2-linux.c.
3115 (nios2-linux.c): New rule.
3116 * configure.srv: Add nios2*-*-linux*.
3117 * linux-nios2-low.c: New.
3118
3119 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3120
3121 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3122
3123 2013-04-25 Hui Zhu <hui@codesourcery.com>
3124
3125 PR gdb/15186
3126 * ax.c (ax_printf): Add fflush.
3127
3128 2013-04-22 Tom Tromey <tromey@redhat.com>
3129
3130 * Makefile.in (SFILES): Add filestuff.c.
3131 (OBS): Add filestuff.o.
3132 (filestuff.o): New target.
3133 * config.in, configure: Rebuild.
3134 * configure.ac: Check for fdwalk, pipe2.
3135
3136 2013-04-17 Pedro Alves <palves@redhat.com>
3137
3138 * configure.ac (USE_THREAD_DB): Delete variable.
3139 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3140 Don't AC_SUBST USE_THREAD_DB.
3141 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3142 * config.in, configure: Regenerate.
3143
3144 2013-04-16 Pedro Alves <palves@redhat.com>
3145
3146 * linux-low.h (struct lwp_info) <thread_known>: Move under
3147 the USE_THREAD_DB #ifdef.
3148
3149 2013-04-16 Pedro Alves <palves@redhat.com>
3150
3151 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3152 (linux-low.o): Delete rule.
3153 * linux-low.h: Always include "gdb_thread_db.h" instead of
3154 conditionally including thread_db.h.
3155 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3156 HAVE_THREAD_DB_H.
3157
3158 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3159
3160 * Makefile.in (install-only): Fix make install regression.
3161
3162 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3163
3164 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3165 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3166 installation.
3167 * gdbserver.1: Remove.
3168
3169 2013-03-22 Pedro Alves <palves@redhat.com>
3170
3171 * linux-low.c (handle_extended_wait): Don't call
3172 linux_enable_event_reporting.
3173
3174 2013-03-15 Tony Theodore <tonyt@logyst.com>
3175
3176 PR build/9098:
3177 * Makefile.in (SHELL): Use @SHELL@.
3178
3179 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3180
3181 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3182 compiler warning.
3183
3184 2013-03-13 Joel Brobecker <brobecker@adacore.com>
3185
3186 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3187 Remove extraneous NULL element.
3188
3189 2013-03-13 Yao Qi <yao@codesourcery.com>
3190
3191 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3192 'V' block in trace frame.
3193
3194 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3195
3196 * target.h (struct target_ops): Add btrace ops.
3197 (target_supports_btrace): New macro.
3198 (target_enable_btrace): New macro.
3199 (target_disable_btrace): New macro.
3200 (target_read_btrace): New macro.
3201 * gdbthread.h (struct thread_info): Add btrace field.
3202 * server.c: Include btrace-common.h.
3203 (handle_btrace_general_set): New function.
3204 (handle_btrace_enable): New function.
3205 (handle_btrace_disable): New function.
3206 (handle_general_set): Call handle_btrace_general_set.
3207 (handle_qxfer_btrace): New function.
3208 (struct qxfer qxfer_packets[]): Add btrace entry.
3209 * inferiors.c (remove_thread): Disable btrace.
3210 * linux-low: Include linux-btrace.h.
3211 (linux_low_enable_btrace): New function.
3212 (linux_low_read_btrace): New function.
3213 (linux_target_ops): Add btrace ops.
3214 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3215 Add srv_linux_btrace=yes.
3216 (x86_64-*-linux*): Add linux-btrace.o.
3217 Add srv_linux_btrace=yes.
3218 * configure.ac: Define HAVE_LINUX_BTRACE.
3219 * config.in: Regenerated.
3220 * configure: Regenerated.
3221
3222 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3223
3224 * server.c (handle_qxfer): Preserve error message if -3 is
3225 returned.
3226 (qxfer): Document the -3 return value.
3227
3228 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3229
3230 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3231 (linux_btrace_h): New variable.
3232 (linux-btrace.o): New rule.
3233
3234 2013-03-08 Stan Shebs <stan@codesourcery.com>
3235 Hafiz Abid Qadeer <abidh@codesourcery.com>
3236
3237 * tracepoint.c (trace_buffer_size): New global.
3238 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3239 (init_trace_buffer): Change to one-argument function. Allocate
3240 trace buffer memory.
3241 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3242 handle QTBuffer:size packet.
3243 (cmd_bigqtbuffer_size): New function.
3244 (initialize_tracepoint): Call init_trace_buffer with
3245 DEFAULT_TRACE_BUFFER_SIZE.
3246 * server.c (handle_query): Add QTBuffer:size in the
3247 supported packets.
3248
3249 2013-03-07 Yao Qi <yao@codesourcery.com>
3250
3251 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3252 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3253 of -1.
3254 (cmd_qtsp): Adjust condition. Do post increment.
3255 Set cur_action and cur_step_action back to 0.
3256
3257 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3258
3259 PR server/15236
3260 * linux-low.c (linux_write_memory): Return early success if LEN is
3261 zero.
3262
3263 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
3264
3265 * configure.srv: Add x86_64-*-cygwin* as target.
3266
3267 2013-02-28 Tom Tromey <tromey@redhat.com>
3268
3269 * configure.ac: Invoke AC_SYS_LARGEFILE.
3270 * configure, config.in: Rebuild.
3271
3272 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
3273
3274 * win32-low.c: Throughout, fix format strings and casts of
3275 printf-like functions to avoid type related warnings on all
3276 platforms.
3277 (get_child_debug_event): Print dwDebugEventCode as hex since
3278 that's how it's usually documented.
3279
3280 2013-02-28 Yao Qi <yao@codesourcery.com>
3281
3282 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3283 pulongest.
3284
3285 2013-02-27 Jiong Wang <jiwang@tilera.com>
3286
3287 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3288 (reg-tilegx32.c): New rule.
3289 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3290 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3291 different register info initializer according to elf class.
3292 (init_registers_tilgx32): New function. The tilegx32 register info
3293 initializer.
3294 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3295 (tile_store_gregset): Likewise.
3296
3297 2013-02-27 Yao Qi <yao@codesourcery.com>
3298
3299 * server.c (process_point_options): Print debug message when
3300 debug_threads is true.
3301
3302 2013-02-26 Yao Qi <yao@codesourcery.com>
3303
3304 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3305
3306 2013-02-19 Pedro Alves <palves@redhat.com>
3307 Kai Tietz <ktietz@redhat.com>
3308
3309 PR gdb/15161
3310
3311 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3312 instead of strtoul to extract address from packet.
3313 (process_serial_event) <'z'>: Likewise.
3314
3315 2013-02-18 Yao Qi <yao@codesourcery.com>
3316
3317 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3318
3319 2013-02-14 Pedro Alves <palves@redhat.com>
3320
3321 Plug memory leak.
3322
3323 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3324 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3325
3326 2013-02-14 Pedro Alves <palves@redhat.com>
3327
3328 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3329
3330 2013-02-14 Pedro Alves <palves@redhat.com>
3331
3332 * tracepoint.c (save_string): Delete.
3333 (add_tracepoint_action): Use savestring instead of save_string.
3334
3335 2013-02-12 Pedro Alves <palves@redhat.com>
3336
3337 * linux-xtensa-low.c: Ditto.
3338 * xtensa-xtregs.c: Ditto.
3339
3340 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3341
3342 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3343 thread_db.
3344
3345 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3346
3347 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3348 aarch64_num_wp_regs and aarch64_num_bp_regs to
3349 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3350
3351 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3352
3353 * linux-aarch64-low.c (ps_get_thread_area): Replace
3354 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3355
3356 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3357 Marcus Shawcroft <marcus.shawcroft@arm.com>
3358 Nigel Stephens <nigel.stephens@arm.com>
3359 Yufeng Zhang <yufeng.zhang@arm.com>
3360
3361 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3362 (aarch64.c, aarch64-without-fpu.c): New targets.
3363 * configure.srv (aarch64*-*-linux*): New.
3364 * linux-aarch64-low.c: New file.
3365
3366 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3367
3368 * linux-low.c (handle_extended_wait, linux_create_inferior)
3369 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3370 (dequeue_one_deferred_signal, linux_resume_one_thread)
3371 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3372 (linux_tracefork_grandchild, linux_test_for_tracefork)
3373 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3374 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3375 where the argument is 0.
3376
3377 2013-01-25 Yao Qi <yao@codesourcery.com>
3378
3379 * event-loop.c: Include "queue.h".
3380 (gdb_event_p): New typedef.
3381 (struct gdb_event) <next_event>: Remove.
3382 (event_queue): Change to QUEUE(gdb_event_p).
3383 (async_queue_event): Remove.
3384 (gdb_event_xfree): New.
3385 (initialize_event_loop): New.
3386 (process_event): Use API from QUEUE.
3387 (wait_for_event): Likewise.
3388 * server.c (main): Call initialize_event_loop.
3389 * server.h (initialize_event_loop): Declare.
3390
3391 2013-01-18 Yao Qi <yao@codesourcery.com>
3392
3393 * ax.h (struct eval_agent_expr_context): New.
3394 (gdb_eval_agent_expr): Update declaration.
3395 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3396 TFRAME. Add new argument CTX.
3397 * server.h (struct eval_agent_expr_context): Declare.
3398 (agent_mem_read, agent_tsv_read): Update declaration.
3399 (agent_mem_read_string): Likewise.
3400 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3401 (add_traceframe_block): Add new argument TPOINT.
3402 Increase TPOINT->traceframe_usage.
3403 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3404 eval_tracepoint_agent_expr.
3405 (condition_true_at_tracepoint): Likewise.
3406 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3407 (agent_mem_read_string, agent_tsv_read): Likewise.
3408
3409 2013-01-16 Yao Qi <yao@codesourcery.com>
3410
3411 * linux-low.c (linux_resume_one_lwp): Don't check
3412 'lwp->bp_reinsert != 0'.
3413
3414 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3415 Pedro Alves <palves@redhat.com>
3416
3417 * lynx-low.c (ptrace_request_to_str): Define a temporary
3418 macro and use it to simplify this function's implementation.
3419
3420 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3421
3422 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3423 sets errno.
3424
3425 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3426
3427 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3428
3429 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3430
3431 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3432
3433 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3434
3435 * lynx-low.c (lynx_resume): Use the resume_info parameter
3436 to determine the ptid for the lynx_ptrace call, unless
3437 it is equal to minus_one_ptid, in which case we use the
3438 ptid of the current_inferior.
3439 (lynx_wait_1): After having received a thread create/exit
3440 event, resume the inferior's execution using the signaling
3441 thread's ptid, rather than the old ptid.
3442
3443 2013-01-07 Joel Brobecker <brobecker@adacore.com>
3444
3445 * lynx-low.c (lynx_resume): Delete variable ret.
3446
3447 2013-01-01 Joel Brobecker <brobecker@adacore.com>
3448
3449 * gdbreplay.c (gdbreplay_version): Update copyright year.
3450 * server.c (gdbserver_version): Likewise.
3451
3452 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3453
3454 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3455 new thread.
3456
3457 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3458
3459 * lynx-low.c (ptrace_request_to_str): Add handling for
3460 PTRACE_GETTRACESIG.
3461
3462 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3463
3464 * lynx-low.c (lynx_attach): Delete variable new_process.
3465
3466 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3467
3468 * lynx-low.c (lynx_create_inferior): Delete variable
3469 new_process.
3470
3471 2012-12-17 Joel Brobecker <brobecker@adacore.com>
3472
3473 * lynx-low.c (ptrace_request_to_str): Do not handle
3474 PTRACE_GETTHREADLIST if this macro does not exist.
3475
3476 2012-12-15 Yao Qi <yao@codesourcery.com>
3477
3478 * Makefile.in (OBS): Add notif.o.
3479 * notif.c, notif.h: New.
3480 * server.c: Include "notif.h".
3481 (struct vstop_notif) <next>: Remove.
3482 <base>: New field.
3483 (queue_stop_reply): Update.
3484 (push_event, send_next_stop_reply): Remove.
3485 (discard_queued_stop_replies): Update.
3486 (notif_stop): New variable.
3487 (handle_v_stopped): Remove.
3488 (handle_v_requests): Don't call handle_v_stopped. Call
3489 handle_ack_notif instead.
3490 (queue_stop_reply_callback): Call notif_event_enque instead
3491 of queue_stop_reply.
3492 (handle_status): Don't call send_next_stop_reply, call
3493 notif_write_event instead.
3494 (kill_inferior_callback): Likewise.
3495 (detach_or_kill_inferior_callback): Likewise.
3496 (main): Call initialize_notif.
3497 (process_serial_event): Call QUEUE_is_empty.
3498 (handle_target_event): Call notif_push instead of push event.
3499 * server.h (push_event): Remove declaration.
3500
3501 2012-12-10 Tom Tromey <tromey@redhat.com>
3502
3503 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3504 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3505 macros.
3506 (.c.o): Rewrite.
3507 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3508 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3509 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3510 (amd64-linux-ipa.o, ax.o): Rewrite.
3511 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3512 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3513 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3514 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3515 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3516 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3517 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3518 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3519 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3520 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3521 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3522 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3523 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3524 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3525 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3526 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3527 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3528 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3529 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3530 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3531 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3532 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3533 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3534 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3535 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3536 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3537 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3538 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3539 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3540 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3541 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3542 (reg-tilegx.o): Remove.
3543 (all_object_files): New macro.
3544 Include .deps files.
3545 * aclocal.m4, configure: Rebuild.
3546 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3547 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3548 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3549
3550 2012-12-05 Tom Tromey <tromey@redhat.com>
3551
3552 PR gdb/14917:
3553 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3554
3555 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
3556
3557 * configure.ac: Check for linux/perf_event.h.
3558 * config.in: Regenerated.
3559 * configure: Regenerated.
3560
3561 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3562
3563 * hostio.c (handle_readlink): Decrease buffer size
3564 parameter passed to readlink by one byte.
3565
3566 2012-11-26 Yao Qi <yao@codesourcery.com>
3567
3568 * configure.ac (build_warnings): Append '-Wempty-body'.
3569 * configure: Regenerated.
3570 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3571 body.
3572
3573 2012-11-15 Pierre Muller <muller@sourceware.org>
3574
3575 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3576 * config.in: Regenerate.
3577 * configure: Regenerate.
3578 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3579 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3580 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3581 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3582 header.
3583 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3584 instead of <sys/wait.h> header.
3585 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3586
3587 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3588
3589 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3590 (various make rules): Remove -DGDBSERVER
3591
3592 2012-11-09 Yao Qi <yao@codesourcery.com>
3593
3594 * spu-low.c (current_ptid): Move it to ..
3595 * gdbthread.h: ... here. New.
3596 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3597 * server.c (myresume, process_serial_event): Likewise.
3598 * thread-db.c (thread_db_find_new_threads): Likewise.
3599 * tracepoint.c (run_inferior_command): Likewise.
3600
3601 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
3602
3603 * server.c (handle_search_memory_1): Include access length in
3604 warning message.
3605
3606 2012-09-05 Michael Brandt <michael.brandt@axis.com>
3607
3608 * linux-crisv32-low.c: Fix compile errors.
3609
3610 2012-09-04 Yao Qi <yao@codesourcery.com>
3611
3612 * tracepoint.c (cmd_qtsv): Adjust debug message.
3613 Don't check CUR_TPOINT.
3614
3615 2012-08-28 Yao Qi <yao@codesourcery.com>
3616
3617 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3618 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3619 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3620 Remove declarations of xmalloc, xreallloc, xstrdup and
3621 freeargv.
3622 * Makefile.in (libiberty_h): New.
3623 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3624 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3625
3626 2012-08-23 Yao Qi <yao@codesourcery.com>
3627
3628 * server.h: Remove declaration of 'xsnprintf'.
3629
3630 2012-08-22 Keith Seitz <keiths@redhat.com>
3631
3632 * server.h: Include build-gnulib-gbserver/config.h.
3633 * gdbreplay.c: Likewise.
3634
3635 2012-08-08 Doug Evans <dje@google.com>
3636
3637 * Makefile.in (SFILES): Add gdb_vecs.c.
3638 (OBS): Add gdb_vecs.o.
3639 (gdb_vecs_h, host_defs_h): New variables.
3640 (thread-db.o): Add $(gdb_vecs_h) dependency.
3641 (gdb_vecs.o): New rule.
3642 * thread-db.c: #include "gdb_vecs.h".
3643 (thread_db_load_search): Use a vector to iterate over path elements.
3644 Handle text appearing after "$pdir".
3645
3646 * configure.ac: Add check for strstr.
3647 * config.in: Regenerate.
3648 * configure: Regenerate.
3649
3650 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3651
3652 * hostio.c (handle_pread): If pread fails, fall back to attempting
3653 lseek/read.
3654 (handle_pwrite): Likewise for pwrite.
3655
3656 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3657
3658 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3659 between unsupported TYPE and unimplementable ADDR/LEN combination.
3660 (arm_insert_point): Act on new return value.
3661
3662 2012-07-31 Pedro Alves <palves@redhat.com>
3663
3664 * server.c (process_point_options): Only skip tokens if we find
3665 one that is unrecognized. Don't treat 'X' specially while
3666 skipping unrecognized tokens.
3667
3668 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3669
3670 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3671 to 4-byte-align HW breakpoint addresses for Thumb.
3672
3673 2012-07-27 Yao Qi <yao@codesourcery.com>
3674
3675 PR remote/14161.
3676
3677 * server.h: Declare gdb_agent_about_to_close.
3678 * target.c (kill_inferior): Include "agent.h".
3679 New. Send command 'kill'.
3680 * target.h (kill_inferior): Removed macro.
3681 * tracepoint.c (gdb_agent_about_to_close): New.
3682 (gdb_agent_helper_thread): Handle command 'close'.
3683 Wait endlessly until the inferior stops.
3684 Install gdb_agent_remove_socket to atexit hook.
3685 (agent_socket_name): New static variable.
3686 (gdb_agent_socket_init): Replace local variable 'name' with
3687 'agent_socket_name'.
3688 (gdb_agent_remove_socket): New.
3689
3690 2012-07-27 Yao Qi <yao@codesourcery.com>
3691
3692 * server.c (process_point_options): Stop at 'X' when parsing.
3693
3694 2012-07-19 Michael Eager <eager@eagercon.com>
3695
3696 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3697 to hw_execute.
3698 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3699 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3700 hardware breakpoint.
3701
3702 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3703
3704 * gdbserver/linux-low.c (initialize_low): Call
3705 linux_ptrace_init_warnings.
3706
3707 2012-07-02 Doug Evans <dje@google.com>
3708
3709 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3710 pointer to int.
3711
3712 2012-07-02 Stan Shebs <stan@codesourcery.com>
3713
3714 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3715 (ax.o): Add it to build rule.
3716 (ax-ipa.o): Ditto.
3717 (OBS): Add format.o.
3718 (IPA_OBS): Add format.o.
3719 * server.c (handle_query): Claim support for breakpoint commands.
3720 (process_point_options): Add command case.
3721 (process_serial_event): Leave running if there are printfs in
3722 effect.
3723 * mem-break.h (any_persistent_commands): Declare.
3724 (add_breakpoint_commands): Declare.
3725 (gdb_no_commands_at_breakpoint): Declare.
3726 (run_breakpoint_commands): Declare.
3727 * mem-break.c (struct point_command_list): New struct.
3728 (struct breakpoint): New field command_list.
3729 (any_persistent_commands): New function.
3730 (add_commands_to_breakpoint): New function.
3731 (add_breakpoint_commands): New function.
3732 (gdb_no_commands_at_breakpoint): New function.
3733 (run_breakpoint_commands): New function.
3734 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3735 locally.
3736 * ax.c: Include format.h.
3737 (ax_printf): New function.
3738 (gdb_eval_agent_expr): Add printf opcode.
3739
3740 2012-06-13 Yao Qi <yao@codesourcery.com>
3741
3742 * server.c (start_inferior): Remove duplicated writes to fields
3743 'last_resume_kind' and 'last_status' of 'current_inferior'.
3744
3745 2012-06-12 Yao Qi <yao@codesourcery.com>
3746 Pedro Alves <palves@redhat.com>
3747
3748 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3749 comment.
3750 * server.c (handle_v_cont): Extend comment.
3751
3752 2012-06-11 Yao Qi <yao@codesourcery.com>
3753
3754 * linux-low.c (linux_attach): Add 'static'.
3755
3756 2012-06-06 Yao Qi <yao@codesourcery.com>
3757
3758 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3759
3760 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3761
3762 Fix gcc -flto compilation warning.
3763 * server.c (main): Make variable multi_mode and attach volatile.
3764
3765 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3766
3767 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3768 if the platform doesn't know about it.
3769
3770 2012-05-30 Jeff Kenton <jkenton@tilera.com>
3771
3772 * Makefile.in (SFILES): Add linux-tile-low.c.
3773 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3774 * configure.srv: Handle tilegx-*-linux*.
3775 * linux-tile-low.c: New file.
3776
3777 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3778
3779 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3780
3781 2012-05-24 Pedro Alves <palves@redhat.com>
3782
3783 PR gdb/7205
3784
3785 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3786
3787 2012-05-24 Pedro Alves <palves@redhat.com>
3788
3789 PR gdb/7205
3790
3791 Replace target_signal with gdb_signal throughout.
3792
3793 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3794
3795 * linux-low.c (linux_store_registers): Avoid the copying sequence
3796 when no data has been retrieved by ptrace.
3797
3798 2012-05-22 Will Deacon <will.deacon@arm.com>
3799
3800 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3801 Include asm/ptrace.h.
3802 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3803 already defined.
3804
3805 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3806
3807 * linux-low.c (linux_store_registers): Don't re-retrieve data
3808 with ptrace that has already been obtained from /proc. Always
3809 copy any data retrieved with ptrace to the buffer supplied.
3810
3811 2012-05-11 Yao Qi <yao@codesourcery.com>
3812 Pedro Alves <palves@redhat.com>
3813
3814 * linux-low.c (enum stopping_threads_kind): New.
3815 (stopping_threads): Change type to `enum stopping_threads_kind'.
3816 (handle_extended_wait): If stopping and suspending threads, leave
3817 the new_lwp suspended too.
3818 (linux_wait_for_event): Adjust.
3819 (stop_all_lwps): Set `stopping_threads' to
3820 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3821 whether we're suspending threads or just stopping them. Assert no
3822 recursion happens.
3823
3824 2012-04-29 Yao Qi <yao@codesourcery.com>
3825
3826 * server.h: Move some code to ...
3827 * gdbthread.h: ... here. New.
3828 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3829 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3830 (nto-low.o, win32-low.o): Likewise.
3831 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3832 * regcache.c, remote-utils.c, server.c: Likewise.
3833 * target.c, tracepoint.c, win32-low.c: Likewise.
3834
3835 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3836
3837 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3838 (PTRACE_ARG4_TYPE): Likewise.
3839 (PTRACE_XFER_TYPE): Likewise.
3840 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3841 ptrace to PTRACE_ARG3_TYPE.
3842 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3843 (PTRACE_ARG4_TYPE): Likewise.
3844 (PTRACE_XFER_TYPE): Likewise.
3845 (linux_detach_one_lwp): Cast fourth argument of
3846 ptrace to long then PTRACE_ARG4_TYPE.
3847 (regsets_fetch_inferior_registers): Cast third argument of
3848 ptrace to long then PTRACE_ARG3_TYPE.
3849 (regsets_store_inferior_registers): Likewise.
3850
3851 2012-04-20 Pedro Alves <palves@redhat.com>
3852
3853 * configure: Regenerate.
3854
3855 2012-04-19 Pedro Alves <palves@redhat.com>
3856
3857 * Makefile.in (GNULIB_BUILDDIR): New.
3858 (LIBGNU, INCGNU, GNULIB_H): Adjust.
3859 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3860 (all, install-only, uninstall, clean-info, all-lib, clean): No
3861 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3862 (maintainer-clean realclean distclean): Use subdir_do.
3863 (subdir_do): New.
3864 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
3865 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
3866 * acinclude.m4: Include acx_configure_dir.m4.
3867 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3868 calls. Call AC_PROG_RANLIB. Configure gnulib using
3869 ACX_CONFIGURE_DIR.
3870 (GNULIB): New.
3871 (GNULIB_STDINT_H): Adjust.
3872 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3873 * gdbreplay.c: Include build-gnulib/config.h.
3874 * server.h: Likewise.
3875 * aclocal.m4: Regenerate.
3876 * config.in: Regenerate.
3877 * configure: Regenerate.
3878
3879 2012-04-19 Pedro Alves <palves@redhat.com>
3880
3881 * Makefile.in (LIBGNU, INCGNU): Adjust.
3882 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3883 (all, install-only, uninstall, clean-info, all-lib, clean)
3884 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3885 * configure.ac: Adjust AC_OUTPUT output.
3886 * aclocal.m4: Regenerate.
3887 * configure: Regenerate.
3888
3889 2012-04-19 Pedro Alves <palves@redhat.com>
3890
3891 * Makefile.in (generated_files): New.
3892 (server_h): Remove the explicit dependency on config.h, and depend
3893 on $generated_files.
3894
3895 2012-04-19 Pedro Alves <palves@redhat.com>
3896
3897 * Makefile.in (INCGNU): Add -Ignulib.
3898
3899 2012-04-19 Pedro Alves <palves@redhat.com>
3900
3901 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3902 (INCGNU): ... this, and spell out -I here.
3903 (GNULIB_LIB): Rename to ...
3904 (LIBGNU): ... this.
3905 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3906
3907 2012-04-19 Pedro Alves <palves@redhat.com>
3908
3909 * config.in: Regenerate.
3910
3911 2012-04-19 Pedro Alves <palves@redhat.com>
3912
3913 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3914 * server.h (memmem): Remove declaration.
3915 * config.in: Regenerate.
3916 * configure: Regenerate.
3917
3918 2012-04-19 Yao Qi <yao@codesourcery.com>
3919
3920 * Makefile.in (SFILES): Add common/vec.c.
3921 (OBS): Add vec.o.
3922 (vec.o): New rule.
3923
3924 2012-04-19 Yao Qi <yao@codesourcery.com>
3925
3926 * remote-utils.c (prepare_resume_reply): Replace with macro
3927 target_core_of_thread.
3928 * server.c (handle_qxfer_threads_proper): Likewise.
3929 * target.h (traget_core_of_thread): New macro.
3930
3931 2012-04-18 Pedro Alves <palves@redhat.com>
3932
3933 * aclocal.m4: Regenerate.
3934 * configure: Regenerate.
3935
3936 2012-04-16 Yao Qi <yao@codesourcery.com>
3937
3938 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3939 duplicated on address.
3940
3941 2012-04-16 Yao Qi <yao@codesourcery.com>
3942
3943 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3944 (struct tracepoint_action_ops) <send>: New field.
3945 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3946 (agent_expr_send, x_tracepoint_action_send): New.
3947 (l_tracepoint_action_send): New.
3948 (cmd_qtdp): Download and install tracepoint
3949 according to `use_agent'.
3950 (run_inferior_command): Add one more parameter `len'.
3951 Update callers.
3952 (tracepoint_send_agent): New.
3953 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3954
3955 2012-04-16 Yao Qi <yao@codesourcery.com>
3956
3957 * tracepoint.c (download_tracepoints): Moved to ...
3958 (cmd_qtstart): ... here.
3959
3960 2012-04-14 Yao Qi <yao@codesourcery.com>
3961
3962 * tracepoint.c: Include inttypes.h.
3963 (struct collect_memory_action): Use sized types.
3964 (struct tracepoint): Likewise.
3965 (cmd_qtdp, stop_tracing): Update print specifiers.
3966 (cmd_qtp, response_tracepoint): Likewise.
3967 (collect_data_at_tracepoint): Likewise.
3968 (collect_data_at_step): Likewise.
3969
3970 2012-04-14 Yao Qi <yao@codesourcery.com>
3971
3972 Import gnulib module inttypes.
3973 * aclocal.m4, config.in, configure: Regenerated.
3974
3975 2012-04-14 Yao Qi <yao@codesourcery.com>
3976
3977 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3978 Makefile and config.status at last.
3979
3980 2012-04-13 Yao Qi <yao@codesourcery.com>
3981
3982 * tracepoint.c: Include stdint.h unconditionally.
3983
3984 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3985
3986 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3987 on BFD_HAVE_SYS_PROCFS_TYPE.
3988 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3989 * configure: Regenerate.
3990 * config.in: Likewise.
3991
3992 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3993
3994 * Makefile.in (clean): Also remove x32.c x32-linux.c
3995 x32-avx.c x32-avx-linux.c.
3996 (x32.o): New target.
3997 (x32.c): Likewise.
3998 (x32-linux.o): Likewise.
3999 (x32-linux.c): Likewise.
4000 (x32-avx.o): Likewise.
4001 (x32-avx.c): Likewise.
4002 (x32-avx-linux.o): Likewise.
4003 (x32-avx-linux.c): Likewise.
4004
4005 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4006 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4007 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4008 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4009 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4010 i386/x32-avx-linux.xml.
4011
4012 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4013 (init_registers_x32_avx_linux): Likwise.
4014 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4015 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4016
4017 2012-04-13 Pedro Alves <palves@redhat.com>
4018
4019 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4020 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4021 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4022 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4023 the sub-make.
4024
4025 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4026
4027 * linux-x86-low.c (compat_x32_clock_t): New.
4028 (compat_x32_siginfo_t): Likewise.
4029 (compat_x32_siginfo_from_siginfo): Likewise.
4030 (siginfo_from_compat_x32_siginfo): Likewise.
4031 (linux_is_elf64): Likewise.
4032 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4033 and siginfo_from_compat_x32_siginfo for x32.
4034 (x86_arch_setup): Set linux_is_elf64.
4035
4036 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4037
4038 PR gdb/13969
4039 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4040 e_machine field.
4041 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4042 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4043 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4044 compatible with process.
4045
4046 2012-04-12 Yao Qi <yao@codesourcery.com>
4047
4048 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4049 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4050 (install-only, install-info, clean): Handle sub dir gnulib.
4051 (all-lib, am--refresh): New targets.
4052 (memmem.o): Remove target.
4053 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4054 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4055 (AC_REPLACE_FUNCS): Remove memmem.
4056 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4057 (AC_OUTPUT): Generate Makefile in gnulib/.
4058 * aclocal.m4, config.in, configure: Regenerated.
4059
4060 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4061
4062 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4063
4064 2012-04-05 Pedro Alves <palves@redhat.com>
4065
4066 -Werror=strict-aliasing
4067
4068 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4069 pointer.
4070
4071 2012-04-04 Pedro Alves <palves@redhat.com>
4072
4073 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4074 (sparc_store_gregset_from_stack, sparc_store_gregset)
4075 (sparc_breakpoint_at): Fix formatting.
4076
4077 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4078
4079 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4080 are available.
4081 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4082 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4083 * config.in: Regenerate.
4084 * configure: Likewise.
4085
4086 2012-03-29 Pedro Alves <palves@redhat.com>
4087
4088 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4089 Correct ptrace arguments.
4090
4091 2012-03-28 Pedro Alves <palves@redhat.com>
4092
4093 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4094 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4095 (IA64_FR1_REGNUM): New defines.
4096 (ia64_fetch_register): New.
4097 (the_low_target): Install it.
4098 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4099 field.
4100 * linux-low.c (linux_fetch_registers): Try the
4101 the_low_target.fetch_register hook first.
4102
4103 * linux-arm-low.c (the_low_target): Adjust.
4104 * linux-bfin-low.c (the_low_target): Adjust.
4105 * linux-cris-low.c (the_low_target): Adjust.
4106 * linux-crisv32-low.c (the_low_target): Adjust.
4107 * linux-m32r-low.c (the_low_target): Adjust.
4108 * linux-m68k-low.c (the_low_target): Adjust.
4109 * linux-mips-low.c (the_low_target): Adjust.
4110 * linux-ppc-low.c (the_low_target): Adjust.
4111 * linux-s390-low.c (the_low_target): Adjust.
4112 * linux-sh-low.c (the_low_target): Adjust.
4113 * linux-sparc-low.c (the_low_target): Adjust.
4114 * linux-tic6x-low.c (the_low_target): Adjust.
4115 * linux-x86-low.c (the_low_target): Adjust.
4116 * linux-xtensa-low.c (the_low_target): Adjust.
4117
4118 2012-03-26 Pedro Alves <palves@redhat.com>
4119
4120 * server.c (handle_qxfer_libraries): Don't bail early if
4121 the_target->qxfer_libraries_svr4 is not NULL.
4122
4123 2012-03-26 Pedro Alves <palves@redhat.com>
4124
4125 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4126
4127 2012-03-23 Pedro Alves <palves@redhat.com>
4128
4129 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4130 "library-list-svr4" element's start tag when the the DSO list is
4131 empty.
4132
4133 2012-03-23 Pedro Alves <palves@redhat.com>
4134
4135 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4136 a variable whose type size is the same as the inferior's pointer
4137 size.
4138
4139 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4140
4141 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4142 struct siginfo.
4143 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4144 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4145 * linux-low.h: Include <signal.h>.
4146 (struct siginfo): Remove forward declaration.
4147 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4148 struct siginfo.
4149
4150 2012-03-21 Mike Frysinger <vapier@gentoo.org>
4151
4152 * .gitignore: Ignore more files.
4153
4154 2012-03-19 Pedro Alves <palves@redhat.com>
4155 Jan Kratochvil <jan.kratochvil@redhat.com>
4156
4157 * server.c (cont_thread, general_thread): Add describing comments.
4158 (start_inferior): Clear `cont_thread'.
4159 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4160 of a process.
4161
4162 2012-03-15 Yao Qi <yao@codesourcery.com>
4163
4164 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4165 handling to ...
4166 (cmd_qtdp): ... here.
4167
4168 2012-03-15 Yao Qi <yao@codesourcery.com>
4169
4170 * tracepoint.c (struct tracepoint_action_ops): New.
4171 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4172 (m_tracepoint_action_download): New.
4173 (r_tracepoint_action_download): New.
4174 (x_tracepoint_action_download): New.
4175 (l_tracepoint_action_download): New.
4176 (add_tracepoint_action): Install `action->ops' according type.
4177 (download_tracepoint_1): Move code `download' function pointer
4178 of various tracepoint_action_ops.
4179
4180 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4181
4182 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4183 linux_ptrace_attach_warnings.
4184
4185 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4186
4187 * Makefile.in (linux-ptrace.o): New.
4188 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4189 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4190 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4191 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4192 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4193 of these targets.
4194 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4195
4196 2012-03-08 Yao Qi <yao@codesourcery.com>
4197 Pedro Alves <palves@redhat.com>
4198
4199 Fix PR server/13392.
4200 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4201 offset of JMP insn.
4202 * tracepoint.c (remove_tracepoint): New.
4203 (cmd_qtdp): Call remove_tracepoint when failed to install.
4204
4205 2012-03-07 Pedro Alves <palves@redhat.com>
4206
4207 * linux-low.c (get_detach_signal): New.
4208 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4209 Pass on pending signals to PTRACE_DETACH. Check the result of the
4210 ptrace call.
4211 * server.c (program_signals, program_signals_p): New.
4212 (handle_general_set): Handle QProgramSignals.
4213 * server.h (program_signals, program_signals_p): Declare.
4214
4215 2012-03-05 Pedro Alves <palves@redhat.com>
4216 Jan Kratochvil <jan.kratochvil@redhat.com>
4217
4218 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4219 New comment why.
4220
4221 2012-03-03 Yao Qi <yao@codesourcery.com>
4222
4223 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4224 agent_look_up_symbols.
4225
4226 2012-03-03 Yao Qi <yao@codesourcery.com>
4227
4228 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4229 (linux-x86-low.o): Likewise.
4230 * server.h: Remove in_process_agent_loaded.
4231 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4232 common/agent.c.
4233 Update callers.
4234
4235 2012-03-03 Yao Qi <yao@codesourcery.com>
4236
4237 * tracepoint.c (gdb_agent_capability): New global.
4238 (in_process_agent_loaded_ust): Renamed to
4239 `in_process_agent_supports_ust'.
4240 Update callers.
4241 (in_process_agent_supports_ust): Call agent_capability_check.
4242 (clear_installed_tracepoints): Assert that agent supports
4243 agent.
4244
4245 2012-03-03 Yao Qi <yao@codesourcery.com>
4246
4247 * linux-low.c (linux_supports_agent): New.
4248 (linux_target_ops): Initialize field `supports_agent' with
4249 linux_supports_agent.
4250 * target.h (struct target_ops) <supports_agent>: New.
4251 (target_supports_agent): New macro.
4252 * server.c (handle_general_set): Handle packet 'QAgent'.
4253 (handle_query): Send `QAgent+'.
4254 * Makefile.in (server.o): Depends on agent.h.
4255
4256 2012-03-03 Yao Qi <yao@codesourcery.com>
4257
4258 * Makefile.in (OBS): Add agent.o.
4259 Add new rule for agent.o.
4260 Track dependence of tracepoint.c on agent.h.
4261 * tracepoint.c (run_inferior_command_1):
4262 (run_inferior_command): Call agent_run_command.
4263 (gdb_ust_connect_sync_socket): Deleted. Move it to
4264 common/agent.c.
4265 (resume_thread, stop_thread): Likewise.
4266 (gdb_ust_socket_init): Renamed to ...
4267 (gdb_agent_socket_init): ... New.
4268 (gdb_ust_thread): Renamed to ...
4269 (gdb_agent_helper_thread): ... New.
4270 (gdb_ust_init): Move some code to ...
4271 (gdb_agent_init): ... here. New.
4272 [HAVE_UST]: Call gdb_ust_init.
4273 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4274 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4275 * config.in, configure: Regenerated.
4276
4277 2012-03-02 Pedro Alves <palves@redhat.com>
4278
4279 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4280 * linux-low.c (struct simple_pid_list): New.
4281 (stopped_pids): New a struct simple_pid_list pointer.
4282 (add_to_pid_list, pull_pid_from_list): New.
4283 (handle_extended_wait): Don't assume the first signal new children
4284 report is SIGSTOP. Adjust call to pull_pid_from_list.
4285 (linux_wait_for_lwp): Adjust.
4286
4287 2012-03-02 Yao Qi <yao@codesourcery.com>
4288
4289 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4290 debug log.
4291
4292 2012-03-02 Yao Qi <yao@codesourcery.com>
4293
4294 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4295 `stop_pc' and `tpoint'. Update caller.
4296
4297 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4298
4299 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4300 * linux-low.c (use_linux_regsets): New macro.
4301 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4302 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4303 (linux_register_in_regsets): New function.
4304 (usr_fetch_inferior_registers): Skip registers covered by
4305 regsets.
4306 (usr_store_inferior_registers): Likewise.
4307 (usr_fetch_inferior_registers): New macro.
4308 (usr_store_inferior_registers): Likewise.
4309 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4310 (linux_store_registers): Likewise.
4311 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4312 prototype.
4313 (init_registers_mips64_dsp_linux): Likewise.
4314 (init_registers_mips_linux): New macro.
4315 (init_registers_mips_dsp_linux): Likewise.
4316 (mips_dsp_num_regs): Likewise.
4317 (DSP_BASE, DSP_CONTROL): New fallback macros.
4318 (mips_base_regs): New macro.
4319 (mips_regmap): Use it. Fix the size.
4320 (mips_dsp_regmap): New variable.
4321 (mips_dsp_regset_bitmap): Likewise.
4322 (mips_arch_setup): New function.
4323 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4324 than mips_regmap.
4325 (mips_cannot_store_register): Likewise.
4326 (the_low_target): Update .arch_setup, .num_regs and .regmap
4327 initializers. Add .regset_bitmap initializer.
4328 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4329 initializer.
4330 * linux-bfin-low.c (the_low_target): Likewise.
4331 * linux-cris-low.c (the_low_target): Likewise.
4332 * linux-crisv32-low.c (the_low_target): Likewise.
4333 * linux-ia64-low.c (the_low_target): Likewise.
4334 * linux-m32r-low.c (the_low_target): Likewise.
4335 * linux-m68k-low.c (the_low_target): Likewise.
4336 * linux-ppc-low.c (the_low_target): Likewise.
4337 * linux-s390-low.c (the_low_target): Likewise.
4338 * linux-sh-low.c (the_low_target): Likewise.
4339 * linux-sparc-low.c (the_low_target): Likewise.
4340 * linux-tic6x-low.c (the_low_target): Likewise.
4341 * linux-x86-low.c (the_low_target): Likewise.
4342 * linux-xtensa-low.c (the_low_target): Likewise.
4343 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4344 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4345 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4346 srv_xmlfiles.
4347 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4348 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4349
4350 2012-02-29 Yao Qi <yao@codesourcery.com>
4351 Pedro Alves <palves@redhat.com>
4352
4353 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4354 `step_over_finished' is true.
4355
4356 2012-02-27 Pedro Alves <palves@redhat.com>
4357
4358 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4359 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4360
4361 2012-02-27 Pedro Alves <palves@redhat.com>
4362
4363 PR server/9684
4364 * linux-low.c (pid_is_stopped): New.
4365 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4366
4367 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
4368
4369 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4370 of conditions.
4371
4372 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4373
4374 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4375
4376 2012-02-24 Luis Machado <lgustavo@codesourcery>
4377
4378 * server.c (handle_query): Advertise support for target-side
4379 breakpoint condition evaluation.
4380 (process_point_options): New function.
4381 (process_serial_event): When inserting a breakpoint, check for
4382 a target-side condition that should be evaluated.
4383
4384 * mem-break.c: Include regcache.h and ax.h.
4385 (point_cond_list_t): New data structure.
4386 (breakpoint) <cond_list>: New field.
4387 (find_gdb_breakpoint_at): Make non-static.
4388 (delete_gdb_breakpoint_at): Clear any target-side
4389 conditions.
4390 (clear_gdb_breakpoint_conditions): New function.
4391 (add_condition_to_breakpoint): Likewise.
4392 (add_breakpoint_condition): Likewise.
4393 (gdb_condition_true_at_breakpoint): Likewise.
4394 (gdb_breakpoint_here): Return result directly instead
4395 of going through a local variable.
4396
4397 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4398 (clear_gdb_breakpoint_conditions): Likewise.
4399 (add_breakpoint_condition): Likewise.
4400 (gdb_condition_true_at_breakpoint): Likewise.
4401
4402 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4403 (need_step_over_p): Take target-side breakpoint condition into
4404 consideration.
4405
4406 2012-02-24 Luis Machado <lgustavo@codesourcery>
4407
4408 * server.h: Include tracepoint.h.
4409 (agent_mem_read, agent_get_trace_state_variable_value,
4410 agent_set_trace_state_variable_value,
4411 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4412 get_set_tsv_func_addr): New prototypes.
4413
4414 * ax.h: New include file.
4415 * ax.c: New source file.
4416
4417 * tracepoint.c: Include ax.h.
4418 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4419 agent_expr, eval_result_type): Move to ax.h.
4420 (parse_agent_expr): Rename to ...
4421 (gdb_parse_agent_expr): ... this, make it non-static and move
4422 to ax.h.
4423 (unparse_agent_expr) Rename to ...
4424 (gdb_unparse_agent_expr): ... this, make it non-static and move
4425 to ax.h.
4426 (eval_agent_expr): Rename to ...
4427 (eval_tracepoint_agent_expr): ... this.
4428 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4429 forward declarations.
4430 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4431 (agent_get_trace_state_variable_value): New function.
4432 (agent_set_trace_state_variable_value): New function.
4433 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4434 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4435 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4436 (condition_true_at_tracepoint): Likewise.
4437 (parse_agent_expr): Rename to ...
4438 (gdb_parse_agent_expr): ... this and move to ax.c.
4439 (unparse_agent_expr): Rename to ...
4440 (gdb_unparse_agent_expr): ... this and move to ax.c.
4441 (gdb_agent_op_name): Move to ax.c.
4442 (eval_agent_expr): Rename to ...
4443 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4444 and move to ax.c.
4445 (eval_tracepoint_agent_expr): New function.
4446 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4447 non-static.
4448 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4449 ax.c.
4450 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4451 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4452 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4453 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4454 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4455 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4456 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4457 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4458 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4459 (compile_bytecodes): Remove forward declaration.
4460 (is_goto_target): Move to ax.c.
4461 (compile_bytecodes): Move to ax.c and call
4462 agent_get_trace_state_variable_value (...) and
4463 agent_set_trace_state_variable_value (...).
4464
4465 * Makefile.in: Update ax.c and IPA dependencies.
4466
4467 2012-02-24 Pedro Alves <palves@redhat.com>
4468
4469 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4470 (cmd_bigqtbuffer_circular): ... this. Only handle
4471 'QTBuffer:circular:'.
4472 (handle_tracepoint_general_set): Adjust.
4473
4474 2012-02-16 Yao Qi <yao@codesourcery.com>
4475
4476 * inferiors.c: Move code to ...
4477 * dll.c: .... here. New.
4478 * server.h: Declare clear_dlls.
4479 * Makefile.in (SFILES): Add dll.c.
4480 (OBS): Add dll.o
4481 (dll.o): New rule.
4482
4483 2012-02-11 Yao Qi <yao@codesourcery.com>
4484
4485 * server.c: (handle_monitor_command): Add a new parameter
4486 `own_buf'.
4487 (handle_query): Update caller.
4488
4489 2012-02-09 Joel Brobecker <brobecker@adacore.com>
4490
4491 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4492 * configure, config.in: Regenerate.
4493 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4494 is not defined.
4495
4496 2012-02-02 Pedro Alves <palves@redhat.com>
4497
4498 Try SIGKILL first, then PTRACE_KILL.
4499 * linux-low.c (linux_kill_one_lwp): New.
4500 (linux_kill_one_lwp): Rename to ...
4501 (kill_one_lwp_callback): ... this. Use the new
4502 linux_kill_one_lwp.
4503
4504 2012-02-02 Pedro Alves <palves@redhat.com>
4505
4506 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4507 inferior.
4508
4509 2012-01-27 Pedro Alves <palves@redhat.com>
4510
4511 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4512 (elf_64_file_p): Make static.
4513 (linux_pid_exe_is_elf_64_file): New.
4514 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4515 Delete declarations.
4516 (linux_pid_exe_is_elf_64_file): Declare.
4517 * linux-x86-low.c (x86_arch_setup): Use
4518 linux_pid_exe_is_elf_64_file.
4519
4520 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4521
4522 * linux-low.c (linux_wait_for_event_1): Rename to ...
4523 (linux_wait_for_event): ... here and merge it with former
4524 linux_wait_for_event - new variable wait_ptid, use it.
4525 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4526
4527 2012-01-23 Pedro Alves <palves@redhat.com>
4528
4529 * server.c (main): Avoid yet another case of infinite loop while
4530 detaching/killing after a longjmp.
4531
4532 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4533
4534 Code cleanup.
4535 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4536
4537 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4538
4539 * hostio.c (handle_readlink): New function.
4540 (handle_vFile): Call it to handle "vFile:readlink" packets.
4541
4542 2012-01-20 Pedro Alves <palves@redhat.com>
4543 Ulrich Weigand <ulrich.weigand@linaro.org>
4544
4545 * server.c (handle_v_requests): Only support vAttach and vRun to
4546 start multiple processes when in extended protocol mode.
4547
4548 2012-01-17 Pedro Alves <palves@redhat.com>
4549
4550 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4551 memalign plus mprotect to allocate the scratch buffer.
4552
4553 2012-01-13 Pedro Alves <palves@redhat.com>
4554
4555 * server.c (attach_inferior): Clear `cont_thread'.
4556
4557 2012-01-13 Pedro Alves <palves@redhat.com>
4558
4559 * server.c (main): Avoid infinite loop while detaching/killing
4560 after a longjmp.
4561
4562 2012-01-09 Doug Evans <dje@google.com>
4563
4564 * server.c (start_inferior): Set last_ptid in --wrapper case.
4565
4566 2012-01-06 Yao Qi <yao@codesourcery.com>
4567
4568 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4569 defined.
4570 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4571
4572 2012-01-04 Yao Qi <yao@codesourcery.com>
4573
4574 * tracepoint.c (cmd_qtdp): Print debug message
4575 for static tracepoint.
4576
4577 2012-01-04 Yao Qi <yao@codesourcery.com>
4578
4579 * tracepoint.c (trace_vdebug): Differentiate debug message
4580 between gdbserver and IPA.
4581
4582 2012-01-03 Yao Qi <yao@codesourcery.com>
4583
4584 * tracepoint.c (tracepoint_was_hit): Don't collect for
4585 static tracepoint.
4586
4587 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4588
4589 * terminal.h: Reformat copyright header.
4590
4591 2012-01-02 Joel Brobecker <brobecker@adacore.com>
4592
4593 * server.c (gdbserver_version): Update copyright year.
4594 * gdbreplay.c (gdbreplay_version): Likewise.
4595
4596 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4597
4598 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4599
4600 Revert:
4601 2011-12-18 Hui Zhu <teawater@gmail.com>
4602 * linux-low.c (linux_create_inferior): Save return value to ret.
4603
4604 2011-12-18 Hui Zhu <teawater@gmail.com>
4605
4606 * linux-low.c (linux_create_inferior): Save return value to ret.
4607
4608 2011-12-16 Doug Evans <dje@google.com>
4609
4610 * linux-low.c (linux_create_inferior): If stdio connection,
4611 redirect stdin from /dev/null, stdout to stderr.
4612 * remote-utils.c (remote_is_stdio): New static global.
4613 (remote_connection_is_stdio): New function.
4614 (remote_prepare): Handle stdio connection.
4615 (remote_open): Ditto.
4616 (remote_close): Don't close stdin for stdio connections.
4617 (read_prim,write_prim): New functions. Replace all calls to
4618 read/write to these.
4619 * server.c (main): Watch for "-" argument. Move call to
4620 remote_prepare before start_inferior.
4621 * server.h (STDIO_CONNECTION_NAME): New macro.
4622 (remote_connection_is_stdio): Declare.
4623
4624 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4625 in debugging output.
4626
4627 2011-12-15 Yao Qi <yao@codesourcery.com>
4628
4629 * tracepoint.c: Include sys/syscall.h.
4630 (gdb_ust_thread): Remove preprocessor conditional.
4631
4632 2011-12-14 Pedro Alves <pedro@codesourcery.com>
4633
4634 * linux-low.c (linux_detach_one_lwp): Call
4635 the_low_target.prepare_to_resume before detaching.
4636
4637 2011-12-14 Yao Qi <yao@codesourcery.com>
4638
4639 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4640 of write.
4641
4642 2011-12-14 Yao Qi <yao@codesourcery.com>
4643
4644 * i386-low.c (i386_low_stopped_data_address): Initialize local
4645 variable `control'.
4646
4647 2011-12-13 Pedro Alves <pedro@codesourcery.com>
4648
4649 PR remote/13492
4650
4651 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4652 DR_CONTROL unless necessary. Extend comments.
4653 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4654 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4655
4656 2011-12-13 Yao Qi <yao@codesourcery.com>
4657
4658 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4659 macros.
4660 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4661
4662 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4663
4664 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4665 Print new debug message for such case.
4666
4667 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4668
4669 Fix overlapping memcpy.
4670 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4671 the read_inferior_memory transfer.
4672 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4673 write_inferior_memory transfer.
4674 (set_fast_tracepoint_jump): New variable buf. Use it for the
4675 read_inferior_memory and write_inferior_memory transfers.
4676 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4677 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4678 Use it for the write_inferior_memory transfer.
4679 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4680 buffers.
4681
4682 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4683
4684 * linux-low.c (fetch_register, store_register): Make code
4685 consistent, fix formatting.
4686
4687 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4688
4689 * linux-low.c (usr_store_inferior_registers): Factor out code
4690 to handle individual registers into...
4691 (store_register): ... this new function.
4692
4693 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4694
4695 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4696 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4697 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4698 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4699 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4700 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4701 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4702 (srv_xmlfiles): Add new XML files.
4703
4704 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4705 and <sys/uio.h>.
4706 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4707 (init_registers_s390_linux32v1): Add prototype.
4708 (init_registers_s390_linux32v2): Likewise.
4709 (init_registers_s390_linux64v1): Likewise.
4710 (init_registers_s390_linux64v2): Likewise.
4711 (init_registers_s390x_linux64v1): Likewise.
4712 (init_registers_s390x_linux64v2): Likewise.
4713 (s390_num_regs): Increment to 52.
4714 (s390_regmap): Add orig_r2 register.
4715 (s390_num_regs_3264): Increment to 68.
4716 (s390_regmap_3264): Add orig_r2 register.
4717 (s390_collect_ptrace_register): Handle orig_r2 register.
4718 (s390_supply_ptrace_register): Likewise.
4719 (s390_fill_last_break): New function.
4720 (s390_store_last_break): Likewise.
4721 (s390_fill_system_call): New function.
4722 (s390_store_system_call): Likewise.
4723 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4724 register sets.
4725 (s390_check_regset): New function.
4726 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4727 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4728 Update target_regsets for available register sets.
4729
4730 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4731 Jan Kratochvil <jan.kratochvil@redhat.com>
4732
4733 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4734 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4735 New.
4736 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4737 * linux-low.h (struct process_info_private): New member r_debug.
4738 * server.c (handle_qxfer_libraries): Call
4739 the_target->qxfer_libraries_svr4.
4740 (handle_qxfer_libraries_svr4): New function.
4741 (qxfer_packets): New entry "libraries-svr4".
4742 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4743 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4744 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4745 PACKET_qXfer_libraries_svr4.
4746
4747 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4748
4749 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4750 PSW address/mask between 8-byte and 16-byte formats.
4751 (s390_supply_ptrace_register): Likewise.
4752 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4753 basic addressing mode bit.
4754
4755 2011-11-24 Stan Shebs <stan@codesourcery.com>
4756
4757 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4758
4759 2011-11-17 Stan Shebs <stan@codesourcery.com>
4760
4761 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4762 (tracing_start_time): New global.
4763 (tracing_stop_time): New global.
4764 (tracing_user_name): New global.
4765 (tracing_notes): New global.
4766 (tracing_stop_note): New global.
4767 (cmd_qtstart): Set traceframe_usage, start_time.
4768 (stop_tracing): Set stop_time.
4769 (cmd_qtstatus): Report additional status.
4770 (cmd_qtp): New function.
4771 (handle_tracepoint_query): Call it.
4772 (cmd_qtnotes): New function.
4773 (handle_tracepoint_general_set): Call it.
4774 (get_timestamp): Rename from tsv_get_timestamp.
4775
4776 2011-11-14 Stan Shebs <stan@codesourcery.com>
4777 Kwok Cheung Yeung <kcy@codesourcery.com>
4778
4779 * linux-x86-low.c (small_jump_insn): New.
4780 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4781 trampoline and error message, build a trampoline and issue a small
4782 jump instruction to it.
4783 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4784 trampoline and error message.
4785 (x86_get_min_fast_tracepoint_insn_len): New.
4786 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4787 * linux-low.h (struct linux_target_ops): Add arguments to
4788 install_fast_tracepoint_jump_pad operation, add new operation.
4789 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4790 arguments.
4791 (linux_get_min_fast_tracepoint_insn_len): New function.
4792 (linux_target_op): Add new operation.
4793 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4794 (gdb_trampoline_buffer_end): Ditto.
4795 (gdb_trampoline_buffer_error): Ditto.
4796 (struct ipa_sym_addresses): Add fields for new IPA variables.
4797 (symbol_list): Add entries for new IPA variables.
4798 (struct tracepoint): Add fields to hold the address range of the
4799 trampoline used by the tracepoint.
4800 (trampoline_buffer_head): New static variable.
4801 (trampoline_buffer_tail): Ditto.
4802 (claim_trampoline_space): New function.
4803 (have_fast_tracepoint_trampoline_buffer): New function.
4804 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4805 structure.
4806 (install_fast_tracepoint): Ditto, also add error buffer argument.
4807 (cmd_qtminftpilen): New function.
4808 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4809 (fast_tracepoint_from_trampoline_address): New function.
4810 (fast_tracepoint_collecting): Handle trampoline as part of jump
4811 pad space.
4812 (set_trampoline_buffer_space): New function.
4813 (initialize_tracepoint): Initialize new IPA variables.
4814 * target.h (struct target_ops): Add arguments to
4815 install_fast_tracepoint_jump_pad operation, add new
4816 get_min_fast_tracepoint_insn_len operation.
4817 (target_get_min_fast_tracepoint_insn_len): New.
4818 (install_fast_tracepoint_jump_pad): Add arguments.
4819 * server.h (IPA_BUFSIZ): Define.
4820 * linux-i386-ipa.c: Include extra header files.
4821 (initialize_fast_tracepoint_trampoline_buffer): New function.
4822 (initialize_low_tracepoint): Call it.
4823 * server.h (set_trampoline_buffer_space): Declare.
4824 (claim_trampoline_space): Ditto.
4825 (have_fast_tracepoint_trampoline_buffer): Ditto.
4826
4827 2011-11-14 Yao Qi <yao@codesourcery.com>
4828
4829 * server.c (handle_query): Handle InstallInTrace for qSupported.
4830 * tracepoint.c (add_tracepoint): Sort list.
4831 (install_tracepoint, download_tracepoint): New.
4832 (cmd_qtdp): Call them to install and download tracepoints.
4833 (sort_tracepoints): Removed.
4834 (cmd_qtstart): Update.
4835
4836 2011-11-14 Yao Qi <yao@codesourcery.com>
4837
4838 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4839 * mem-break.h: Declare.
4840 * tracepoint.c (cmd_qtstart): Move some code to ...
4841 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4842 New.
4843 (download_tracepoints): Move some code to ...
4844 (download_tracepoint_1): ... here. New.
4845
4846 2011-11-08 Yao Qi <yao@codesourcery.com>
4847
4848 * remote-utils.c (relocate_instruction): A comment fix.
4849
4850 2011-11-07 Joel Brobecker <brobecker@adacore.com>
4851
4852 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4853 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4854 dr_status_mirror and dr_control_mirror from debug_reg_state.
4855 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4856 (i386_initial_stuff): Remove use of deleted globals.
4857 (i386_get_thread_context, i386_set_thread_context,
4858 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4859 from debug_reg_state.
4860
4861 2011-11-05 Yao Qi <yao@codesourcery.com>
4862
4863 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4864 address as TPOINT's.
4865
4866 2011-11-02 Stan Shebs <stan@codesourcery.com>
4867
4868 * tracepoint.c (agent_mem_read_string): New function.
4869 (eval_agent_expr): Call it for tracenz.
4870 * server.c (handle_query): Report support for tracenz.
4871
4872 2011-11-02 Yao Qi <yao@codesourcery.com>
4873
4874 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4875
4876 2011-11-02 Yao Qi <yao@codesourcery.com>
4877
4878 * target.h: Fix a typo in comment.
4879
4880 2011-10-31 Pedro Alves <pedro@codesourcery.com>
4881
4882 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4883 clobber the breakpoints' shadows with fast tracepoint jumps.
4884 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4885 * target.c (write_inferior_memory): Also pass MYADDR down to
4886 check_mem_write.
4887
4888 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4889
4890 * configure.ac: Check support for personality routine.
4891 * configure: Regenerate.
4892 * config.in: Likewise.
4893 * linux-low.c: Include <sys/personality.h>.
4894 Define ADDR_NO_RANDOMIZE if necessary.
4895 (linux_create_inferior): Disable address space randomization when
4896 forking inferior, if requested.
4897 (linux_supports_disable_randomization): New function.
4898 (linux_target_ops): Install it.
4899 * server.h (disable_randomization): Declare.
4900 * server.c (disable_randomization): New global variable.
4901 (handle_general_set): Handle QDisableRandomization.
4902 (handle_query): Likewise for qSupported.
4903 (main): Support --disable-randomization and --no-disable-randomization
4904 command line arguments.
4905 * target.h (struct target_ops): Add supports_disable_randomization.
4906 (target_supports_disable_randomization): New macro.
4907
4908 2011-09-29 Mike Frysinger <vapier@gentoo.org>
4909
4910 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4911 ifdef check.
4912 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4913 [!PT_GETDSBT] (target_loadmap): New definition.
4914 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4915 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4916 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4917 and PT_GETDSBT to LINUX_LOADMAP.
4918 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4919 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4920
4921 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4922
4923 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4924 (arm_linux_hwbp_cap): New static variable.
4925 (arm_linux_get_hwbp_cap): Replace by ...
4926 (arm_linux_init_hwbp_cap): ... this new function.
4927 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4928 (arm_linux_get_hw_watchpoint_count): Likewise.
4929 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4930 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4931 (arm_prepare_to_resume): Use perror_with_name instead of error.
4932
4933 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
4934
4935 * linux-arm-low.c: Include <signal.h>.
4936 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4937 (struct arm_linux_hwbp_cap): New data type.
4938 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4939 (struct arm_linux_hw_breakpoint): New data type.
4940 (MAX_BPTS, MAX_WPTS): Define.
4941 (struct arch_process_info, struct arch_lwp_info): New data types.
4942 (arm_linux_get_hwbp_cap): New function.
4943 (arm_linux_get_hw_breakpoint_count): Likewise.
4944 (arm_linux_get_hw_watchpoint_count): Likewise.
4945 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4946 (arm_hwbp_control_initialize): Likewise.
4947 (arm_hwbp_control_is_enabled): Likewise.
4948 (arm_hwbp_control_is_initialized): Likewise.
4949 (arm_hwbp_control_disable): Likewise.
4950 (arm_linux_hw_breakpoint_equal): Likewise.
4951 (arm_linux_hw_point_initialize): Likewise.
4952 (struct update_registers_data): New data structure.
4953 (update_registers_callback: New function.
4954 (arm_insert_point): Likewise.
4955 (arm_remove_point): Likewise.
4956 (arm_stopped_by_watchpoint): Likewise.
4957 (arm_stopped_data_address): Likewise.
4958 (arm_new_process): Likewise.
4959 (arm_new_thread): Likewise.
4960 (arm_prepare_to_resume): Likewise.
4961 (the_low_target): Register arm_insert_point, arm_remove_point,
4962 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4963 arm_new_thread, and arm_prepare_to_resume.
4964
4965 2011-09-15 Stan Shebs <stan@codesourcery.com>
4966
4967 * server.h (struct emit_ops): Add compare-goto fields.
4968 * tracepoint.c (gdb_agent_op_sizes): New table.
4969 (emit_eq_goto): New function.
4970 (emit_ne_goto): New function.
4971 (emit_lt_goto): New function.
4972 (emit_le_goto): New function.
4973 (emit_gt_goto): New function.
4974 (emit_ge_goto): New function.
4975 (is_goto_target): New function.
4976 (compile_bytecodes): Recognize special cases of compare-goto
4977 combinations and call specialized emitters for them.
4978 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4979 (amd64_emit_ne_goto): New function.
4980 (amd64_emit_lt_goto): New function.
4981 (amd64_emit_le_goto): New function.
4982 (amd64_emit_gt_goto): New function.
4983 (amd64_emit_ge_goto): New function.
4984 (amd64_emit_ops): Add the new functions.
4985 (i386_emit_eq_goto): New function.
4986 (i386_emit_ne_goto): New function.
4987 (i386_emit_lt_goto): New function.
4988 (i386_emit_le_goto): New function.
4989 (i386_emit_gt_goto): New function.
4990 (i386_emit_ge_goto): New function.
4991 (i386_emit_ops): Add the new functions.
4992
4993 2011-09-08 Stan Shebs <stan@codesourcery.com>
4994
4995 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4996 (i386_emit_epilogue): Restore %ebx.
4997
4998 2011-08-31 Jie Zhang <jzhang918@gmail.com>
4999
5000 * server.c (step_thread): Remove definition.
5001 (process_serial_event): Don't handle Hs.
5002 * server.h (step_thread): Remove declaration.
5003 * target.c (set_desired_inferior): Remove use of step_thread.
5004
5005 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5006
5007 * linux-low.c: Include linux-procfs.h.
5008 (linux_attach_lwp_1): Update comments.
5009 (linux_attach): Scan for existing threads when attaching to a
5010 process that is the tgid.
5011 * Makefile.in: Update dependencies.
5012
5013 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
5014
5015 * configure.srv: Add linux-procfs.o dependencies.
5016
5017 2011-08-14 Yao Qi <yao@codesourcery.com>
5018
5019 * target.h (struct target_ops): Fix indent.
5020 * win32-low.c (win32_target_ops): Fix comment.
5021
5022 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
5023 Yao Qi <yao@codesourcery.com>
5024
5025 * Makefile.in (clean): Remove tic6x-*.c files.
5026 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5027 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5028 (tic6x-c64xp-linux.c): Likewise.
5029 * configure.srv: Add support for tic6x-*-uclinux.
5030 * linux-tic6x-low.c: New.
5031 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5032
5033 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
5034 Yao Qi <yao@codesourcery.com>
5035
5036 * target.h (struct target_ops): Add read_loadmap.
5037 * linux-low.c (struct target_loadseg): New type.
5038 (struct target_loadmap): New type.
5039 (linux_read_loadmap): New function.
5040 (linux_target_ops): Add linux_read_loadmap.
5041 * server.c (handle_query): Support qXfer:fdpic:read packet.
5042 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5043 to NULL.
5044
5045 2011-08-05 Eli Zaretskii <eliz@gnu.org>
5046
5047 * win32-low.c: Include <stdint.h>.
5048
5049 2011-07-22 Pedro Alves <pedro@codesourcery.com>
5050
5051 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5052 to the inferior here.
5053 (i386_remove_aligned_watchpoint): Ditto.
5054 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5055 fit part of the watchpoint in the debug registers.
5056 (i386_update_inferior_debug_regs): New.
5057 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5058 registers, and only update the inferior on success.
5059 (i386_low_remove_watchpoint): Ditto.
5060
5061 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5062
5063 * linux-low.c (compare_ints, unique, list_threads, show_process,
5064 linux_core_of_thread): Delete.
5065 (linux_target_ops): Change linux_core_of_thread to
5066 linux_common_core_of_thread.
5067 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5068 * utils.c (malloc_failure): Change type of argument.
5069 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5070 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5071 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5072 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5073 (IPA_OBJS): Add common-utils-ipa.o.
5074 (ptid_h, linux_osdata_h): New macros.
5075 (server_h): Add common/common-utils.h, common/xml-utils.h,
5076 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5077 common/ptid.h.
5078 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5079 ptid.o, buffer.o): New rules.
5080 (linux-low.o): Add common/linux-osdata.h as a dependency.
5081 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5082 * configure.ac: Add AC_HEADER_DIRENT check.
5083 * config.in: Regenerate.
5084 * configure: Regenerate.
5085 * remote-utils.c (xml_escape_text): Delete.
5086 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5087 buffer_xml_printf): Move to common/buffer.c.
5088 * server.c (main): Remove call to initialize_inferiors.
5089 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5090 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5091 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5092 internal_error, gdb_assert, gdb_assert_fail): Delete.
5093 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5094 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5095 common/buffer.h.
5096 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5097 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5098 initialize_inferiors): Delete.
5099
5100 2011-07-20 Pedro Alves <pedro@codesourcery.com>
5101
5102 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5103 symbol error.
5104
5105 2011-05-31 Pedro Alves <pedro@codesourcery.com>
5106
5107 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5108 assertion.
5109 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5110
5111 2011-05-26 Yao Qi <yao@codesourcery.com>
5112
5113 * Makefile.in (thread-db.o): Track dependence to
5114 common/gdb_thread_db.h.
5115 * thread-db.c: include gdb_thread_db.h from right place.
5116
5117 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5118
5119 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5120 __FILE__ and __LINE__ to internal_error.
5121
5122 2011-05-13 Doug Evans <dje@google.com>
5123
5124 * thread-db.c (try_thread_db_load_from_sdir): New function.
5125 (try_thread_db_load_from_dir): New function.
5126 (thread_db_load_search): Handle $sdir, ignore $pdir.
5127 Remove trying of system directories if search of
5128 libthread-db-search-path fails, that is now done via $sdir.
5129
5130 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5131
5132 * server.c (handle_query): Add EnableDisableTracepoints to the list
5133 of supported features.
5134 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5135 tracepoints.
5136 (cmd_qtenable_disable): New.
5137 (cmd_qtstart): Install tracepoints even if disabled.
5138 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5139 receiving a QTEnable or QTDisable packet.
5140 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5141 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5142 tracepoints.
5143 (gdb_probe): Skip data collection if static tracepoint is disabled.
5144
5145 2011-05-10 Doug Evans <dje@google.com>
5146
5147 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5148
5149 2011-05-04 Doug Evans <dje@google.com>
5150
5151 * linux-low.c (linux_join): Skip process lookup.
5152 * spu-low.c (spu_join): Ditto.
5153 * server.c (join_inferiors_callback): Delete.
5154 (process_serial_event): For 'D' packet (detach) call join_inferior
5155 directly.
5156
5157 2011-05-04 Joseph Myers <joseph@codesourcery.com>
5158
5159 * README: Don't mention xscale*-*-linux*.
5160 * configure.srv (xscale*-*-linux*): Don't handle target.
5161
5162 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5163
5164 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5165 casting pointers.
5166 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5167 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5168 (i386_emit_void_call_2): Likewise.
5169
5170 2011-04-26 Yao Qi <yao@codesourcery.com>
5171
5172 * linux-low.c: Move common macros to linux-ptrace.h.
5173 Include linux-ptrace.h.
5174 * Makefile.in (linux_ptrace_h): New.
5175 (linux-low.o): Depends on linux-ptrace.h.
5176
5177 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5178
5179 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5180 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5181 (remote_prepare): New function with most of the TCP code from ...
5182 (remote_open): ... here. Detect PORT here unconditionally. Move also
5183 setting transport_is_reliable.
5184 * server.c (run_once): New variable.
5185 (gdbserver_usage): Document it.
5186 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5187 the first run if RUN_ONCE.
5188 * server.h (run_once, remote_prepare): New declarations.
5189
5190 2011-04-19 Tom Tromey <tromey@redhat.com>
5191
5192 * win32-low.c (handle_load_dll): Remove duplicate "the".
5193
5194 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5195
5196 Remove support for old Cygwin 1.5 versions.
5197 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5198 function to avoid warning.
5199 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5200 warning.
5201
5202 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5203
5204 * gdbserver/server.h (Macro _): Define it if not available.
5205
5206 2011-03-14 Michael Snyder <msnyder@vmware.com>
5207
5208 * hostio.c (handle_close): Remove unnecessary null test.
5209
5210 2011-03-10 Joel Brobecker <brobecker@adacore.com>
5211
5212 * Makefile.in (maintainer-clean realclean distclean): Remove
5213 "make ... subdir_do" command.
5214
5215 2011-03-10 Michael Snyder <msnyder@vmware.com>
5216
5217 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5218
5219 * server.c (handle_v_run): Free alloced buffer on early return.
5220
5221 2011-03-09 Yao Qi <yao@codesourcery.com>
5222
5223 Revert:
5224 2011-03-04 Yao Qi <yao@codesourcery.com>
5225
5226 * Makefile.in: Remove GNU make feature --directory.
5227
5228 2011-03-05 Yao Qi <yao@codesourcery.com>
5229
5230 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5231 (subdir_do): New make target. Copied from gdb/Makefile.
5232 (maintainer-clean, realclean, distclean, clean): Call corresponding
5233 make targets in common/Makefile.
5234
5235 2011-02-11 Yao Qi <yao@codesourcery.com>
5236
5237 * configure.ac: Call AC_PROG_RANLIB.
5238 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5239 * configure: Regenerate.
5240
5241 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5242
5243 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5244
5245 2011-03-06 Yao Qi <yao@codesourcery.com>
5246
5247 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5248
5249 2011-03-05 Yao Qi <yao@codesourcery.com>
5250
5251 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5252 (subdir_do): New make target. Copied from gdb/Makefile.
5253 (maintainer-clean, realclean, distclean, clean): Call corresponding
5254 make targets in common/Makefile.
5255
5256 2011-03-04 Yao Qi <yao@codesourcery.com>
5257
5258 * Makefile.in: Remove GNU make feature --directory.
5259
5260 2011-03-04 Michael Snyder <msnyder@vmware.com>
5261
5262 * server.c (queue_stop_reply): Call xmalloc not malloc.
5263
5264 2011-03-02 Michael Snyder <msnyder@vmware.com>
5265
5266 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5267
5268 2011-02-28 Michael Snyder <msnyder@vmware.com>
5269
5270 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5271 (cmd_qtframe): Ditto.
5272 (cmd_qtbuffer): Ditto.
5273 (cmd_bigqtbuffer): Ditto.
5274
5275 * utils.c (decimal2str): Initialize 'width' to nine, then
5276 don't mess with it.
5277
5278 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5279
5280 * hostio.c (require_data): Free *data, not data.
5281
5282 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 * hostio.c (require_data): Use free, not xfree.
5285
5286 2011-02-27 Michael Snyder <msnyder@vmware.com>
5287
5288 * server.c (handle_query): Discard unused value.
5289
5290 * hostio.c (require_data): Free malloc memory before returning
5291 error.
5292
5293 2011-02-26 Michael Snyder <msnyder@vmware.com>
5294
5295 * linux-low.c (list_threads): Call closedir for dirent.
5296
5297 2011-02-27 Michael Snyder <msnyder@vmware.com>
5298
5299 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5300 a case statement falls through.
5301
5302 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5303
5304 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5305 in comparison.
5306
5307 2011-02-26 Michael Snyder <msnyder@vmware.com>
5308
5309 * utils.c (decimal2str): Eliminate dead code and dead param.
5310 (pulongest): Drop dead param from call to decimal2str.
5311 (plongest): Ditto.
5312
5313 2011-02-24 Joel Brobecker <brobecker@adacore.com>
5314
5315 Revert the following patch (not approved yet):
5316 2011-02-21 Hui Zhu <teawater@gmail.com>
5317 * tracepoint.c (tp_printf): New function.
5318 (eval_agent_expr): Handle gdb_agent_op_printf.
5319
5320 2011-02-21 Hui Zhu <teawater@gmail.com>
5321
5322 * tracepoint.c (tp_printf): New function.
5323 (eval_agent_expr): Handle gdb_agent_op_printf.
5324
5325 2011-02-18 Tom Tromey <tromey@redhat.com>
5326
5327 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5328 (tracepoint.o): Likewise.
5329 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5330 (gdb_agent_op_names): Likewise.
5331
5332 2011-02-18 Tom Tromey <tromey@redhat.com>
5333
5334 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5335 gdb_agent_op_rot>: New constants.
5336 (gdb_agent_op_names): Add pick and roll.
5337 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5338 cases.
5339
5340 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5341
5342 * aclocal.m4: Regenerated with aclocal-1.11.1.
5343
5344 2011-02-14 Pedro Alves <pedro@codesourcery.com>
5345
5346 * server.c (handle_qxfer_traceframe_info): New.
5347 (qxfer_packets): Register "traceframe-info".
5348 (handle_query): Report support for qXfer:traceframe-info:read+.
5349 * tracepoint.c (match_blocktype): New.
5350 (traceframe_find_block_type): Rename to ...
5351 (traceframe_walk_blocks): ... this. Add callback filter argument,
5352 and use it.
5353 (traceframe_find_block_type): New, reimplemented on top of
5354 traceframe_walk_blocks.
5355 (build_traceframe_info_xml): New.
5356 (traceframe_read_info): New.
5357 * server.h (traceframe_read_info): Declare.
5358
5359 2011-02-11 Yao Qi <yao@codesourcery.com>
5360
5361 * configure.ac: Call AC_PROG_RANLIB.
5362 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5363 * configure: Regenerate.
5364
5365 2011-02-07 Pedro Alves <pedro@codesourcery.com>
5366
5367 * server.c (gdb_read_memory): Change return semantics to allow
5368 partial transfers.
5369 (handle_search_memory_1): Adjust.
5370 (process_serial_event) <'m' packet>: Handle partial transfers.
5371 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5372
5373 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5374
5375 * regcache.c (init_register_cache): Initialize
5376 regcache->register_status.
5377 (free_register_cache): Release regcache->register_status.
5378 (regcache_cpy): Copy register_status.
5379 (registers_to_string): Print 'x's for unavailable registers.
5380 (supply_register): Mark the register's status valid or
5381 unavailable, depending on whether a buffer was passed in or not.
5382 (supply_register_zeroed): New.
5383 (supply_regblock): Mark the registers' status valid or
5384 unavailable, depending on whether a buffer was passed in or not.
5385 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5386 (struct regcache): New `register_status' field.
5387 (supply_register_zeroed): Declare.
5388 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5389 supply_register_zeroed, rather than passing a NULL buffer to
5390 supply_register.
5391 * tracepoint.c (fetch_traceframe_registers): Update comment.
5392
5393 2011-01-28 Pedro Alves <pedro@codesourcery.com>
5394
5395 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5396 buffer explicit.
5397
5398 2011-01-25 Pedro Alves <pedro@codesourcery.com>
5399
5400 * server.h (decode_xfer_write): Change prototype.
5401 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5402 and don't extract the annex here.
5403 * server.c (decode_xfer_read): Remove `annex' parameter,
5404 and don't extract the annex here.
5405 (decode_xfer): New.
5406 (struct qxfer): New.
5407 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5408 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5409 (handle_qxfer_statictrace): New functions, abstracted out from
5410 handle_query, and made to use the struct qxfer interface.
5411 (handle_threads_qxfer_proper): Rename to ...
5412 (handle_qxfer_threads_proper): ... this.
5413 (handle_threads_qxfer): Rename to ...
5414 (handle_qxfer_threads): ... this. Adjust.
5415 (qxfer_packets): New array.
5416 (handle_qxfer): New function.
5417 (handle_query): Use handle_qxfer.
5418
5419 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5420
5421 * gdbreplay.c: Shorten lines of >= 80 columns.
5422 * linux-low.c: Ditto.
5423 * linux-ppc-low.c: Ditto.
5424 * linux-s390-low.c: Ditto.
5425 * linux-sparc-low.c: Ditto.
5426 * linux-x86-low.c: Ditto.
5427 * linux-xtensa-low.c: Ditto.
5428 * mem-break.c: Ditto.
5429 * nto-low.c: Ditto.
5430 * regcache.h: Ditto.
5431 * remote-utils.c: Ditto.
5432 * server.c: Ditto.
5433 * server.h: Ditto.
5434 * thread-db.c: Ditto.
5435 * tracepoint.c: Ditto.
5436 * utils.c: Ditto.
5437 * win32-low.h: Ditto.
5438
5439 2011-01-05 Joel Brobecker <brobecker@adacore.com>
5440
5441 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5442 update.
5443
5444 2011-01-01 Joel Brobecker <brobecker@adacore.com>
5445
5446 * server.c (gdbserver_version): Update copyright year in version
5447 output.
5448 * gdbreplay.c (gdbreplay_version): Ditto.
5449
5450 2010-12-29 Jie Zhang <jie.zhang@analog.com>
5451
5452 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5453 * linux-bfin-low.c: New file.
5454 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5455 PT_DATA_ADDR for BFIN targets.
5456 * Makefile.in (SFILES): Add linux-bfin-low.c.
5457 (clean): Remove reg-bfin.c.
5458 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5459 * README: Mention supported Blackfin targets.
5460
5461 2010-12-23 Mike Frysinger <vapier@gentoo.org>
5462
5463 * .gitignore: New file.
5464
5465 2010-11-16 Mike Frysinger <vapier@gentoo.org>
5466
5467 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5468
5469 2010-10-22 Jie Zhang <jie@codesourcery.com>
5470
5471 * Makefile.in: Add FLAGS_TO_PASS variable.
5472 (install): Remove dependency of install-only and recursively
5473 invoke make for install-only.
5474
5475 2010-10-04 Doug Evans <dje@google.com>
5476
5477 * Makefile.in (uninstall): Use $(DESTDIR).
5478
5479 2010-09-24 Pedro Alves <pedro@codesourcery.com>
5480
5481 PR gdb/11842
5482
5483 * linux-x86-low.c (compat_siginfo_from_siginfo)
5484 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5485 si_code is < 0. Check for si_code == SI_TIMER before checking for
5486 si_code < 0.
5487
5488 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5489
5490 * lynx-i386-low.c: New file.
5491 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5492
5493 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5494
5495 * lynx-low.c (ptrace_request_to_str): Remove handling for
5496 request values that have been removed in LynxOS 5.x.
5497
5498 2010-09-13 Joel Brobecker <brobecker@adacore.com>
5499
5500 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5501 <ptrace.h>
5502
5503 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5504
5505 * configure.ac: Add --enable-inprocess-agent option.
5506 * configure: Rebuilt.
5507
5508 2010-09-06 Yao Qi <yao@codesourcery.com>
5509
5510 * linux-low.c (linux_kill): Remove unused variable.
5511 (linux_stabilize_threads): Likewise.
5512 * server.c (start_inferior): Likewise.
5513 (queue_stop_reply_callback): Likewise.
5514 * tracepoint.c (do_action_at_tracepoint): Likewise.
5515
5516 2010-09-06 Yao Qi <yao@codesourcery.com>
5517
5518 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5519 on return.
5520
5521 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5522
5523 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5524
5525 2010-09-06 Pedro Alves <pedro@codesourcery.com>
5526
5527 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5528 "$(IPA_DEPFILES)".
5529
5530 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5531
5532 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5533 gdbserver/lynx-ppc-low.c: New files.
5534 * Makefile.in (lynx_low_h): New variable.
5535 (lynx-low.o, lynx-ppc-low.o): New rules.
5536 * configure.ac: On LynxOS, link with -lnetinet.
5537 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5538 * configure: regenerate.
5539
5540 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5541
5542 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5543 * configure.ac: Add check for vasprintf and vsnprintf.
5544 * configure, config.in: Regenerate.
5545 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5546
5547 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5548
5549 * gdbreplay.c: Move include of alloca.h up, next to include of
5550 malloc.h.
5551 * server.h: Add include of malloc.h.
5552 * mem-break.c: Remove include of malloc.h.
5553 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5554
5555 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5556
5557 * Makefile.in (memmem.o): Build with -Wno-error.
5558
5559 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5560
5561 * utils.c (xsnprintf): Make non-static.
5562 * server.h: Add xsnprintf declaration.
5563 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5564 replace calls to snprintf by calls to xsnprintf throughout.
5565
5566 2010-09-01 Joel Brobecker <brobecker@adacore.com>
5567
5568 * configure.ac: Add configure check for alloca.
5569 * configure, config.in: Regenerate.
5570 * server.h: Include alloca.h if it exists.
5571 * gdbreplay.c: Include alloca.h if it exists.
5572
5573 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5574
5575 * linux-low.c (__SIGRTMIN): Define if not already defined.
5576 (linux_create_inferior): Check for __ANDROID__ rather than
5577 __SIGRTMIN.
5578 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5579 are already deferred.
5580 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5581 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5582 stopped and already has a pending signal to report.
5583 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5584 a pending signal to report or is moving out of a jump pad.
5585 (linux_init_signals): Check for __ANDROID__ rather than
5586 __SIGRTMIN.
5587
5588 2010-08-28 Pedro Alves <pedro@codesourcery.com>
5589
5590 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5591 debug_threads check. Avoid a linear search when not doing debug
5592 output.
5593
5594 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5595
5596 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5597 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5598 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5599 (process_event): Change local fd's type to gdb_fildes_t.
5600 (create_file_handler): Adjust prototype.
5601 (delete_file_handler): Adjust prototype.
5602 (handle_file_event): Adjust prototype. Use pfildes.
5603 (create_file_event): Adjsut prototype.
5604 * remote-utils.c (remote_desc, listen_desc): Change type to
5605 gdb_fildes_t.
5606 * server.h: New gdb_fildes_t typedef.
5607 [USE_WIN32API]: Include winsock2.h.
5608 (delete_file_handler, add_file_handler): Adjust prototypes.
5609 (pfildes): Declare.
5610 * utils.c (pfildes): New.
5611
5612 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5613
5614 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5615 * configure: Regenerate.
5616
5617 2010-08-27 Pedro Alves <pedro@codesourcery.com>
5618
5619 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5620 (linux_done_accessing_memory): ... this.
5621 (linux_target_ops): Adjust.
5622 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5623 * nto-low.c (nto_target_ops): Adjust comment.
5624 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5625 * spu-low.c (spu_target_ops): Adjust comment.
5626 * target.h (target_ops): Rename unprepare_to_access_memory field
5627 to done_accessing_memory.
5628 (unprepare_to_access_memory): Rename to ...
5629 (done_accessing_memory): ... this.
5630
5631 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5632
5633 * linux-low.c (linux_prepare_to_access_memory): New.
5634 (linux_unprepare_to_access_memory): New.
5635 (linux_target_ops): Install them.
5636 * server.c (read_memory): Rename to ...
5637 (gdb_read_memory): ... this. Use
5638 prepare_to_access_memory/prepare_to_access_memory.
5639 (write_memory): Rename to ...
5640 (gdb_write_memory): ... this. Use
5641 prepare_to_access_memory/prepare_to_access_memory.
5642 (handle_search_memory_1): Adjust.
5643 (process_serial_event): Adjust.
5644 * target.h (struct target_ops): New fields
5645 prepare_to_access_memory and unprepare_to_access_memory.
5646 (prepare_to_access_memory, unprepare_to_access_memory): New.
5647 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5648 prepare_to_access_memory/prepare_to_access_memory.
5649 * nto-low.c (nto_target_ops): Adjust.
5650 * spu-low.c (spu_target_ops): Adjust.
5651 * win32-low.c (win32_target_ops): Adjust.
5652
5653 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5654
5655 * Makefile.in (WARN_CFLAGS): Get it from configure.
5656 (WERROR_CFLAGS): New.
5657 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5658 * configure.ac: Introduce --enable-werror, which adds -Werror to
5659 the compiler command line. Enabled by default. Disable with
5660 --disable-werror. Add -Wdeclaration-after-statement
5661 Wpointer-arith and -Wformat-nonliteral to warning flags.
5662 * configure: Regenerate.
5663
5664 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5665
5666 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5667
5668 2010-08-26 Pedro Alves <pedro@codesourcery.com>
5669
5670 * gdbreplay.c (remote_error): New.
5671 (gdbchar): New.
5672 (expect): Use gdbchar. Check for error reading from GDB.
5673 Clarify sync error output.
5674 (play): Check for errors writing to GDB.
5675 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5676 * remote-utils.c (getpkt): Check for errors writing to the remote
5677 descriptor.
5678
5679 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5680
5681 * linux-low.c (linux_wait_1): Move non-debugging code out of
5682 `debug_threads' control.
5683
5684 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5685
5686 * linux-low.c (linux_wait_1): Don't set last_status here.
5687 * server.c (push_event, queue_stop_reply_callback): Assert we're
5688 not pushing a TARGET_WAITKIND_IGNORE event.
5689 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5690 (myresume, handle_target_event): Set the thread's last_resume_kind
5691 and last_status from the target returned status.
5692
5693 2010-08-25 Pedro Alves <pedro@codesourcery.com>
5694
5695 PR threads/10729
5696
5697 * linux-x86-low.c (update_debug_registers_callback): New.
5698 (i386_dr_low_set_addr): Use it.
5699 (i386_dr_low_get_addr): New.
5700 (i386_dr_low_set_control): Use update_debug_registers_callback.
5701 (i386_dr_low_get_control): New.
5702 (i386_dr_low_get_status): Adjust.
5703 * linux-low.c (linux_stop_lwp): New.
5704 * linux-low.h (linux_stop_lwp): Declare.
5705
5706 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5707 argument instead of a i386_debug_reg_state.
5708 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5709 a i386_debug_reg_state.
5710 (i386_insert_aligned_watchpoint): Adjust.
5711 (i386_remove_aligned_watchpoint): Adjust.
5712 (i386_low_stopped_data_address): Read the debug registers from the
5713 inferior instead of from the mirrors.
5714 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5715 (i386_dr_low_get_addr): Declare.
5716 (i386_dr_low_get_control): Declare.
5717 (i386_dr_low_get_status): Change prototype.
5718
5719 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5720 (i386_dr_low_get_addr): New.
5721 (i386_dr_low_get_control): New.
5722 (i386_dr_low_get_status): Adjust prototype. Return
5723 dr_status_mirror.
5724 (i386_initial_stuff): Clear dr_status_mirror and
5725 dr_control_mirror.
5726 (i386_get_thread_context): Adjust.
5727 (i386_set_thread_context): Adjust.
5728 (i386_thread_added): Adjust.
5729
5730 2010-08-24 Pedro Alves <pedro@codesourcery.com>
5731
5732 * linux-low.h (linux_thread_area): Delete declaration.
5733
5734 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5735
5736 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5737 after its termination.
5738
5739 2010-08-09 Pedro Alves <pedro@codesourcery.com>
5740
5741 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5742 (gdb_wants_all_stopped): Delete.
5743 (linux_wait_1): Don't call them.
5744 * server.c (handle_v_cont): Tag all threads as want-stopped.
5745 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5746 stopped as "client-wants-stopped".
5747
5748 2010-07-31 Pedro Alves <pedro@codesourcery.com>
5749
5750 * Makefile.in (signals_h): New.
5751 (server_h): Depend on it.
5752 (server.o): Don't depend on $(signals_def).
5753 (signals.o): Depend on $(signals_def).
5754
5755 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5756
5757 * Makefile.in (signals_def): New.
5758 (server_h): Append include/gdb/signals.h and signals_def.
5759 (server.o): Append signals_def.
5760
5761 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5762
5763 * server.c (handle_target_event): Use target_signal_to_host for
5764 resume_info.sig initialization.
5765 * target.h (struct thread_resume) <sig>: New comment.
5766
5767 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5768
5769 * server.c (handle_query): strcpy() the returned string from paddress()
5770 instead of sprintf().
5771 * utils.c (paddress): Return phex_nz().
5772
5773 2010-07-07 Joel Brobecker <brobecker@adacore.com>
5774
5775 * server.c (handle_v_cont): Call mourn_inferior if process
5776 just exited.
5777 (myresume): Likewise.
5778
5779 2010-07-01 Pedro Alves <pedro@codesourcery.com>
5780
5781 Static tracepoints, and integration with UST.
5782
5783 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5784 * mem-break.c (uninsert_all_breakpoints)
5785 (reinsert_all_breakpoints): New.
5786 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5787 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5788 (gdb_agent_ust_loaded, helper_thread_id)
5789 (gdb_agent_helper_thread_id): New macros.
5790 (struct ipa_sym_addresses): Add addr_ust_loaded,
5791 addr_helper_thread_id, addr_cmd_buf.
5792 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5793 (in_process_agent_loaded_ust): New.
5794 (write_e_ust_not_loaded): New.
5795 (maybe_write_ipa_ust_not_loaded): New.
5796 (struct collect_static_trace_data_action): New.
5797 (enum tracepoint_type) <static_tracepoint>: New.
5798 (struct tracepoint) <handle>: Mention static tracepoints.
5799 (struct static_tracepoint_ctx): New.
5800 (CMD_BUF_SIZE): New.
5801 (add_tracepoint_action): Handle static tracepoint actions.
5802 (unprobe_marker_at): New.
5803 (clear_installed_tracepoints): Handle static tracepoints.
5804 (cmd_qtdp): Handle static tracepoints.
5805 (probe_marker_at): New.
5806 (cmd_qtstart): Handle static tracepoints.
5807 (response_tracepoint): Handle static tracepoints.
5808 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5809 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5810 (get_context_regcache): Handle static tracepoints.
5811 (do_action_at_tracepoint): Handle static tracepoint actions.
5812 (traceframe_find_block_type): Handle static trace data blocks.
5813 (traceframe_read_sdata): New.
5814 (download_tracepoints): Download static tracepoint actions.
5815 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5816 (GDB_PROBE_NAME): New.
5817 (ust_ops): New.
5818 (GET_UST_SYM): New.
5819 (USTF): New.
5820 (dlsym_ust): New.
5821 (ust_marker_to_static_tracepoint): New.
5822 (gdb_probe): New.
5823 (collect_ust_data_at_tracepoint): New.
5824 (gdb_ust_probe): New.
5825 (UNIX_PATH_MAX, SOCK_DIR): New.
5826 (gdb_ust_connect_sync_socket): New.
5827 (resume_thread, stop_thread): New.
5828 (run_inferior_command): New.
5829 (init_named_socket): New.
5830 (gdb_ust_socket_init): New.
5831 (cstr_to_hexstr): New.
5832 (next_st): New.
5833 (first_marker, next_marker): New.
5834 (response_ust_marker): New.
5835 (cmd_qtfstm, cmd_qtsstm): New.
5836 (unprobe_marker_at, probe_marker_at): New.
5837 (cmd_qtstmat, gdb_ust_thread): New.
5838 (gdb_ust_init): New.
5839 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5840 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5841 (ST_REGENTRY): New.
5842 (x86_64_st_collect_regmap): New.
5843 (X86_64_NUM_ST_COLLECT_GREGS): New.
5844 (AMD64_RIP_REGNUM): New.
5845 (supply_static_tracepoint_registers): New.
5846 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5847 (ST_REGENTRY): New.
5848 (i386_st_collect_regmap): New.
5849 (i386_NUM_ST_COLLECT_GREGS): New.
5850 (supply_static_tracepoint_registers): New.
5851 * server.c (handle_query): Handle qXfer:statictrace:read.
5852 <qSupported>: Report support for StaticTracepoints, and
5853 qXfer:statictrace:read features.
5854 * server.h (traceframe_read_sdata)
5855 (supply_static_tracepoint_registers): Declare.
5856 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5857 (unpack_varlen_hex): Include in IPA build.
5858 * Makefile.in (ustlibs, ustinc): New.
5859 (IPA_OBJS): Add remote-utils-ipa.o.
5860 ($(IPA_LIB)): Link -ldl and -lpthread.
5861 (UST_CFLAGS): New.
5862 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5863 * config.in, configure: Regenerate.
5864
5865 2010-06-20 Ian Lance Taylor <iant@google.com>
5866 Pedro Alves <pedro@codesourcery.com>
5867
5868 * linux-x86-low.c (always_true): Delete.
5869 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5870 trying to fool the compiler with always_true.
5871
5872 2010-06-20 Pedro Alves <pedro@codesourcery.com>
5873
5874 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5875 conditions in gdbserver.
5876
5877 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5878
5879 * spu-low.c (spu_read_memory): Wrap around local store limit.
5880 (spu_write_memory): Likewise.
5881
5882 2010-06-15 Pedro Alves <pedro@codesourcery.com>
5883
5884 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5885 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5886 LONGEST uses.
5887 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5888 uses.
5889 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5890 uses with LONGEST uses.
5891
5892 2010-06-14 Stan Shebs <stan@codesourcery.com>
5893 Pedro Alves <pedro@codesourcery.com>
5894
5895 Bytecode compiler.
5896
5897 * linux-x86-low.c: Include limits.h.
5898 (add_insns): New.
5899 (always_true): New.
5900 (EMIT_ASM): New.
5901 (EMIT_ASM32): New.
5902 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5903 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5904 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5905 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5906 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5907 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5908 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5909 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5910 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5911 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5912 (amd64_emit_void_call_2): New.
5913 (amd64_emit_ops): New.
5914 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5915 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5916 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5917 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5918 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5919 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5920 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5921 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5922 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5923 (i386_emit_stack_adjust, i386_emit_int_call_1)
5924 (i386_emit_void_call_2): New.
5925 (i386_emit_ops): New.
5926 (x86_emit_ops): New.
5927 (the_low_target): Install x86_emit_ops.
5928 * server.h (struct emit_ops): New.
5929 (get_raw_reg_func_addr): Declare.
5930 (current_insn_ptr, emit_error): Declare.
5931 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5932 (set_trace_state_variable_value): New defines.
5933 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5934 addr_get_trace_state_variable_value and
5935 addr_set_trace_state_variable_value.
5936 (symbol_list): New fields for get_raw_reg,
5937 get_trace_state_variable_value and set_trace_state_variable_value.
5938 (condfn): New typedef.
5939 (struct tracepoint): New field `compiled_cond'.
5940 (do_action_at_tracepoint): Clear compiled_cond.
5941 (get_trace_state_variable_value, set_trace_state_variable_value):
5942 Export in the IPA.
5943 (condition_true_at_tracepoint): If there's a compiled condition,
5944 run that.
5945 (current_insn_ptr, emit_error): New globals.
5946 (struct bytecode_address): New.
5947 (get_raw_reg_func_addr): New.
5948 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5949 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5950 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5951 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5952 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5953 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5954 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5955 (compile_tracepoint_condition, compile_bytecodes): New.
5956 * target.h (emit_ops): Forward declare.
5957 (struct target_ops): New field emit_ops.
5958 (target_emit_ops): New.
5959 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5960 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5961 * linux-low.c (linux_emit_ops): New.
5962 (linux_target_ops): Install it.
5963 * linux-low.h (struct linux_target_ops): New field emit_ops.
5964
5965 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5966
5967 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5968 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5969
5970 2010-06-01 Pedro Alves <pedro@codesourcery.com>
5971 Stan Shebs <stan@codesourcery.com>
5972
5973 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5974 (all): Depend on $(extra_libraries).
5975 (install-only): Install the IPA.
5976 (IPA_OBJS, IPA_LIB): New.
5977 (clean): Remove the IPA lib.
5978 (IPAGENT_CFLAGS): New.
5979 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5980 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5981 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5982 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5983 * configure.ac: Check for atomic builtins support in the compiler.
5984 (IPA_DEPFILES, extra_libraries): Define.
5985 * configure.srv (ipa_obj): Add description.
5986 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5987 (i[34567]86-*-linux*): Set ipa_obj.
5988 (x86_64-*-linux*): Set ipa_obj.
5989 * linux-low.c (stabilizing_threads): New.
5990 (supports_fast_tracepoints): New.
5991 (linux_detach): Stabilize threads before detaching.
5992 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5993 the lwp is either not stabilizing, or is moving out of a jump pad.
5994 (linux_fast_tracepoint_collecting): New.
5995 (maybe_move_out_of_jump_pad): New.
5996 (enqueue_one_deferred_signal): New.
5997 (dequeue_one_deferred_signal): New.
5998 (linux_wait_for_event_1): If moving out of a jump pad, defer
5999 pending signals to later.
6000 (linux_stabilize_threads): New.
6001 (linux_wait_1): Check if threads need moving out of jump pads, and
6002 do it if so.
6003 (stuck_in_jump_pad_callback): New.
6004 (move_out_of_jump_pad_callback): New.
6005 (lwp_running): New.
6006 (linux_resume_one_lwp): Handle moving out of jump pads.
6007 (linux_set_resume_request): Dequeue deferred signals.
6008 (need_step_over_p): Also step over fast tracepoint jumps.
6009 (start_step_over): Also uninsert fast tracepoint jumps.
6010 (finish_step_over): Also reinsert fast tracepoint jumps.
6011 (linux_install_fast_tracepoint_jump): New.
6012 (linux_target_ops): Install linux_stabilize_threads and
6013 linux_install_fast_tracepoint_jump_pad.
6014 * linux-low.h (linux_target_ops) <get_thread_area,
6015 install_fast_tracepoint_jump_pad>: New fields.
6016 (struct lwp_info) <collecting_fast_tracepoint,
6017 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6018 (linux_get_thread_area): Declare.
6019 * linux-x86-low.c (jump_insn): New.
6020 (x86_get_thread_area): New.
6021 (append_insns): New.
6022 (push_opcode): New.
6023 (amd64_install_fast_tracepoint_jump_pad): New.
6024 (i386_install_fast_tracepoint_jump_pad): New.
6025 (x86_install_fast_tracepoint_jump_pad): New.
6026 (the_low_target): Install x86_get_thread_area and
6027 x86_install_fast_tracepoint_jump_pad.
6028 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6029 (struct fast_tracepoint_jump): New.
6030 (fast_tracepoint_jump_insn): New.
6031 (fast_tracepoint_jump_shadow): New.
6032 (find_fast_tracepoint_jump_at): New.
6033 (fast_tracepoint_jump_here): New.
6034 (delete_fast_tracepoint_jump): New.
6035 (set_fast_tracepoint_jump): New.
6036 (uninsert_fast_tracepoint_jumps_at): New.
6037 (reinsert_fast_tracepoint_jumps_at): New.
6038 (set_breakpoint_at): Use write_inferior_memory.
6039 (uninsert_raw_breakpoint): Use write_inferior_memory.
6040 (check_mem_read): Mask out fast tracepoint jumps.
6041 (check_mem_write): Mask out fast tracepoint jumps.
6042 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6043 (set_fast_tracepoint_jump): Declare.
6044 (delete_fast_tracepoint_jump)
6045 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6046 (reinsert_fast_tracepoint_jumps_at): Declare.
6047 * regcache.c: Don't compile many functions when building the
6048 in-process agent library.
6049 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6050 the register buffer in the heap.
6051 (free_register_cache): If the register buffer isn't owned by the
6052 regcache, don't free it.
6053 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6054 pre-existing register caches.
6055 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6056 type.
6057 (convert_ascii_to_int): : Constify `from' parameter type.
6058 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6059 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6060 the needed buffer in-place.
6061 (relocate_instruction): New.
6062 * server.c (handle_query) <qSymbols>: If the target supports
6063 tracepoints, give it a chance of looking up symbols. Report
6064 support for fast tracepoints.
6065 (handle_status): Stabilize threads.
6066 (process_serial_event): Adjust.
6067 * server.h (struct fast_tracepoint_jump): Forward declare.
6068 (struct process_info) <fast_tracepoint_jumps>: New field.
6069 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6070 (decode_X_packet, decode_M_packet): Adjust.
6071 (relocate_instruction): Declare.
6072 (in_process_agent_loaded): Declare.
6073 (tracepoint_look_up_symbols): Declare.
6074 (struct fast_tpoint_collect_status): Declare.
6075 (fast_tracepoint_collecting): Declare.
6076 (force_unlock_trace_buffer): Declare.
6077 (handle_tracepoint_bkpts): Declare.
6078 (initialize_low_tracepoint)
6079 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6080 * target.h (struct target_ops) <stabilize_threads,
6081 install_fast_tracepoint_jump_pad>: New fields.
6082 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6083 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6084 [HAVE_STDINT_H]: Include stdint.h.
6085 (trace_debug_1): Rename to ...
6086 (trace_vdebug): ... this.
6087 (trace_debug): Rename to ...
6088 (trace_debug_1): ... this. Add `level' parameter.
6089 (trace_debug): New.
6090 (ATTR_USED, ATTR_NOINLINE): New.
6091 (IP_AGENT_EXPORT): New.
6092 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6093 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6094 (about_to_request_buffer_space, trace_buffer_is_full)
6095 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6096 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6097 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6098 (traceframe_write_count, traceframes_created)
6099 (trace_state_variables)
6100 New renaming defines.
6101 (struct ipa_sym_addresses): New.
6102 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6103 (symbol_list): New.
6104 (ipa_sym_addrs): New.
6105 (all_tracepoint_symbols_looked_up): New.
6106 (in_process_agent_loaded): New.
6107 (write_e_ipa_not_loaded): New.
6108 (maybe_write_ipa_not_loaded): New.
6109 (tracepoint_look_up_symbols): New.
6110 (debug_threads) [IN_PROCESS_AGENT]: New.
6111 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6112 (UNKNOWN_SIDE_EFFECTS): New.
6113 (stop_tracing): New.
6114 (flush_trace_buffer): New.
6115 (stop_tracing_bkpt): New.
6116 (flush_trace_buffer_bkpt): New.
6117 (read_inferior_integer): New.
6118 (read_inferior_uinteger): New.
6119 (read_inferior_data_pointer): New.
6120 (write_inferior_data_pointer): New.
6121 (write_inferior_integer): New.
6122 (write_inferior_uinteger): New.
6123 (struct collect_static_trace_data_action): Delete.
6124 (enum tracepoint_type): New.
6125 (struct tracepoint) <type>: New field `type'.
6126 <actions_str, step_actions, step_actions_str>: Only include in
6127 GDBserver.
6128 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6129 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6130 (tracepoints): Use IP_AGENT_EXPORT.
6131 (last_tracepoint): Don't include in the IPA.
6132 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6133 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6134 (alloced_trace_state_variables): New.
6135 (trace_state_variables): Use IP_AGENT_EXPORT.
6136 (traceframe_t): Delete unused variable.
6137 (circular_trace_buffer): Don't include in the IPA.
6138 (trace_buffer_start): Delete.
6139 (struct trace_buffer_control): New.
6140 (trace_buffer_free): Delete.
6141 (struct ipa_trace_buffer_control): New.
6142 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6143 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6144 New.
6145 (trace_buffer_ctrl): New.
6146 (TRACE_BUFFER_CTRL_CURR): New.
6147 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6148 Reimplement as macros.
6149 (trace_buffer_wrap): Delete.
6150 (traceframe_write_count, traceframe_read_count)
6151 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6152 (struct tracepoint_hit_ctx) <type>: New field.
6153 (struct fast_tracepoint_ctx): New.
6154 (memory_barrier): New.
6155 (cmpxchg): New.
6156 (record_tracepoint_error): Update atomically in the IPA.
6157 (clear_inferior_trace_buffer): New.
6158 (about_to_request_buffer_space): New.
6159 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6160 updating the same buffer.
6161 (add_tracepoint): Default the tracepoint's type to trap
6162 tracepoint, and orig_size to -1.
6163 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6164 internal variables.
6165 (create_trace_state_variable): New parameter `gdb'. Handle it.
6166 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6167 (cmd_qtdp): Handle fast tracepoints.
6168 (cmd_qtdv): Adjust.
6169 (max_jump_pad_size): New.
6170 (gdb_jump_pad_head): New.
6171 (get_jump_space_head): New.
6172 (claim_jump_space): New.
6173 (sort_tracepoints): New.
6174 (MAX_JUMP_SIZE): New.
6175 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6176 IPA.
6177 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6178 support. Upload fast traceframes, and delete internal IPA
6179 breakpoints.
6180 (stop_tracing_handler): New.
6181 (flush_trace_buffer_handler): New.
6182 (cmd_qtstop): Upload fast tracepoints.
6183 (response_tracepoint): Handle fast tracepoints.
6184 (tracepoint_finished_step): Upload fast traceframes. Set the
6185 tracepoint hit context's tracepoint type.
6186 (handle_tracepoint_bkpts): New.
6187 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6188 type. Add comment about fast tracepoints.
6189 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6190 non-existing action_str field.
6191 (get_context_regcache): Handle fast tracepoints.
6192 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6193 to the regcache.
6194 (fast_tracepoint_from_jump_pad_address): New.
6195 (fast_tracepoint_from_ipa_tpoint_address): New.
6196 (collecting_t): New.
6197 (force_unlock_trace_buffer): New.
6198 (fast_tracepoint_collecting): New.
6199 (collecting): New.
6200 (gdb_collect): New.
6201 (write_inferior_data_ptr): New.
6202 (target_tp_heap): New.
6203 (target_malloc): New.
6204 (download_agent_expr): New.
6205 (UALIGN): New.
6206 (download_tracepoints): New.
6207 (download_trace_state_variables): New.
6208 (upload_fast_traceframes): New.
6209 (IPA_FIRST_TRACEFRAME): New.
6210 (IPA_NEXT_TRACEFRAME_1): New.
6211 (IPA_NEXT_TRACEFRAME): New.
6212 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6213 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6214 (gdb_jump_pad_buffer_end): New.
6215 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6216 (initialize_tracepoint): Adjust.
6217 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6218 buffer. Initialize the low module.
6219 * utils.c (PREFIX, TOOLNAME): New.
6220 (malloc_failure): Use PREFIX.
6221 (error): In the IPA, an error causes an exit.
6222 (fatal, warning): Use PREFIX.
6223 (internal_error): Use TOOLNAME.
6224 (NUMCELLS): Increase to 10.
6225 * configure, config.in: Regenerate.
6226
6227 2010-06-01 Pedro Alves <pedro@codesourcery.com>
6228
6229 * server.c (handle_query) <qSupported>: Do two passes over the
6230 qSupported string to avoid nesting strtok.
6231
6232 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6233
6234 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6235 (CDEPS): New.
6236 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6237 -Wl,--dynamic-list.
6238 * configure: Regenerate.
6239 * proc-service.list: New.
6240
6241 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6242
6243 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6244 New comment.
6245
6246 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6247
6248 * gdbreplay.c (remote_open): Check error return from socket() call by
6249 its equality to -1 not by it being negative.
6250 * remote-utils.c (remote_open): Likewise.
6251
6252 2010-05-23 Pedro Alves <pedro@codesourcery.com>
6253
6254 * config.h: Regenerate.
6255
6256 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6257
6258 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6259 doesn't provide PTRACE_GET_THREAD_AREA.
6260
6261 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6262
6263 * linux-m68k-low.c: Include <asm/ptrace.h>
6264 (ps_get_thread_area): Implement.
6265
6266 2010-05-03 Doug Evans <dje@google.com>
6267
6268 * event-loop.c (struct callback_event): New struct.
6269 (callback_list): New global.
6270 (append_callback_event, delete_callback_event): New functions.
6271 (process_callback): New function.
6272 (start_event_loop): Call it.
6273 * remote-utils.c (NOT_SCHEDULED): Define.
6274 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6275 moved out of readchar.
6276 (readchar): Rewrite. Call reschedule before returning.
6277 (reset_readchar): New function.
6278 (remote_close): Call it.
6279 (process_remaining, reschedule): New functions.
6280 * server.h (callback_handler_func): New typedef.
6281 (append_callback_event, delete_callback_event): Declare.
6282
6283 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6284
6285 * proc-service.c (ps_pglobal_lookup): Use
6286 thread_db_look_up_one_symbol.
6287 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6288 parameter. Use it instead of all_symbols_looked_up.
6289 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6290 field.
6291 (all_symbols_looked_up): Don't declare.
6292 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6293 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6294 field.
6295 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6296 Set all_symbols_looked_up here.
6297 (thread_db_look_up_one_symbol): New.
6298 (thread_db_get_tls_address): Adjust.
6299 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6300 thread_db object on the heap, and tentatively set it in the
6301 process structure.
6302 (thread_db_init): Don't set all_symbols_looked_up here.
6303 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6304
6305 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6306
6307 * linux-low.c (linux_kill, linux_detach): Adjust.
6308 (status_pending_p_callback): Remove redundant statement. Check
6309 for !TARGET_WAITIKIND_IGNORE, instead of
6310 TARGET_WAITKIND_STOPPED.
6311 (handle_tracepoints): Make sure LWP is locked. Adjust.
6312 (linux_wait_for_event_1): Adjust.
6313 (linux_cancel_breakpoints): New.
6314 (unsuspend_one_lwp): New.
6315 (unsuspend_all_lwps): New.
6316 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6317 (send_sigstop_callback): Change return type to int, add new
6318 `except' parameter and handle it.
6319 (suspend_and_send_sigstop_callback): New.
6320 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6321 pass them down. If SUSPEND, also increment the lwp's suspend
6322 count.
6323 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6324 (need_step_over_p): Don't consider suspended LWPs.
6325 (start_step_over): Adjust.
6326 (proceed_one_lwp): Change return type to int, add new `except'
6327 parameter and handle it.
6328 (unsuspend_and_proceed_one_lwp): New.
6329 (proceed_all_lwps): Use find_inferior instead of
6330 for_each_inferior.
6331 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6332 also decrement the suspend count of LWPs. Pass `except' down,
6333 instead of hacking its suspend count.
6334 (linux_pause_all): Add `freeze' parameter. Adjust.
6335 (linux_unpause_all): New.
6336 (linux_target_ops): Install linux_unpause_all.
6337 * server.c (handle_status): Adjust.
6338 * target.h (struct target_ops): New fields `unpause_all' and
6339 `cancel_breakpoints'. Add new parameter to `pause_all'.
6340 (pause_all): Add new `freeze' parameter.
6341 (unpause_all): New.
6342 (cancel_breakpoints): New.
6343 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6344 cancel breakpoints.
6345 (cmd_qtstart): Pause threads.
6346 (stop_tracing): Pause threads, and cancel breakpoints.
6347 * win32-low.c (win32_target_ops): Adjust.
6348
6349 2010-05-03 Pedro Alves <pedro@codesourcery.com>
6350
6351 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6352 the inferior right away from here...
6353 (linux_wait_1): ... to here, and adjust to check the thread's
6354 last_resume_kind instead of the lwp's step or stop_expected flags.
6355
6356 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6357
6358 * README: Use consistent `GDB' and `GDBserver' spellings.
6359
6360 2010-05-02 Pedro Alves <pedro@codesourcery.com>
6361
6362 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6363 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6364 (linux_detach_one_lwp): Assume the lwp is stopped.
6365 (any_thread_of): Delete.
6366 (linux_detach): Stop all lwps here. Don't blindly delete all
6367 breakpoints.
6368 (delete_lwp_callback): New.
6369 (linux_mourn): Delete all lwps of the process that is gone.
6370 (linux_wait_1): Don't delete the last lwp of the process here.
6371 * mem-break.h (mark_breakpoints_out): Declare.
6372 * mem-break.c (mark_breakpoints_out): New.
6373 (free_all_breakpoints): Use it.
6374 * server.c (handle_target_event): If the process is gone, mark
6375 breakpoints out.
6376 * thread-db.c (struct thread_db) <create_bp>: New field.
6377 (thread_db_enable_reporting): Fix prototype. Store a thread event
6378 breakpoint reference in the thread_db struct.
6379 (thread_db_load_search): Clear the thread_db object.
6380 (try_thread_db_load_1): Ditto.
6381 (switch_to_process): New.
6382 (disable_thread_event_reporting): Use it.
6383 (remove_thread_event_breakpoints): New.
6384 (thread_db_detach, thread_db_mourn): Use it.
6385
6386 2010-05-01 Pedro Alves <pedro@codesourcery.com>
6387
6388 * linux-low.c (linux_enable_event_reporting): New.
6389 (linux_wait_for_event_1, handle_extended_wait): Use it.
6390
6391 2010-04-30 Pedro Alves <pedro@codesourcery.com>
6392
6393 * linux-low.c (linux_kill_one_lwp, linux_kill)
6394 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6395 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6396 SIGSTOP even if the LWP is stopped.
6397 (send_sigstop_callback): New.
6398 (stop_all_lwps): Use send_sigstop_callback instead.
6399 (linux_resume_one_thread): Adjust.
6400 (proceed_one_lwp): Still proceed an LWP that the client has
6401 requested to stop, if we haven't reported it as stopped yet. Make
6402 sure that LWPs the client want stopped, have a pending SIGSTOP.
6403
6404 2010-04-26 Doug Evans <dje@google.com>
6405
6406 * server.c (handle_general_set): Make static.
6407
6408 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6409 Print received char after testing for error/eof instead of before.
6410 (input_interrupt): Tweak comment.
6411
6412 2010-04-23 Doug Evans <dje@google.com>
6413
6414 * server.c (start_inferior): Print inferior argv if --debug.
6415
6416 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6417
6418 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6419 * nto-x86-low.c: Include server.h
6420
6421 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6422
6423 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6424 be consistent with other sources of this directory.
6425 (init_registers_amd64): Correct name of source file of this function
6426 in the comment.
6427
6428 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6429
6430 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6431 64-bit executables.
6432
6433 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6434
6435 * win32-i386-low.c: Add 64-bit support.
6436 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6437 (init_registers_amd64): Declare.
6438 (mappings): Add 64-bit version of array.
6439 (init_windows_x86): New function.
6440 (the_low_target): Change init_arch field to init_windows_x86.
6441
6442 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6443
6444 * win32-low.c: Adapt to support also 64-bit architecture.
6445 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6446 (get_image_name): Use SIZE_T type for local variable `done'.
6447 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6448 (toolhelp_get_dll_name): Idem.
6449 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6450 Use uintptr_t typecast to avoid warning.
6451 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6452 (handle_exception): Use phex_nz to avoid warning.
6453 (win32_wait): Remove unused local variable `process'.
6454
6455 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6456
6457 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6458 `amd64-avx.o'.
6459
6460 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6461
6462 * configure.ac: Use `ws2_32' library for srv_mingw.
6463 * configure: Regenerate.
6464 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6465 * remote-utils.c: Likewise.
6466
6467 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6468
6469 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6470 if __x86_64__ is defined.
6471
6472 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6473
6474 * configure: Regenerate.
6475
6476 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6477
6478 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6479 * target.h (target_ops): New get_tib_address field.
6480 * win32-low.h (win32_thread_info): Add thread_local_base field.
6481 * win32-low.c (child_add_thread): Add tlb argument.
6482 Set thread_local_base field to TLB.
6483 (get_child_debug_event): Adapt to child_add_thread change.
6484 (win32_get_tib_address): New function.
6485 (win32_target_ops): Set get_tib_address field to
6486 win32_get_tib_address.
6487 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6488
6489 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6490
6491 * linux-low.c (linux_mourn): Also remove the process.
6492 * server.c (handle_target_event): Don't remove the process here.
6493 * nto-low.c (nto_mourn): New.
6494 (nto_target_ops): Install it.
6495 * spu-low.c (spu_mourn): New.
6496 (spu_target_ops): Install it.
6497 * win32-low.c (win32_mourn): New.
6498 (win32_target_ops): Install it.
6499
6500 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6501
6502 * server.h (buffer_xml_printf): Remove redundant `;'.
6503
6504 2010-04-12 Pedro Alves <pedro@codesourcery.com>
6505
6506 * regcache.c (set_register_cache): Invalidate regcaches before
6507 changing the register cache layout.
6508 (regcache_invalidate_one): Allow a NULL regcache.
6509 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6510 regcaches before changing the register cache layout or the target
6511 regsets.
6512
6513 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6514
6515 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6516 variable warning on Linux/x86-64.
6517
6518 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6519
6520 GDBserver disconnected tracing support.
6521
6522 * linux-low.c (linux_remove_process): Delete.
6523 (add_lwp): Don't set last_resume_kind here.
6524 (linux_kill): Use `mourn'.
6525 (linux_detach): Use `thread_db_detach', and `mourn'.
6526 (linux_mourn): New.
6527 (linux_attach_lwp_1): Adjust comment.
6528 (linux_attach): last_resume_kind moved the thread_info; adjust.
6529 (status_pending_p_callback): Adjust.
6530 (linux_wait_for_event_1): Adjust.
6531 (count_events_callback, select_singlestep_lwp_callback)
6532 (select_event_lwp_callback, cancel_breakpoints_callback)
6533 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6534 (proceed_one_lwp): Adjust.
6535 (linux_async): Add debug output.
6536 (linux_thread_stopped): New.
6537 (linux_pause_all): New.
6538 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6539 linux_pause_all.
6540 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6541 (thread_db_free): Delete declaration.
6542 (thread_db_detach, thread_db_mourn): Declare.
6543 * thread-db.c (thread_db_init): Use thread_db_mourn.
6544 (thread_db_free): Delete, split in two.
6545 (disable_thread_event_reporting): New.
6546 (thread_db_detach): New.
6547 (thread_db_mourn): New.
6548
6549 * server.h (struct thread_info) <last_resume_kind>: New field.
6550 <attached>: Add comment.
6551 <gdb_detached>: New field.
6552 (handler_func): Change return type to int.
6553 (handle_serial_event, handle_target_event): Ditto.
6554 (gdb_connected): Declare.
6555 (tracing): Delete.
6556 (disconnected_tracing): Declare.
6557 (stop_tracing): Declare.
6558
6559 * server.c (handle_query) <qSupported>: Report support for
6560 disconnected tracing.
6561 (queue_stop_reply_callback): Account for running threads.
6562 (gdb_wants_thread_stopped): New.
6563 (gdb_wants_all_threads_stopped): New.
6564 (gdb_reattached_process): New.
6565 (handle_status): Clear the `gdb_detached' flag of all processes.
6566 In all-stop, stop all threads.
6567 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6568 (process_serial_event): If the remote connection breaks, or if an
6569 exit was forced with "monitor exit", force an event loop exit.
6570 Handle disconnected tracing on detach.
6571 (handle_serial_event): Adjust.
6572 (handle_target_event): If GDB isn't connected, forward events back
6573 to the inferior, unless the last process exited, in which case,
6574 exit gdbserver. Adjust interface.
6575
6576 * remote-utils.c (remote_open): Don't block in accept. Instead
6577 register an event loop source on the listen socket file
6578 descriptor. Refactor bits into ...
6579 (listen_desc): ... this new global.
6580 (gdb_connected): ... this new function.
6581 (enable_async_notification): ... this new function.
6582 (handle_accept_event): ... this new function.
6583 (remote_close): Clear remote_desc.
6584
6585 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6586
6587 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6588 New fields.
6589 (mourn_inferior): Define.
6590 (target_process_qsupported): Avoid the dangling else problem.
6591 (thread_stopped): Define.
6592 (pause_all): Define.
6593 (target_waitstatus_to_string): Declare.
6594 * target.c (target_waitstatus_to_string): New.
6595
6596 * tracepoint.c (tracing): Make extern.
6597 (disconnected_tracing): New.
6598 (stop_tracing): Make extern. Handle tracing stops due to GDB
6599 disconnecting.
6600 (cmd_qtdisconnected): New.
6601 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6602 (handle_tracepoint_general_set): Handle QTDisconnected.
6603
6604 * event-loop.c (event_handler_func): Change return type to int.
6605 (process_event): Bail out if the event handler wants the event
6606 loop to stop.
6607 (handle_file_event): Ditto.
6608 (start_event_loop): Bail out if the event handler wants the event
6609 loop to stop.
6610
6611 * nto-low.c (nto_target_ops): Adjust.
6612 * spu-low.c (spu_wait): Don't remove the process here.
6613 (spu_target_ops): Adjust.
6614 * win32-low.c (win32_wait): Don't remove the process here.
6615 (win32_target_ops): Adjust.
6616
6617 2010-04-11 Pedro Alves <pedro@codesourcery.com>
6618
6619 * regcache.c (realloc_register_cache): Invalidate inferior's
6620 regcache before recreating it.
6621
6622 2010-04-09 Pedro Alves <pedro@codesourcery.com>
6623
6624 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6625
6626 2010-04-09 Stan Shebs <stan@codesourcery.com>
6627 Pedro Alves <pedro@codesourcery.com>
6628
6629 * server.h (LONGEST): New.
6630 (struct thread_info) <while_stepping>: New field.
6631 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6632 Declare.
6633 (initialize_tracepoint, handle_tracepoint_general_set)
6634 (handle_tracepoint_query, tracepoint_finished_step)
6635 (tracepoint_was_hit, release_while_stepping_state_list):
6636 (current_traceframe): Declare.
6637 * server.c (handle_general_set): Handle tracepoint packets.
6638 (read_memory): New.
6639 (write_memory): New.
6640 (handle_search_memory_1): Use read_memory.
6641 (handle_query): Report support for conditional tracepoints, trace
6642 state variables, and tracepoint sources. Handle tracepoint
6643 queries.
6644 (main): Initialize the tracepoints module.
6645 (process_serial_event): Handle traceframe reads/writes.
6646
6647 * linux-low.c (handle_tracepoints): New.
6648 (linux_wait_1): Call it.
6649 (linux_resume_one_lwp): Handle while-stepping.
6650 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6651 (linux_target_ops): Install them.
6652 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6653 New field.
6654 * linux-x86-low.c (x86_supports_tracepoints): New.
6655 (the_low_target). Install it.
6656
6657 * mem-break.h (delete_breakpoint): Declare.
6658 * mem-break.c (delete_breakpoint): Make external.
6659
6660 * target.h (struct target_ops): Add `supports_tracepoints',
6661 `read_pc', and `write_pc' fields.
6662 (target_supports_tracepoints): Define.
6663 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6664 (phex_nz): New.
6665
6666 * regcache.h (struct regcache) <registers_owned>: New field.
6667 (init_register_cache, regcache_cpy): Declare.
6668 (regcache_read_pc, regcache_write_pc): Declare.
6669 (register_cache_size): Declare.
6670 (supply_regblock): Declare.
6671 * regcache.c (init_register_cache): New.
6672 (new_register_cache): Use it.
6673 (regcache_cpy): New.
6674 (register_cache_size): New.
6675 (supply_regblock): New.
6676 (regcache_read_pc, regcache_write_pc): New.
6677
6678 * tracepoint.c: New.
6679
6680 * Makefile.in (OBS): Add tracepoint.o.
6681 (tracepoint.o): New rule.
6682
6683 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6684
6685 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6686 (i386-mmx.o): New.
6687 (i386-mmx.c): Likewise.
6688 (i386-mmx-linux.o): Likewise.
6689 (i386-mmx-linux.c): Likewise.
6690
6691 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6692 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6693 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6694 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6695
6696 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6697 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6698 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6699
6700 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6701
6702 * Makefile.in (clean): Updated.
6703 (i386-avx.o): New.
6704 (i386-avx.c): Likewise.
6705 (i386-avx-linux.o): Likewise.
6706 (i386-avx-linux.c): Likewise.
6707 (amd64-avx.o): Likewise.
6708 (amd64-avx.c): Likewise.
6709 (amd64-avx-linux.o): Likewise.
6710 (amd64-avx-linux.c): Likewise.
6711
6712 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6713 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6714 (srv_amd64_regobj): Add amd64-avx.o.
6715 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6716 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6717 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6718 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6719 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6720 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6721 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6722
6723 * i387-fp.c: Include "i386-xstate.h".
6724 (i387_xsave): New.
6725 (i387_cache_to_xsave): Likewise.
6726 (i387_xsave_to_cache): Likewise.
6727 (x86_xcr0): Likewise.
6728
6729 * i387-fp.h (i387_cache_to_xsave): Likewise.
6730 (i387_xsave_to_cache): Likewise.
6731 (x86_xcr0): Likewise.
6732
6733 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6734 * linux-crisv32-low.c (target_regsets): Likewise.
6735 * linux-m68k-low.c (target_regsets): Likewise.
6736 * linux-mips-low.c (target_regsets): Likewise.
6737 * linux-ppc-low.c (target_regsets): Likewise.
6738 * linux-s390-low.c (target_regsets): Likewise.
6739 * linux-sh-low.c (target_regsets): Likewise.
6740 * linux-sparc-low.c (target_regsets): Likewise.
6741 * linux-xtensa-low.c (target_regsets): Likewise.
6742
6743 * linux-low.c: Include <sys/uio.h>.
6744 (regsets_fetch_inferior_registers): Support nt_type.
6745 (regsets_store_inferior_registers): Likewise.
6746 (linux_process_qsupported): New.
6747 (linux_target_ops): Add linux_process_qsupported.
6748
6749 * linux-low.h (regset_info): Add nt_type.
6750 (linux_target_ops): Add process_qsupported.
6751
6752 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6753 and <sys/uio.h>.
6754 (init_registers_i386_avx_linux): New.
6755 (init_registers_amd64_avx_linux): Likewise.
6756 (xmltarget_i386_linux_no_xml): Likewise.
6757 (xmltarget_amd64_linux_no_xml): Likewise.
6758 (PTRACE_GETREGSET): Likewise.
6759 (PTRACE_SETREGSET): Likewise.
6760 (x86_fill_xstateregset): Likewise.
6761 (x86_store_xstateregset): Likewise.
6762 (use_xml): Likewise.
6763 (x86_linux_update_xmltarget): Likewise.
6764 (x86_linux_process_qsupported): Likewise.
6765 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6766 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6767 init_registers_i386_linux here. Call
6768 x86_linux_update_xmltarget.
6769 (the_low_target): Add x86_linux_process_qsupported.
6770
6771 * server.c (handle_query): Call target_process_qsupported.
6772
6773 * target.h (target_ops): Add process_qsupported.
6774 (target_process_qsupported): New.
6775
6776 2010-04-03 Pedro Alves <pedro@codesourcery.com>
6777
6778 * inferiors.c (add_thread): Set last_status kind to
6779 TARGET_WAITKIND_IGNORE.
6780 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6781 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6782 (linux_wait_1): Move `thread' local definition to block that uses
6783 it. Don't NULL initialize `event_child'.
6784 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6785 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6786 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6787
6788 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6789
6790 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6791 an extended waitstatus, or by a watchpoint.
6792 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6793 thread was stepping or has been stopped by a watchpoint.
6794
6795 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6796
6797 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6798 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6799 of another, then delete the previous, and validate all
6800 breakpoints.
6801 (validate_inserted_breakpoint): New.
6802 (delete_disabled_breakpoints): New.
6803 (validate_breakpoints): New.
6804 (check_mem_read): Validate breakpoints before trusting their
6805 shadow. Delete disabled breakpoints.
6806 (check_mem_write): Validate breakpoints before trusting they
6807 should be inserted. Delete disabled breakpoints.
6808 * mem-break.h (validate_breakpoints):
6809 * server.c (handle_query): Validate breakpoints when we see a
6810 qSymbol query.
6811
6812 2010-04-01 Pedro Alves <pedro@codesourcery.com>
6813
6814 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6815 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6816 if we could tell there's a GDB breakpoint at stop_pc.
6817 (need_step_over_p): Don't do a step over if we find a GDB
6818 breakpoint at the resume PC.
6819
6820 * mem-break.c (struct raw_breakpoint): New.
6821 (enum bkpt_type): New type `gdb_breakpoint'.
6822 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6823 fields. New field `raw'.
6824 (find_raw_breakpoint_at): New.
6825 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6826 breakpoint instead.
6827 (set_breakpoint_at): Adjust.
6828 (delete_raw_breakpoint): New.
6829 (release_breakpoint): New.
6830 (delete_breakpoint): Rename to...
6831 (delete_breakpoint_1): ... this. Add proc parameter. Use
6832 release_breakpoint. Return ENOENT.
6833 (delete_breakpoint): Reimplement.
6834 (find_breakpoint_at): Delete.
6835 (find_gdb_breakpoint_at): New.
6836 (delete_breakpoint_at): Delete.
6837 (set_gdb_breakpoint_at): New.
6838 (delete_gdb_breakpoint_at): New.
6839 (gdb_breakpoint_here): New.
6840 (set_reinsert_breakpoint): Use release_breakpoint.
6841 (uninsert_breakpoint): Rename to ...
6842 (uninsert_raw_breakpoint): ... this.
6843 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6844 (reinsert_raw_breakpoint): Change parameter type to
6845 raw_breakpoint.
6846 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6847 instead.
6848 (check_breakpoints): Adjust. Use release_breakpoint.
6849 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6850 (breakpoint_inserted_here): Ditto.
6851 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6852 Don't trust the breakpoint's shadow if it is not inserted.
6853 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6854 (delete_all_breakpoints): Adjust.
6855 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6856 use delete_breakpoint_1.
6857
6858 * mem-break.h (breakpoints_supported): Delete declaration.
6859 (set_gdb_breakpoint_at): Declare.
6860 (gdb_breakpoint_here): Declare.
6861 (delete_breakpoint_at): Delete.
6862 (delete_gdb_breakpoint_at): Declare.
6863
6864 * server.h (struct raw_breakpoint): Forward declare.
6865 (struct process_info): New field `raw_breakpoints'.
6866
6867 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6868 breakpoints.
6869
6870 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6871
6872 * linux-low.c (status_pending_p_callback): Fix comment.
6873 (linux_wait_for_event_1): Move most of the internal breakpoint
6874 handling from here...
6875 (linux_wait_1): ... to here.
6876 (count_events_callback): New.
6877 (select_singlestep_lwp_callback): New.
6878 (select_event_lwp_callback): New.
6879 (cancel_breakpoints_callback): New.
6880 (select_event_lwp): New.
6881 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6882 priority to all LWPs that have had events that should be reported
6883 to the client. Cancel breakpoints when about to reporting the
6884 event to the client, not while stopping lwps. No longer cancel
6885 finished single-steps here.
6886 (cancel_finished_single_step): Delete.
6887 (cancel_finished_single_steps): Delete.
6888
6889 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6890
6891 * mem-break.c (enum bkpt_type): New.
6892 (struct breakpoint): New field `type'.
6893 (set_breakpoint_at): Change return type to struct breakpoint
6894 pointer. Set type to `other_breakpoint' by default.
6895 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6896 in the breakpoint list.
6897 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6898 (reinsert_breakpoint): Rename to ...
6899 (reinsert_raw_breakpoint): ... this.
6900 (reinsert_breakpoints_at): Adjust.
6901 * mem-break.h (struct breakpoint): Declare.
6902 (set_breakpoint_at): Change return type to struct breakpoint
6903 pointer.
6904
6905 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6906
6907 * server.c (handle_query): Assign, not compare.
6908
6909 2010-03-24 Pedro Alves <pedro@codesourcery.com>
6910
6911 Teach linux gdbserver to step-over-breakpoints.
6912
6913 * linux-low.c (can_hardware_single_step): New.
6914 (supports_breakpoints): New.
6915 (handle_extended_wait): If stopping threads, read the stop pc of
6916 the new cloned LWP.
6917 (get_pc): New.
6918 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6919 low target doesn't support retrieving the PC.
6920 (add_lwp): Set last_resume_kind to resume_continue.
6921 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6922 (linux_attach): Don't clear stop_expected. Set the lwp's
6923 last_resume_kind to resume_stop.
6924 (linux_detach_one_lwp): Don't check for removed breakpoints.
6925 (check_removed_breakpoint): Delete.
6926 (status_pending_p): Rename to ...
6927 (status_pending_p_callback): ... this. Don't check for removed
6928 breakpoints. Don't consider threads that are stopped from GDB's
6929 perspective.
6930 (linux_wait_for_lwp): Always read the stop_pc here.
6931 (cancel_breakpoint): New.
6932 (step_over_bkpt): New global.
6933 (linux_wait_for_event_1): Implement stepping over breakpoints.
6934 (gdb_wants_lwp_stopped): New.
6935 (gdb_wants_all_stopped): New.
6936 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6937 single-step traps here. Store the thread's last reported target
6938 wait status.
6939 (send_sigstop): Don't clear stop_expected. Always set it,
6940 instead.
6941 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6942 (cancel_finished_single_step): New.
6943 (cancel_finished_single_steps): New.
6944 (wait_for_sigstop): Don't cancel finished single-step traps here.
6945 (linux_resume_one_lwp): Don't check for removed breakpoints.
6946 Don't set `step' on non-hardware step archs.
6947 (linux_set_resume_request): Ignore resume_stop requests if already
6948 stopping or stopped. Set the lwp's last_resume_kind.
6949 (resume_status_pending_p): Don't check for removed breakpoints.
6950 (need_step_over_p): New.
6951 (start_step_over): New.
6952 (finish_step_over): New.
6953 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6954 requests. Clear the thread's last reported target waitstatus.
6955 Don't use the `suspended' flag. Don't consider pending breakpoints.
6956 (linux_resume): Start a step-over if necessary.
6957 (proceed_one_lwp): New.
6958 (proceed_all_lwps): New.
6959 (unstop_all_lwps): New.
6960 * linux-low.h (struct lwp_info): Rewrite comment for the
6961 `suspended' flag. Add the `stop_pc' field. Delete the
6962 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6963 Add `'last_resume_kind' and `need_step_over' fields.
6964 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6965 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6966 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6967 (set_raw_breakpoint_at): New.
6968 (set_breakpoint_at): Rewrite to use it.
6969 (reinsert_breakpoint_handler): Delete.
6970 (set_reinsert_breakpoint): New.
6971 (reinsert_breakpoint_by_bp): Delete.
6972 (delete_reinsert_breakpoints): New.
6973 (uninsert_breakpoint): Rewrite.
6974 (uninsert_breakpoints_at): New.
6975 (reinsert_breakpoint): Rewrite.
6976 (reinsert_breakpoints_at): New.
6977 (check_breakpoints): Rewrite.
6978 (breakpoint_here): New.
6979 (breakpoint_inserted_here): New.
6980 (check_mem_read): Adjust.
6981 * mem-break.h (breakpoints_supported, breakpoint_here)
6982 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6983 (reinsert_breakpoint_by_bp): Delete declaration.
6984 (delete_reinsert_breakpoints): Declare.
6985 (reinsert_breakpoint): Delete declaration.
6986 (reinsert_breakpoints_at): Declare.
6987 (uninsert_breakpoint): Delete declaration.
6988 (uninsert_breakpoints_at): Declare.
6989 (check_breakpoints): Adjust prototype.
6990 * server.h: Adjust include order.
6991 (struct thread_info): Declare here. Add a `last_status' field.
6992
6993 2010-03-23 Michael Snyder <msnyder@vmware.com>
6994
6995 * server.c (crc32): New function.
6996 (handle_query): Add handling for 'qCRC:' request.
6997
6998 2010-03-23 Pedro Alves <pedro@codesourcery.com>
6999
7000 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7001 lwp had been stopped by a watchpoint.
7002
7003 2010-03-16 Pedro Alves <pedro@codesourcery.com>
7004
7005 * server.h (internal_error): Declare.
7006 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7007 * utils.c (internal_error): New function.
7008
7009 2010-03-15 Andreas Schwab <schwab@redhat.com>
7010
7011 * configure.srv: Fix typo setting srv_regobj.
7012
7013 2010-03-15 Pedro Alves <pedro@codesourcery.com>
7014
7015 * linux-low.c (fetch_register): Avoid passing a non string literal
7016 format to `error'.
7017 (usr_store_inferior_registers): Ditto.
7018
7019 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7020
7021 * linux-low.c (linux_write_memory): Bail out early if peeking
7022 memory failed.
7023
7024 2010-03-14 Pedro Alves <pedro@codesourcery.com>
7025
7026 * linux-low.h (struct lwp_info): New fields
7027 `stopped_by_watchpoint' and `stopped_data_address'.
7028 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7029 here, and cache them in the lwp object.
7030 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7031 directly.
7032 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7033 field.
7034 (linux_stopped_by_watchpoint): Rewrite.
7035 (linux_stopped_data_address): Rewrite.
7036
7037 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
7038
7039 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7040 switching the current inferior, not before.
7041
7042 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7043
7044 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7045 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7046 i386-linux.c and amd64-linux.c.
7047 (reg-i386.o): Removed.
7048 (reg-i386.c): Likewise.
7049 (reg-i386-linux.o): Likewise.
7050 (reg-i386-linux.c): Likewise.
7051 (reg-x86-64.o): Likewise.
7052 (reg-x86-64.c): Likewise.
7053 (reg-x86-64-linux.o): Likewise.
7054 (reg-x86-64-linux.c): Likewise.
7055 (i386.o): New.
7056 (i386.c): Likewise.
7057 (i386-linux.o): Likewise.
7058 (i386-linux.c): Likewise.
7059 (amd64.o): Likewise.
7060 (amd64.c): Likewise.
7061 (amd64-linux.o): Likewise.
7062 (amd64-linux.c): Likewise.
7063
7064 * configure.srv (srv_i386_regobj): New.
7065 (srv_i386_linux_regobj): Likewise.
7066 (srv_amd64_regobj): Likewise.
7067 (srv_amd64_linux_regobj): Likewise.
7068 (srv_i386_32bit_xmlfiles): Likewise.
7069 (srv_i386_64bit_xmlfiles): Likewise.
7070 (srv_i386_xmlfiles): Likewise.
7071 (srv_amd64_xmlfiles): Likewise.
7072 (srv_i386_linux_xmlfiles): Likewise.
7073 (srv_amd64_linux_xmlfiles): Likewise.
7074 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7075 srv_xmlfiles to $srv_i386_xmlfiles.
7076 (i[34567]86-*-mingw32ce*): Likewise.
7077 (i[34567]86-*-mingw*): Likewise.
7078 (i[34567]86-*-nto*): Likewise.
7079 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7080 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7081 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7082 (x86_64-*-linux*): Likewise.
7083
7084 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7085 (init_registers_amd64_linux): New.
7086 (x86_arch_setup): Replace init_registers_x86_64_linux with
7087 init_registers_amd64_linux.
7088
7089 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7090
7091 * configure.ac: Check for libdl. If it is not available link against
7092 static libthread_db.
7093 * configure: Regenerate.
7094
7095 2010-02-22 Pedro Alves <pedro@codesourcery.com>
7096
7097 PR9605
7098
7099 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7100 handing a read watchpoint.
7101 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7102
7103 2010-02-12 Doug Evans <dje@google.com>
7104
7105 * linux-low.c (linux_supports_tracefork_flag): Document.
7106 (linux_look_up_symbols): Add comment.
7107
7108 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7109
7110 * regcache.c (supply_register): Clear regcache if buf is NULL.
7111
7112 2010-02-02 Nicolas Roche <roche@sourceware.org>
7113 Joel Brobecker <brobecker@adacore.com>
7114
7115 * inferiors.c (find_inferior): Add function documentation.
7116 (unloaded_dll): Handle the case where the unloaded dll has not
7117 been previously registered in the dll list.
7118
7119 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7120
7121 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7122 (thumb2_breakpoint): New.
7123 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7124
7125 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7126
7127 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7128 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7129 breakpoints.
7130
7131 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7132
7133 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7134
7135 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7136
7137 * linux-s390-low.c (s390_collect_ptrace_register)
7138 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7139
7140 2010-01-21 Doug Evans <dje@google.com>
7141
7142 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7143 (PTRACE_ARG4_TYPE): New macro.
7144 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7145 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7146 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7147 (usr_store_inferior_registers): Ditto.
7148 (linux_read_memory, linux_write_memory): Ditto.
7149 (linux_test_for_tracefork): Ditto.
7150
7151 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7152 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7153
7154 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7155
7156 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7157 target.
7158
7159 2010-01-21 Pedro Alves <pedro@codesourcery.com>
7160
7161 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7162 prototype to take a regcache. Adjust.
7163
7164 2010-01-20 Pedro Alves <pedro@codesourcery.com>
7165
7166 * regcache.h (struct thread_info): Forward declare.
7167 (struct regcache): New.
7168 (new_register_cache): Adjust prototype.
7169 (get_thread_regcache): Declare.
7170 (free_register_cache): Adjust prototype.
7171 (registers_to_string, registers_from_string): Ditto.
7172 (supply_register, supply_register_by_name, collect_register)
7173 (collect_register_as_string, collect_register_by_name): Ditto.
7174 * regcache.c (struct inferior_regcache_data): Delete.
7175 (get_regcache): Rename to ...
7176 (get_thread_regcache): ... this. Adjust. Switch inferior before
7177 fetching registers.
7178 (regcache_invalidate_one): Adjust.
7179 (regcache_invalidate): Fix prototype.
7180 (new_register_cache): Return the new register cache.
7181 (free_register_cache): Change prototype.
7182 (realloc_register_cache): Adjust.
7183 (registers_to_string): Change prototype to take a regcache. Adjust.
7184 (registers_from_string): Ditto.
7185 (register_data): Ditto.
7186 (supply_register): Ditto.
7187 (supply_register_by_name): Ditto.
7188 (collect_register): Ditto.
7189 (collect_register_as_string): Ditto.
7190 (collect_register_by_name): Ditto.
7191 * server.c (process_serial_event): Adjust.
7192 * linux-low.h (regset_fill_func, regset_store_func): Change
7193 prototype.
7194 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7195 Change prototype.
7196 * linux-low.c (get_stop_pc): Adjust.
7197 (check_removed_breakpoint): Adjust.
7198 (linux_wait_for_event): Adjust.
7199 (linux_resume_one_lwp): Adjust.
7200 (fetch_register): Add regcache parameter. Adjust.
7201 (usr_store_inferior_registers): Ditto.
7202 (regsets_fetch_inferior_registers): Ditto.
7203 (regsets_store_inferior_registers): Ditto.
7204 (linux_fetch_registers, linux_store_registers): Ditto.
7205 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7206 regcache. Adjust.
7207 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7208 Ditto.
7209 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7210 prototype to take a regcache.
7211 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7212 * remote-utils.c (convert_ascii_to_int, outreg)
7213 (prepare_resume_reply): Change prototype to take a regcache.
7214 Adjust.
7215 * target.h (struct target_ops) <fetch_registers, store_registers>:
7216 Change prototype to take a regcache.
7217 (fetch_inferior_registers, store_inferior_registers): Change
7218 prototype to take a regcache. Adjust.
7219 * proc-service.c (ps_lgetregs): Adjust.
7220 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7221 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7222 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7223 take a regcache. Adjust.
7224 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7225 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7226 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7227 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7228 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7229 (cris_cannot_fetch_register):
7230 (cris_breakpoint_at): Change prototype to take a regcache.
7231 Adjust.
7232 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7233 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7234 to take a regcache. Adjust.
7235 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7236 Adjust.
7237 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7238 take a regcache. Adjust.
7239 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7240 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7241 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7242 * linux-mips-low.c (mips_get_pc):
7243 (mips_set_pc): Change prototype to take a regcache. Adjust.
7244 (mips_reinsert_addr): Adjust.
7245 (mips_collect_register): Change prototype to take a regcache.
7246 Adjust.
7247 (mips_supply_register):
7248 (mips_collect_register_32bit, mips_supply_register_32bit)
7249 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7250 (mips_store_fpregset): Ditto.
7251 * linux-ppc-low.c (ppc_supply_ptrace_register)
7252 (ppc_supply_ptrace_register): Ditto.
7253 (parse_spufs_run): Adjust.
7254 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7255 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7256 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7257 take a regcache. Adjust.
7258 * linux-s390-low.c (s390_collect_ptrace_register)
7259 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7260 (s390_set_pc): Change prototype to take a regcache. Adjust.
7261 (s390_arch_setup): Adjust.
7262 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7263 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7264 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7265 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7266 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7267 regcache. Adjust.
7268 (sparc_breakpoint_at): Adjust.
7269 * linux-xtensa-low.c (xtensa_fill_gregset):
7270 (xtensa_store_gregset):
7271 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7272 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7273 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7274 prototype to take a regcache. Adjust.
7275 * win32-arm-low.c (arm_fetch_inferior_register)
7276 (arm_store_inferior_register): Change prototype to take a
7277 regcache. Adjust.
7278 * win32-i386-low.c (i386_fetch_inferior_register)
7279 (i386_store_inferior_register): Change prototype to take a
7280 regcache. Adjust.
7281 * win32-low.c (child_fetch_inferior_registers)
7282 (child_store_inferior_registers): Change prototype to take a
7283 regcache. Adjust.
7284 (win32_wait): Adjust.
7285 (win32_fetch_inferior_registers): Change prototype to take a
7286 regcache. Adjust.
7287 (win32_store_inferior_registers): Adjust.
7288 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7289 store_inferior_register>: Change prototype to take a regcache.
7290
7291 2010-01-20 Doug Evans <dje@google.com>
7292
7293 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7294 #ifdef.
7295 (linux_wait_for_event1, linux_init_signals): Ditto.
7296 (W_STOPCODE): Provide definition if missing.
7297
7298 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7299
7300 * linux-low.c (linux_core_of_thread): New.
7301 (compare_ints, show_process, list_threads): New.
7302 (linux_qxfer_osdata): Report threads and cores.
7303 (linux_target_op): Register linux_core_of_thread.
7304 * remote-utils.c (prepare_resume_reply): Report the core.
7305 (buffer_xml_printf): Support %d specifier.
7306 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7307 New.
7308 (handle_query): Handle qXfer:threads. Announce availability
7309 thereof.
7310 * target.h (struct target_ops): New field core_of_thread.
7311
7312 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7313
7314 * Makefile.in (clean): Remove new generated files.
7315 (reg-s390.o, reg-s390.c): Remove rules.
7316 (reg-s390x.o, reg-s390x.c): Likewise.
7317 (s390-linux32.o, s390-linux32.c): Add rules.
7318 (s390-linux64.o, s390-linux64.c): Likewise.
7319 (s390x-linux64.o, s390x-linux64.c): Likewise.
7320 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7321 * linux-s390-low.c: Include <elf.h>.
7322 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7323 (init_registers_s390): Remove prototype.
7324 (init_registers_s390x): Likewise.
7325 (init_registers_s390_linux32): Add prototype.
7326 (init_registers_s390_linux64): Likewise.
7327 (init_registers_s390x_linux64): Likewise.
7328 (s390_num_regs_3264): New define.
7329 (s390_regmap_3264): New global variable.
7330 (s390_cannot_fetch_register): Remove obsolete check.
7331 (s390_cannot_store_register): Likewise.
7332 (s390_collect_ptrace_register): Handle upper/lower register halves.
7333 (s390_supply_ptrace_register): Likewise.
7334 (s390_fill_gregset): Update to register number changes.
7335 (s390_get_hwcap): New routine.
7336 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7337 Install appropriate regmap and register set.
7338
7339 2010-01-01 Joel Brobecker <brobecker@adacore.com>
7340
7341 * server.c (gdbserver_version): Update copyright year to 2010.
7342 * gdbreplay.c (gdbreplay_version): Likewise.
7343
7344 2009-12-28 Doug Evans <dje@google.com>
7345
7346 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7347 elf/external.h. Include <elf.h> instead but only if necessary.
7348
7349 2009-12-28 Pedro Alves <pedro@codesourcery.com>
7350
7351 * linux-low.c (linux_remove_process): Remove `detaching'
7352 parameter. Don't release/detach from thread_db here.
7353 (linux_kill): Release/detach from thread_db here, ...
7354 (linux_detach): ... and here, before actually detaching.
7355 (linux_wait_1): ... and here, when a process exits.
7356 * thread-db.c (any_thread_of): New.
7357 (thread_db_free): Switch the current inferior to a thread of the
7358 passed in process.
7359
7360 2009-12-21 Doug Evans <dje@google.com>
7361
7362 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7363
7364 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7365 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7366 warning ifndef __NR_tkill. Move setting of errno there too.
7367 Delete unnecessary resetting of errno after syscall.
7368 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7369
7370 * configure.ac: Check for dladdr.
7371 * config.in: Regenerate.
7372 * configure: Regenerate.
7373 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7374 (try_thread_db_load): Update.
7375
7376 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7377
7378 2009-12-18 Doug Evans <dje@google.com>
7379
7380 * event-loop.c: Include unistd.h if it exists.
7381
7382 * linux-low.c (my_waitpid): Move definition away from being in
7383 between linux_tracefork_child/linux_test_for_tracefork.
7384
7385 * gdb_proc_service.h (psaddr_t): Fix type.
7386 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7387 signature to match glibc.
7388
7389 2009-12-16 Doug Evans <dje@google.com>
7390
7391 * linux-low.c (linux_read_memory): Fix argument to read.
7392
7393 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7394
7395 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7396 events, don't leave current_inferior pointing at null.
7397
7398 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7399
7400 * win32-low.c (LOG): Delete.
7401 (OUTMSG): Output to stderr.
7402 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7403 on compile time LOG macro.
7404 (win32_wait): Fix debug output.
7405
7406 2009-11-26 Pedro Alves <pedro@codesourcery.com>
7407
7408 * win32-low.c (win32_add_one_solib): If the dll name is
7409 "ntdll.dll", prepend the system directory to the dll path.
7410
7411 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7412
7413 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7414
7415 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
7416 Vladimir Prus <vladimir@codesourcery.com>
7417
7418 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7419 * configure.ac: Check for __mcoldfire__ and set
7420 gdb_cv_m68k_is_coldfire.
7421 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7422 reg-cf.o and reg-m68k.o.
7423 * configure: Regenerated.
7424
7425 2009-11-16 Pedro Alves <pedro@codesourcery.com>
7426
7427 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7428 Pass it to thread_db_free.
7429 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7430 proper `detaching' argument to linux_remove_process.
7431 * linux-low.h (thread_db_free): Add `detaching' parameter.
7432 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7433 to thread_db_free.
7434 (thread_db_free): Add `detaching' parameter. Only
7435 call td_ta_clear_event if detaching from process.
7436
7437 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7438
7439 * thread-db.c (thread_db_free): Fix typo.
7440
7441 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7442
7443 PR gdb/10838
7444 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7445
7446 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7447
7448 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7449 with an i686 compiler.
7450 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7451 needed.
7452 * configure: Rebuilt.
7453
7454 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7455
7456 PR gdb/10783
7457
7458 * server.c (handle_search_memory_1): Correct read_addr initialization
7459 in loop for searching subsequent chunks.
7460
7461 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7462
7463 * configure.ac: New --with-libthread-db option.
7464 * thread-db.c: Allow direct dependence on libthread_db.
7465 (thread_db_free): Adjust.
7466 * config.in: Regenerate.
7467 * configure: Likewise.
7468
7469 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7470
7471 PR gdb/10757
7472 * thread-db.c (attach_thread): New function.
7473 (maybe_attach_thread): Return success/failure.
7474 (find_new_threads_callback): Adjust.
7475 (thread_db_find_new_threads): Loop until no new threads.
7476
7477 2009-10-13 Pedro Alves <pedro@codesourcery.com>
7478
7479 * proc-service.c (ps_lgetregs): Formatting.
7480
7481 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7482
7483 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7484 * configure.ac: Adjust.
7485 * linux-low.h (struct process_info_private): Move members to struct
7486 thread_db.
7487 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7488 * linux-low.c (linux_remove_process): Adjust.
7489 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7490 * server.c (handle_query): Move code ...
7491 (handle_monitor_command): ... here. New function.
7492 * target.h (struct target_ops): New member.
7493 * thread-db.c (struct thread_db): New.
7494 (libthread_db_search_path): New variable.
7495 (thread_db_create_event, thread_db_enable_reporting)
7496 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7497 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7498 (try_thread_db_load_1, dladdr_to_soname): New functions.
7499 (try_thread_db_load, thread_db_load_search): New functions.
7500 (thread_db_init): Search for libthread_db.
7501 (thread_db_free): New function.
7502 (thread_db_handle_monitor_command): Likewise.
7503 * config.in: Regenerate.
7504 * configure: Regenerate.
7505
7506 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7507
7508 * spu-low.c (spu_kill): Wait for inferior to terminate.
7509 Call clear_inferiors.
7510 (spu_detach): Call clear_inferiors.
7511
7512 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7513
7514 * aclocal.m4: Regenerate.
7515 * config.in: Likewise.
7516 * configure: Likewise.
7517
7518 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7519
7520 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7521 (parse_spufs_run): New function.
7522 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7523 (ppc_breakpoint_at): Handle SPU breakpoints.
7524
7525 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7526
7527 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7528 (SPUFS_MAGIC): Define.
7529 (spu_enumerate_spu_ids): New function.
7530 (linux_qxfer_spu): New function.
7531 (linux_target_ops): Install linux_qxfer_spu.
7532
7533 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7534
7535 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7536 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7537 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7538 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7539 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7540 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7541 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7542 (init_registers_powerpc_cell32l): Add prototype.
7543 (init_registers_powerpc_cell64l): Likewise.
7544 (ppc_arch_setup): Detect Cell/B.E. architecture.
7545
7546 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7547
7548 * Makefile.in (datarootdir): New variable.
7549
7550 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7551
7552 * linux-low.c (linux_write_memory): Update debugging output.
7553 * Makefile.in (clean): Add new descriptions.
7554 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7555 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7556 * configure.srv: Add new files for arm*-*-linux*.
7557 * linux-arm-low.c: Add new declarations.
7558 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7559 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7560 (HWCAP_VFPv3D16): New.
7561 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7562 instead of __IWMMXT__.
7563 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7564 (arm_arch_setup): New.
7565 (target_regsets): Remove #ifdef. Add VFP regset.
7566 (the_low_target): Use arm_arch_setup.
7567
7568 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7569
7570 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7571 the main thread again.
7572
7573 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7574
7575 Adding Neutrino gdbserver.
7576 * configure: Regenerated.
7577 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7578 * configure.srv (i[34567]86-*-nto*): New target.
7579 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7580 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7581 (nto_comctrl) [__QNX__]: New function.
7582 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7583
7584 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7585
7586 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7587 srv_tgtobj.
7588
7589 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7590 Pedro Alves <pedro@codesourcery.com>
7591
7592 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7593 don't support CONTEXT_EXTENDED_REGISTERS.
7594 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7595 (the_low_target): Install them.
7596 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7597 failing with ERROR_PIPE_NOT_CONNECTED.
7598
7599 2009-06-30 Doug Evans <dje@google.com>
7600 Pierre Muller <muller@ics.u-strasbg.fr>
7601
7602 Add h/w watchpoint support to x86-linux, win32-i386.
7603 * Makefile.in (SFILES): Add i386-low.c
7604 (i386_low_h): Define.
7605 (i386-low.o): Add dependencies.
7606 (linux-x86-low.o): Add i386-low.h dependency.
7607 (win32-i386-low.o): Ditto.
7608 * i386-low.c: New file.
7609 * i386-low.h: New file.
7610 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7611 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7612 * linux-low.c (linux_add_process): Initialize arch_private.
7613 (linux_remove_process): Free arch_private.
7614 (add_lwp): Initialize arch_private.
7615 (delete_lwp): Free arch_private.
7616 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7617 provided.
7618 * linux-low.h (process_info_private): New member arch_private.
7619 (lwp_info): New member arch_private.
7620 (linux_target_ops): New members new_process, new_thread,
7621 prepare_to_resume.
7622 (ptid_of): New macro.
7623 * linux-x86-low.c: Include stddef.h, i386-low.h.
7624 (arch_process_info): New struct.
7625 (arch_lwp_info): New struct.
7626 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7627 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7628 (i386_dr_low_get_status): New function.
7629 (x86_insert_point, x86_remove_point): New functions.
7630 (x86_stopped_by_watchpoint): New function.
7631 (x86_stopped_data_address): New function.
7632 (x86_linux_new_process, x86_linux_new_thread): New functions.
7633 (x86_linux_prepare_to_resume): New function.
7634 (the_low_target): Add entries for insert_point, remove_point,
7635 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7636 prepare_to_resume.
7637 * server.c (debug_hw_points): New global.
7638 (monitor_show_help): Document set debug-hw-points.
7639 (handle_query): Process "set debug-hw-points".
7640 * server.h (debug_hw_points): Declare.
7641 (paddress): Declare.
7642 * utils.c (NUMCELLS, CELLSIZE): New macros.
7643 (get_sell, xsnprintf, paddress): New functions.
7644 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7645 remove_point, stopped_by_watchpoint, stopped_data_address.
7646 * win32-i386-low.c: Include i386-low.h.
7647 (debug_reg_state): Replaces dr.
7648 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7649 (i386_dr_low_get_status): New function.
7650 (i386_insert_point, i386_remove_point): New functions.
7651 (i386_stopped_by_watchpoint): New function.
7652 (i386_stopped_data_address): New function.
7653 (i386_initial_stuff): Update.
7654 (get_thread_context,set_thread_context,i386_thread_added): Update.
7655 (the_low_target): Add entries for insert_point,
7656 remove_point, stopped_by_watchpoint, stopped_data_address.
7657 * win32-low.c (win32_insert_watchpoint): New function.
7658 (win32_remove_watchpoint): New function.
7659 (win32_stopped_by_watchpoint): New function.
7660 (win32_stopped_data_address): New function.
7661 (win32_target_ops): Add entries for insert_watchpoint,
7662 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7663 * win32-low.h (win32_target_ops): New members insert_point,
7664 remove_point, stopped_by_watchpoint, stopped_data_address.
7665
7666 2009-06-25 Pedro Alves <pedro@codesourcery.com>
7667
7668 * server.c (process_serial_event): Re-return unsupported, not
7669 error, if the type isn't recognized. Re-allow supporting only
7670 insert or remove packets. Also call require_running for
7671 breakpoints. Add missing break statement to default case. Tidy.
7672 * target.h (struct target_ops): Rename insert_watchpoint to
7673 insert_point, and remove_watchpoint to remove_point.
7674
7675 * linux-low.h (struct linux_target_ops): Likewise.
7676 * linux-low.c (linux_insert_watchpoint): Rename to ...
7677 (linux_insert_point): ... this. Adjust.
7678 (linux_remove_watchpoint): Rename to ...
7679 (linux_remove_point): ... this. Adjust.
7680 (linux_target_ops): Adjust.
7681 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7682 (cris_insert_point): ... this.
7683 (cris_remove_watchpoint): Rename to ...
7684 (cris_remove_point): ... this.
7685 (the_low_target): Adjust.
7686
7687 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7688
7689 * server.c (handle_v_kill): Pass signal_pid to
7690 kill_inferior if multi_process is zero.
7691
7692 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7693
7694 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7695 * target.h (target_ops): Comment for *_watchpoint to make it clear
7696 the functions can get types '0' and '1'.
7697
7698 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7699
7700 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7701 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7702 * regcache.c (get_regcache): Likewise.
7703 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7704 * win32-low.c (child_fetch_inferior_registers): Remove check for
7705 regno 0.
7706
7707 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7708 Pedro Alves <pedro@codesourcery.com>
7709
7710 * target.h (struct target_ops) <supports_multi_process>: New
7711 callback.
7712 (target_supports_multi_process): New.
7713 * server.c (handle_query): Even if GDB reports support, only
7714 enable multi-process if the target also supports it. Report
7715 multi-process support only if the target backend supports it.
7716 * linux-low.c (linux_supports_multi_process): New function.
7717 (linux_target_ops): Install it as target_supports_multi_process
7718 callback.
7719
7720 2009-05-24 Doug Evans <dje@google.com>
7721
7722 Global renaming of find_thread_pid to find_thread_ptid.
7723 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7724 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7725 All callers updated.
7726
7727 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7728 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7729 directly.
7730
7731 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7732 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7733 (linux_resume_one_lwp): Ditto.
7734
7735 2009-05-23 Doug Evans <dje@google.com>
7736
7737 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7738 from struct inferior_list_entry * to struct lwp_info *.
7739 All callers updated.
7740
7741 2009-05-13 Doug Evans <dje@google.com>
7742
7743 * linux-x86-low.c: Don't include assert.h.
7744 (x86_siginfo_fixup): Use fatal, not assert.
7745 (x86_arch_setup): Fix comment.
7746
7747 2009-05-12 Doug Evans <dje@google.com>
7748
7749 Biarch support for i386/amd64 gdbserver.
7750 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7751 Add linux-x86-low.c.
7752 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7753 (linux-x86-low.o): Add.
7754 * linux-x86-64-low.c: Delete.
7755 * linux-i386-low.c: Delete.
7756 * linux-x86-low.c: New file.
7757 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7758 linux-x86-low.o.
7759 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7760 linux-x86-low.o.
7761 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7762 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7763 (linux_child_pid_to_exec_file): New function.
7764 (elf_64_header_p, elf_64_file_p): New functions.
7765 (siginfo_fixup): New function.
7766 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7767 give target a chance to convert layout.
7768 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7769 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7770
7771 2009-05-07 Doug Evans <dje@google.com>
7772
7773 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7774 (regsets_store_inferior_registers): Ditto.
7775
7776 2009-05-06 Pedro Alves <pedro@codesourcery.com>
7777
7778 PR server/10048
7779
7780 * linux-low.c (must_set_ptrace_flags): Delete.
7781 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7782 of the global.
7783 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7784 `lwp->must_set_ptrace_flags' instead.
7785 (linux_wait_for_event_1): Set ptrace options here.
7786 (linux_wait_1): ... not here.
7787
7788 2009-04-30 Doug Evans <dje@google.com>
7789
7790 * inferiors.c (started_inferior_callback): New function.
7791 (attached_inferior_callback): New function.
7792 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7793 * server.c (print_started_pid, print_attached_pid): New functions.
7794 (detach_or_kill_for_exit): New function.
7795 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7796 * server.h (have_started_inferiors_p): Declare.
7797 (have_attached_inferiors_p): Declare.
7798
7799 * inferiors.c (remove_process): Fix memory leak, free process.
7800 * linux-low.c (linux_remove_process): New function.
7801 (linux_kill): Call it instead of remove_process.
7802 (linux_detach, linux_wait_1): Ditto.
7803
7804 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7805
7806 * configure.srv: Add x86 Windows CE target.
7807
7808 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7809
7810 * inferiors.c (get_thread_process): Make global.
7811 * server.h (get_thread_process): Add prototype.
7812 * thread-db.c (find_one_thread): Use get_thread_process
7813 instead of current_process.
7814 (thread_db_get_tls_address): Do not crash if called when
7815 thread layer is not yet initialized.
7816
7817 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7818
7819 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7820 * spu-low.c (current_tid): Rename to ...
7821 (current_ptid): ... this.
7822 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7823 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7824 ptid_get_lwp (current_ptid) instead of current_tid.
7825 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7826 instead of current_tid. Use find_process_pid to verify pid
7827 argument is valid. Pass proper argument to remove_process.
7828 (spu_thread_alive): Compare current_ptid instead of current_tid.
7829 (spu_resume): Likewise.
7830
7831 2009-04-02 Pedro Alves <pedro@codesourcery.com>
7832
7833 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7834 variable.
7835
7836 2009-04-01 Pedro Alves <pedro@codesourcery.com>
7837
7838 Implement the multiprocess extensions, and add linux multiprocess
7839 support.
7840
7841 * server.h (ULONGEST): Declare.
7842 (struct ptid, ptid_t): New.
7843 (minus_one_ptid, null_ptid): Declare.
7844 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7845 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7846 (struct inferior_list_entry): Change `id' type from unsigned from
7847 to ptid_t.
7848 (struct sym_cache, struct breakpoint, struct
7849 process_info_private): Forward declare.
7850 (struct process_info): Declare.
7851 (current_process): Declare.
7852 (all_processes): Declare.
7853 (initialize_inferiors): Declare.
7854 (add_thread): Adjust to use ptid_t.
7855 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7856 (add_process, remove_process, find_thread_pid): Declare.
7857 (find_inferior_id): Adjust to use ptid_t.
7858 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7859 (multi_process): Declare.
7860 (push_event): Adjust to use ptid_t.
7861 (read_ptid, write_ptid): Declare.
7862 (prepare_resume_reply): Adjust to use ptid_t.
7863 (clear_symbol_cache): Declare.
7864 * inferiors.c (all_processes): New.
7865 (null_ptid, minus_one_ptid): New.
7866 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7867 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7868 (add_thread): Change unsigned long to ptid. Remove gdb_id
7869 parameter. Adjust.
7870 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7871 (gdb_id_to_thread): Rename to ...
7872 (find_thread_pid): ... this. Change unsigned long to ptid.
7873 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7874 (loaded_dll, pull_pid_from_list): Adjust.
7875 (add_process, remove_process, find_process_pid)
7876 (get_thread_process, current_process, initialize_inferiors): New.
7877 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7878 (struct target_waitstatus) <related_pid>: Ditto.
7879 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7880 return type to int.
7881 (struct target_ops) <join>: Add `pid' argument.
7882 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7883 (struct target_ops) <wait>: Add `ptid' field. Change return type
7884 to ptid.
7885 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7886 (mywait): Add `ptid' argument. Change return type to ptid_t.
7887 (target_pid_to_str): Declare.
7888 * target.c (set_desired_inferior): Adjust to use ptids.
7889 (mywait): Add new `ptid' argument. Adjust.
7890 (target_pid_to_str): New.
7891 * mem-break.h (free_all_breakpoints): Declare.
7892 * mem-break.c (breakpoints): Delelete.
7893 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7894 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7895 to use per-process breakpoint list.
7896 (free_all_breakpoints): New.
7897 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7898 (symbol_cache, all_symbols_looked_up): Delete.
7899 (hexchars): New.
7900 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7901 read_ptid): New.
7902 (prepare_resume_reply): Change ptid argument's type from unsigned
7903 long to ptid_t. Adjust. Implement W;process and X;process.
7904 (free_sym_cache, clear_symbol_cache): New.
7905 (look_up_one_symbol): Adjust to per-process symbol cache. *
7906 * server.c (cont_thread, general_thread, step_thread): Change type
7907 to ptid_t.
7908 (attached): Delete.
7909 (multi_process): New.
7910 (last_ptid): Change type to ptid_t.
7911 (struct vstop_notif) <ptid>: Change type to ptid_t.
7912 (queue_stop_reply, push_event): Change `ptid' argument's type to
7913 ptid_t.
7914 (discard_queued_stop_replies): Add `pid' argument.
7915 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7916 changes. Don't reference the `attached' global.
7917 (attach_inferior): Adjust to mywait interface changes.
7918 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7919 features. Handle and report "multiprocess+". Handle
7920 "qAttached:PID".
7921 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7922 changes.
7923 (handle_v_kill): New.
7924 (handle_v_stopped): Adjust to use target_pid_to_str.
7925 (handle_v_requests): Allow multiple attaches and runs when
7926 multiprocess extensions are in effect. Handle "vKill".
7927 (myresume): Adjust to use ptids.
7928 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7929 (handle_status): Adjust to discard_queued_stop_replies interface
7930 change.
7931 (first_thread_of, kill_inferior_callback)
7932 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7933 (main): Call initialize_inferiors. Adjust to use ptids, killing
7934 and detaching from all inferiors. Handle multiprocess packet
7935 variants.
7936 * linux-low.h: Include gdb_proc_service.h.
7937 (struct process_info_private): New.
7938 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7939 <lwpid_of>: Use ptid_get_lwp.
7940 (get_lwp_thread): Adjust.
7941 (struct lwp_info): Add `dead' member.
7942 (find_lwp_pid): Declare.
7943 * linux-low.c (thread_db_active): Delete.
7944 (new_inferior): Adjust comment.
7945 (inferior_pid): Delete.
7946 (linux_add_process): New.
7947 (handle_extended_wait): Adjust.
7948 (add_lwp): Change unsigned long to ptid.
7949 (linux_create_inferior): Add process to processes table. Adjust
7950 to use ptids. Don't set new_inferior here.
7951 (linux_attach_lwp): Rename to ...
7952 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7953 it. Adjust to use ptids.
7954 (linux_attach_lwp): New.
7955 (linux_attach): Add process to processes table. Don't set
7956 new_inferior here.
7957 (struct counter): New.
7958 (second_thread_of_pid_p, last_thread_of_process_p): New.
7959 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7960 multiple processes.
7961 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7962 processes. Remove process from process table.
7963 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7964 to multiple processes.
7965 (any_thread_of): New.
7966 (linux_detach): Add `pid' argument, and handle it. Remove process
7967 from processes table.
7968 (linux_join): Add `pid' argument. Handle it.
7969 (linux_thread_alive): Change unsighed long argument to ptid_t.
7970 Consider dead lwps as not being alive.
7971 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7972 threads we're not interested in.
7973 (same_lwp, find_lwp_pid): New.
7974 (linux_wait_for_lwp): Change `pid' argument's type from int to
7975 ptid_t. Adjust.
7976 (linux_wait_for_event): Rename to ...
7977 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7978 from int to ptid_t. Adjust.
7979 (linux_wait_for_event): New.
7980 (linux_wait_1): Add `ptid' argument. Change return type to
7981 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7982 that exit from the process table.
7983 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7984 Adjust.
7985 (mark_lwp_dead): New.
7986 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7987 stopping all threads, mark its main lwp as dead.
7988 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7989 ptids.
7990 (fetch_register, usr_store_inferior_registers)
7991 (regsets_fetch_inferior_registers)
7992 (regsets_store_inferior_registers, linux_read_memory)
7993 (linux_write_memory): Inline `inferior_pid'.
7994 (linux_look_up_symbols): Adjust to use per-process
7995 `thread_db_active'.
7996 (linux_request_interrupt): Adjust to use ptids.
7997 (linux_read_auxv): Inline `inferior_pid'.
7998 (initialize_low): Don't reference thread_db_active.
7999 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8000 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8001 (ps_getpid): Return the pid of the current inferior.
8002 * thread-db.c (proc_handle, thread_agent): Delete.
8003 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8004 per-process data.
8005 (find_one_thread): Change argument type to ptid_t. Adjust to
8006 per-process data.
8007 (maybe_attach_thread): Adjust to per-process data and ptids.
8008 (thread_db_find_new_threads): Ditto.
8009 (thread_db_init): Ditto.
8010 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8011 processes table. Adjust to use ptids.
8012 (spu_kill, spu_detach): Adjust interface. Remove process from
8013 processes table.
8014 (spu_join, spu_thread_alive): Adjust interface.
8015 (spu_wait): Adjust interface. Remove process from processes
8016 table. Adjust to use ptids.
8017 * win32-low.c (current_inferior_tid): Delete.
8018 (current_inferior_ptid): New.
8019 (debug_event_ptid): New.
8020 (thread_rec): Take a ptid. Adjust.
8021 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8022 (child_delete_thread): Ditto.
8023 (do_initial_child_stuff): Add `attached' argument. Add process to
8024 processes table.
8025 (child_fetch_inferior_registers, child_store_inferior_registers):
8026 Adjust.
8027 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8028 (win32_attach): Pass 1 to do_initial_child_stuff.
8029 (win32_kill): Adjust interface. Remove process from processes
8030 table.
8031 (win32_detach): Ditto.
8032 (win32_join): Adjust interface.
8033 (win32_thread_alive): Take a ptid.
8034 (win32_resume): Adjust to use ptids.
8035 (get_child_debug_event): Ditto.
8036 (win32_wait): Adjust interface. Remove exiting process from
8037 processes table.
8038
8039 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8040
8041 Non-stop mode support.
8042
8043 * server.h (non_stop): Declare.
8044 (gdb_client_data, handler_func): Declare.
8045 (delete_file_handler, add_file_handler, start_event_loop):
8046 Declare.
8047 (handle_serial_event, handle_target_event, push_event)
8048 (putpkt_notif): Declare.
8049 * target.h (enum resume_kind): New.
8050 (struct thread_resume): Replace `step' field by `kind' field.
8051 (TARGET_WNOHANG): Define.
8052 (struct target_ops) <wait>: Add `options' argument.
8053 <supports_non_stop, async, start_non_stop>: New fields.
8054 (target_supports_non_stop, target_async): New.
8055 (start_non_stop): Declare.
8056 (mywait): Add `options' argument.
8057 * target.c (mywait): Add `options' argument. Print child exit
8058 notifications here.
8059 (start_non_stop): New.
8060 * server.c (non_stop, own_buf, mem_buf): New globals.
8061 (struct vstop_notif): New.
8062 (notif_queue): New global.
8063 (queue_stop_reply, push_event, discard_queued_stop_replies)
8064 (send_next_stop_reply): New.
8065 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8066 interface changes.
8067 (attach_inferior): In non-stop mode, don't wait for the target
8068 here.
8069 (handle_general_set): Handle QNonStop.
8070 (handle_query): When handling qC, return the current general
8071 thread, instead of the first thread of the list.
8072 (handle_query): If the backend supports non-stop mode, include
8073 QNonStop+ in the qSupported query response.
8074 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8075 and non-stop mode.
8076 (handle_v_attach, handle_v_run): Handle non-stop mode.
8077 (handle_v_stopped): New.
8078 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8079 (myresume): Adjust to use resume_kind. Handle non-stop.
8080 (queue_stop_reply_callback): New.
8081 (handle_status): Handle non-stop mode.
8082 (main): Clear non_stop flag on reconnection. Use the event-loop.
8083 Refactor serial protocol handling from here ...
8084 (process_serial_event): ... to this new function. When GDB
8085 selects any thread, select one here. In non-stop mode, wait until
8086 GDB acks all pending events before exiting.
8087 (handle_serial_event, handle_target_event): New.
8088 * remote-utils.c (remote_open): Install remote_desc in the event
8089 loop.
8090 (remote_close): Remove remote_desc from the event loop.
8091 (putpkt_binary): Rename to...
8092 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8093 (putpkt_binary): New as wrapper around putpkt_binary_1.
8094 (putpkt_notif): New.
8095 (prepare_resume_reply): In non-stop mode, don't change the
8096 general_thread.
8097 * event-loop.c: New.
8098 * Makefile.in (OBJ): Add event-loop.o.
8099 (event-loop.o): New rule.
8100
8101 * linux-low.h (pid_of): Moved here.
8102 (lwpid_of): New.
8103 (get_lwp_thread): Use lwpid_of.
8104 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8105 * linux-low.c (pid_of): Delete.
8106 (inferior_pid): Use lwpid_of.
8107 (linux_event_pipe): New.
8108 (target_is_async_p): New.
8109 (delete_lwp): New.
8110 (handle_extended_wait): Use lwpid_of.
8111 (add_lwp): Don't set lwpid field.
8112 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8113 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8114 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8115 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8116 first. Adjust to linux_wait_for_event interface changes. Use
8117 lwpid_of.
8118 (linux_detach): Don't delete the main lwp here.
8119 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8120 (status_pending_p): Don't consider explicitly suspended lwps.
8121 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8122 pointer. Add OPTIONS argument. Change return type to int. Use
8123 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8124 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8125 pointer. Add status pointer argument. Return a pid instead of a
8126 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8127 changes. In non-stop mode, don't switch to a random thread.
8128 (linux_wait): Rename to...
8129 (linux_wait_1): ... this. Add target_options argument, and handle
8130 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8131 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8132 clean exit and signal exit code. Don't stop all threads in
8133 non-stop mode. In all-stop mode, only stop all threads when
8134 reporting a stop to GDB. Handle explicit thread stop requests.
8135 (async_file_flush, async_file_mark): New.
8136 (linux_wait): New.
8137 (send_sigstop): Use lwpid_of.
8138 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8139 interface changes. In non-stop mode, don't switch to a random
8140 thread.
8141 (linux_resume_one_lwp): Use lwpid_of.
8142 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8143 (linux_resume_one_thread): ... this. Handle resume_stop. In
8144 non-stop mode, don't look for pending flag in all threads.
8145 (resume_status_pending_p): Don't consider explicitly suspended
8146 threads.
8147 (my_waitpid): Reimplement. Emulate __WALL.
8148 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8149 Use lwpid_of.
8150 (sigchld_handler, linux_supports_non_stop, linux_async)
8151 (linux_start_non_stop): New.
8152 (linux_target_ops): Register linux_supports_non_stop, linux_async
8153 and linux_start_non_stop.
8154 (initialize_low): Install SIGCHLD handler.
8155 * thread-db.c (thread_db_create_event, find_one_thread)
8156 (thread_db_get_tls_address): Use lwpid_of.
8157 * win32-low.c (win32_detach): Adjust to use resume_kind.
8158 (win32_wait): Add `options' argument.
8159 * spu-low.c (spu_resume): Adjust to use resume_kind.
8160 (spu_wait): Add `options' argument.
8161
8162 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8163
8164 Decouple target code from remote protocol.
8165
8166 * target.h (enum target_waitkind): New.
8167 (struct target_waitstatus): New.
8168 (struct target_ops) <wait>: Return an unsigned long. Take a
8169 target_waitstatus pointer instead of a char pointer.
8170 (mywait): Likewise.
8171 * target.c (mywait): Change prototype to return an unsigned long.
8172 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8173 * server.h (thread_from_wait, old_thread_from_wait): Delete
8174 declarations.
8175 (prepare_resume_reply): Change prototype to take a
8176 target_waitstatus.
8177 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8178 (last_status, last_ptid): New.
8179 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8180 pid instead of a signal.
8181 (attach_inferior): Remove "status" and "signal" parameters.
8182 Adjust.
8183 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8184 not as an address.
8185 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8186 (handle_v_requests, myresume): Remove "status" and "signal"
8187 parameters. Adjust.
8188 (handle_status): New.
8189 (main): Delete local `status'. Adjust.
8190 * remote-utils.c: Include target.h.
8191 (prepare_resume_reply): Change prototype to take a
8192 target_waitstatus. Adjust.
8193
8194 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8195 interface.
8196 * spu-low.c (spu_wait): Adjust.
8197 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8198 Delete.
8199 (win32_wait): Adjust.
8200
8201 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8202
8203 * target.h (struct thread_resume): Delete leave_stopped member.
8204 (struct target_ops): Add a `n' argument to the `resume' callback.
8205 * server.c (start_inferior): Adjust.
8206 (handle_v_cont, myresume): Adjust.
8207 * linux-low.c (check_removed_breakpoint): Adjust to resume
8208 interface change, and to removed leave_stopped field.
8209 (resume_ptr): Delete.
8210 (struct thread_resume_array): New.
8211 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8212 resume interface change.
8213 (linux_continue_one_thread, linux_queue_one_thread)
8214 (resume_status_pending_p): Check if the resume field is NULL
8215 instead of checking the leave_stopped member.
8216 (linux_resume): Adjust to the target resume interface change.
8217 * spu-low.c (spu_resume): Adjust to the target resume interface
8218 change.
8219 * win32-low.c (win32_detach, win32_resume): Ditto.
8220
8221 2009-04-01 Pedro Alves <pedro@codesourcery.com>
8222
8223 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8224 flag.
8225 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8226 pending.
8227 (linux_continue_one_thread): Only preserve the stepping flag if
8228 there's a pending breakpoint.
8229
8230 2009-03-31 Pedro Alves <pedro@codesourcery.com>
8231
8232 * server.c (main): After the inferior having exited, call
8233 remote_close before exiting gdbserver.
8234
8235 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8236
8237 Fix size of FPSCR in Power 7 processors.
8238 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8239 (PPC_FEATURE_HAS_DFP): New #define.
8240 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8241 size of the FPSCR.
8242
8243 2009-03-23 Pedro Alves <pedro@codesourcery.com>
8244
8245 * server.c (handle_query) Whitespace and formatting.
8246
8247 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8248
8249 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8250 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8251 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8252 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8253 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8254 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8255 Makefile.in, configure.ac: Fix whitespace throughout.
8256 * configure: Regenerate.
8257
8258 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8259
8260 * inferiors.c (find_inferior): Make it safe for the callback
8261 function to delete the currently iterated inferior.
8262
8263 2009-03-22 Pedro Alves <pedro@codesourcery.com>
8264
8265 * Makefile.in (linuw_low_h): Move higher.
8266 (thread-db.o): Depend on $(linux_low_h).
8267
8268 2009-03-17 Pedro Alves <pedro@codesourcery.com>
8269
8270 Rename "process" to "lwp" throughout.
8271
8272 * linux-low.c (all_processes): Rename to...
8273 (all_lwps): ... this.
8274 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8275 (add_process): Rename to ...
8276 (add_lwp): ... this. Adjust.
8277 (linux_create_inferior): Adjust.
8278 (linux_attach_lwp): Adjust.
8279 (linux_attach): Adjust.
8280 (linux_kill_one_process): Rename to ...
8281 (linux_kill_one_lwp): ... this. Adjust.
8282 (linux_kill): Adjust.
8283 (linux_detach_one_process): Rename to ...
8284 (linux_detach_one_lwp): ... this. Adjust.
8285 (linux_detach): Adjust.
8286 (check_removed_breakpoint): Adjust.
8287 (status_pending_p): Adjust.
8288 (linux_wait_for_process): Rename to ...
8289 (linux_wait_for_lwp): ... this. Adjust.
8290 (linux_wait_for_event): Adjust.
8291 (send_sigstop): Adjust.
8292 (wait_for_sigstop): Adjust.
8293 (stop_all_processes): Rename to ...
8294 (stop_all_lwps): ... this.
8295 (linux_resume_one_process): Rename to ...
8296 (linux_resume_one_lwp): ... this. Adjust.
8297 (linux_set_resume_request, linux_continue_one_thread)
8298 (linux_queue_one_thread, resume_status_pending_p)
8299 (usr_store_inferior_registers, regsets_store_inferior_registers)
8300 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8301 Adjust.
8302 * linux-low.h (get_process): Rename to ...
8303 (get_lwp): ... this. Adjust.
8304 (get_thread_process): Rename to ...
8305 (get_thread_lwp): ... this. Adjust.
8306 (get_process_thread): Rename to ...
8307 (get_lwp_thread): ... this. Adjust.
8308 (struct process_info): Rename to ...
8309 (struct lwp_info): ... this.
8310 (all_processes): Rename to ...
8311 (all_lwps): ... this.
8312 * proc-service.c (ps_lgetregs): Adjust.
8313 * thread-db.c (thread_db_create_event, find_one_thread)
8314 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8315
8316 2009-03-14 Pedro Alves <pedro@codesourcery.com>
8317
8318 * server.c (handle_query): Handle "qAttached".
8319
8320 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8321
8322 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8323 GPLv3, update license URL.
8324
8325 2009-03-01 Doug Evans <dje@google.com>
8326
8327 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8328 (server_h): Add gdb_signals.h.
8329 (signals.o): Update.
8330 * server.h (target_signal_from_host,target_signal_to_host_p)
8331 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8332
8333 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8334
8335 * remote-utils.c (getpkt): Also generate remote-debug
8336 information if noack_mode is set.
8337
8338 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8339
8340 * server.c (handle_query): Report qXfer:siginfo:read and
8341 qXfer:siginfo:write as supported and handle them.
8342 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8343 * linux-low.c (linux_xfer_siginfo): New.
8344 (linux_target_ops): Set it.
8345
8346 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8347
8348 * server.c (gdbserver_usage): Mention --remote-debug.
8349 (main): Accept '--remote-debug' switch.
8350
8351 2009-01-18 Doug Evans <dje@google.com>
8352
8353 * regcache.c (new_register_cache): No need to check result of xcalloc.
8354 * server.c (handle_search_memory): Back out calls to xmalloc,
8355 result is checked and error is returned to user upon failure.
8356 (handle_query): Ditto. Add more checks for result of malloc.
8357 (handle_v_cont): Check result of malloc, report error back to
8358 user upon failure.
8359 (handle_v_run): Ditto. Call freeargv.
8360 * server.h (freeargv): Declare.
8361 * utils.c (freeargv): New fn.
8362
8363 2009-01-15 Doug Evans <dje@google.com>
8364
8365 * gdbreplay.c (perror_with_name): Make arg const char *.
8366 * server.h (target_signal_to_name): Make return type const char *.
8367 * thread-db.c (thread_db_err_str): Make return type const char *.
8368 * utils.c (perror_with_name): Make arg const char *.
8369
8370 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8371
8372 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8373 when handling a EXIT_PROCESS_DEBUG_EVENT.
8374
8375 2009-01-06 Joel Brobecker <brobecker@adacore.com>
8376
8377 * gdbreplay.c (gdbreplay_version): Update copyright year.
8378 * server.c (gdbserver_version): Likewise.
8379
8380 2009-01-05 Doug Evans <dje@google.com>
8381
8382 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8383 (handle_extended_wait): Improve comment.
8384
8385 2008-12-13 Doug Evans <dje@google.com>
8386
8387 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8388 * server.h (ATTR_MALLOC): New macro.
8389 (xmalloc,xcalloc,xstrdup): Declare.
8390 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8391 * inferiors.c: Ditto.
8392 * linux-low.c: Ditto.
8393 * mem-break.c: Ditto.
8394 * regcache.c: Ditto.
8395 * remote-utils.c: Ditto.
8396 * server.c: Ditto.
8397 * target.c: Ditto.
8398 * win32-low.c: Ditto.
8399
8400 2008-12-12 Doug Evans <dje@google.com>
8401
8402 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8403 in debugging printf.
8404
8405 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8406
8407 2008-12-09 Doug Evans <dje@google.com>
8408
8409 * linux-low.h (struct process_info): Delete member tid, unused.
8410 * thread-db.c (find_one_thread): Update.
8411 (maybe_attach_thread): Update.
8412
8413 2008-12-02 Pedro Alves <pedro@codesourcery.com>
8414
8415 * target.h (struct target_ops): Add qxfer_osdata member.
8416 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8417 and dirent.h.
8418 (linux_qxfer_osdata): New functions.
8419 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8420 callback.
8421 * server.c (handle_query): Handle "qXfer:osdata:read:".
8422 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8423 (buffer_xml_printf): New functions.
8424 * server.h (struct buffer): New.
8425 (buffer_grow_str, buffer_grow_str0): New macros.
8426 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8427 (buffer_xml_printf): Declare.
8428
8429 2008-11-24 Doug Evans <dje@google.com>
8430
8431 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8432
8433 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8434
8435 * server.c (handle_v_run): Always use the supplied argument list.
8436
8437 2008-11-19 Bob Wilson <bob.wilson@acm.org>
8438
8439 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8440 (xtensa_regmap_table): Add entry for scompare1.
8441
8442 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8443
8444 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8445 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8446 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8447 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8448 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8449 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8450 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8451 XML target descriptions.
8452 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8453 when inferior is running on an ISA 2.05 or later processor. Add
8454 special case to return offset for full 64-bit slot of FPSCR when
8455 in 32-bits.
8456
8457 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8458
8459 * Makefile.in (SFILES, clean): Added sparc64 files.
8460 (reg-sparc64.o, reg-sparc64.c): New.
8461 * configure.srv (sparc*-*-linux*): New configuration.
8462 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8463 syscall arguments for SPARC.
8464 (regsets_store_inferior_registers): Likewise.
8465 * linux-sparc-low.c: New file.
8466
8467 2008-10-21 Doug Evans <dje@google.com>
8468
8469 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8470 (READLINE_DIR,READLINE_DEP): Delete.
8471 (INTERNAL_CFLAGS): Update.
8472 (LINTFLAGS): Update.
8473
8474 2008-10-10 Pedro Alves <pedro@codesourcery.com>
8475
8476 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8477 whole argv from the last run, not just argv[0].
8478
8479 2008-09-08 Pedro Alves <pedro@codesourcery.com>
8480
8481 * regcache.c (new_register_cache): Return NULL if the register
8482 cache size isn't known yet.
8483 (free_register_cache): Avoid dereferencing a NULL regcache.
8484
8485 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8486
8487 * configure.srv: Merge MIPS and MIPS64.
8488
8489 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8490
8491 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8492
8493 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
8494
8495 * Makefile.in: Add required vsx dependencies.
8496
8497 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8498 Declare init_registers_powerpc_vsx32l.
8499 Declare init_registers_powerpc_vsx64l.
8500 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8501 (ppc_arch_setup): Check for VSX in hwcap.
8502 (ppc_fill_vsxregset): New function.
8503 (ppc_store_vsxregset): New function.
8504 Add new VSX entry in regset_info target_regsets.
8505
8506 * configure.srv: Add new VSX dependencies.
8507
8508 2008-08-12 Pedro Alves <pedro@codesourcery.com>
8509
8510 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8511 (remote_open): Set or clear transport_is_reliable.
8512 (putpkt_binary): Don't expect acks in noack mode.
8513 (getpkt): Don't send ack/nac in noack mode.
8514 * server.c (handle_general_set): Handle QStartNoAckMode.
8515 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8516 qSupported.
8517 (main): Reset noack_mode on every connection.
8518 * server.h (noack_mode): Declare.
8519
8520 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8521
8522 * Makefile.in (GDBREPLAY_OBS): New variable.
8523 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8524
8525 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8526 Daniel Jacobowitz <dan@codesourcery.com>
8527
8528 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8529 (usr_store_inferior_registers): Likewise.
8530 (regsets_store_inferior_registers): Likewise.
8531
8532 2008-07-31 Rolf Jansen <rj@surtec.com>
8533 Pedro Alves <pedro@codesourcery.com>
8534
8535 * configure.ac: Check for memmem declaration.
8536 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8537 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8538 (disable_packet_qfThreadInfo): Unconditionally compile.
8539 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8540 * configure, config.in: Regenerate.
8541
8542 2008-07-28 Doug Kwan <dougkwan@google.com>
8543
8544 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8545 (linux_write_memory): Remove declaration of errno.
8546
8547 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8548
8549 * linux-low.c (handle_extended_wait): Do not use "status"
8550 variable uninitialized.
8551
8552 2008-07-07 Pedro Alves <pedro@codesourcery.com>
8553
8554 * server.c (handle_v_attach): Inhibit reporting dll changes.
8555
8556 2008-06-27 Pedro Alves <pedro@codesourcery.com>
8557
8558 * remote-utils.c (prepare_resume_reply): If requested, don't
8559 output "thread:TID" in the T stop reply.
8560
8561 * server.c (disable_packet_vCont, disable_packet_Tthread)
8562 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8563 (handle_query): If requested, disable support for qC, qfThreadInfo
8564 and qsThreadInfo.
8565 (handle_v_requests): If requested, disable support for vCont.
8566 (gdbserver_show_disableable): New.
8567 (main): Handle --disable-packet and --disable-packet=LIST.
8568
8569 * server.h (disable_packet_vCont, disable_packet_Tthread)
8570 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8571
8572 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8573
8574 * server.c (gdbserver_usage): Mention --version.
8575
8576 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8577
8578 * Makefile.in (gdbreplay.o): New rule.
8579
8580 2008-06-06 Joseph Myers <joseph@codesourcery.com>
8581
8582 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8583 message, not gdbserver.
8584
8585 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
8586 Nathan Sidwell <nathan@codesourcery.com>
8587 Joseph Myers <joseph@codesourcery.com>
8588
8589 * acinclude.m4: Include ../../config/acx.m4.
8590 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8591 * configure, config.in: Regenerate.
8592 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8593 * server.c (gdbserver_version): Print PKGVERSION.
8594 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8595 (main): Adjust gdbserver_usage calls.
8596 * gdbreplay.c (version, host_name): Add declarations.
8597 (gdbreplay_version, gdbreplay_usage): New.
8598 (main): Accept --version and --help options.
8599
8600 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8601
8602 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8603 (arm_breakpoint_at): Handle Thumb.
8604 (the_low_target): Add comment.
8605
8606 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8607
8608 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8609
8610 2008-05-09 Doug Evans <dje@google.com>
8611
8612 * server.h (decode_search_memory_packet): Declare.
8613 * remote-utils.c (decode_search_memory_packet): New fn.
8614 * server.c (handle_search_memory_1): New fn.
8615 (handle_search_memory): New fn.
8616 (handle_query): Process qSearch:memory packets.
8617
8618 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8619
8620 * regcache.c (registers_length): Remove.
8621 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8622 full register packet.
8623 * regcache.h (registers_length): Remove prototype.
8624 * server.h (PBUFSIZ): Define to 16384.
8625
8626 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8627
8628 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8629 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8630 powerpc-64l.o, and powerpc-altivec64l.o.
8631 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8632 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8633 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8634 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8635 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8636 to srv_xmlfiles.
8637
8638 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8639 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8640 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8641 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8642 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8643 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8644 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8645 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8646 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8647 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8648 (clean): Update.
8649
8650 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8651 (init_registers_powerpc_32l): ... this new prototype.
8652 (init_registers_powerpc_32): Remove, replace by ...
8653 (init_registers_powerpc_altivec32l): ... this new prototype.
8654 (init_registers_powerpc_e500): Remove, replace by ...
8655 (init_registers_powerpc_e500l): ... this new prototype.
8656 (init_registers_ppc64): Remove, replace by ...
8657 (init_registers_powerpc_64l): ... this new prototype.
8658 (init_registers_powerpc_64): Remove, replace by ...
8659 (init_registers_powerpc_altivec64l): ... this new prototype.
8660 (ppc_num_regs): Set to 73.
8661 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8662 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8663 (ppc_cannot_store_register): Handle orig_r3 and trap.
8664 (ppc_arch_setup): Update init_registers_... calls.
8665 (ppc_fill_gregset): Handle orig_r3 and trap.
8666
8667 * inferiors.c (clear_inferiors): Reset current_inferior.
8668
8669 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8670
8671 * acinclude.m4: Add override.m4.
8672 * configure: Regenerate.
8673
8674 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8675
8676 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8677 initial call to init_register_ppc64.
8678
8679 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8680
8681 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8682 single powerpc*-*-linux* case.
8683 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8684
8685 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8686
8687 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8688 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8689 from reg_xmlfiles.
8690 * linux-ppc-low.c: Include <elf.h>.
8691 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8692 (ppc_hwcap): New global variable.
8693 (ppc_regmap): Remove __SPE__ #ifdef sections.
8694 (ppc_regmap_e500): New global variable.
8695 (ppc_cannot_store_register): Update __SPE__ special case.
8696 (ppc_get_hwcap): New function.
8697 (ppc_arch_setup): Use it to determine whether inferior supports
8698 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8699 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8700 Do not access registers if target does not support AltiVec.
8701 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8702 Do not access registers if target does not support SPE.
8703 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8704
8705 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8706
8707 * linux-low.c (disabled_regsets, num_regsets): New.
8708 (use_regsets_p): Delete.
8709 (linux_wait_for_process): Clear disabled_regsets.
8710 (regsets_fetch_inferior_registers): Check and set it.
8711 (regsets_store_inferior_registers): Likewise.
8712 (linux_fetch_registers, linux_store_registers): Do not use
8713 use_regsets_p.
8714 (initialize_low): Allocate disabled_regsets.
8715
8716 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8717
8718 * Makefile.in (LIBOBJS): New.
8719 (OBS): Use LIBOBJS.
8720 (memmem.o): New rule.
8721 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8722 * configure: Regenerated.
8723
8724 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8725
8726 * server.c (handle_query): Never return "unsupported" for
8727 qXfer:features:read queries.
8728
8729 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8730
8731 * server.c (get_features_xml): Fix inverted condition.
8732 (handle_query): Always support qXfer:feature:read.
8733
8734 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8735
8736 * server.c (wrapper_argv): New.
8737 (start_inferior): Handle wrapper_argv. If set, expect an extra
8738 trap.
8739 (gdbserver_usage): Document --wrapper.
8740 (main): Parse --wrapper.
8741
8742 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8743
8744 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8745 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8746 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8747 (ppc_set_pc): Likewise.
8748 (ppc_arch_setup): New function.
8749 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8750 of collect_register.
8751 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8752
8753 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8754
8755 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8756 instead of linux-ppc64-low.o.
8757 * linux-ppc64-low.c: Remove file.
8758 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8759 (linux-ppc64-low.o): Remove rule.
8760
8761 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8762 (init_registers_powerpc_64): Likewise.
8763 (ppc_regmap): Conditionally define depending on __powerpc64__.
8764 (ppc_cannot_store_register): Do not special-case "fpscr" when
8765 compiled on __powerpc64__.
8766 (ppc_collect_ptrace_register): New function.
8767 (ppc_supply_ptrace_register): New function.
8768 (ppc_breakpoint): Change type to "unsigned int".
8769 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8770 (the_low_target): Conditionally provide initializers for the
8771 arch_setup member depending on __powerpc64__. Install
8772 collect_ptrace_register and supply_ptrace_register members.
8773
8774 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8775
8776 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8777 * server.c (gdbserver_xmltarget): Define.
8778 (get_features_xml): Use it to replace "target.xml" and arch_string.
8779
8780 * configure.srv: Remove srv_xmltarget. Add XML files that were
8781 mentioned there to srv_xmlfiles instead. Remove conditional tests
8782 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8783 srv_xmlfiles and srv_regobj to include all possible choices.
8784 * configure.ac (srv_xmltarget): Remove.
8785 (srv_xmlfiles): Do not add "target.xml".
8786 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8787 checks for supplementary target information.
8788 * configure: Regenerate.
8789 * Makefile.in (XML_TARGET): Remove.
8790 (target.xml): Remove rule.
8791 (clean): Do not clean up target.xml.
8792 (.PRECIOUS): Do not mention target.xml.
8793
8794 * target.h (struct target_ops): Remove arch_string member.
8795 * linux-low.c (linux_arch_string): Remove.
8796 (linux_target_ops): Remove arch_string initializer.
8797 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8798 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8799 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8800 * spu-low.c (spu_arch_string): Remove.
8801 (spu_target_ops): Remove arch_string initializer.
8802 * win32-low.c (win32_arch_string): Remove.
8803 (win32_target_ops): Remove arch_string initializer.
8804 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8805 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8806 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8807
8808 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8809
8810 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8811 by collect_ptrace_register and supply_ptrace_register hooks.
8812 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8813 instead of checking for the_low_target.left_pad_xfer.
8814 (usr_store_inferior_registers): Use collect_ptrace_register callback
8815 instead of checking for the_low_target.left_pad_xfer.
8816
8817 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8818 (s390_supply_ptrace_register): Likewise.
8819 (s390_fill_gregset): Call s390_collect_ptrace_register.
8820 (the_low_target): Update.
8821
8822 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8823 (ppc_supply_ptrace_register): Likewise.
8824 (the_low_target): Update.
8825
8826 * linux-i386-low.c (the_low_target): Update.
8827 * linux-x86-64-low.c (the_low_target): Update.
8828
8829 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8830
8831 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8832 reg-s390.o and reg-s390x.o.
8833
8834 * linux-low.c (new_inferior): New global variable.
8835 (linux_create_inferior, linux_attach): Set it.
8836 (linux_wait_for_process): Call the_low_target.arch_setup after the
8837 target has stopped for the first time.
8838 (initialize_low): Do not call the_low_target.arch_setup.
8839
8840 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8841 (s390_set_pc): Likewise.
8842 (s390_arch_setup): New function.
8843 (the_low_target): Use s390_arch_setup as arch_setup routine.
8844
8845 * regcache.c (realloc_register_cache): New function.
8846 (set_register_cache): Call it for each existing regcache.
8847
8848 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8849
8850 * server.h (init_registers): Remove prototype.
8851
8852 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8853 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8854 instead of init_registers ().
8855 * linux-arm-low.c (init_registers_arm): Add prototype.
8856 (init_registers_arm_with_iwmmxt): Likewise.
8857 (the_low_target): Add initializer for arch_setup field.
8858 * linux-cris-low.c (init_registers_cris): Add prototype.
8859 (the_low_target): Add initializer for arch_setup field.
8860 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8861 (the_low_target): Add initializer for arch_setup field.
8862 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8863 (the_low_target): Add initializer for arch_setup field.
8864 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8865 (the_low_target): Add initializer for arch_setup field.
8866 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8867 (the_low_target): Add initializer for arch_setup field.
8868 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8869 (the_low_target): Add initializer for arch_setup field.
8870 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8871 (init_registers_mips64_linux): Likewise.
8872 (the_low_target): Add initializer for arch_setup field.
8873 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8874 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8875 (the_low_target): Add initializer for arch_setup field.
8876 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8877 (init_registers_powerpc_64): Likewise.
8878 (the_low_target): Add initializer for arch_setup field.
8879 * linux-s390-low.c (init_registers_s390): Add prototype.
8880 (init_registers_s390x): Likewise.
8881 (the_low_target): Add initializer for arch_setup field.
8882 * linux-sh-low.c (init_registers_sh): Add prototype.
8883 (the_low_target): Add initializer for arch_setup field.
8884 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8885 (the_low_target): Add initializer for arch_setup field.
8886 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8887 (the_low_target): Add initializer for arch_setup field.
8888
8889 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8890 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8891 instead of init_registers ().
8892 * win32-arm-low.c (init_registers_arm): Add prototype.
8893 (the_low_target): Add initializer for arch_setup field.
8894 * win32-i386-low.c (init_registers_i386): Add prototype.
8895 (the_low_target): Add initializer for arch_setup field.
8896
8897 * spu-low.c (init_registers_spu): Add prototype.
8898 (initialize_low): Call initialie_registers_spu () instead of
8899 initialize_registers ().
8900
8901 2008-02-19 Pedro Alves <pedro@codesourcery.com>
8902
8903 * server.c (handle_v_requests): When handling the vRun and vAttach
8904 packets, if already debugging a process, don't kill it. Return an
8905 error instead.
8906
8907 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8908
8909 * server.c (handle_query): Correct length check.
8910
8911 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8912
8913 * win32-low.c (do_initial_child_stuff): Add process handle
8914 parameter. Set current_process_handle and current_process_id from the
8915 parameters. Clear globals.
8916 (win32_create_inferior): Don't set current_process_handle and
8917 current_process_id here. Instead pass them on the call to
8918 do_initial_child_stuff.
8919 (win32_attach): Likewise.
8920 (win32_clear_inferiors): New.
8921 (win32_kill): Don't close the current process handle or the
8922 current thread handle here. Instead call win32_clear_inferiors.
8923 (win32_detach): Don't open a new handle to the process. Call
8924 win32_clear_inferiors.
8925 (win32_join): Don't rely on current_process_handle; open a new
8926 handle using the process id.
8927 (win32_wait): Call win32_clear_inferiors when the inferior process
8928 has exited.
8929
8930 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8931
8932 * server.c (monitor_show_help): Add "exit".
8933
8934 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8935
8936 * Makefile.in (SFILES): Add linux-xtensa-low.c.
8937 (clean): Add reg-xtensa.c.
8938 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8939 * configure.srv (xtensa*-*-linux*) New target.
8940 * linux-xtensa-low.c: New.
8941 * xtensa-xtregs.c: New.
8942
8943 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8944
8945 * hostio.c: Don't include errno.h.
8946 (errno_to_fileio_errno): Move to hostio-errno.
8947 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8948 error number outputting to the target->hostio_last_error callback.
8949 (hostio_packet_error): Use FILEIO_EINVAL directly.
8950 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8951 calls to hostio_error.
8952 * hostio-errno.c: New.
8953 * server.h (hostio_last_error_from_errno): Declare.
8954 * target.h (target_ops): Add hostio_last_error member.
8955 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8956 as hostio_last_error handler.
8957 * spu-low.c (spu_target_ops): Likewise.
8958 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8959 (wince_hostio_last_error): New functions.
8960 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8961 as hostio_last_error handler.
8962 (win32_target_ops) [!_WIN32_WCE]: Register
8963 hostio_last_error_from_errno as hostio_last_error handler.
8964 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8965 (hostio-errno.o): New rule.
8966 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8967 * configure.srv (srv_hostio_err_objs): New variable. Default to
8968 hostio-errno.o.
8969 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8970 * configure: Regenerate.
8971
8972 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8973
8974 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8975 (linux_kill, linux_detach): Clean up the process list.
8976 * remote-utils.c (remote_open): Improve port number parsing.
8977 (putpkt_binary, input_interrupt): Only send interrupts if the target
8978 is running.
8979 * server.c (extended_protocol): Make static.
8980 (attached): Define earlier.
8981 (exit_requested, response_needed, program_argv): New variables.
8982 (target_running): New.
8983 (start_inferior): Clear attached here.
8984 (attach_inferior): Set attached here.
8985 (require_running): Define.
8986 (handle_query): Use require_running and target_running. Implement
8987 "monitor exit".
8988 (handle_v_attach, handle_v_run): New.
8989 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8990 (gdbserver_usage): Update.
8991 (main): Redo argument parsing. Handle --debug and --multi. Handle
8992 --attach along with other options or after the port. Save
8993 program_argv. Support no initial program. Resynchronize
8994 communication with GDB after an error. Handle "monitor exit".
8995 Use require_running and target_running. Always allow the extended
8996 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8997 restart in extended mode.
8998 * README: Refer to the GDB manual. Update --attach usage.
8999
9000 2007-12-20 Andreas Schwab <schwab@suse.de>
9001
9002 * linux-low.c (STACK_SIZE): Define.
9003 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9004 (linux_test_for_tracefork): Likewise.
9005
9006 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9007
9008 * linux-low.c (linux_wait_for_event): Update messages. Do not
9009 reinsert auto-delete breakpoints.
9010 * mem-break.c (struct breakpoint): Change return type of handler to
9011 int.
9012 (set_breakpoint_at): Update handler type.
9013 (reinsert_breakpoint_handler): Return 1 instead of calling
9014 delete_breakpoint.
9015 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9016 setting a new one.
9017 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9018 * mem-break.h (set_breakpoint_at): Update handler type.
9019 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9020 * win32-low.c (auto_delete_breakpoint): New.
9021 (get_child_debug_event): Use it.
9022
9023 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9024
9025 * configure.ac: Check for pread and pwrite.
9026 * hostio.c (handle_pread): Fall back to lseek and read.
9027 (handle_pwrite): Fall back to lseek and write.
9028 * config.in, configure: Regenerated.
9029
9030 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9031
9032 * server.c (myresume): Add own_buf argument.
9033 (main): Update calls.
9034
9035 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9036
9037 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9038 * remote-utils.c (remote_open): Do not call disable_async_io.
9039 (block_async_io): Delete.
9040 (unblock_async_io): Make static.
9041 (initialize_async_io): New.
9042 * server.c (handle_v_cont): Handle async I/O here.
9043 (myresume): Likewise. Move other common resume tasks here...
9044 (main): ... from here. Call initialize_async_io. Disable async
9045 I/O before the main loop.
9046 * server.h (initialize_async_io): Declare.
9047 (block_async_io, unblock_async_io): Delete prototypes.
9048 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9049
9050 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9051
9052 * remote-utils.c (readchar): Allow binary data in received messages.
9053
9054 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9055
9056 * win32-low.c (attaching): New global.
9057 (win32_create_inferior): Clear the `attaching' global.
9058 (win32_attach): Set the `attaching' global.
9059 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9060 attaching. Only set a breakpoint at the entry point if not
9061 attaching.
9062
9063 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9064
9065 * server.c (main): Don't report dll events on the initial
9066 connection on attaches.
9067
9068 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9069
9070 * server.c (main): Relax numerical bases supported for the pid of
9071 the --attach command line argument.
9072
9073 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9074
9075 * win32-low.c (win32_attach): Call OpenProcess before
9076 DebugActiveProcess, not after. Add last error output to error
9077 call.
9078
9079 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9080
9081 * win32-low.c (win32_get_thread_context)
9082 (win32_set_thread_context): New functions.
9083 (thread_rec): Use win32_get_thread_context.
9084 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9085 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9086 field.
9087
9088 2007-12-03 Leo Zayas
9089 Pedro Alves <pedro_alves@portugalmail.pt>
9090
9091 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9092 global variables.
9093 (child_add_thread): Minor cleanup.
9094 (child_continue): Resume artificially suspended threads before
9095 calling ContinueDebugEvent.
9096 (suspend_one_thread): New.
9097 (fake_breakpoint_event): New.
9098 (get_child_debug_event): Change return type to int. Check here if
9099 gdb sent an interrupt request. If a soft interrupt was requested,
9100 fake a breakpoint event. Return 0 if there is no event to handle,
9101 and 1 otherwise.
9102 (win32_wait): Don't check here if gdb sent an interrupt request.
9103 Ensure there is a valid event to handle.
9104 (win32_request_interrupt): Add soft interruption method as last
9105 resort.
9106
9107 2007-12-03 Leo Zayas
9108 Pedro Alves <pedro_alves@portugalmail.pt>
9109
9110 * win32-low.h (win32_thread_info): Add descriptions to the
9111 structure members. Replace `suspend_count' counter by a
9112 `suspended' flag.
9113 * win32-low.c (thread_rec): Update condition of when to get the
9114 context from the inferior. Rely on ContextFlags being set if it
9115 has already been retrieved. Only suspend the inferior thread if
9116 we haven't already. Warn if that fails.
9117 (continue_one_thread): s/suspend_count/suspended/. Only call
9118 ResumeThread once. Warn if that fails.
9119
9120 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9121
9122 * win32-low.c (win32_wait): Don't read from the inferior when it
9123 has already exited.
9124
9125 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9126
9127 * Makefile.in (win32_low_h): New variable.
9128 (win32-low.o): Add dependency on $(win32_low_h).
9129 (win32-arm-low.o, win32-i386-low.o): New rules.
9130
9131 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9132
9133 * hostio.c: Correct copyright year.
9134
9135 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9136
9137 * Makefile.in (OBS): Add hostio.o.
9138 (hostio.o): New rule.
9139 * server.h (handle_vFile): Declare.
9140 * hostio.c: New file.
9141 * server.c (handle_v_requests): Take packet_len and new_packet_len
9142 for binary packets. Call handle_vFile.
9143 (main): Update call to handle_v_requests.
9144
9145 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9146
9147 * linux-low.c: Include <sched.h>.
9148
9149 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9150
9151 * linux-low.c (linux_tracefork_grandchild): New.
9152 (linux_tracefork_child): Use clone.
9153 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9154
9155 2007-10-31 Joel Brobecker <brobecker@adacore.com>
9156
9157 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9158
9159 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9160
9161 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9162
9163 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9164
9165 * inferiors.c (change_inferior_id): Delete.
9166 (add_pid_to_list, pull_pid_from_list): New.
9167 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9168 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9169 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9170 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9171 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9172 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9173 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9174 (using_threads): Always set to 1.
9175 (handle_extended_wait): New.
9176 (add_process): Do not set TID.
9177 (linux_create_inferior): Set must_set_ptrace_flags.
9178 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9179 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9180 (linux_thread_alive): Rename TID argument to LWPID.
9181 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9182 (linux_wait_for_event): Do not use TID or check using_threads. Update
9183 call to dead_thread_notify. Call handle_extended_wait.
9184 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9185 (send_sigstop): Delete sigstop_sent.
9186 (wait_for_sigstop): Avoid TID.
9187 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9188 (linux_test_for_tracefork): New.
9189 (linux_lookup_signals): Use thread_db_active and
9190 linux_supports_tracefork_flag.
9191 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9192 * linux-low.h (get_process_thread): Avoid TID.
9193 (struct process_ifo): Move thread_known and tid to the end. Remove
9194 sigstop_sent.
9195 (linux_attach_lwp, thread_db_init): Update prototypes.
9196 * server.h (change_inferior_id): Delete prototype.
9197 (add_pid_to_list, pull_pid_from_list): New prototypes.
9198 * thread-db.c (thread_db_use_events): New.
9199 (find_first_thread): Rename to...
9200 (find_one_thread): ...this. Update callers and messages. Do not
9201 call fatal. Check thread_db_use_events. Do not call
9202 change_inferior_id or new_thread_notify.
9203 (maybe_attach_thread): Update. Do not call new_thread_notify.
9204 (thread_db_init): Set thread_db_use_events. Check use_events.
9205 * utils.c (fatal, warning): Correct message prefix.
9206
9207 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9208
9209 * Makefile.in (clean): Remove new files.
9210 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9211 (powerpc-64.o, powerpc-64.c): New rules.
9212 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9213 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9214 with SPE.
9215 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9216 SPE targets.
9217 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9218 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9219 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9220 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9221 (target_regsets): Add AltiVec and SPE register sets.
9222 * configure.ac: Check for AltiVec and SPE.
9223 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9224 (ppc_fill_vrregset, ppc_store_vrregset): New.
9225 (target_regsets): Add AltiVec register set.
9226 * configure: Regenerated.
9227
9228 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9229
9230 * linux-low.c (O_LARGEFILE): Define.
9231 (linux_read_memory): Use /proc/PID/mem.
9232 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9233 * configure, config.in: Regenerated.
9234
9235 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9236
9237 * linux-low.c (linux_wait_for_event): Do not pass signals while
9238 single-stepping.
9239
9240 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9241
9242 * win32-low.c (create_process): New.
9243 (win32_create_inferior): Use create_process instead of
9244 CreateProcess. If create_process failed retry appending an ".exe"
9245 suffix. Store the GetLastError result immediatelly after
9246 create_process calls and use it on the call to error.
9247
9248 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9249
9250 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9251
9252 2007-08-23 Joel Brobecker <brobecker@adacore.com>
9253
9254 * configure.ac: Switch license to GPLv3.
9255
9256 2007-08-01 Michael Snyder <msnyder@access-company.com>
9257
9258 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9259
9260 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9261
9262 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9263 typedef.
9264 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9265 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9266 CloseToolhelp32Snapshot.
9267 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9268 CloseToolhelp32Snapshot.
9269
9270 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
9271
9272 * server.c (main): Check for inferior exit before main loop.
9273
9274 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9275
9276 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9277 instead of on tmp_desc.
9278
9279 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9280 Daniel Jacobowitz <dan@codesourcery.com>
9281
9282 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9283 (add_thread): Minor cleanups.
9284 (clear_inferiors): Move lower in the file. Clear the DLL
9285 list.
9286 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9287 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9288 (xml_escape_text): New.
9289 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9290 for qSupported.
9291 (handle_v_cont): Report errors.
9292 (gdbserver_version): Update.
9293 (main): Correct size of own_buf. Do not report initial DLL events.
9294 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9295 (unloaded_dll, xml_escape_text): New.
9296 * win32-low.c (enum target_waitkind): Update comments.
9297 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9298 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9299 (win32_EnumProcessModules, win32_GetModuleInformation)
9300 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9301 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9302 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9303 (win32_Module32First, win32_Module32Next, load_toolhelp)
9304 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9305 (get_child_debug_event): Handle DLL events.
9306 (win32_wait): Likewise.
9307
9308 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9309
9310 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9311 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9312
9313 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9314
9315 * win32-low.c (handle_output_debug_string): Ignore event if not
9316 waiting.
9317
9318 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9319
9320 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9321
9322 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9323
9324 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9325
9326 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9327
9328 * inferiors.c (change_inferior_id): Add comment.
9329 * linux-low.c (check_removed_breakpoint): Add an early
9330 prototype. Improve debug output.
9331 (linux_attach): Doc update.
9332 (linux_detach_one_process, linux_detach): Clean up before releasing
9333 each process.
9334 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9335 * linux-low.h (struct process_info): Doc improvement.
9336 * mem-break.c (delete_all_breakpoints): New.
9337 * mem-break.h (delete_all_breakpoints): New prototype.
9338 * thread-db.c (find_first_thread): New.
9339 (thread_db_create_event): Call it instead of
9340 thread_db_find_new_threads. Clean up unused variables.
9341 (maybe_attach_thread): Remove first thread handling.
9342 (thread_db_find_new_threads): Use find_first_thread.
9343 (thread_db_get_tls_address): Likewise.
9344
9345 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9346
9347 * thread-db.c (thread_db_find_new_threads): Add prototype.
9348 (thread_db_create_event): Check for the main thread before adding
9349 a new thread.
9350 (maybe_attach_thread): Only enable event reporting if TID == 0.
9351 (thread_db_get_tls_address): Check for new threads.
9352
9353 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9354
9355 * linux-low.c (linux_create_inferior): Try execv before execvp.
9356 * spu-low.c (spu_create_inferior): Likewise.
9357
9358 2007-06-13 Mike Frysinger <vapier@gentoo.org>
9359
9360 * linux-low.c (linux_create_inferior): Change execv to execvp.
9361 * spu-low.c (spu_create_inferior): Likewies.
9362
9363 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9364
9365 * Makefile.in (clean): Clean new files instead of deleted ones.
9366 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9367 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9368 rules.
9369 * configure.srv: Specify XML files and new regformats for MIPS and
9370 MIPS64 GNU/Linux.
9371 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9372 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9373 an entry for the restart register.
9374 (mips_cannot_fetch_register, mips_cannot_store_register)
9375 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9376 register names to match the XML descriptions.
9377 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9378 restart register instead of $0.
9379
9380 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9381 Markus Deuling <deuling@de.ibm.com>
9382
9383 * remote-utils.c (decode_xfer_write): New function.
9384 * server.h (decode_xfer_write): Add prototype.
9385 * server.c (handle_query): Add PACKET_LEN argument. Support
9386 qXfer:spu:read and qXfer:spu:write packets.
9387 (main): Pass packet_len to handle_query.
9388 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9389 * target.h (target_ops): Add qxfer_spu.
9390
9391 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9392
9393 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9394 accessing non-seekable spufs files.
9395
9396 2007-05-16 Markus Deuling <deuling@de.ibm.com>
9397
9398 * server.c (handle_query): Add reply for qC packet.
9399
9400 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9401 Leo Zayas <lerele@champenstudios@com>
9402
9403 * server.h (check_remote_input_interrupt_request): New function.
9404 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9405 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9406 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9407 (check_remote_input_interrupt_request): New function.
9408 * server.h (check_remote_input_interrupt_request): Declare.
9409 * win32-low.c (winapi_DebugBreakProcess,
9410 winapi_GenerateConsoleCtrlEvent): New typedefs.
9411 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9412 to 250 ms.
9413 (win32_wait): Check for remote interrupt request
9414 with check_remote_input_interrupt_request.
9415 (win32_request_interrupt): New function.
9416 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9417
9418 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9419
9420 * win32-low.c (debug_registers_changed,
9421 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9422 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9423 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9424 (thread_rec): Get context using the low target.
9425 (child_add_thread): Call thread_added on the low target,
9426 which does the same thing.
9427 (regptr): Delete.
9428 (do_initial_child_stuff): Remove debug registers references.
9429 Set context using the low target. Resume threads after
9430 setting the contexts.
9431 (child_continue): Remove dead variable. Remove debug
9432 registers references.
9433 (child_fetch_inferior_registers): Go through the low target.
9434 (do_child_store_inferior_registers): Remove.
9435 (child_store_inferior_registers): Go through the low target.
9436 (win32_resume): Remove debug registers references.
9437 Set context using the low target.
9438 (handle_exception): Change return type to void. Don't record
9439 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9440 first chance exception.
9441 (get_child_debug_event): Change return type to void. Remove
9442 goto loop. Always return after waiting for debug event.
9443 (win32_wait): Convert to switch statement. Handle spurious
9444 events.
9445
9446 * win32-i386-low.c (debug_registers_changed,
9447 debug_registers_used): New.
9448 (initial_stuff): Rename to ...
9449 (i386_initial_stuff): ... this. Clear debug registers
9450 state variables.
9451 (store_debug_registers): Delete.
9452 (i386_get_thread_context): New.
9453 (load_debug_registers): Delete.
9454 (i386_set_thread_context): New.
9455 (i386_thread_added): New.
9456 (single_step): Rename to ...
9457 (i386_single_step): ... this.
9458 (do_fetch_inferior_registers): Rename to ...
9459 (i386_fetch_inferior_register): ... this.
9460 (i386_store_inferior_register): New.
9461 (the_low_target): Adapt to new interface.
9462
9463 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9464 (arm_get_thread_context): New.
9465 (arm_set_thread_context): New.
9466 (regptr): New.
9467 (do_fetch_inferior_registers): Rename to ...
9468 (arm_fetch_inferior_register): ... this.
9469 (arm_store_inferior_register): New.
9470 (arm_wince_breakpoint): Reimplement as unsigned long.
9471 (arm_wince_breakpoint_len): Define.
9472 (the_low_target): Adapt to new interface.
9473
9474 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9475 load_debug_registers. Add get_thread_context, set_thread_context,
9476 thread_added and store_inferior_register. Rename
9477 fetch_inferior_registers to fetch_inferior_register.
9478 (regptr): Remove declaration.
9479
9480 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9481
9482 * linux-low.c (linux_detach): Change return type to int. Return 0.
9483 * spu-low.c (spu_detach): Likewise.
9484
9485 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9486
9487 * target.h (target_ops): Change return type of detach to int.
9488 Add join.
9489 (join_inferior): New.
9490 * server.c (main): Don't skip detach support on mingw32.
9491 If the inferior doesn't support detaching return error.
9492 Call join_inferior instead of using waitpid.
9493 * linux-low.c (linux_join): New.
9494 (linux_target_op): Add linux_join.
9495 * spu-low.c (spu_join): New.
9496 (spu_target_ops): Add spu_join.
9497 * win32-low.c (win32_detach): Adapt to new interface.
9498 Reopen current_process_handle before detaching. Issue a child
9499 resume before detaching.
9500 (win32_join): New.
9501 (win32_target_op): Add win32_join.
9502
9503 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9504
9505 * win32-low.c (win32-attach): Fix return value.
9506 * target.h (target_ops): Describe ATTACH return values.
9507
9508 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9509
9510 * win32-low.c (GETPROCADDRESS): Define.
9511 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9512 (winapi_DebugSetProcessKillOnExit): Likewise.
9513 (win32_create_inferior): Force usage of ansi CreateProcessA.
9514 (win32_attach): Use GETPROCADDRESS.
9515 (win32_detach): Likewise.
9516
9517 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9518
9519 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9520
9521 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9522
9523 * win32-low.c: Commit leftover changes from 2007-03-29.
9524
9525 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9526
9527 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9528 fields short instead of int. Add explicit padding.
9529 (i387_cache_to_fsave): Remove unnecessary casts.
9530 (i387_fsave_to_cache): Doc fix.
9531 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9532
9533 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9534
9535 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9536 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9537
9538 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9539
9540 * configure.srv (arm*-*-mingw32ce*): Move near the other
9541 arm targets.
9542
9543 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9544
9545 * configure.ac: Add errno checking.
9546 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9547 sys/file.h and malloc.h.
9548 (AC_CHECK_DECLS): Add perror.
9549 (srv_mingwce): Handle.
9550 * configure.srv (i[34567]86-*-cygwin*): Add
9551 win32-i386-low.o to srv_tgtobj.
9552 (i[34567]86-*-mingw*): Likewise.
9553 (arm*-*-mingw32ce*): Add case.
9554 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9555 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9556 [__MINGW32CE__] (strerror): New function.
9557 [__MINGW32CE__] (errno): Define to GetLastError.
9558 [__MINGW32CE__] (COUNTOF): New macro.
9559 (remote_open): Remove extra close call.
9560 * mem-break.c (delete_breakpoint_at): New function.
9561 * mem-break.h (delete_breakpoint_at): Declare.
9562 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9563 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9564 [USE_WIN32API] (read, write): Add char* casts.
9565 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9566 * server.h: Include wincecompat.h on Windows CE.
9567 [HAVE_ERRNO_H]: Check.
9568 (perror): Declare if not declared.
9569 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9570 (perror_with_name): Remove errno declaration.
9571 * wincecompat.h: New.
9572 * wincecompat.c: New.
9573 * win32-low.h: New.
9574 * win32-arm-low.c: New.
9575 * win32-i386-low.c: New.
9576 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9577 (OUTMSG2): Make it safe.
9578 (_T): New macro.
9579 (COUNTOF): New macro.
9580 (NUM_REGS): Get it from the low target.
9581 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9582 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9583 (thread_rec): Let low target handle debug registers.
9584 (child_add_thread): Likewise.
9585 (child_init_thread_list): Likewise.
9586 (continue_one_thread): Likewise.
9587 (regptr): New.
9588 (do_child_fetch_inferior_registers): Move to ...
9589 * win32-i386-low.c: ... here, and rename to ...
9590 (do_fetch_inferior_registers): ... this.
9591 * win32-low.c (child_fetch_inferior_registers):
9592 Go through the low target.
9593 (do_child_store_inferior_registers): Use regptr.
9594 (strwinerror): New function.
9595 (win32_create_inferior): Handle Windows CE.
9596 Use strwinerror instead of strerror on Windows error
9597 codes. Add program to the error output.
9598 Don't close the main thread handle on Windows CE.
9599 (win32_attach): Use coredll.dll on Windows CE.
9600 (win32_kill): Close current process and current
9601 thread handles.
9602 (win32_detach): Use coredll.dll on Windows CE.
9603 (win32_resume): Let low target handle debug registers, and
9604 step request.
9605 (handle_exception): Add/Remove initial breakpoint. Avoid
9606 non-existant WSTOPSIG on Windows CE.
9607 (win32_read_inferior_memory): Cast to remove warning.
9608 (win32_arch_string): Go through the low target.
9609 (initialize_low): Call set_breakpoint_data with the low
9610 target's breakpoint.
9611 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9612 FOP_REGNUM, mappings): Move to ...
9613 * win32-i386-low.c: ... here.
9614 * win32-low.c (win32_thread_info): Move to ...
9615 * win32-low.h: ... here.
9616 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9617 win32-arm-low.c and wincecompat.c.
9618 (all:): Add $EXEEXT.
9619 (install-only:): Likewise.
9620 (gdbserver:): Likewise.
9621 (gdbreplay:): Likewise.
9622 * config.in: Regenerate.
9623 * configure: Regenerate.
9624
9625 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9626
9627 * win32-low.c: Rename typedef thread_info to
9628 win32_thread_info throughout.
9629
9630 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9631
9632 * win32-i386-low.c: Rename to ...
9633 * win32-low.c: ... this.
9634 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9635 * Makefile.in: Likewise.
9636
9637 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9638
9639 * remote-utils.c (monitor_output): Constify msg parameter.
9640 * server.h (monitor_output): Likewise.
9641 * win32-i386-low.c (handle_output_debug_string): New.
9642 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9643 handle_output_debug_string.
9644 (get_child_debug_event): Likewise.
9645
9646 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9647
9648 * server.c (main): Correct strtoul check.
9649
9650 2007-03-27 Jon Ringle <jon@ringle.org>
9651
9652 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9653
9654 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9655
9656 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9657
9658 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9659
9660 * terminal.h: Check HAVE_SGTTY_H.
9661
9662 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
9663
9664 * remote-utils.c (remote_open): Print out the assigned port number.
9665
9666 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9667
9668 * remote-utils.c (monitor_output): New function.
9669 * server.c (debug_threads): Define here.
9670 (monitor_show_help): New function.
9671 (handle_query): Handle qRcmd.
9672 (main): Do not handle 'd' packet.
9673 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9674 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9675 of debug_threads.
9676
9677 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9678
9679 * Makefile.in (EXEEXT): New.
9680 (clean): Use $(EXEEXT).
9681
9682 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9683
9684 * target.h (target_ops): Rename send_signal to request_interrupt,
9685 and remove enum target_signal parameter.
9686 * linux-low.c (linux_request_interrupt): Rename from
9687 linux_send_signal, and always send SIGINT.
9688 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9689 and always send SIGINT.
9690 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9691 of send_signal.
9692 (input_interrupt): Likewise.
9693
9694 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9695
9696 * server.c (get_features_xml): Check if target implemented
9697 arch_string.
9698 * win32-i386-low.c (win32_arch_string): New.
9699 (win32_target_ops): Add win32_arch_string as arch_string member.
9700
9701 2007-02-22 Markus Deuling <deuling@de.ibm.com>
9702
9703 * spu-low.c (spu_arch_string): New.
9704 (spu_target_ops): Add spu_arch_string.
9705
9706 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9707
9708 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9709 * configure.ac: Do not check for terminal.h.
9710 * configure, config.in: Regenerated.
9711
9712 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * Makefile.in (OBS): Add $(XML_BUILTIN).
9715 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9716 (clean): Update.
9717 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9718 (arm-with-iwmmxt.c): New.
9719 * config.in, configure: Regenerate.
9720 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9721 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9722 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9723 (arm*-*-linux*): Add iWMMXt and regset support.
9724 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9725 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9726 (arm_store_wmmxregset, target_regsets): New.
9727 * server.c (get_features_xml): Take annex argument. Check builtin
9728 XML documents.
9729 (handle_query): Handle multiple annexes.
9730
9731 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9732
9733 * remote-utils.c [USE_WIN32API] (read, write): Define.
9734 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9735 write.
9736
9737 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9738
9739 * linux-i386-low.c (the_low_target): Set arch_string.
9740 * linux-x86-64-low.c (the_low_target): Likewise.
9741 * linux-low.c (linux_arch_string): New.
9742 (linux_target_ops): Add it.
9743 * linux-low.h (struct linux_target_ops): Add arch_string.
9744 * server.c (write_qxfer_response): Use const void * for DATA.
9745 (get_features_xml): New.
9746 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9747 * target.h (struct target_ops): Add arch_string method.
9748
9749 2007-01-03 Denis Pilat <denis.pilat@st.com>
9750 Daniel Jacobowitz <dan@codesourcery.com>
9751
9752 * linux-low.c (linux_kill): Handle being called with no threads.
9753 * win32-i386-low.c (win32_kill): Likewise.
9754 (get_child_debug_event): Clear current_process_handle.
9755
9756 2006-12-30 Denis PILAT <denis.pilat@st.com>
9757 Daniel Jacobowitz <dan@codesourcery.com>
9758
9759 * remote-utils.c (remote_open): Check the type of specified
9760 serial port devices before opening them.
9761 * server.c (main): Kill the inferior if an error occurs during
9762 the first remote_open.
9763
9764 2006-12-05 Markus Deuling <deuling@de.ibm.com>
9765
9766 * README: Update supported targets.
9767
9768 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * Makefile.in (clean): Remove reg-mips64.c.
9771 (reg-mips64.c, reg-mips64.o): New rules.
9772 * configure.srv: Handle mips64. Include regset support for mips.
9773 * linux-mips-low.c (union mips_register): New.
9774 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9775 (mips_breakpoint, mips_breakpoint_at): Use int.
9776 (mips_collect_register, mips_supply_register)
9777 (mips_collect_register_32bit, mips_supply_register_32bit)
9778 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9779 (mips_store_fpregset, target_regsets): New.
9780 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9781
9782 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9783
9784 * configure.srv: Add target "spu*-*-*".
9785 * Makefile.in (clean): Remove reg-spu.c.
9786 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9787 * spu-low.c: New file.
9788
9789 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9790
9791 * configure.ac: Correct td_thr_tls_get_addr test.
9792 * configure: Regenerated.
9793
9794 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9795
9796 * linux-low.c (linux_wait_for_event): Reformat. Use the
9797 pass_signals array.
9798 * remote-utils.c (decode_address_to_semicolon): New.
9799 * server.c (pass_signals, handle_general_set): New.
9800 (handle_query): Mention QPassSignals for qSupported.
9801 (main): Call handle_general_set.
9802 * server.h (pass_signals, decode_address_to_semicolon): New.
9803
9804 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9805
9806 * server.c (handle_query): Correct error handling for read_auxv.
9807
9808 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9809
9810 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9811 and srv_linux_thread_db to yes.
9812 * linux-s390-low.c (s390_fill_gregset): New function.
9813 (target_regsets): Define data structure.
9814
9815 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9816
9817 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9818 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9819 * config.in, configure: Regenerated.
9820 * inferiors.c (gdb_id_to_thread): New function.
9821 (gdb_id_to_thread_id): Use it.
9822 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9823 * linux-low.h (struct process_info): Add th member.
9824 (thread_db_get_tls_address): New prototype.
9825 * remote-utils.c (decode_address): Make non-static.
9826 * server.c (handle_query): Handle qGetTLSAddr.
9827 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9828 * target.h (struct target_ops): Add get_tls_address.
9829 * thread-db.c (maybe_attach_thread): Save the thread handle.
9830 (thread_db_get_tls_address): New.
9831
9832 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9835 (linux_resume_one_process): Take a siginfo_t *. Update all
9836 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9837 (struct pending_signals): Add a siginfo_t.
9838 (linux_wait_for_process): Always set last_status.
9839 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9840 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9841 * linux-low.h (struct process_info): Add last_status.
9842
9843 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9844
9845 * remote-utils.c (try_rle): New function.
9846 (putpkt_binary): Use it.
9847
9848 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9851 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9852 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9853 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9854 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9855 point registers.
9856
9857 2006-08-08 Richard Sandiford <richard@codesourcery.com>
9858
9859 * server.c (terminal_fd): New variable.
9860 (old_foreground_pgrp): Likewise.
9861 (restore_old_foreground_pgrp): New function.
9862 (start_inferior): Record the terminal file descriptor in terminal_fd
9863 and its original foreground group in old_foreground_pgrp. Register
9864 restore_old_foreground_pgrp with atexit().
9865
9866 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9867
9868 * server.c (handle_query): Correct qPart to qXfer.
9869
9870 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9871
9872 * configure.ac: Check for more headers which are missing on
9873 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9874 * configure.srv: Add Cygwin and mingw32.
9875 * remote-utils.c: Don't include headers unconditionally which
9876 are missing on mingw32. Include <winsock.h> for mingw32.
9877 (remote_open): Adjust for mingw32 support. Flush
9878 standard error after writing to it.
9879 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9880 (unblock_async_io, enable_async_io, disable_async_io)
9881 (readchar, getpkt): Update for Winsock support.
9882 (prepare_resume_reply): Expect a protocol signal number.
9883 * server.c: Disable <sys/wait.h> on mingw32.
9884 (start_inferior): Adjust for mingw32 support. Flush
9885 standard error after writing to it.
9886 (attach_inferior): Likewise. Use protocol signal
9887 numbers.
9888 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9889 and names.
9890 * win32-i386-low.c: New file.
9891 * Makefile.in (XM_CLIBS): Set.
9892 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9893 (win32-i386-low.o): New dependency rule.
9894 * linux-low.c (linux_wait): Use target signal numbers.
9895 * target.h (struct target_ops): Doc fix.
9896 * server.h (target_signal_to_name): New prototype.
9897 * gdbreplay.c: Don't include headers unconditionally which
9898 are missing on mingw32. Include <winsock.h> for mingw32.
9899 (remote_close, remote_open): Adjust for Winsock support.
9900 * configure, config.in: Regenerated.
9901
9902 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * server.c (decode_xfer_read, write_qxfer_response): New.
9905 (handle_query): Take a packet length argument. Handle
9906 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9907 the qSupported response.
9908 (main): Update call to handle_query.
9909
9910 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9911
9912 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9913 (putpkt_binary): Renamed from putpkt and adjusted for binary
9914 data.
9915 (putpkt): New wrapper for putpkt_binary.
9916 (readchar): Don't mask off the high bit.
9917 (decode_X_packet): New function.
9918 * server.c (main): Call putpkt_binary if a handler sets the packet
9919 length. Save the length of the incoming packet. Handle 'X'.
9920 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9921
9922 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9923
9924 * server.c (handle_query): Handle qSupported.
9925
9926 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9927
9928 * remote-utils.c (all_symbols_looked_up): New variable.
9929 (look_up_one_symbol): Check it.
9930 * server.h (look_up_one_symbol): New declaration.
9931 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9932
9933 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9934
9935 * Makefile.in (linux-arm-low.o): Update dependencies.
9936 * linux-arm-low.c: Include "gdb_proc_service.h".
9937 (PTRACE_GET_THREAD_AREA): Define.
9938 (ps_get_thread_area): New function.
9939
9940 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9941
9942 * configure.srv (m68k*-*-uclinux*): New target.
9943 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9944 (linux_resume_one_process): Remove extraneous cast.
9945 (linux_read_offsets): New.
9946 (linux_target_op): Add linux_read_offsets on mmuless systems.
9947 * server.c (handle_query): Add qOffsets logic.
9948 * target.h (struct target_ops): Add read_offsets.
9949
9950 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9951
9952 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9953 (PTRACE_GET_THREAD_AREA): Define.
9954 (ps_get_thread_area): New function.
9955 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9956 (linux-x86-64-low.o): Update.
9957
9958 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9959
9960 * configure.ac: Remove checks for prfpregset_t.
9961 * gdb_proc_service.h: New file.
9962 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9963 new "gdb_proc_service.h".
9964 * proc-service.c: Likewise.
9965 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9966 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9967 * Makefile.in (gdb_proc_service_h): Updated.
9968 * configure, config.in: Regenerated.
9969
9970 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9971
9972 * remote-utils.c (prepare_resume_reply): Move declaration
9973 of gdb_id_from_wait to the top of the block.
9974
9975 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9976
9977 * linux-low.c (regsets_store_inferior_registers): Read the regset
9978 from the target before filling it.
9979
9980 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9981
9982 * server.c (attach_inferior): Return SIGTRAP for a successful
9983 attach.
9984
9985 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9986
9987 * Makefile.in (OBS): Add version.o.
9988 (STAGESTUFF): Delete.
9989 (version.o): Add dependencies.
9990 (version.c): Replace rule.
9991 (clean): Remove version.c.
9992 * server.c (gdbserver_version): New.
9993 (gdbserver_usage): Use printf.
9994 (main): Handle --version and --help.
9995 * server.h (version, host_name): Add declarations.
9996
9997 2005-12-23 Eli Zaretskii <eliz@gnu.org>
9998
9999 * linux-arm-low.c:
10000 * linux-arm-low.c:
10001 * inferiors.c:
10002 * i387-fp.h:
10003 * i387-fp.c:
10004 * gdbreplay.c:
10005 * regcache.c:
10006 * proc-service.c:
10007 * mem-break.h:
10008 * mem-break.c:
10009 * linux-x86-64-low.c:
10010 * linux-sh-low.c:
10011 * linux-s390-low.c:
10012 * linux-ppc64-low.c:
10013 * linux-ppc-low.c:
10014 * linux-mips-low.c:
10015 * linux-m68k-low.c:
10016 * linux-m32r-low.c:
10017 * linux-low.h:
10018 * linux-low.c:
10019 * linux-ia64-low.c:
10020 * linux-i386-low.c:
10021 * linux-crisv32-low.c:
10022 * thread-db.c:
10023 * terminal.h:
10024 * target.h:
10025 * target.c:
10026 * server.h:
10027 * server.c:
10028 * remote-utils.c:
10029 * regcache.h:
10030 * utils.c:
10031 * Makefile.in:
10032 * configure.ac:
10033 * gdbserver.1: Add (C) after Copyright. Update the FSF
10034 address.
10035
10036 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10037
10038 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10039 (arm_breakpoint_at): Recognize both breakpoints.
10040 (the_low_target): Use the correct breakpoint instruction.
10041
10042 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10043
10044 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10045 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10046 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10047 (the_low_target): Update.
10048
10049 2005-10-25 Andreas Schwab <schwab@suse.de>
10050
10051 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10052
10053 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10054 (ia64_num_regs): Reduce to 462.
10055
10056 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10057
10058 * acinclude.m4: Correct quoting.
10059 * aclocal.m4: Regenerated.
10060
10061 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10062 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10063 (thread_db_init): Call thread_db_err_str.
10064 * configure.ac: Check for TD_VERSION.
10065 * config.in, configure: Regenerated.
10066
10067 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10068
10069 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10070
10071 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10072
10073 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10074 is not available. Define HAVE_PTRACE_GETREGS if it is.
10075 * config.in, configure: Regenerated.
10076 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10077 * linux-i386-low.c, linux-m68k-low.c: Update to use
10078 HAVE_PTRACE_GETREGS.
10079 * linux-low.c (regsets_fetch_inferior_registers)
10080 (regsets_store_inferior_registers): Only return 0 if we processed
10081 GENERAL_REGS.
10082 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10083 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10084
10085 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10086
10087 * inferiors.c (struct thread_info): Add gdb_id.
10088 (add_thread): Add gdb_id argument.
10089 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10090 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10091 calls to add_thread.
10092 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10093 * server.c (handle_query): Use thread_to_gdb_id.
10094 (handle_v_cont, main): Use gdb_id_to_thread_id.
10095 * server.h (add_thread): Update prototype.
10096 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10097 prototypes.
10098
10099 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10100
10101 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10102 left-padded registers.
10103 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10104 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10105
10106 2005-07-01 Steve Ellcey <sje@cup.hp.com>
10107
10108 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10109 * configure: Regenerate.
10110 * config.in: Regenerate.
10111 * server.h (NEED_DECLARATION_STRERROR):
10112 Replace with !HAVE_DECL_STRERROR.
10113
10114 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10115
10116 * linux-low.c (linux_wait, linux_send_signal): Don't test
10117 an unsigned long variable for > 0 if it could be MAX_ULONG.
10118 * server.c (myresume): Likewise.
10119 * target.c (set_desired_inferior): Likewise.
10120
10121 2005-06-13 Mark Kettenis <kettenis@gnu.org>
10122
10123 * configure.ac: Simplify and improve check for socklen_t.
10124 * configure, config.in: Regenerate.
10125
10126 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * acconfig.h: Remove.
10129 * configure.ac: Add a test for socklen_t. Use three-argument
10130 AC_DEFINE throughout.
10131 * config.in: Regenerated using autoheader 2.59.
10132 * configure: Regenerated.
10133
10134 * gdbreplay.c (socklen_t): Provide a default.
10135 (remote_open): Use socklen_t.
10136 * remote-utils.c (socklen_t): Provide a default.
10137 (remote_open): Use socklen_t.
10138 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10139 unsigned char.
10140
10141 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10142 char for buffers.
10143 * linux-low.c (linux_read_memory, linux_write_memory)
10144 (linux_read_auxv): Likewise.
10145 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10146 (check_mem_write): Likewise.
10147 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10148 Likewise.
10149 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10150 (registers_from_string, register_data): Likewise.
10151 * server.c (handle_query, main): Likewise.
10152 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10153 (decode_M_packet): Likewise.
10154 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10155 * target.h (struct target_ops): Update read_memory, write_memory,
10156 and read_auxv.
10157 (read_inferior_memory, write_inferior_memory): Update.
10158 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10159 to unsigned char *.
10160 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10161 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10162 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10163 linux-s390-low.c, linux-sh-low.c: Update for changes in
10164 read_inferior_memory and the_low_target->breakpoint.
10165
10166 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10169 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10170 * configure.srv: Add powerpc64-*-linux*.
10171 * linux-ppc64-low.c: New file.
10172
10173 2005-05-23 Orjan Friberg <orjanf@axis.com>
10174
10175 * linux-cris-low.c: New file with support for CRIS.
10176 * linux-crisv32-low.c: Ditto for CRISv32.
10177 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10178 (clean): Add reg-cris.c and reg-crisv32.c.
10179 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10180 reg-crisv32.o, and reg-crisv32.c to make rules.
10181 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10182 recognized targets.
10183
10184 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10185
10186 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10187 of sizeof (PTRACE_XFER_TYPE).
10188 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10189
10190 2005-05-12 Orjan Friberg <orjanf@axis.com>
10191
10192 * target.h (struct target_ops): Add insert_watchpoint,
10193 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10194 pointers for hardware watchpoint support.
10195 * linux-low.h (struct linux_target_ops): Ditto.
10196 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10197 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10198 to linux_target_ops.
10199 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10200 reply packet.
10201 * server.c (main): Recognize 'Z' and 'z' packets.
10202
10203 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10204
10205 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10206 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10207 (the_low_target): Add new members.
10208
10209 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10210
10211 * proc-service.c (ps_lgetregs): Search all_processes instead of
10212 all_threads.
10213
10214 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10215
10216 * server.c (start_inferior): Change return type to int.
10217 (attach_inferior): Change sigptr to int *.
10218 (handle_v_cont, handle_v_requests): Change signal to int *.
10219 (main): Change signal to int.
10220
10221 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
10222
10223 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10224 * configure.srv: Add m32r*-*-linux*.
10225 * linux-m32r-low.c: New file.
10226
10227 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10228
10229 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10230
10231 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10232
10233 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10234 Take unsigned long arguments for PIDs.
10235 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10236 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10237 (wait_for_sigstop, linux_resume_one_process)
10238 (regsets_fetch_inferior_registers, linux_send_signal)
10239 (linux_read_auxv): Likewise. Update the types of variables holding
10240 PIDs. Update format string specifiers.
10241 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10242 * remote-utils.c (prepare_resume_reply): Likewise.
10243 * server.c (cont_thread, general_thread, step_thread)
10244 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10245 unsigned long.
10246 (handle_query): Update format specifiers.
10247 (handle_v_cont, main): Use strtoul for thread IDs.
10248 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10249 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10250 (general_thread, step_thread, thread_from_wait)
10251 (old_thread_from_wait): Update.
10252 * target.h (struct thread_resume): Use unsigned long for THREAD.
10253 (struct target_ops): Use unsigned long for arguments to attach and
10254 thread_alive.
10255
10256 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10257
10258 * acinclude.m4: Include bfd/bfd.m4 directly.
10259 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10260 <agriffis@toolchain.org>.
10261 * aclocal.m4, configure: Regenerated.
10262
10263 2005-01-07 Andrew Cagney <cagney@gnu.org>
10264
10265 * configure.ac: Rename configure.in, require autoconf 2.59.
10266 * configure: Re-generate.
10267
10268 2004-12-08 Daniel Jacobowitz <dan@debian.org>
10269
10270 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10271 LIBS when finished.
10272 * aclocal.m4: Regenerated.
10273 * configure: Regenerated.
10274
10275 2004-11-21 Andreas Schwab <schwab@suse.de>
10276
10277 * linux-m68k-low.c (m68k_num_gregs): Define.
10278 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10279 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10280 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10281 (m68k_breakpoint_at): New. Add to the_low_target.
10282
10283 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10284 srv_linux_thread_db to yes.
10285
10286 2004-10-20 Joel Brobecker <brobecker@gnat.com>
10287
10288 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10289 (ARCH_SET_FS): Likewise.
10290 (ARCH_GET_FS): Likewise.
10291 (ARCH_GET_GS): Likewise.
10292
10293 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10294
10295 * linux-i386-low.c (ps_get_thread_area): New.
10296 * linux-x86-64-low.c (ps_get_thread_area): New.
10297 * linux-low.c: Include <sys/syscall.h>.
10298 (linux_kill_one_process): Don't kill the first thread here.
10299 (linux_kill): Kill the first thread here.
10300 (kill_lwp): New function.
10301 (send_sigstop, linux_send_signal): Use it.
10302 * proc-service.c: Clean up #ifdefs.
10303 (fpregset_info): Delete.
10304 (ps_lgetregs): Update and enable implementation.
10305 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10306 implementations.
10307 * remote-utils.c (struct sym_cache, symbol_cache): New.
10308 (input_interrupt): Print a clearer message.
10309 (async_io_enabled): New variable.
10310 (enable_async_io, disable_async_io): Use it. Update comments.
10311 (look_up_one_symbol): Use the symbol cache.
10312 * thread-db.c (thread_db_look_up_symbols): New function.
10313 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10314
10315 2004-10-16 Daniel Jacobowitz <dan@debian.org>
10316
10317 * configure.in: Test for -rdynamic.
10318 * configure: Regenerated.
10319 * Makefile (INTERNAL_LDFLAGS): New.
10320 (gdbserver, gdbreplay): Use it.
10321
10322 2004-09-02 Andrew Cagney <cagney@gnu.org>
10323
10324 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10325
10326 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
10327
10328 * linux-low.c (linux_wait): Clear all_processes list also.
10329
10330 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10331
10332 * linux-low.c: Include <errno.h>. Remove extern declaration of
10333 errno.
10334
10335 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
10336
10337 * gdbreplay.c, server.h, utils.c: Update copyright years.
10338
10339 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10340
10341 * server.c (main): Print child status or termination signal from
10342 variable 'signal', not 'sig'.
10343
10344 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10345
10346 * linux-low.c (linux_read_memory): Change return type to
10347 int. Check for and return error from ptrace().
10348 * target.c (read_inferior_memory): Change return type to int. Pass
10349 back return status from the_target->read_memory().
10350 * target.h (struct target_ops): Adapt *read_memory() prototype.
10351 Update comment.
10352 (read_inferior_memory): Adapt prototype.
10353 * server.c (main): Return an error packet if
10354 read_inferior_memory() returns an error.
10355
10356 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
10357
10358 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10359 Unify with other clean targets.
10360
10361 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10362
10363 * server.c (handle_v_cont): Call set_desired_inferior.
10364
10365 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10366
10367 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10368
10369 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10370
10371 * linux-low.c (linux_wait): Unblock async I/O.
10372 (linux_resume): Block and enable async I/O.
10373 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10374 * server.h (block_async_io, unblock_async_io): Add prototypes.
10375
10376 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10377
10378 * remote-utils.c (remote_open): Print a status notice after
10379 opening a TCP port.
10380 * server.c (attach_inferior): Print a status notice after
10381 attaching.
10382
10383 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
10384
10385 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10386
10387 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
10388
10389 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10390 error packet.
10391 * server.c, target.h: Update copyright years.
10392
10393 2004-02-25 Roland McGrath <roland@redhat.com>
10394
10395 * target.h (struct target_ops): New member `read_auxv'.
10396 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10397 * linux-low.c (linux_read_auxv): New function.
10398 (linux_target_ops): Initialize `read_auxv' member to that.
10399
10400 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10401
10402 Committed by Jim Blandy <jimb@redhat.com>.
10403
10404 * linux-s390-low.c (s390_num_regs): Update.
10405 (s390_regmap): Remove control registers. Use __s390x__ predefine
10406 instead of GPR_SIZE to distiguish s390 and s390x targets.
10407
10408 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
10409
10410 * linux-low.c: Update copyright year.
10411 (check_removed_breakpoint): Clear pending_is_breakpoint.
10412 (linux_set_resume_request, linux_queue_one_thread)
10413 (resume_status_pending_p): New functions.
10414 (linux_continue_one_thread): Use process->resume.
10415 (linux_resume): Only resume threads if there are no pending events.
10416 * linux-low.h (struct process_info): Add resume request
10417 pointer.
10418
10419 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
10420
10421 * regcache.c (new_register_cache): Clear the allocated register
10422 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10423
10424 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
10425
10426 * linux-low.c (linux_resume): Take a struct thread_resume *
10427 argument.
10428 (linux_wait): Update call.
10429 (resume_ptr): New static variable.
10430 (linux_continue_one_thread): Renamed from
10431 linux_continue_one_process. Use resume_ptr.
10432 (linux_resume): Use linux_continue_one_thread.
10433 * server.c (handle_v_cont, handle_v_requests): New functions.
10434 (myresume): New function.
10435 (main): Handle 'v' case.
10436 * target.h (struct thread_resume): New type.
10437 (struct target_ops): Change argument of "resume" to struct
10438 thread_resume *.
10439 (myresume): Delete macro.
10440
10441 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10442
10443 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10444 (uninstall): Support DESTDIR.
10445
10446 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10447
10448 * configure.srv: Add xscale*linux copy of arm*linux entry.
10449
10450 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
10451
10452 * linux-arm-low.c (arm_reinsert_addr): New function.
10453 (the_low_target): Add arm_reinsert_addr.
10454
10455 2003-07-08 Mark Kettenis <kettenis@gnu.org>
10456
10457 * mem-break.c: Remove whitespace at end of file.
10458
10459 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10460
10461 * configure.in: Check whether we need to prototype strerror.
10462 * server.h: Optionally prototype strerror.
10463 * gdbreplay.c (perror_with_name): Use strerror.
10464 * linux-low.c (linux_attach_lwp): Use strerror.
10465 * utils.c (perror_with_name): Use strerror.
10466 * config.in, configure: Regenerated.
10467
10468 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
10469
10470 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10471 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10472
10473 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
10474
10475 * Makefile.in (SFILES): Update.
10476 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10477 low-sun3.c: Remove files.
10478
10479 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
10480
10481 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10482 (linux_detach_one_process, linux_detach): New functions.
10483 (linux_target_ops): Add linux_detach.
10484 * server.c (main): Handle 'D' packet.
10485 * target.h (struct target_ops): Add "detach" member.
10486 (detach_inferior): Define.
10487
10488 2003-06-13 Mark Kettenis <kettenis@gnu.org>
10489
10490 From Kelley Cook <kelleycook@wideopenwest.com>:
10491 * configure.srv: Accept i[34567]86 variants.
10492
10493 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
10494
10495 * linux-low.c (linux_wait_for_event): Correct comment typos.
10496 (linux_resume_one_process): Call check_removed_breakpoint.
10497 (linux_send_signal): New function.
10498 (linux_target_ops): Add linux_send_signal.
10499 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10500 of kill.
10501 * target.h (struct target_ops): Add send_signal.
10502
10503 2003-05-29 Jim Blandy <jimb@redhat.com>
10504
10505 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10506 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10507 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10508 away part of the register's value.
10509
10510 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
10511
10512 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10513 (linux_wait_for_event, linux_init_signals): Likewise.
10514
10515 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
10516
10517 * configure.in: Check for stdlib.h.
10518 * configure: Regenerated.
10519 * config.in: Regenerated.
10520
10521 2003-01-04 Andreas Schwab <schwab@suse.de>
10522
10523 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10524
10525 2003-01-02 Andrew Cagney <ac131313@redhat.com>
10526
10527 * Makefile.in: Remove obsolete code.
10528
10529 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
10530
10531 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10532 defined(PT_FPR0_HI).
10533
10534 2002-11-17 Stuart Hughes <seh@zee2.com>
10535
10536 * linux-arm-low.c (arm_num_regs): Increase.
10537 (arm_regmap): Include status register.
10538
10539 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
10540
10541 * linux-low.c (register_addr): Remove incorrect -1 check.
10542
10543 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
10544
10545 * linux-low.c (linux_create_inferior): Call setpgid. Return
10546 the new PID.
10547 (unstopped_p, linux_signal_pid): Remove.
10548 (linux_target_ops): Remove linux_signal_pid.
10549 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10550 global instead of target method.
10551 * target.h (struct target_ops): Remove signal_pid. Update comment
10552 for create_inferior.
10553 * server.c (signal_pid): New variable.
10554 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
10555 gdbserver. Set the child to be the foreground process group.
10556 (attach_inferior): Set signal_pid.
10557
10558 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
10559
10560 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10561
10562 2002-08-20 Jim Blandy <jimb@redhat.com>
10563
10564 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10565 default for this.
10566
10567 2002-08-01 Andrew Cagney <cagney@redhat.com>
10568
10569 * Makefile.in: Make chill references obsolete.
10570
10571 2002-07-24 Kevin Buettner <kevinb@redhat.com>
10572
10573 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10574 * configure: Regenerate.
10575 * config.in: Regenerate.
10576
10577 2002-07-09 David O'Brien <obrien@FreeBSD.org>
10578
10579 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10580 (perror_with_name, remote_close, remote_open, expect, play): Static.
10581
10582 2002-07-04 Michal Ludvig <mludvig@suse.cz>
10583
10584 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10585 byte offsets instead of an array of indexes.
10586 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10587
10588 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
10589
10590 * regcache.c: Add comment.
10591
10592 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
10593
10594 * thread-db.c: New file.
10595 * proc-service.c: New file.
10596 * acinclude.m4: New file.
10597 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10598 proc-service.o, and thread-db.o.
10599 (linux-low.o): Add USE_THREAD_DB.
10600 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10601 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10602 * aclocal.m4: Regenerated.
10603 * config.in: Regenerated.
10604 * configure: Regenerated.
10605 * configure.in: Check for proc_service.h, sys/procfs.h,
10606 thread_db.h, and linux/elf.h headrs.
10607 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10608 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10609 Check for -lthread_db and thread support.
10610 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10611 PowerPC, and SuperH.
10612 * i387-fp.c: Constify arguments.
10613 * i387-fp.h: Likewise.
10614 * inferiors.c: (struct thread_info): Renamed from
10615 `struct inferior_info'. Remove PID member. Use generic inferior
10616 list header. All uses updated.
10617 (inferiors, signal_pid): Removed.
10618 (all_threads): New variable.
10619 (get_thread): Define.
10620 (add_inferior_to_list): New function.
10621 (for_each_inferior): New function.
10622 (change_inferior_id): New function.
10623 (add_inferior): Removed.
10624 (remove_inferior): New function.
10625 (add_thread): New function.
10626 (free_one_thread): New function.
10627 (remove_thread): New function.
10628 (clear_inferiors): Use for_each_inferior and free_one_thread.
10629 (find_inferior): New function.
10630 (find_inferior_id): New function.
10631 (inferior_target_data): Update argument type.
10632 (set_inferior_target_data): Likewise.
10633 (inferior_regcache_data): Likewise.
10634 (set_inferior_regcache_data): Likewise.
10635 * linux-low.c (linux_bp_reinsert): Remove.
10636 (all_processes, stopping_threads, using_thrads)
10637 (struct pending_signals, debug_threads, pid_of): New.
10638 (inferior_pid): Replace with macro.
10639 (struct inferior_linux_data): Remove.
10640 (get_stop_pc, add_process): New functions.
10641 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10642 Use add_process and add_thread.
10643 (linux_attach_lwp): New function, based on old linux_attach. Use
10644 add_process and add_thread. Set stop_expected for new threads.
10645 (linux_attach): New function.
10646 (linux_kill_one_process): New function.
10647 (linux_kill): Kill all LWPs.
10648 (linux_thread_alive): Use find_inferior_id.
10649 (check_removed_breakpoints, status_pending_p): New functions.
10650 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10651 Update. Use WNOHANG. Wait for cloned processes also. Update process
10652 struct for the found process.
10653 (linux_wait_for_event): New function.
10654 (linux_wait): Use it. Support LWPs.
10655 (send_sigstop, wait_for_sigstop, stop_all_processes)
10656 (linux_resume_one_process, linux_continue_one_process): New functions.
10657 (linux_resume): Support LWPs.
10658 (REGISTER_RAW_SIZE): Remove.
10659 (fetch_register): Use register_size instead. Call supply_register.
10660 (usr_store_inferior_registers): Likewise. Call collect_register.
10661 Fix recursive case.
10662 (regsets_fetch_inferior_registers): Improve error message.
10663 (regsets_store_inferior_registers): Add debugging.
10664 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10665 (unstopped_p, linux_signal_pid): New functions.
10666 (linux_target_ops): Add linux_signal_pid.
10667 (linux_init_signals): New function.
10668 (initialize_low): Call it. Initialize using_threads.
10669 * regcache.c (inferior_regcache_data): Add valid
10670 flag.
10671 (get_regcache): Fetch registers lazily. Add fetch argument
10672 and update all callers.
10673 (regcache_invalidate_one, regcache_invalidate): New
10674 functions.
10675 (new_register_cache): Renamed from create_register_cache.
10676 Return the new regcache.
10677 (free_register_cache): Change argument to a void *.
10678 (registers_to_string, registers_from_string): Call get_regcache
10679 with fetch flag set.
10680 (register_data): Make static. Pass fetch flag to get_regcache.
10681 (supply_register): Call get_regcache with fetch flag clear.
10682 (collect_register): Call get_regcache with fetch flag set.
10683 (collect_register_as_string): New function.
10684 * regcache.h: Update.
10685 * remote-utils.c (putpkt): Flush after debug output and use
10686 stderr.
10687 Handle input interrupts while waiting for an ACK.
10688 (input_interrupt): Use signal_pid method.
10689 (getpkt): Flush after debug output and use stderr.
10690 (outreg): Use collect_register_as_string.
10691 (new_thread_notify, dead_thread_notify): New functions.
10692 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10693 and general_thread.
10694 (look_up_one_symbol): Flush after debug output.
10695 * server.c (step_thread, server_waiting): New variables.
10696 (start_inferior): Don't use signal_pid. Update call to mywait.
10697 (attach_inferior): Update call to mywait.
10698 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10699 (main): Don't fetch/store registers explicitly. Use
10700 set_desired_inferior. Support proposed ``Hs'' packet. Update
10701 calls to mywait.
10702 * server.h: Update.
10703 (struct inferior_list, struct_inferior_list_entry): New.
10704 * target.c (set_desired_inferior): New.
10705 (write_inferior_memory): Constify.
10706 (mywait): New function.
10707 * target.h: Update.
10708 (struct target_ops): New signal_pid method.
10709 (mywait): Removed macro, added prototype.
10710
10711 * linux-low.h (regset_func): Removed.
10712 (regset_fill_func, regset_store_func): New.
10713 (enum regset_type): New.
10714 (struct regset_info): Add type field. Use new operation types.
10715 (struct linux_target_ops): stop_pc renamed to get_pc.
10716 Add decr_pc_after_break and breakpoint_at.
10717 (get_process, get_thread_proess, get_process_thread)
10718 (strut process_info, all_processes, linux_attach_lwp)
10719 (thread_db_init): New.
10720
10721 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10722 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10723 (the_low_target): Add new members.
10724 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10725 (i386_store_fpxregset): Constify.
10726 (target_regsets): Add new kind identifier.
10727 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10728 (i386_set_pc): Add debugging.
10729 (i386_breakpoint_at): New function.
10730 (the_low_target): Add new members.
10731 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10732 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10733 (mips_breakpoint_at): New.
10734 (the_low_target): Add new members.
10735 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10736 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10737 (the_low_target): Add new members.
10738 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10739 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10740 (the_low_target): Add new members.
10741 * linux-x86-64-low.c (target_regsets): Add new kind
10742 identifier.
10743
10744 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
10745
10746 From Martin Pool <mbp@samba.org>:
10747 * server.c (gdbserver_usage): New function.
10748 (main): Call it.
10749
10750 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10753 stop_at -> stop_pc.
10754
10755 2002-05-04 Andrew Cagney <ac131313@redhat.com>
10756
10757 * Makefile.in: Remove obsolete code.
10758
10759 2002-04-24 Michal Ludvig <mludvig@suse.cz>
10760
10761 * linux-low.c (regsets_fetch_inferior_registers),
10762 (regsets_store_inferior_registers): Removed cast to int from
10763 ptrace() calls.
10764 * regcache.h: Added declaration of struct inferior_info.
10765
10766 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10767
10768 * inferiors.c (struct inferior_info): Add regcache_data.
10769 (add_inferior): Call create_register_cache.
10770 (clear_inferiors): Call free_register_cache.
10771 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10772 * regcache.c (struct inferior_regcache_data): New.
10773 (registers): Remove.
10774 (get_regcache): New function.
10775 (create_register_cache, free_register_cache): New functions.
10776 (set_register_cache): Don't initialize the register cache here.
10777 (registers_to_string, registers_from_string, register_data): Call
10778 get_regcache.
10779 * regcache.h: Add prototypes.
10780 * server.h: Likewise.
10781
10782 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
10783
10784 * mem-break.c: New file.
10785 * mem-break.h: New file.
10786 * Makefile.in: Add mem-break.o rule; update server.h
10787 dependencies.
10788 * inferiors.c (struct inferior_info): Add target_data
10789 member.
10790 (clear_inferiors): Free target_data member if set.
10791 (inferior_target_data, set_inferior_target_data): New functions.
10792 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10793 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10794 * linux-low.c (linux_bp_reinsert): New variable.
10795 (struct inferior_linux_data): New.
10796 (linux_create_inferior): Use set_inferior_target_data.
10797 (linux_attach): Likewise. Call add_inferior.
10798 (linux_wait_for_one_inferior): New function.
10799 (linux_wait): Call it.
10800 (linux_write_memory): Add const.
10801 (initialize_low): Call set_breakpoint_data.
10802 * linux-low.h (struct linux_target_ops): Add breakpoint
10803 handling members.
10804 * server.c (attach_inferior): Remove extra add_inferior
10805 call.
10806 * server.h: Include mem-break.h. Update inferior.c
10807 prototypes.
10808 * target.c (read_inferior_memory)
10809 (write_inferior_memory): New functions.
10810 * target.h (read_inferior_memory)
10811 (write_inferior_memory): Change macros to prototypes.
10812 (struct target_ops): Update comments. Add const to write_memory
10813 definition.
10814
10815 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
10816
10817 * linux-low.c (usr_store_inferior_registers): Support
10818 registers which are allowed to fail to store.
10819 * linux-low.h (linux_target_ops): Likewise.
10820 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10821 (ppc_cannot_store_register): FPSCR may not be storable.
10822
10823 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10824
10825 * server.h: Include <string.h> if HAVE_STRING_H.
10826 * ChangeLog: Correct paths in last ChangeLog entry.
10827
10828 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10829
10830 * linux-low.h: Remove obsolete prototypes.
10831 (struct linux_target_ops): New.
10832 (extern the_low_target): New.
10833 * linux-low.c (num_regs, regmap): Remove declarations.
10834 (register_addr): Use the_low_target explicitly.
10835 (fetch_register): Likewise.
10836 (usr_fetch_inferior_registers): Likewise.
10837 (usr_store_inferior_registers): Likewise.
10838 * linux-arm-low.c (num_regs): Remove.
10839 (arm_num_regs): Define.
10840 (arm_regmap): Renamed from regmap, made static.
10841 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10842 made static.
10843 (arm_cannot_store_register): Renamed from cannot_store_register,
10844 made static.
10845 (the_low_target): New.
10846 * linux-i386-low.c (num_regs): Remove.
10847 (i386_num_regs): Define.
10848 (i386_regmap): Renamed from regmap, made static.
10849 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10850 made static.
10851 (i386_cannot_store_register): Renamed from cannot_store_register,
10852 made static.
10853 (the_low_target): New.
10854 * linux-ia64-low.c (num_regs): Remove.
10855 (ia64_num_regs): Define.
10856 (ia64_regmap): Renamed from regmap, made static.
10857 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10858 made static.
10859 (ia64_cannot_store_register): Renamed from cannot_store_register,
10860 made static.
10861 (the_low_target): New.
10862 * linux-m68k-low.c (num_regs): Remove.
10863 (m68k_num_regs): Define.
10864 (m68k_regmap): Renamed from regmap, made static.
10865 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10866 made static.
10867 (m68k_cannot_store_register): Renamed from cannot_store_register,
10868 made static.
10869 (the_low_target): New.
10870 * linux-mips-low.c (num_regs): Remove.
10871 (mips_num_regs): Define.
10872 (mips_regmap): Renamed from regmap, made static.
10873 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10874 made static.
10875 (mips_cannot_store_register): Renamed from cannot_store_register,
10876 made static.
10877 (the_low_target): New.
10878 * linux-ppc-low.c (num_regs): Remove.
10879 (ppc_num_regs): Define.
10880 (ppc_regmap): Renamed from regmap, made static.
10881 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10882 made static.
10883 (ppc_cannot_store_register): Renamed from cannot_store_register,
10884 made static.
10885 (the_low_target): New.
10886 * linux-s390-low.c (num_regs): Remove.
10887 (s390_num_regs): Define.
10888 (s390_regmap): Renamed from regmap, made static.
10889 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10890 made static.
10891 (s390_cannot_store_register): Renamed from cannot_store_register,
10892 made static.
10893 (the_low_target): New.
10894 * linux-sh-low.c (num_regs): Remove.
10895 (sh_num_regs): Define.
10896 (sh_regmap): Renamed from regmap, made static.
10897 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10898 made static.
10899 (sh_cannot_store_register): Renamed from cannot_store_register,
10900 made static.
10901 (the_low_target): New.
10902 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10903 (the_low_target): New.
10904
10905 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10906
10907 * Makefile.in: Add stamp-h target.
10908 * configure.in: Create stamp-h.
10909 * configure: Regenerated.
10910
10911 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10912
10913 * inferiors.c: New file.
10914 * target.c: New file.
10915 * target.h: New file.
10916 * Makefile.in: Add target.o and inferiors.o. Update
10917 dependencies.
10918 * linux-low.c (inferior_pid): New static variable,
10919 moved from server.c.
10920 (linux_create_inferior): Renamed from create_inferior.
10921 Call add_inferior. Return 0 on success instead of a PID.
10922 (linux_attach): Renamed from myattach.
10923 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10924 (linux_thread_alive): Renamed from mythread_alive.
10925 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10926 child dies.
10927 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10928 (regsets_store_inferior_registers): Correct error message.
10929 Add missing ``return 0''.
10930 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10931 (linux_store_registers): Renamed from store_inferior_registers.
10932 (linux_read_memory): Renamed from read_inferior_memory.
10933 (linux_write_memory): Renamed from write_inferior_memory.
10934 (linux_target_ops): New structure.
10935 (initialize_low): Call set_target_ops ().
10936 * remote-utils.c (unhexify): New function.
10937 (hexify): New function.
10938 (input_interrupt): Send signals to ``signal_pid''.
10939 * server.c (inferior_pid): Remove.
10940 (start_inferior): Update create_inferior call.
10941 (attach_inferior): Call add_inferior.
10942 (handle_query): New function.
10943 (main): Call handle_query for `q' packets.
10944 * server.h: Include "target.h". Remove obsolete prototypes.
10945 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10946
10947 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
10948
10949 * Makefile.in: Add WARN_CFLAGS. Update configury
10950 dependencies.
10951 * configure.in: Check for <string.h>
10952 * configure: Regenerate.
10953 * config.in: Regenerate.
10954 * gdbreplay.c: Include needed system headers.
10955 (remote_open): Remove strchr prototype.
10956 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10957 * regcache.c (supply_register): Change buf argument to const void *.
10958 (supply_register_by_name): Likewise.
10959 (collect_register): Change buf argument to void *.
10960 (collect_register_by_name): Likewise.
10961 * regcache.h: Add missing prototypes.
10962 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10963 * server.c (handle_query): New function.
10964 (attached): New static variable, moved out of main.
10965 (main): Quiet longjmp clobber warnings.
10966 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10967 * utils.c (error): Remove NORETURN.
10968 (fatal): Likewise.