]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Implement remote_bfd_iovec_stat
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
791c0056
GB
12015-03-11 Gary Benson <gbenson@redhat.com>
2
3 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4 struct stat.st_blocks and struct stat.st_blksize.
5 * configure: Regenerate.
6 * config.in: Likewise.
7 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8 (OBS): Add common-remote-fileio.o.
9 (common-remote-fileio.o): New rule.
10
9a9df970
PA
112015-03-09 Pedro Alves <palves@redhat.com>
12
13 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
14 'struct sockaddr' pointer in 'accept' call.
15
9eb1356e
PA
162015-03-09 Pedro Alves <palves@redhat.com>
17
18 Revert:
19 2015-03-07 Pedro Alves <palves@redhat.com>
20 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
21 or <winsock2.h> here. Instead include "gdb_socket.h".
22 (remote_open): Use union gdb_sockaddr_u.
23 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
24 or <winsock2.h> here. Instead include "gdb_socket.h".
25 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
26 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
27 or <sys/un.h>.
28 (init_named_socket, gdb_agent_helper_thread): Use union
29 gdb_sockaddr_u.
30
aac331e4
PA
312015-03-07 Pedro Alves <palves@redhat.com>
32
33 * configure.ac (build_warnings): Move
34 -Wdeclaration-after-statement to the C-specific set.
35 * configure: Regenerate.
36
366c75fc
PA
372015-03-07 Pedro Alves <palves@redhat.com>
38
39 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
40 or <winsock2.h> here. Instead include "gdb_socket.h".
41 (remote_open): Use union gdb_sockaddr_u.
42 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
43 or <winsock2.h> here. Instead include "gdb_socket.h".
44 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
45 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
46 or <sys/un.h>.
47 (init_named_socket, gdb_agent_helper_thread): Use union
48 gdb_sockaddr_u.
49
492d29ea
PA
502015-03-07 Pedro Alves <palves@redhat.com>
51
52 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
53 instead.
54
60a191ed
YQ
552015-03-06 Yao Qi <yao.qi@linaro.org>
56
57 * linux-aarch64-low.c (aarch64_insert_point): Use
58 show_debug_regs as a boolean.
59 (aarch64_remove_point): Likewise.
60
f5771b1d
PA
612015-03-05 Pedro Alves <palves@redhat.com>
62
63 * lynx-low.c (lynx_target_ops): Install NULL hooks for
64 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
65 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
66 * nto-low.c (nto_target_ops): Likewise.
67 * spu-low.c (spu_target_ops): Likewise.
68 * win32-low.c (win32_target_ops): Likewise.
69
3e572f71
PA
702015-03-04 Pedro Alves <palves@redhat.com>
71
72 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
73 Decide whether a breakpoint triggered based on the SIGTRAP's
74 siginfo.si_code.
75 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
76 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
77 (linux_low_filter_event): Check for breakpoints before checking
78 watchpoints.
79 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
80 siginfo.si_code.
81 (linux_stopped_by_sw_breakpoint)
82 (linux_supports_stopped_by_sw_breakpoint)
83 (linux_stopped_by_hw_breakpoint)
84 (linux_supports_stopped_by_hw_breakpoint): New functions.
85 (linux_target_ops): Install new target methods.
86
1ec68e26
PA
872015-03-04 Pedro Alves <palves@redhat.com>
88
89 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
90 * server.c (swbreak_feature, hwbreak_feature): New globals.
91 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
92 (captured_main): Clear swbreak_feature and hwbreak_feature.
93 * server.h (swbreak_feature, hwbreak_feature): Declare.
94 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
95 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
96 supports_stopped_by_hw_breakpoint>: New fields.
97 (target_supports_stopped_by_sw_breakpoint)
98 (target_stopped_by_sw_breakpoint)
99 (target_supports_stopped_by_hw_breakpoint)
100 (target_stopped_by_hw_breakpoint): Declare.
101
15c66dd6
PA
1022015-03-04 Pedro Alves <palves@redhat.com>
103
104 enum lwp_stop_reason -> enum target_stop_reason
105 * linux-low.c (check_stopped_by_breakpoint): Adjust.
106 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
107 (linux_wait_1, stuck_in_jump_pad_callback)
108 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
109 (linux_stopped_by_watchpoint):
110 * linux-low.h (enum lwp_stop_reason): Delete.
111 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
112 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
113
98fc70d6
YQ
1142015-03-04 Yao Qi <yao.qi@linaro.org>
115
116 * Makefile.in (SFILES): Add linux-aarch64-low.c.
117
dd2ac174
GB
1182015-03-03 Gary Benson <gbenson@redhat.com>
119
120 * hostio.c (handle_vFile): Fix prefix lengths.
121
d68e53f4
MM
1222015-03-03 Markus Metzger <markus.t.metzger@intel.com>
123
124 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
125 ptr_bits.
126
bf2d68ab
AA
1272015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
128
129 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
130 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
131 (clean): Add "rm -f" for above C files.
132 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
133 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
134 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
135 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
136 * linux-s390-low.c (HWCAP_S390_VX): New macro.
137 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
138 (init_registers_s390x_vx_linux64)
139 (init_registers_s390x_tevx_linux64)
140 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
141 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
142 declarations.
143 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
144 (s390_store_vxrs_high): New functions.
145 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
146 NT_S390_VXRS_HIGH.
147 (s390_arch_setup): Add logic for selecting one of the new target
148 descriptions. Activate the new vector regsets if applicable.
149 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
150 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
151 and init_registers_s390x_tevx_linux64.
152
c966a859
PA
1532015-03-01 Pedro Alves <palves@redhat.com>
154
155 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
156 parameter.
157
4180215b
PA
1582015-02-27 Pedro Alves <palves@redhat.com>
159
160 * linux-x86-low.c (u_debugreg_offset): New function.
161 (x86_linux_dr_get, x86_linux_dr_set): Use it.
162
749bab01
PA
1632015-02-27 Pedro Alves <palves@redhat.com>
164
165 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
166 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
167 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
168 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
169 (ps_lsetfpregs, ps_getpid)
170 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
171 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
172 (ps_lsetxregs, ps_plog): Declare.
173
3c14e5a3
PA
1742015-02-27 Pedro Alves <palves@redhat.com>
175
176 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
177 IP_AGENT_EXPORT_FUNC.
178 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
179 IP_AGENT_EXPORT_FUNC.
180 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
181 (IP_AGENT_EXPORT): Delete.
182 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
183 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
184 (gdb_trampoline_buffer_error, collecting, gdb_collect)
185 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
186 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
187 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
188 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
189 (traceframe_read_count, traceframe_write_count)
190 (traceframes_created, trace_state_variables, get_raw_reg)
191 (get_trace_state_variable_value, set_trace_state_variable_value)
192 (ust_loaded, helper_thread_id, cmd_buf): Use
193 IPA_SYM_EXPORTED_NAME.
194 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
195 (tracepoints) Use IP_AGENT_EXPORT_VAR.
196 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
197 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
198 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
199 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
200 EXTERN_C_PUSH/EXTERN_C_POP.
201 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
202 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
203 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
204 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
205 (traceframe_write_count, traceframe_read_count)
206 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
207 (about_to_request_buffer_space, get_trace_state_variable_value)
208 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
209 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
210 EXTERN_C_PUSH/EXTERN_C_POP.
211 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
212 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
213 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
214 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
215 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
216 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
217 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
218 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
219 Define.
220 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
221 (IP_AGENT_EXPORT_VAR_DECL): Define.
222 (tracing): Declare.
223 (gdb_agent_get_raw_reg): Declare.
224
fe978cb0
PA
2252015-02-27 Tom Tromey <tromey@redhat.com>
226 Pedro Alves <palves@redhat.com>
227
228 Rename symbols whose names are reserved C++ keywords throughout.
229
3bc3d82a
PA
2302015-02-27 Pedro Alves <palves@redhat.com>
231
232 * Makefile.in (COMPILER): New, get it from autoconf.
233 (CXX): Get from autoconf instead.
234 (COMPILE.pre): Use COMPILER.
235 (CC-LD): Rename to ...
236 (CC_LD): ... this. Use COMPILER.
237 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
238 (CXX_FOR_TARGET): Default to g++ instead of gcc.
239 * acinclude.m4: Include build-with-cxx.m4.
240 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
241 Disable -Werror by default if building in C++ mode.
242 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
243 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
244 the C++ compiler. Save/restore CXXFLAGS too.
245 * configure: Regenerate.
246
07697489
PA
2472015-02-27 Pedro Alves <palves@redhat.com>
248
249 * acinclude.m4: Include libiberty.m4.
250 * configure.ac: Call libiberty_INIT.
251 * config.in, configure: Regenerate.
252
9beb7c4e
PA
2532015-02-26 Pedro Alves <palves@redhat.com>
254
255 * linux-low.c (linux_wait_1): When incrementing the PC past a
256 program breakpoint always use the_low_target.breakpoint_len as
257 increment, rather than the maximum between that and
258 the_low_target.decr_pc_after_break.
259
8090aef2
PA
2602015-02-23 Pedro Alves <palves@redhat.com>
261
262 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
263 thread was doing a step-over; always adjust the PC if
264 we stepped over a permanent breakpoint.
265 (linux_wait_1): If we stepped over breakpoint that was on top of a
266 permanent breakpoint, manually advance the PC past it.
267
bc9540e8
PA
2682015-02-23 Pedro Alves <palves@redhat.com>
269
270 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
271 modes.
272 (x86_fill_gregset, x86_store_gregset): Use it when handling
273 $orig_eax.
274
2db9a427
PA
2752015-02-20 Pedro Alves <palves@redhat.com>
276
277 * thread-db.c: Include "nat/linux-procfs.h".
278 (thread_db_init): Skip listing new threads if the kernel supports
279 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
280
afa8d396
PA
2812015-02-20 Pedro Alves <palves@redhat.com>
282
283 * linux-low.c (status_pending_p_callback): Use ptid_match.
284
c9587f88
AT
2852015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
286
287 PR breakpoints/16812
288 * linux-low.c (wstatus_maybe_breakpoint): Remove.
289 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
290 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
291
b05ec7a5
AT
2922015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
293
294 PR breakpoints/15956
295 * tracepoint.c (cmd_qtinit): Add check for current_thread.
296
d33501a5
MM
2972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
298
299 * linux-low.c (linux_low_btrace_conf): Print size.
300 * server.c (handle_btrace_conf_general_set): New.
301 (hanle_general_set): Call handle_btrace_conf_general_set.
302 (handle_query): Report Qbtrace-conf:bts:size as supported.
303
f4abbc16
MM
3042015-02-09 Markus Metzger <markus.t.metzger@intel.com>
305
306 * linux-low.c (linux_low_enable_btrace): Update parameters.
307 (linux_low_btrace_conf): New.
308 (linux_target_ops)<to_btrace_conf>: Initialize.
309 * server.c (current_btrace_conf): New.
310 (handle_btrace_enable): Rename to ...
311 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
312 to target_enable_btrace. Update comment. Update users.
313 (handle_qxfer_btrace_conf): New.
314 (qxfer_packets): Add btrace-conf entry.
315 (handle_query): Report qXfer:btrace-conf:read as supported packet.
316 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
317 (target_ops)<read_btrace_conf>: New.
318 (target_enable_btrace): Update parameters.
319 (target_read_btrace_conf): New.
320
043c3577
MM
3212015-02-09 Markus Metzger <markus.t.metzger@intel.com>
322
323 * server.c (handle_btrace_general_set): Remove call to
324 target_supports_btrace.
325 (supported_btrace_packets): New.
326 (handle_query): Call supported_btrace_packets.
327 * target.h: include btrace-common.h.
328 (btrace_target_info): Removed.
329 (supports_btrace, target_supports_btrace): Update parameters.
330
734b0e4b
MM
3312015-02-09 Markus Metzger <markus.t.metzger@intel.com>
332
333 * Makefile.in (SFILES): Add common/btrace-common.c.
334 (OBS): Add common/btrace-common.o.
335 (btrace-common.o): Add build rules.
336 * linux-low: Include btrace-common.h.
337 (linux_low_read_btrace): Use struct btrace_data. Call
338 btrace_data_init and btrace_data_fini.
339
d6c146e9
PA
3402015-02-06 Pedro Alves <palves@redhat.com>
341
342 * thread-db.c (find_new_threads_callback): Add debug output.
343
20ba1ce6
PA
3442015-02-04 Pedro Alves <palves@redhat.com>
345
346 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
347 (resume_stopped_resumed_lwps): New function.
348 (linux_wait_for_event_filtered): Use it.
349
8cc73a39
SDJ
3502015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
351
352 * Makefile.in (SFILES): Add linux-personality.c.
353 (linux-personality.o): New rule.
354 * configure.srv (srv_linux_obj): Add linux-personality.o to the
355 list of objects to be built.
356 * linux-low.c: Include nat/linux-personality.h.
357 (linux_create_inferior): Remove code to disable address space
358 randomization (moved to ../nat/linux-personality.c). Create
359 cleanup to disable address space randomization.
360
fb23d554
SDJ
3612015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
362
363 * Makefile.in (posix-strerror.o): New rule.
364 (mingw-strerror.o): Likewise.
365 * configure: Regenerated.
366 * configure.ac: Source file ../common/common.host. Initialize new
367 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
368
cdf43629
YQ
3692015-01-14 Yao Qi <yao@codesourcery.com>
370
371 * Makefile.in (SFILES): Add nat/ppc-linux.c.
372 (ppc-linux.o): New rule.
373 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
374 * configure.ac: AC_CHECK_FUNCS(getauxval).
375 * config.in: Re-generated.
376 * configure: Re-generated.
377 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
378 ppc64_64bit_inferior_p
379
514c5338
YQ
3802015-01-14 Yao Qi <yao@codesourcery.com>
381
382 * linux-ppc-low.c: Include "nat/ppc-linux.h".
383 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
384 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
385 (PT_ORIG_R3, PT_TRAP): Likewise.
386 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
387 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
388 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
389
3368c1e5
JB
3902015-01-10 Joel Brobecker <brobecker@adacore.com>
391
392 * i387-fp.c (i387_cache_to_xsave): In look over
393 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
394 zmmh_low_space field by use of zmmh_high_space.
395
582511be
PA
3962015-01-09 Pedro Alves <palves@redhat.com>
397
398 * linux-low.c (step_over_bkpt): Move higher up in the file.
399 (handle_extended_wait): Don't store the stop_pc here.
400 (get_stop_pc): Adjust comments and rename to ...
401 (check_stopped_by_breakpoint): ... this. Record whether the LWP
402 stopped for a software breakpoint or hardware breakpoint.
403 (thread_still_has_status_pending_p): New function.
404 (status_pending_p_callback): Use
405 thread_still_has_status_pending_p. If the event is no longer
406 interesting, resume the LWP.
407 (handle_tracepoints): Add assert.
408 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
409 (wstatus_maybe_breakpoint): New function.
410 (cancel_breakpoint): Delete function.
411 (check_stopped_by_watchpoint): New function, factored out from
412 linux_low_filter_event.
413 (lp_status_maybe_breakpoint): Delete function.
414 (linux_low_filter_event): Remove filter_ptid argument.
415 Leave thread group exits pending here. Store the LWP's stop PC.
416 Always leave events pending.
417 (linux_wait_for_event_filtered): Pull all events out of the
418 kernel, and leave them all pending.
419 (count_events_callback, select_event_lwp_callback): Consider all
420 events.
421 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
422 (select_event_lwp): Only give preference to the stepping LWP in
423 all-stop mode. Adjust comments.
424 (ignore_event): New function.
425 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
426 references to cancel_breakpoints. Adjust to renames. Also give
427 equal priority to all LWPs that have had events in non-stop mode.
428 If reporting a software breakpoint event, unadjust the LWP's PC.
429 (linux_wait): If linux_wait_1 returned an ignored event, retry.
430 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
431 Adjust.
432 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
433 (resume_status_pending_p): Use thread_still_has_status_pending_p.
434 (linux_stopped_by_watchpoint): Adjust.
435 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
436 * linux-low.h (enum lwp_stop_reason): New.
437 (struct lwp_info) <stop_pc>: Adjust comment.
438 <stopped_by_watchpoint>: Delete field.
439 <stop_reason>: New field.
440 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
441 * mem-break.c (software_breakpoint_inserted_here)
442 (hardware_breakpoint_inserted_here): New function.
443 * mem-break.h (software_breakpoint_inserted_here)
444 (hardware_breakpoint_inserted_here): Declare.
445 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
446 (cancel_breakpoints): Delete.
447 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
448 (upload_fast_traceframes): Remove references to
449 cancel_breakpoints.
450
a33e3959
PA
4512015-01-09 Pedro Alves <palves@redhat.com>
452
453 * thread-db.c (find_new_threads_callback): Ignore thread if the
454 kernel thread ID is -1.
455
8784d563
PA
4562015-01-09 Pedro Alves <palves@redhat.com>
457
458 * linux-low.c (linux_attach_fail_reason_string): Move to
459 nat/linux-ptrace.c, and rename.
460 (linux_attach_lwp): Update comment.
461 (attach_proc_task_lwp_callback): New function.
462 (linux_attach): Adjust to rename and use
463 linux_proc_attach_tgid_threads.
464 (linux_attach_fail_reason_string): Delete declaration.
465
76f2b779
JB
4662015-01-01 Joel Brobecker <brobecker@adacore.com>
467
468 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
469 * server.c (gdbserver_version): Likewise.
470
fafcc06a
SDJ
4712014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
472
473 * remote-utils.c: Include ctype.h.
474 (input_interrupt): Explicitly handle the case when the char
475 received is the NUL byte. Improve the printing of non-ASCII
476 characters.
477
beed38b8
JB
4782014-12-16 Joel Brobecker <brobecker@adacore.com>
479
480 * linux-low.c (linux_low_filter_event): Update call to
481 linux_enable_event_reporting following the addition of
482 a new parameter to that function.
483
bf330350
CU
4842014-12-16 Catalin Udma <catalin.udma@freescale.com>
485
486 PR server/17457
487 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
488 (AARCH64_FPCR_REGNO): Likewise.
489 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
490 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
491 (aarch64_store_fpregset): Likewise.
492
5227d625
JB
4932014-12-15 Joel Brobecker <brobecker@adacore.com>
494
495 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
496 Remove FIXME comment about assumption about N.
497
f93b65a0
JB
4982014-12-13 Joel Brobecker <brobecker@adacore.com>
499
500 * configure.ac: If large-file support is disabled in GDBserver,
501 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
502 * configure: Regenerate.
503
e5a9158d
AA
5042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
505
506 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
507 warning upon ENODATA from ptrace.
508 * linux-s390-low.c (s390_store_tdb): New.
509 (s390_regsets): Add regset for NT_S390_TDB.
510
feea5f36
AA
5112014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
512
513 * linux-low.c (regsets_store_inferior_registers): Skip regsets
514 without a fill_function.
515 * linux-s390-low.c (s390_fill_last_break): Remove.
516 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
517 (s390_arch_setup): Use regset's size instead of fill_function for
518 loop end condition.
519
098dbe61
AA
5202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
521
522 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
523 the regset's store function when ptrace returned an error.
524 * regcache.c (get_thread_regcache): Invalidate register cache
525 before fetching inferior's registers.
526
28eef672
AA
5272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
528
529 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
530 while-loop as for-loop.
531 (regsets_store_inferior_registers): Likewise.
532
bdca27a2
YQ
5332014-11-28 Yao Qi <yao@codesourcery.com>
534
535 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
536 * config.in, configure: Re-generate.
537 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
538 is defined.
539
9c232dda
YQ
5402014-11-21 Yao Qi <yao@codesourcery.com>
541
542 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
543 (AC_CHECK_HEADERS): Remove malloc.h.
544 * configure: Re-generated.
545 * config.in: Re-generated.
546 * server.h: Don't include alloca.h and malloc.h.
547 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
548 Don't include malloc.h.
549
43968415
JB
5502014-11-17 Joel Brobecker <brobecker@adacore.com>
551
552 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
553 corresponding ERRNO check in same block.
554
40e91bc7
PA
5552014-11-12 Pedro Alves <palves@redhat.com>
556
557 * server.c (cont_thread): Update comment.
558 (start_inferior, attach_inferior): No longer clear cont_thread.
559 (handle_v_cont): No longer set cont_thread.
560 (captured_main): Clear cont_thread each time a GDB connects.
561
c2c118cf
PA
5622014-11-12 Pedro Alves <palves@redhat.com>
563
564 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
565 thread, and don't resume all threads if the Hc thread has exited.
566
78708b7c
PA
5672014-11-12 Pedro Alves <palves@redhat.com>
568
569 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
570 the process group instead of to a specific LWP.
571
a2abc7de
PA
5722014-10-15 Pedro Alves <palves@redhat.com>
573
574 PR server/17487
575 * win32-arm-low.c (arm_set_thread_context): Remove current_event
576 parameter.
577 (arm_set_thread_context): Delete.
578 (the_low_target): Adjust.
579 * win32-i386-low.c (debug_registers_changed)
580 (debug_registers_used): Delete.
581 (update_debug_registers_callback): New function.
582 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
583 needing to update their debug registers.
584 (win32_get_current_dr): New function.
585 (x86_dr_low_get_addr, x86_dr_low_get_control)
586 (x86_dr_low_get_status): Fetch the debug register from the thread
587 record's context.
588 (i386_initial_stuff): Adjust.
589 (i386_get_thread_context): Remove current_event parameter. Don't
590 clear debug_registers_changed nor copy DR values to
591 debug_reg_state.
592 (i386_set_thread_context): Delete.
593 (i386_prepare_to_resume): New function.
594 (i386_thread_added): Mark the thread as needing to update irs
595 debug registers.
596 (the_low_target): Remove i386_set_thread_context and install
597 i386_prepare_to_resume.
598 * win32-low.c (win32_get_thread_context): Adjust.
599 (win32_set_thread_context): Use SetThreadContext
600 directly.
601 (win32_prepare_to_resume): New function.
602 (win32_require_context): New function, factored out from ...
603 (thread_rec): ... this.
604 (continue_one_thread): Call win32_prepare_to_resume on each thread
605 we're about to continue.
606 (win32_resume): Call win32_prepare_to_resume on the event thread.
607 * win32-low.h (struct win32_thread_info)
608 <debug_registers_changed>: New field.
609 (struct win32_target_ops): Change prototype of set_thread_context,
610 delete set_thread_context and add prepare_to_resume.
611 (win32_require_context): New declaration.
612
a442d071
GB
6132014-10-08 Gary Benson <gbenson@redhat.com>
614
615 * server.h: Do not include common-exceptions.h.
616
6f1947e8
GB
6172014-10-08 Gary Benson <gbenson@redhat.com>
618
619 * server.h: Do not include cleanups.h.
620
63b434a4
JH
6212014-09-30 James Hogan <james.hogan@imgtec.com>
622
623 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
624 mips64-dsp-linux.c.
625
c4d9ceb6
YQ
6262014-09-23 Yao Qi <yao@codesourcery.com>
627
628 * linux-low.c (lp_status_maybe_breakpoint): New function.
629 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
630 (count_events_callback): Likewise.
631 (select_event_lwp_callback): Likewise.
632 (cancel_breakpoints_callback): Likewise.
633
89a5711c
DB
6342014-09-19 Don Breazeal <donb@codesourcery.com>
635
636 * linux-low.c (handle_extended_wait): Call
637 linux_ptrace_get_extended_event.
638 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
639 linux_is_extended_waitstatus.
640
bffc0964
JB
6412014-09-16 Joel Brobecker <brobecker@adacore.com>
642
643 * Makefile.in (CPPFLAGS): Define.
644 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
645 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
646
0bfdf32f
GB
6472014-09-16 Gary Benson <gbenson@redhat.com>
648
649 * inferiors.h (current_inferior): Renamed as...
650 (current_thread): New variable. All uses updated.
651 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
652 (maybe_move_out_of_jump_pad): Likewise.
653 (cancel_breakpoint): Likewise.
654 (linux_low_filter_event): Likewise.
655 (wait_for_sigstop): Likewise.
656 (linux_resume_one_lwp): Likewise.
657 (need_step_over_p): Likewise.
658 (start_step_over): Likewise.
659 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
660 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
661 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
662 and save_inferior as saved_thread.
663 * regcache.c (get_thread_regcache): Renamed saved_inferior as
664 saved_thread.
665 (regcache_invalidate_thread): Likewise.
666 * remote-utils.c (prepare_resume_reply): Likewise.
667 * thread-db.c (thread_db_get_tls_address): Likewise.
668 (disable_thread_event_reporting): Likewise.
669 (remove_thread_event_breakpoints): Likewise.
670 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
671 as saved_thread.
672 * target.h (set_desired_inferior): Renamed as...
673 (set_desired_thread): New declaration. All uses updated.
674 * server.c (myresume): Updated comment to reference thread instead
675 of inferior.
676 (handle_serial_event): Likewise.
677 (handle_target_event): Likewise.
678
361c8ade
GB
6792014-09-12 Tom Tromey <tromey@redhat.com>
680 Gary Benson <gbenson@redhat.com>
681
682 * regcache.h: Include common-regcache.h.
683 (regcache_read_pc): Don't declare.
684 * regcache.c (get_thread_regcache_for_ptid): New function.
685
bd9269f7
GB
6862014-09-11 Tom Tromey <tromey@redhat.com>
687 Gary Benson <gbenson@redhat.com>
688
689 * symbol.c: New file.
690 * Makefile.in (SFILES): Add symbol.c.
691 (OBS): Add symbol.o.
692
f8c1d06b
GB
6932014-09-11 Gary Benson <gbenson@redhat.com>
694
695 * target.c (target_stop_ptid, target_continue_ptid): New
696 functions.
697
721ec300
GB
6982014-09-11 Tom Tromey <tromey@redhat.com>
699 Gary Benson <gbenson@redhat.com>
700
701 * target.h: Include target/target.h.
702 * target.c (target_read_memory, target_read_uint32)
703 (target_write_memory): New functions.
704
c5e92cca
GB
7052014-09-11 Gary Benson <gbenson@redhat.com>
706
707 * server.h (debug_hw_points): Don't declare.
708 * server.c (debug_hw_points): Don't define. Replace all uses
709 with show_debug_regs.
710 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
711 all uses with show_debug_regs.
712
2e4bb98a
EBM
7132014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
714
715 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
716 endianness into account.
717 (ppc_supply_ptrace_register): Likewise.
718
ac740bc7
JH
7192014-09-03 James Hogan <james.hogan@imgtec.com>
720
721 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
722 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
723
97ea6506
GB
7242014-09-03 Gary Benson <gbenson@redhat.com>
725
726 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
727 ALL_DEBUG_ADDRESS_REGISTERS.
728
df7e5265
GB
7292014-09-02 Gary Benson <gbenson@redhat.com>
730
731 * i386-low.h: Renamed as...
732 * x86-low.h: New file. All type, function and variable name
733 prefixes changed from "i386_" to "x86_". All references updated.
734 * i386-low.c: Renamed as...
735 * x86-low.c: New file. All type, function and variable name
736 prefixes changed from "i386_" to "x86_". All references updated.
737
ed859da7
GB
7382014-09-02 Gary Benson <gbenson@redhat.com>
739
740 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
741 (x86_linux_new_thread): Likewise.
742
860789c7
GB
7432014-08-29 Gary Benson <gbenson@redhat.com>
744
745 * server.h (setjmp.h): Do not include.
746 (toplevel): Do not declare.
747 (common-exceptions.h): Include.
748 (cleanups.h): Likewise.
749 * server.c (toplevel): Do not define.
750 (exit_code): New static global.
751 (detach_or_kill_for_exit_cleanup): New function.
752 (main): New function. Original main renamed to...
753 (captured_main): New function.
754 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
755
ff55e1b5
GB
7562014-08-29 Gary Benson <gbenson@redhat.com>
757
758 * Makefile.in (SFILES): Add common/common-exceptions.c.
759 (OBS): Add common-exceptions.o.
760 (common-exceptions.o): New rule.
761 * utils.c (prepare_to_throw_exception): New function.
762
e9bcb658
GB
7632014-08-29 Gary Benson <gbenson@redhat.com>
764
765 * config.in: Regenerate.
766 * configure: Likewise.
767
e3180625
GB
7682014-08-29 Gary Benson <gbenson@redhat.com>
769
770 * Makefile.in (SFILES): Add common/cleanups.c.
771 (OBS): cleanups.o.
772 (cleanups.o): New rule.
773
e3d6ba5d
GB
7742014-08-29 Gary Benson <gbenson@redhat.com>
775
776 * utils.c (internal_vwarning): New function.
777
7096e886
GB
7782014-08-28 Gary Benson <gbenson@redhat.com>
779
780 * utils.h (fatal): Remove declaration.
781 * utils.c (fatal): Remove function.
782
14ce3192
GB
7832014-08-28 Gary Benson <gbenson@redhat.com>
784
785 * tracepoint.c (gdb_agent_init): Replace fatal with
786 perror_with_name.
787 (initialize_tracepoint): Likewise.
788
50278d59
GB
7892014-08-28 Gary Benson <gbenson@redhat.com>
790
791 * remote-utils.c (remote_prepare): Replace fatal with error.
792
aa96c426
GB
7932014-08-28 Gary Benson <gbenson@redhat.com>
794
795 * linux-low.c (linux_async): Replace fatal with warning.
796 Tidy up and return.
797 (linux_start_non_stop): Return -1 if linux_async failed.
798
f7160e97
GB
7992014-08-28 Gary Benson <gbenson@redhat.com>
800
801 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
802 gdb_assert.
803 (i386_dr_low_get_addr): Remove vague comment.
804 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
805 gdb_assert.
806
38e08fca
GB
8072014-08-28 Gary Benson <gbenson@redhat.com>
808
809 * inferiors.c (get_thread_process): Replace check with gdb_assert.
810 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
811 internal_error.
812 (linux_resume_one_lwp): Likewise.
813 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
814 gdb_assert.
815 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
816 with internal_error.
817 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
818 (init_register_cache): Replace fatal with gdb_assert_not_reached.
819 (find_register_by_name): Replace fatal with internal_error.
820 (find_regno): Likewise.
821 * tdesc.c (init_target_desc): Replace check with gdb_assert.
822 * thread-db.c (thread_db_create_event): Likewise.
823 (thread_db_load_search): Likewise.
824 (try_thread_db_load_1): Likewise.
825 * tracepoint.c (get_jump_space_head): Replace fatal with
826 internal_error.
827 (claim_trampoline_space): Likewise.
828 (have_fast_tracepoint_trampoline_buffer): Likewise.
829 (cmd_qtstart): Likewise.
830 (stop_tracing): Likewise.
831 (fast_tracepoint_collecting): Likewise.
832 (target_malloc): Likewise.
833 (download_tracepoint): Likewise.
834 (download_trace_state_variables): Replace check with gdb_assert.
835 (upload_fast_traceframes): Replace fatal with internal_error.
836
34abf635
GB
8372014-08-19 Tom Tromey <tromey@redhat.com>
838 Gary Benson <gbenson@redhat.com>
839
840 * Makefile.in (SFILES): Add common/common-debug.c.
841 (OBS): Add common-debug.o.
842 (common-debug.o): New rule.
843 * debug.h (debug_printf): Don't declare.
844 * debug.c (debug_printf): Renamed and rewritten as...
845 (debug_vprintf): New function.
846
f6e94d78
GB
8472014-08-19 Gary Benson <gbenson@redhat.com>
848
849 * utils.h: Do not include print-utils.h.
850
9239eeab
GB
8512014-08-19 Tom Tromey <tromey@redhat.com>
852 Gary Benson <gbenson@redhat.com>
853
854 * server.h: Add static assertion.
855 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
856
ef87c8bb
GB
8572014-08-19 Tom Tromey <tromey@redhat.com>
858 Gary Benson <gbenson@redhat.com>
859
860 * Makefile.in (SFILES): Add common/errors.c.
861 (OBS): Add errors.o.
862 (IPA_OBS): Add errors-ipa.o.
863 (errors.o): New rule.
864 (errors-ipa.o): Likewise.
865 * utils.h (perror_with_name, error, warning): Don't declare.
866 * utils.c (warning): Renamed and rewritten as...
867 (vwarning): New function.
868 (error): Renamed and rewritten as...
869 (verror): New function.
870 (internal_error): Renamed and rewritten as...
871 (internal_verror): New function.
872
bb974a24
GB
8732014-08-07 Gary Benson <gbenson@redhat.com>
874
875 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
876 * configure: Regenerate.
877 * config.in: Likewise.
878 * server.h: Do not include errno.h.
879 * event-loop.c: Likewise.
880 * hostio-errno.c: Likewise.
881 * linux-low.c: Likewise.
882 * remote-utils.c: Likewise.
883 * spu-low.c: Likewise.
884 * utils.c: Likewise.
885 * gdbreplay.c: Unconditionally include errno.h.
886
6d3d12eb
GB
8872014-08-07 Gary Benson <gbenson@redhat.com>
888
889 * server.h: Do not include string.h.
890 * event-loop.c: Likewise.
891 * linux-low.c: Likewise.
892 * regcache.c: Likewise.
893 * remote-utils.c: Likewise.
894 * spu-low.c: Likewise.
895 * utils.c: Likewise.
896
dccbb609
GB
8972014-08-07 Gary Benson <gbenson@redhat.com>
898
899 * server.h: Do not include gdb_assert.h.
900
e76df0d0
GB
9012014-08-07 Gary Benson <gbenson@redhat.com>
902
903 * server.h: Do not include common-utils.h.
904
4cb9c816
GB
9052014-08-07 Gary Benson <gbenson@redhat.com>
906
907 * server.h: Do not include ptid.h.
908 * notif.h: Likewise.
909
3995eeee
GB
9102014-08-07 Gary Benson <gbenson@redhat.com>
911
912 * server.h: Do not include gdb_locale.h.
913
cb9f1a9b
GB
9142014-08-07 Gary Benson <gbenson@redhat.com>
915
916 * server.h: Do not include gdb/signals.h.
917 * win32-low.c: Likewise.
918
a5fceff8
GB
9192014-08-07 Gary Benson <gbenson@redhat.com>
920
921 * server.h: Do not include pathmax.h.
922
b9391142
GB
9232014-08-07 Gary Benson <gbenson@redhat.com>
924
925 * server.h: Do not include libiberty.h.
926 * linux-bfin-low.c: Likewise.
927
0e443c87
GB
9282014-08-07 Gary Benson <gbenson@redhat.com>
929
930 * server.h: Do not include ansidecl.h.
931
8ebb3f56
GB
9322014-08-07 Gary Benson <gbenson@redhat.com>
933
934 * linux-x86-low.c: Do not include stddef.h.
935 * lynx-ppc-low.c: Likewise.
936 * tracepoint.c: Likewise.
937
8980bdf6
GB
9382014-08-07 Gary Benson <gbenson@redhat.com>
939
940 * server.h: Do not include stdarg.h.
941 * nto-low.c: Likewise.
942
d7096f71
GB
9432014-08-07 Gary Benson <gbenson@redhat.com>
944
945 * server.h: Do not include stdlib.h.
946 * inferiors.c: Likewise.
947 * linux-low.c: Likewise.
948 * regcache.c: Likewise.
949 * spu-low.c: Likewise.
950 * tracepoint.c: Likewise.
951 * utils.c: Likewise.
952
d02f550d
GB
9532014-08-07 Gary Benson <gbenson@redhat.com>
954
955 * server.h: Do not include stdio.h.
956 * linux-low.c: Likewise.
957 * remote-utils.c: Likewise.
958 * spu-low.c: Likewise.
959 * utils.c: Likewise.
960 * wincecompat.c: Likewise.
961
87f6c4e3
GB
9622014-08-06 Gary Benson <gbenson@redhat.com>
963
964 * regcache.c (init_register_cache): Move conditionals inside if.
965
7089dca4
GB
9662014-08-06 Gary Benson <gbenson@redhat.com>
967
968 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
969
462f517e
GB
9702014-07-31 Gary Benson <gbenson@redhat.com>
971
972 * ax.h: Do not include server.h.
973 * gdbthread.h: Likewise.
974 * lynx-low.h: Likewise.
975 * notif.h: Likewise.
976
976411d6
GB
9772014-07-30 Gary Benson <gbenson@redhat.com>
978
979 * server.h: Include common-defs.h.
980 Do not include config.h or build-gnulib-gdbserver/config.h.
981
d41f6d8e
GB
9822014-07-30 Gary Benson <gbenson@redhat.com>
983
984 * hostio-errno.c: Move server.h to top of includes list.
985 * inferiors.c: Likewise.
986 * linux-x86-low.c: Likewise.
987 * notif.c: Include server.h.
988
314c6a35
TT
9892014-07-24 Tom Tromey <tromey@redhat.com>
990 Gary Benson <gbenson@redhat.com>
991
992 * server.h (CORE_ADDR): Now unsigned.
993
69ff6be5
PA
9942014-07-16 Pedro Alves <palves@redhat.com>
995
996 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
997
ce9e3fe7
PA
9982014-07-15 Pedro Alves <palves@redhat.com>
999
1000 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1001 copy.
1002
e76126e8
PA
10032014-07-11 Pedro Alves <palves@redhat.com>
1004
1005 * linux-low.c (kill_wait_lwp): New function, based on
1006 kill_one_lwp_callback, but use my_waitpid directly.
1007 (kill_one_lwp_callback, linux_kill): Use it.
1008
8e9db26e
PA
10092014-06-23 Pedro Alves <palves@redhat.com>
1010
1011 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1012 before setting DR0..DR3.
1013
698b3e08
GB
10142014-06-20 Gary Benson <gbenson@redhat.com>
1015
1016 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1017 * configure: Regenerated.
1018 * config.in: Likewise.
1019
125f8a3d
GB
10202014-06-20 Gary Benson <gbenson@redhat.com>
1021
1022 * Makefile.in (SFILES): Update locations for files moved
1023 from common to nat.
1024 (object file files): Reordered.
1025
42995dbd
GB
10262014-06-20 Gary Benson <gbenson@redhat.com>
1027
1028 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1029 (i386_dr_low_set_addr): Likewise.
1030 (i386_dr_low_get_addr): Likewise.
1031 (i386_dr_low_can_set_control): Likewise.
1032 (i386_dr_low_set_control): Likewise.
1033 (i386_dr_low_get_control): Likewise.
1034 (i386_dr_low_get_status): Likewise.
1035 (i386_get_debug_register_length): Likewise.
1036 * linux-x86-low.c (i386_dr_low_set_addr):
1037 Changed signature. Made static.
1038 (i386_dr_low_get_addr): Likewise.
1039 (i386_dr_low_set_control): Likewise.
1040 (i386_dr_low_get_control): Likewise.
1041 (i386_dr_low_get_status): Likewise.
1042 (i386_dr_low): New global variable.
1043 * win32-i386-low.c (i386_dr_low_set_addr):
1044 Changed signature. Made static.
1045 (i386_dr_low_get_addr): Likewise.
1046 (i386_dr_low_set_control): Likewise.
1047 (i386_dr_low_get_control): Likewise.
1048 (i386_dr_low_get_status): Likewise.
1049 (i386_dr_low): New global variable.
1050
e1d2394b
MS
10512014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1052
1053 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1054 * Makefile.in (AR, AR_FLAGS): Define.
1055 * configure: Regenerate.
1056
3a8ee006
GB
10572014-06-19 Gary Benson <gbenson@redhat.com>
1058
1059 * Makefile.in (i386-dregs.o): New rule.
1060 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1061 * i386-low.c (target.h): Remove include.
1062 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1063 (DR_CONTROL_SHIFT): Likewise.
1064 (DR_CONTROL_SIZE): Likewise.
1065 (DR_RW_EXECUTE): Likewise.
1066 (DR_RW_WRITE): Likewise.
1067 (DR_RW_READ): Likewise.
1068 (DR_RW_IORW): Likewise.
1069 (DR_LEN_1): Likewise.
1070 (DR_LEN_2): Likewise.
1071 (DR_LEN_4): Likewise.
1072 (DR_LEN_8): Likewise.
1073 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1074 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1075 (DR_ENABLE_SIZE): Likewise.
1076 (DR_LOCAL_SLOWDOWN): Likewise.
1077 (DR_GLOBAL_SLOWDOWN): Likewise.
1078 (DR_CONTROL_RESERVED): Likewise.
1079 (I386_DR_CONTROL_MASK): Likewise.
1080 (I386_DR_VACANT): Likewise.
1081 (I386_DR_LOCAL_ENABLE): Likewise.
1082 (I386_DR_GLOBAL_ENABLE): Likewise.
1083 (I386_DR_DISABLE): Likewise.
1084 (I386_DR_SET_RW_LEN): Likewise.
1085 (I386_DR_GET_RW_LEN): Likewise.
1086 (I386_DR_WATCH_HIT): Likewise.
1087 (i386_wp_op_t): Likewise.
1088 (i386_show_dr): Likewise.
1089 (i386_length_and_rw_bits): Likewise.
1090 (i386_insert_aligned_watchpoint): Likewise.
1091 (i386_remove_aligned_watchpoint): Likewise.
1092 (i386_handle_nonaligned_watchpoint): Likewise.
1093 i386_update_inferior_debug_regs(): Likewise.
1094 (i386_dr_insert_watchpoint): Likewise.
1095 (i386_dr_remove_watchpoint): Likewise.
1096 (i386_dr_region_ok_for_watchpoint): Likewise.
1097 (i386_dr_stopped_data_address): Likewise.
1098 (i386_dr_stopped_by_watchpoint): Likewise.
1099
8f26655c
GB
11002014-06-19 Gary Benson <gbenson@redhat.com>
1101
1102 * i386-low.c (i386_dr_show): Renamed to
1103 i386_show_dr and made static. All uses updated.
1104 (i386_dr_length_and_rw_bits): Renamed to
1105 i386_length_and_rw_bits and made static.
1106 All uses updated.
1107 (i386_dr_insert_aligned_watchpoint): Renamed to
1108 i386_insert_aligned_watchpoint and made static.
1109 All uses updated.
1110 (i386_dr_remove_aligned_watchpoint): Renamed to
1111 i386_remove_aligned_watchpoint and made static.
1112 All uses updated.
1113 (i386_dr_update_inferior_debug_regs): Renamed to
1114 i386_update_inferior_debug_regs and made static.
1115 All uses updated.
1116
b9228891
GB
11172014-06-18 Gary Benson <gbenson@redhat.com>
1118
5171def3
GB
1119 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1120 (i386_dr_low_can_set_control): Likewise.
1121 (i386_get_debug_register_length): Likewise.
1122 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1123 (i386_dr_low_can_set_control): Likewise.
1124 (i386_get_debug_register_length): Likewise.
1125
11262014-06-17 Gary Benson <gbenson@redhat.com>
1127
b9228891
GB
1128 * i386-low.h (i386-dregs.h): New include.
1129 (DR_FIRSTADDR): Now in i386-dregs.h.
1130 (DR_LASTADDR): Likewise.
1131 (DR_NADDR): Likewise.
1132 (DR_STATUS): Likewise.
1133 (DR_CONTROL): Likewise.
1134 (i386_debug_reg_state): Likewise.
1135 (i386_dr_insert_watchpoint): Likewise.
1136 (i386_dr_remove_watchpoint): Likewise.
1137 (i386_dr_region_ok_for_watchpoint): Likewise.
1138 (i386_dr_stopped_data_address): Likewise.
1139 (i386_dr_stopped_by_watchpoint): Likewise.
1140 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1141
4be83cc2
GB
11422014-06-18 Gary Benson <gbenson@redhat.com>
1143
1144 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1145 i386_dr_insert_watchpoint.
1146 (i386_low_remove_watchpoint): Renamed to
1147 i386_dr_remove_watchpoint.
1148 (i386_low_region_ok_for_watchpoint): Renamed to
1149 i386_dr_region_ok_for_watchpoint.
1150 (i386_low_stopped_data_address): Renamed to
1151 i386_dr_stopped_data_address.
1152 (i386_low_stopped_by_watchpoint): Renamed to
1153 i386_dr_stopped_by_watchpoint.
1154 * i386-low.c (i386_show_dr): Renamed to
1155 i386_dr_show and made nonstatic. All uses updated.
1156 (i386_length_and_rw_bits): Renamed to
1157 i386_dr_length_and_rw_bits and made nonstatic.
1158 All uses updated.
1159 (i386_insert_aligned_watchpoint): Renamed to
1160 i386_dr_insert_aligned_watchpoint and made nonstatic.
1161 All uses updated.
1162 (i386_remove_aligned_watchpoint): Renamed to
1163 i386_dr_remove_aligned_watchpoint and made nonstatic.
1164 All uses updated.
1165 (i386_update_inferior_debug_regs): Renamed to
1166 i386_dr_update_inferior_debug_regs and made nonstatic.
1167 All uses updated.
1168 (i386_low_insert_watchpoint): Renamed to
1169 i386_dr_insert_watchpoint. All uses updated.
1170 (i386_low_remove_watchpoint): Renamed to
1171 i386_dr_remove_watchpoint. All uses updated.
1172 (i386_low_region_ok_for_watchpoint): Renamed to
1173 i386_dr_region_ok_for_watchpoint. All uses updated.
1174 (i386_low_stopped_data_address): Renamed to
1175 i386_dr_stopped_data_address. All uses updated.
1176 (i386_low_stopped_by_watchpoint): Renamed to
1177 i386_dr_stopped_by_watchpoint. All uses updated.
1178
131aa0d4
GB
11792014-06-18 Gary Benson <gbenson@redhat.com>
1180
1181 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1182 (i386_dr_low_can_set_control): Likewise.
1183 (i386_insert_aligned_watchpoint): New check.
1184
d9305f7f
GB
11852014-06-18 Gary Benson <gbenson@redhat.com>
1186
1187 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1188 Renamed to state.
1189
e927c9fc
GB
11902014-06-18 Gary Benson <gbenson@redhat.com>
1191
1192 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1193 instead of fatal and error.
1194 (i386_handle_nonaligned_watchpoint): Likewise.
1195
1b6d4134
GB
11962014-06-18 Gary Benson <gbenson@redhat.com>
1197
1198 * i386-low.c (i386_get_debug_register_length): New macro.
1199 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1200 (i386_show_dr): Use debug_printf instead of fprintf. Use
1201 phex to format values.
1202
6e62758f
GB
12032014-06-18 Gary Benson <gbenson@redhat.com>
1204
1205 * i386-low.h: Comment changes.
1206 * i386-low.c: Likewise.
1207
fc6e2f03
GB
12082014-06-18 Gary Benson <gbenson@redhat.com>
1209
1210 * i386-low.c: Whitespace changes.
1211
f9d1eeed
TT
12122014-06-12 Tom Tromey <tromey@redhat.com>
1213
1214 * utils.c (freeargv): Remove.
1215
0b04e523
TT
12162014-06-12 Tom Tromey <tromey@redhat.com>
1217
1218 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1219 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1220 (parse_debug_format_options): Likewise.
1221 (gdbserver_usage): Likewise.
1222 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1223 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1224 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1225 against libiberty.
1226 ($(LIBGNU)): Depend on libiberty.
1227 (all-lib): Recurse into all subdirs.
1228 (install-only): Invoke "install" target in subdirs.
1229 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1230 targets.
1231 * configure: Rebuild.
1232 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1233 for vasprintf, vsnprintf, or gettimeofday.
1234 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1235 srv_tgtobj.
1236
270c9937
JB
12372014-06-05 Joel Brobecker <brobecker@adacore.com>
1238
1239 * development.sh: Delete.
1240 * Makefile.in (config.status): Adjust dependency on development.sh.
1241 * configure.ac: Adjust development.sh source call.
1242 * configure: Regenerate.
1243
0a261ed8
PA
12442014-06-02 Pedro Alves <palves@redhat.com>
1245
1246 * ax.c (gdb_free_agent_expr): New function.
1247 * ax.h (gdb_free_agent_expr): New declaration.
1248 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1249 list.
1250 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1251 static.
1252 (clear_breakpoint_conditions_and_commands): New function.
1253 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1254 (clear_breakpoint_conditions_and_commands): New declaration.
1255
e9dae05e
RR
12562014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1257
1258 * linux-aarch64-low.c (asm/ptrace.h): Include.
1259
5876f503
JK
12602014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1261
1262 Fix TLS access for -static -pthread.
1263 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1264 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1265 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1266
802e8e6d
PA
12672014-05-20 Pedro Alves <palves@redhat.com>
1268
1269 * linux-aarch64-low.c (aarch64_insert_point)
1270 (aarch64_remove_point): No longer check whether the type is
1271 supported here. Adjust to new interface.
1272 (the_low_target): Install aarch64_supports_z_point_type as
1273 supports_z_point_type method.
1274 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1275 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1276 instead of a Z packet char. Adjust.
1277 (arm_supports_z_point_type): New function.
1278 (arm_insert_point, arm_remove_point): Adjust to new interface.
1279 (the_low_target): Install arm_supports_z_point_type.
1280 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1281 (cris_insert_point, cris_remove_point): Adjust to new interface.
1282 Don't check whether the type is supported here.
1283 (the_low_target): Install cris_supports_z_point_type.
1284 * linux-low.c (linux_supports_z_point_type): New function.
1285 (linux_insert_point, linux_remove_point): Adjust to new interface.
1286 * linux-low.h (struct linux_target_ops) <insert_point,
1287 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1288 raw_breakpoint pointer parameter.
1289 <supports_z_point_type>: New method.
1290 * linux-mips-low.c (mips_supports_z_point_type): New function.
1291 (mips_insert_point, mips_remove_point): Adjust to new interface.
1292 Use mips_supports_z_point_type.
1293 (the_low_target): Install mips_supports_z_point_type.
1294 * linux-ppc-low.c (the_low_target): Install NULL as
1295 supports_z_point_type method.
1296 * linux-s390-low.c (the_low_target): Install NULL as
1297 supports_z_point_type method.
1298 * linux-sparc-low.c (the_low_target): Install NULL as
1299 supports_z_point_type method.
1300 * linux-x86-low.c (x86_supports_z_point_type): New function.
1301 (x86_insert_point): Adjust to new insert_point interface. Use
1302 insert_memory_breakpoint. Adjust to new
1303 i386_low_insert_watchpoint interface.
1304 (x86_remove_point): Adjust to remove_point interface. Use
1305 remove_memory_breakpoint. Adjust to new
1306 i386_low_remove_watchpoint interface.
1307 (the_low_target): Install x86_supports_z_point_type.
1308 * lynx-low.c (lynx_target_ops): Install NULL as
1309 supports_z_point_type callback.
1310 * nto-low.c (nto_supports_z_point_type): New.
1311 (nto_insert_point, nto_remove_point): Adjust to new interface.
1312 (nto_target_ops): Install nto_supports_z_point_type.
1313 * mem-break.c: Adjust intro comment.
1314 (struct raw_breakpoint) <raw_type, size>: New fields.
1315 <inserted>: Update comment.
1316 <shlib_disabled>: Delete field.
1317 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1318 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1319 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1320 (raw_bkpt_type_to_target_hw_bp_type): New function.
1321 (find_enabled_raw_code_breakpoint_at): New function.
1322 (find_raw_breakpoint_at): New type and size parameters. Use them.
1323 (insert_memory_breakpoint): New function, based off
1324 set_raw_breakpoint_at.
1325 (remove_memory_breakpoint): New function.
1326 (set_raw_breakpoint_at): Reimplement.
1327 (set_breakpoint): New, based on set_breakpoint_at.
1328 (set_breakpoint_at): Reimplement.
1329 (delete_raw_breakpoint): Go through the_target->remove_point
1330 instead of assuming memory breakpoints.
1331 (find_gdb_breakpoint_at): Delete.
1332 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1333 (find_gdb_breakpoint): New function.
1334 (set_gdb_breakpoint_at): Delete.
1335 (z_type_supported): New function.
1336 (set_gdb_breakpoint_1): New function, loosely based off
1337 set_gdb_breakpoint_at.
1338 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1339 (delete_gdb_breakpoint_at): Delete.
1340 (delete_gdb_breakpoint_1): New function, loosely based off
1341 delete_gdb_breakpoint_at.
1342 (delete_gdb_breakpoint): New function.
1343 (clear_gdb_breakpoint_conditions): Rename to ...
1344 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1345 breakpoint.
1346 (add_condition_to_breakpoint): Make static.
1347 (add_breakpoint_condition): Take a struct breakpoint pointer
1348 instead of an address. Adjust.
1349 (gdb_condition_true_at_breakpoint): Rename to ...
1350 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1351 z_type parameter.
1352 (gdb_condition_true_at_breakpoint): Reimplement.
1353 (add_breakpoint_commands): Take a struct breakpoint pointer
1354 instead of an address. Adjust.
1355 (gdb_no_commands_at_breakpoint): Rename to ...
1356 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1357 parameter. Return true if no breakpoint was found. Change debug
1358 output.
1359 (gdb_no_commands_at_breakpoint): Reimplement.
1360 (run_breakpoint_commands): Rename to ...
1361 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1362 and change return type to boolean.
1363 (run_breakpoint_commands): New function.
1364 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1365 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1366 breakpoint. Go through the_target->remove_point instead of
1367 assuming memory breakpoint.
1368 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1369 software and hardware breakpoints.
1370 (reinsert_raw_breakpoint): Go through the_target->insert_point
1371 instead of assuming memory breakpoint.
1372 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1373 software and hardware breakpoints.
1374 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1375 Check both software and hardware breakpoints.
1376 (validate_inserted_breakpoint): Assert the breakpoint is a
1377 software breakpoint. Set the inserted flag to -1 instead of
1378 setting shlib_disabled.
1379 (delete_disabled_breakpoints): Adjust.
1380 (validate_breakpoints): Only validate software breakpoints.
1381 Adjust to inserted flag change.
1382 (check_mem_read, check_mem_write): Skip breakpoint types other
1383 than software breakpoints. Adjust to inserted flag change.
1384 * mem-break.h (enum raw_bkpt_type): New enum.
1385 (raw_breakpoint, struct process_info): Forward declare.
1386 (Z_packet_to_target_hw_bp_type): Delete declaration.
1387 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1388 (set_gdb_breakpoint, delete_gdb_breakpoint)
1389 (clear_breakpoint_conditions): New declarations.
1390 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1391 (breakpoint_inserted_here): Update comment.
1392 (add_breakpoint_condition, add_breakpoint_commands): Replace
1393 address parameter with a breakpoint pointer parameter.
1394 (gdb_breakpoint_here): Update comment.
1395 (delete_gdb_breakpoint_at): Delete.
1396 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1397 * server.c (process_point_options): Take a struct breakpoint
1398 pointer instead of an address. Adjust.
1399 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1400 delete_gdb_breakpoint.
1401 * spu-low.c (spu_target_ops): Install NULL as
1402 supports_z_point_type method.
1403 * target.h: Include mem-break.h.
1404 (struct target_ops) <prepare_to_access_memory>: Update comment.
1405 <supports_z_point_type>: New field.
1406 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1407 instead of a char. Also take a raw breakpoint pointer.
1408 * win32-arm-low.c (the_low_target): Install NULL as
1409 supports_z_point_type.
1410 * win32-i386-low.c (i386_supports_z_point_type): New function.
1411 (i386_insert_point, i386_remove_point): Adjust to new interface.
1412 (the_low_target): Install i386_supports_z_point_type.
1413 * win32-low.c (win32_supports_z_point_type): New function.
1414 (win32_insert_point, win32_remove_point): Adjust to new interface.
1415 (win32_target_ops): Install win32_supports_z_point_type.
1416 * win32-low.h (struct win32_target_ops):
1417 <supports_z_point_type>: New method.
1418 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1419 instead of a char. Also take a raw breakpoint pointer.
1420
932539e3
PA
14212014-05-20 Pedro Alves <palves@redhat.com>
1422
1423 * mem-break.h: Include break-common.h.
1424 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1425 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1426 (Z_packet_to_target_hw_bp_type): New declaration.
1427 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1428 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1429 (Z_PACKET_ACCESS_WP): Delete macros.
1430 (Z_packet_to_hw_type): Delete function.
1431 * i386-low.h: Don't include break-common.h here.
1432 (Z_packet_to_hw_type): Delete declaration.
1433 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1434 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1435 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1436 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1437 * linux-aarch64-low.c: Don't include break-common.h here.
1438 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1439 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1440 (Z_packet_to_target_hw_bp_type): Delete function.
1441 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1442 function.
1443 (mips_insert_point, mips_remove_point): Use
1444 Z_packet_to_target_hw_bp_type.
1445
4ff0d3d8
PA
14462014-05-20 Pedro Alves <palves@redhat.com>
1447
1448 * linux-aarch64-low.c: Include break-common.h.
1449 (enum target_point_type): Delete.
1450 (Z_packet_to_point_type): Rename to ...
1451 (Z_packet_to_target_hw_bp_type): ... this, and return a
1452 target_hw_bp_type instead.
1453 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1454 instead of an enum target_point_type.
1455 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1456 breakpoint type.
1457 (aarch64_dr_state_insert_one_point)
1458 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1459 (aarch64_handle_aligned_watchpoint)
1460 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1461 Take an enum target_hw_bp_type instead of an enum
1462 target_point_type.
1463 (aarch64_supports_z_point_type): New function.
1464 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1465 use Z_packet_to_target_hw_bp_type.
1466
786dc519
JB
14672014-05-20 Joel Brobecker <brobecker@adacore.com>
1468
1469 * configure.ac: Only use -Werror by default when DEVELOPMENT
1470 is true.
1471 * configure: Regenerate.
1472
9e0aa64f
JK
14732014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1474
1475 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1476 * linux-x86-low.c (X86_64_USER_REGS): New.
1477 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1478
2b577b92
YQ
14792014-04-28 Yao Qi <yao@codesourcery.com>
1480
1481 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1482 name.
1483
94611da2
PA
14842014-04-25 Pedro Alves <palves@redhat.com>
1485
1486 PR server/16255
1487 * linux-low.c (linux_attach_fail_reason_string): New function.
1488 (linux_attach_lwp): Delete.
1489 (linux_attach_lwp_1): Rename to ...
1490 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1491 argument. Remove "initial" parameter. Return int instead of
1492 void. Don't error or warn here.
1493 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1494 failure to attach to the tgid. Call warning when failing to
1495 attach to an lwp.
1496 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1497 argument. Remove "initial" parameter. Return int instead of
1498 void. Don't error or warn here.
1499 (linux_attach_fail_reason_string): New declaration.
1500 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1501 interface change. Use linux_attach_fail_reason_string.
1502
01f9f808
MS
15032014-04-24 Michael Sturm <michael.sturm@mintel.com>
1504 Walfred Tedeschi <walfred.tedeschi@intel.com>
1505
1506 * Makefile.in: Added rules to handle new files
1507 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1508 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1509 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1510 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1511 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1512 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1513 x32-avx512-linux.o.
1514 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1515 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1516 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1517 i386/x32-avx512.xml.
1518 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1519 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1520 i386/x32-avx512-linux.xml.
1521 * i387-fp.c (num_avx512_k_registers): New constant for number
1522 of K registers.
1523 (num_avx512_zmmh_low_registers): New constant for number of
1524 lower ZMM registers (0-15).
1525 (num_avx512_zmmh_high_registers): New constant for number of
1526 higher ZMM registers (16-31).
1527 (num_avx512_ymmh_registers): New contant for number of higher
1528 YMM registers (ymm16-31 added by avx521 on x86_64).
1529 (num_avx512_xmm_registers): New constant for number of higher
1530 XMM registers (xmm16-31 added by AVX512 on x86_64).
1531 (struct i387_xsave): Add space for AVX512 registers.
1532 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1533 Add code to handle AVX512 registers.
1534 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1535 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1536 prototypei from generated file.
1537 (tdesc_amd64_avx512_linux): Likewise.
1538 (init_registers_x32_avx512_linux): Likewise.
1539 (tdesc_x32_avx512_linux): Likewise.
1540 (init_registers_i386_avx512_linux): Likewise.
1541 (tdesc_i386_avx512_linux): Likewise.
1542 (x86_64_regmap): Add AVX512 registers.
1543 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1544 mask.
1545 (initialize_low_arch): Add code to initialize AVX512 registers.
1546
51aa91f9
PA
15472014-04-23 Pedro Alves <palves@redhat.com>
1548
1549 * mem-break.c (find_gdb_breakpoint_at): Make static.
1550 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1551
a4165e94
PA
15522014-04-23 Pedro Alves <palves@redhat.com>
1553
1554 * i386-low.c: Don't include break-common.h here.
1555 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1556 prototype to take target_hw_bp_type as argument instead of a Z
1557 packet char.
1558 * i386-low.h: Include break-common.h here.
1559 (Z_packet_to_hw_type): Declare.
1560 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1561 prototypes.
1562 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1563 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1564 (x86_remove_point): Convert the packet number to a
1565 target_hw_bp_type before calling i386_low_remove_watchpoint.
1566 * win32-i386-low.c (i386_insert_point): Convert the packet number
1567 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1568 (i386_remove_point): Convert the packet number to a
1569 target_hw_bp_type before calling i386_low_remove_watchpoint.
1570
b8acf843
PA
15712014-04-23 Pedro Alves <palves@redhat.com>
1572
1573 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1574
d708bcd1
PA
15752014-04-10 Pedro Alves <palves@redhat.com>
1576
1577 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1578 Check if the condition or command is NULL before checking if the
1579 breakpoint is known. On success, return true.
1580 * mem-break.h (add_breakpoint_condition): Document return.
1581 (add_breakpoint_commands): Add describing comment.
1582 * server.c (skip_to_semicolon): New function.
1583 (process_point_options): Use it.
1584
2eec7d5b
PA
15852014-04-09 Pedro Alves <palves@redhat.com>
1586
1587 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1588 to lwpid_of.
1589
fa96cb38
PA
15902014-02-27 Pedro Alves <palves@redhat.com>
1591
1592 PR 12702
1593 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1594 macros.
1595 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1596 output.
1597 (last_thread_of_process_p): Take a PID argument instead of a
1598 thread pointer.
1599 (linux_wait_for_lwp): Delete.
1600 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1601 functions.
1602 (linux_low_filter_event): New function, party factored out from
1603 linux_wait_for_event.
1604 (linux_wait_for_event): Rename to ...
1605 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1606 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1607 sigsuspend. Check for zombie leaders.
1608 (linux_wait_for_event): Reimplement as wrapper around
1609 linux_wait_for_event_filtered.
1610 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1611 a normal or signal exit is seen, it's the whole process exiting.
1612 (wait_for_sigstop): No longer a for_each_inferior callback.
1613 Rewrite on top of linux_wait_for_event_filtered.
1614 (stop_all_lwps): Call wait_for_sigstop directly.
1615 * server.c (resume, handle_target_event): Handle
1616 TARGET_WAITKIND_NO_RESUMED.
1617
d763de10
JB
16182014-02-26 Joel Brobecker <brobecker@adacore.com>
1619
1620 * win32-low.c (psapi_get_dll_name,
1621 * win32_CreateToolhelp32Snapshot): Delete.
1622 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1623 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1624 Delete.
1625 (handle_load_dll): Add function description.
1626 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1627
850a0f76
JB
16282014-02-26 Joel Brobecker <brobecker@adacore.com>
1629
1630 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1631 Add comment.
1632 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1633 base address when calling win32_add_one_solib.
1634 (handle_load_dll): Delete local variable load_addr.
1635 Remove 0x1000 offset applied to DLL base address when calling
1636 win32_add_one_solib.
1637 (handle_unload_dll): Add comment.
1638
f25b3fc3
JB
16392014-02-26 Joel Brobecker <brobecker@adacore.com>
1640
1641 * win32-low.c (win32_add_all_dlls): Renames
1642 win32_ensure_ntdll_loaded. Rewrite function documentation.
1643 Adjust implementation to always load all DLLs.
1644 Add 0x1000 offset to DLL base address when calling
1645 win32_add_one_solib.
1646 (child_initialization_done): New static global.
1647 (do_initial_child_stuff): Set child_initialization_done to
1648 zero during child initialization, and 1 after. Replace call
1649 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1650 Add comment.
1651 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1652 (handle_unload_dll): Add function documentation.
1653 (get_child_debug_event): Ignore load and unload DLL events
1654 during child initialization.
1655
d86d4aaf
DE
16562014-02-20 Doug Evans <dje@google.com>
1657
3bc32da3 1658 Remove global all_lwps.
d86d4aaf
DE
1659 * inferiors.h (ptid_of): Move here from linux-low.h.
1660 (pid_of, lwpid_of): Ditto.
1661 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1662 parameter is a struct thread_info * now.
1663 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1664 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1665 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1666 directly.
1667 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1668 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1669 * linux-arm-low.c (update_registers_callback): Update, "entry"
1670 parameter is a struct thread_info * now.
1671 Fetch lwpid from current_inferior directly.
1672 (arm_insert_point): Pass &all_threads to find_inferior instead of
1673 &all_lwps.
1674 (arm_remove_point): Ditto.
1675 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1676 (arm_prepare_to_resume): Fetch pid from thread.
1677 (arm_read_description): Fetch lwpid from current_inferior directly.
1678 * linux-low.c (all_lwps): Delete.
1679 (delete_lwp): Delete call to remove_inferior.
1680 (handle_extended_wait): Fetch lwpid from thread.
1681 (add_lwp): Don't set lwp->entry.id. Remove call to
1682 add_inferior_to_list.
1683 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1684 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1685 (kill_one_lwp_callback): Ditto.
1686 (linux_kill): Don't dereference NULL pointer.
1687 Fetch ptid,lwpid from thread.
1688 (get_detach_signal): Fetch ptid from thread.
1689 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1690 Simplify call to regcache_invalidate_thread.
1691 (delete_lwp_callback): Update, "entry" parameter is a
1692 struct thread_info * now. Fetch pid from thread.
1693 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1694 (status_pending_p_callback): Update, "entry" parameter is a
1695 struct thread_info * now. Fetch ptid from thread.
1696 (find_lwp_pid): Update, "entry" parameter is a
1697 struct thread_info * now.
1698 (linux_wait_for_lwp): Fetch pid from thread.
1699 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1700 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1701 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1702 (dequeue_one_deferred_signal): Ditto.
1703 (cancel_breakpoint): Fetch ptid from current_inferior.
1704 (linux_wait_for_event): Pass &all_threads to find_inferior,
1705 not &all_lwps. Fetch ptid, lwpid from thread.
1706 (count_events_callback): Update, "entry" parameter is a
1707 struct thread_info * now.
1708 (select_singlestep_lwp_callback): Ditto.
1709 (select_event_lwp_callback): Ditto.
1710 (cancel_breakpoints_callback): Ditto.
1711 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1712 not &all_lwps.
1713 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1714 (unsuspend_one_lwp): Update, "entry" parameter is a
1715 struct thread_info * now.
1716 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1717 not &all_lwps.
1718 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1719 Fetch lwpid from thread, not lwp.
1720 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1721 Pass &all_threads to find_inferior, not &all_lwps.
1722 (send_sigstop): Fetch lwpid from thread, not lwp.
1723 (send_sigstop_callback): Update, "entry" parameter is a
1724 struct thread_info * now.
1725 (suspend_and_send_sigstop_callback): Ditto.
1726 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1727 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1728 struct thread_info * now.
1729 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1730 from thread, lwp.
1731 (lwp_running): Update, "entry" parameter is a
1732 struct thread_info * now.
1733 (stop_all_lwps): Fetch ptid from thread.
1734 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1735 (linux_resume_one_lwp): Fetch lwpid from thread.
1736 (linux_set_resume_request): Update, "entry" parameter is a
1737 struct thread_info * now. Fetch pid, lwpid from thread.
1738 (resume_status_pending_p): Update, "entry" parameter is a
1739 struct thread_info * now.
1740 (need_step_over_p): Ditto. Fetch lwpid from thread.
1741 (start_step_over): Fetch lwpid from thread.
1742 (linux_resume_one_thread): Update, "entry" parameter is a
1743 struct thread_info * now. Fetch lwpid from thread.
1744 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1745 (proceed_one_lwp): Update, "entry" parameter is a
1746 struct thread_info * now. Fetch lwpid from thread.
1747 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1748 struct thread_info * now.
1749 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1750 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1751 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1752 directly.
1753 (regsets_store_inferior_registers): Ditto.
1754 (fetch_register, store_register): Ditto.
1755 (linux_read_memory, linux_write_memory): Ditto.
1756 (linux_request_interrupt): Ditto.
1757 (linux_read_auxv): Ditto.
1758 (linux_xfer_siginfo): Ditto.
1759 (linux_qxfer_spu): Ditto.
1760 (linux_qxfer_libraries_svr4): Ditto.
1761 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1762 moved to inferiors.h.
1763 (get_lwp): Delete.
1764 (get_thread_lwp): Update.
1765 (struct lwp_info): Delete member "entry". Simplify comment for
1766 member "thread".
1767 (all_lwps): Delete.
1768 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1769 current_inferior directly.
1770 (update_watch_registers_callback): Update, "entry" parameter is a
1771 struct thread_info * now. Fetch pid from thread.
1772 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1773 (mips_insert_point): Fetch lwpid from current_inferior.
1774 Pass &all_threads to find_inferior, not &all_lwps.
1775 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1776 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1777 directly.
1778 (mips_stopped_data_address): Ditto.
1779 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1780 directly.
1781 * linux-tile-low.c (tile_arch_setup): Ditto.
1782 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1783 (update_debug_registers_callback): Update, "entry" parameter is a
1784 struct thread_info * now. Fetch pid from thread.
1785 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1786 Pass &all_threads to find_inferior, not &all_lwps.
1787 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1788 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1789 Pass &all_threads to find_inferior, not &all_lwps.
1790 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1791 (i386_dr_low_get_status): Ditto.
1792 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1793 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1794 (x86_linux_read_description): Ditto.
1795 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1796
3b8361aa
DE
17972014-02-20 Doug Evans <dje@google.com>
1798
1799 * inferiors.c (get_first_inferior): Fix buglet.
1800
f7667f0d
DE
18012014-02-19 Doug Evans <dje@google.com>
1802
1803 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1804 * inferiors.c (add_thread): Change result type to struct thread_info *.
1805 All callers updated.
1806 (add_lwp): Call add_thread here instead of in callers.
1807 All callers updated.
1808 * linux-low.h (get_lwp_thread): Rewrite.
1809 (struct lwp_info): New member "thread".
1810
b3312d80
DE
18112014-02-19 Doug Evans <dje@google.com>
1812
1813 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1814 All callers updated.
1815
ecc6f45c
DE
18162014-02-19 Doug Evans <dje@google.com>
1817
1818 * inferiors.c (add_thread): Fix whitespace.
1819
649ebbca
DE
18202014-02-19 Doug Evans <dje@google.com>
1821
1822 * dll.c (clear_dlls): Replace accessing list implemention details
1823 with API function.
1824 * gdbthread.h (get_first_thread): Declare.
1825 * inferiors.c (for_each_inferior_with_data): New function.
1826 (get_first_thread): New function.
1827 (find_thread_ptid): Simplify.
1828 (get_first_inferior): New function.
1829 (clear_list): Delete.
1830 (one_inferior_p): New function.
1831 (clear_inferior_list): New function.
1832 (clear_inferiors): Update.
1833 * inferiors.h (for_each_inferior_with_data): Declare.
1834 (clear_inferior_list): Declare.
1835 (one_inferior_p): Declare.
1836 (get_first_inferior): Declare.
1837 * linux-low.c (linux_wait_for_event): Replace accessing list
1838 implemention details with API function.
1839 * server.c (target_running): Ditto.
1840 (accumulate_file_name_length): New function.
1841 (emit_dll_description): New function.
1842 (handle_qxfer_libraries): Replace accessing list implemention
1843 details with API function.
1844 (handle_qxfer_threads_worker): New function.
1845 (handle_qxfer_threads_proper): Replace accessing list implemention
1846 details with API function.
1847 (handle_query): Ditto.
1848 (visit_actioned_threads_callback_ftype): New typedef.
1849 (visit_actioned_threads_data): New struct.
1850 (visit_actioned_threads): Rewrite to be find_inferior callback.
1851 (resume): Call find_inferior.
1852 (handle_status): Replace accessing list implemention
1853 details with API function.
1854 (process_serial_event): Replace accessing list implemention details
1855 with API function.
1856 * target.c (set_desired_inferior): Replace accessing list implemention
1857 details with API function.
1858 * tracepoint.c (same_process_p): New function.
1859 (gdb_agent_about_to_close): Replace accessing list implemention
1860 details with API function.
1861 * win32-low.c (child_delete_thread): Replace accessing list
1862 implemention details with API function.
1863 (match_dll_by_basename): New function.
1864 (dll_is_loaded_by_basename): New function.
1865 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1866 details call to dll_is_loaded_by_basename.
1867
80894984
DE
18682014-02-19 Doug Evans <dje@google.com>
1869
1870 * dll.h (struct dll_info): Add comment.
1871 * gdbthread.h (struct thread_info): Add comment.
1872 (current_ptid): Simplify.
1873 * inferiors.c (add_process): Update.
1874 (remove_process): Update.
1875 * inferiors.h (struct process_info): Rename member "head" to "entry".
1876 * linux-low.c (delete_lwp): Update.
1877 (add_lwp): Update.
1878 (last_thread_of_process_p): Update.
1879 (kill_one_lwp_callback, linux_kill): Update.
1880 (status_pending_p_callback): Update.
1881 (wait_for_sigstop): Update. Simplify read of ptid.
1882 (start_step_over): Update.
1883 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1884 (get_lwp_thread): Update.
1885 (struct lwp_info): Rename member "head" to "entry".
1886 * regcache.h (inferior_list_entry): Delete.
1887 * server.c (kill_inferior_callback): Update.
1888 (detach_or_kill_inferior_callback): Update.
1889 (print_started_pid): Update.
1890 (print_attached_pid): Update.
1891 (process_serial_event): Simplify read of ptid.
1892 * thread-db.c (thread_db_create_event): Update.
1893 (thread_db_get_tls_address): Update.
1894 * win32-low.c (current_inferior_ptid): Simplify.
1895
46917d26
TT
18962014-02-19 Tom Tromey <tromey@redhat.com>
1897
1898 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1899 argument.
1900 (target_supports_btrace): Update.
1901
0759a81e
YQ
19022014-02-14 Yao Qi <yao@codesourcery.com>
1903
1904 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1905 (rsp-low-ipa.o): New target.
1906
a7191e8b
TT
19072014-02-12 Tom Tromey <tromey@redhat.com>
1908
1909 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1910 convert_ascii_to_int.
1911 * regcache.c (registers_to_string): Likewise.
1912 * remote-utils.c (decode_M_packet): Likewise.
1913 * server.c (process_serial_event): Likewise.
1914
ff0e980e
TT
19152014-02-12 Tom Tromey <tromey@redhat.com>
1916
1917 * server.c (handle_query, handle_v_run): Use hex2bin, not
1918 unhexify.
1919 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1920
e9371aff
TT
19212014-02-12 Tom Tromey <tromey@redhat.com>
1922
1923 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1924 convert_int_to_ascii.
1925 * regcache.c (registers_to_string, collect_register_as_string):
1926 Likewise.
1927 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1928 Likewise.
1929 * server.c (process_serial_event): Likewise.
1930 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1931 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1932
971dc0b8
TT
19332014-02-12 Tom Tromey <tromey@redhat.com>
1934
1935 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1936 bin2hex, not hexify.
1937 * tracepoint.c (cmd_qtstatus): Likewise.
1938
0a822afb
TT
19392014-02-12 Tom Tromey <tromey@redhat.com>
1940
1941 * remote-utils.c (monitor_output): Pass explicit length to
1942 hexify.
1943
9c3d6531
TT
19442014-02-12 Tom Tromey <tromey@redhat.com>
1945
1946 * tracepoint.c: Include rsp-low.h.
1947 * server.c: Include rsp-low.h.
1948 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1949 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1950 declare.
1951 * remote-utils.c: Include rsp-low.h.
1952 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1953 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1954 (convert_int_to_ascii, convert_ascii_to_int): Move to
1955 common/rsp-low.c.
1956 * regcache.c: Include rsp-low.h.
1957 * ax.c: Include rsp-low.h.
1958 * Makefile.in (SFILES): Add common/rsp-low.c.
1959 (OBS): Add rsp-low.o.
1960 (rsp-low.o): New target.
1961
01fd3ea5
TT
19622014-02-12 Tom Tromey <tromey@redhat.com>
1963
1964 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1965 Include print-utils.h.
1966 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1967 (plongest, thirty_two, phex_nz): Remove.
1968 * Makefile.in (SFILES): Add common/print-utils.c.
1969 (OBS): Add print-utils.o.
1970 (print-utils-ipa.o): New target.
1971 (print-utils.o): New target.
1972 (IPA_OBJS): Add print-utils-ipa.o.
1973
e99dc820
TT
19742014-02-06 Tom Tromey <tromey@redhat.com>
1975
1976 * Makefile.in (SFILES): Fix indentation.
1977
ee1e2d4f
DE
19782014-02-05 Doug Evans <dje@google.com>
1979
1980 * linux-low.c (linux_wait_for_event): Improve comment.
1981 (linux_wait_1): Keep current_inferior in sync with event_child.
1982
f5a02773
DE
19832014-01-22 Doug Evans <dje@google.com>
1984
1985 * gdbthread.h (gdb_id_to_thread): Delete, unused.
1986
87ce2a04
DE
19872014-01-22 Doug Evans <dje@google.com>
1988
1989 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1990 * configure: Regenerate.
1991 * config.in: Regenerate.
1992 * Makefile.in (SFILES): Add debug.c.
1993 (OBS): Add debug.o.
1994 * debug.c: New file.
1995 * debug.h: New file.
1996 * linux-aarch64-low.c (*): Update all debugging printfs to use
1997 debug_printf instead of fprintf.
1998 * linux-arm-low.c (*): Ditto.
1999 * linux-cris-low.c (*): Ditto.
2000 * linux-crisv32-low.c (*): Ditto.
2001 * linux-m32r-low.c (*): Ditto.
2002 * linux-sparc-low.c (*): Ditto.
2003 * linux-x86.c (*): Ditto.
2004 * linux-low.c (*): Ditto.
2005 (linux_wait_1): Add calls to debug_enter, debug_exit.
2006 (linux_wait): Remove redundant debugging printf.
2007 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2008 (linux_resume, unstop_all_lwps): Ditto.
2009 * mem-break.c (*): Update all debugging printfs to use
2010 debug_printf instead of fprintf.
2011 * remote-utils.c (*): Ditto.
2012 * thread-db.c (*): Ditto.
2013 * server.c #include <ctype.h>, "gdb_vecs.h".
2014 (debug_threads): Moved to debug.c.
2015 (*): Update all debugging printfs to use debug_printf instead of
2016 fprintf.
2017 (start_inferior): Replace call to fflush with call to debug_flush.
2018 (monitor_show_help): Mention set debug-format.
2019 (parse_debug_format_options): New function.
2020 (handle_monitor_command): Handle "monitor set debug-format".
2021 (gdbserver_usage): Mention --debug-format.
2022 (main): Parse --debug-format.
2023 * server.h (debug_threads): Declaration moved to debug.h.
2024 #include "debug.h".
2025 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2026 trace_debug_1 that uses debug_printf.
2027 (tracepoint_look_up_symbols): Update all debugging printfs to use
2028 debug_printf instead of fprintf.
2029
e671835b
BS
20302014-01-20 Baruch Siach <baruch@tkos.co.il>
2031
2032 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2033 sys/ptrace.h.
2034
b5737fa9
PA
20352014-01-17 Pedro Alves <palves@redhat.com>
2036
ea38d2a9 2037 PR build/16445
c7faa97a
PA
2038 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2039 defined after including gdb_proc_service.h.
b5737fa9 2040
40ed484e
DE
20412014-01-16 Doug Evans <dje@google.com>
2042
2043 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2044 (match_dll): Use it.
2045
969c39fb
MM
20462014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2047
2048 * target.h (target_ops) <read_btrace>: Change parameters and
2049 return type to allow error reporting.
2050 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2051 trace reading errors on.
2052 * linux-low.c (linux_low_read_btrace): Pass trace reading
2053 errors on.
2054 (linux_low_disable_btrace): New.
2055
ab7f45ba
DE
20562014-01-15 Doug Evans <dje@google.com>
2057
2058 * inferiors.c (thread_id_to_gdb_id): Delete.
2059 * inferiors.h (thread_id_to_gdb_id): Delete.
2060
66af0f44
EZ
20612014-01-13 Eli Zaretskii <eliz@gnu.org>
2062
2063 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2064 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2065 versions.
2066
9939e131
PA
20672014-01-08 Pedro Alves <palves@redhat.com>
2068
2069 * server.c (handle_status): Don't discard previous queued stop
2070 replies or thread's pending status here.
2071 (main) <disconnection>: Do it here instead.
2072
b7ea362b
PA
20732014-01-08 Pedro Alves <palves@redhat.com>
2074
2075 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2076 * server.c (visit_actioned_threads, handle_pending_status): New
2077 function.
2078 (handle_v_cont): Factor out parts to ...
2079 (resume): ... this new function. If in all-stop, and a thread
2080 being resumed has a pending status, report it without actually
2081 resuming.
2082 (myresume): Adjust to use the new 'resume' function.
2083 (clear_pending_status_callback, set_pending_status_callback)
2084 (find_status_pending_thread_callback): New functions.
2085 (handle_status): Handle the case of multiple threads having
2086 interesting statuses to report. Report threads' real last signal
2087 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2088 with an interesting thread to report the status for, instead of
2089 always reporting the status of the first thread.
2090
28498c42
JB
20912014-01-01 Joel Brobecker <brobecker@adacore.com>
2092
2093 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2094 * gdbreplay.c (gdbreplay_version): Likewise.
2095
f45c82da
YZ
20962013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2097
2098 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2099 iov.iov_len with the real length in use.
2100
379a5e2d
JB
21012013-12-13 Joel Brobecker <brobecker@adacore.com>
2102
2103 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2104 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2105 for all targets that use win32-low.c.
2106 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2107 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2108
4210d83e
PA
21092013-12-13 Pedro Alves <palves@redhat.com>
2110
2111 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2112 if equal to TARGET_WAITKIND_LOADED.
2113 * win32-low.c (cached_status): New static global.
2114 (win32_wait): Add declaration.
2115 (do_initial_child_stuff): Flush all initial pending debug events
2116 up to the initial breakpoint.
2117 (win32_wait): If CACHED_STATUS was set, return that instead
2118 of doing a real wait. Remove the code resuming the execution
2119 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2120 during the initial phase. Also remove the code changing
2121 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2122 TARGET_WAITKIND_STOPPED.
2123
e7f0d979
YQ
21242013-12-11 Yao Qi <yao@codesourcery.com>
2125
2126 * notif.c (handle_notif_ack): Return 0 if no notification
2127 matches.
2128
ebcf782c
DE
21292013-11-20 Doug Evans <dje@google.com>
2130
2131 * linux-low.c (linux_set_resume_request): Fix comment.
2132
20ad9378
DE
21332013-11-20 Doug Evans <dje@google.com>
2134
2135 * linux-low.c (resume_status_pending_p): Tweak comment.
2136
a196ebeb
WT
21372013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2138
2139 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2140 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2141 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2142 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2143 (srv_amd64_regobj): Add amd64-mpx.o.
2144 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2145 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2146 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2147 * i387-fp.c (num_pl_bnd_register) Added constant.
2148 (num_pl_bnd_cfg_registers) Added constant.
2149 (struct i387_xsave) Added reserved area and MPX fields.
2150 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2151 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2152 function.
2153 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2154 (init_registers_amd64_mpx_linux): Declare new function.
2155 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2156 (x86_64_regmap): Add MPX registers.
2157 (x86_linux_read_description): Add MPX case.
2158 (initialize_low_arch): Initialize MPX targets.
2159
0080a2f6
TT
21602013-11-18 Tom Tromey <tromey@redhat.com>
2161
2162 * configure: Rebuild.
2163 * configure.ac: Don't check for stdlib.h.
2164 * gdbreplay.c: Unconditionally include stdlib.h.
2165
2978b111
TT
21662013-11-18 Tom Tromey <tromey@redhat.com>
2167
2168 * config.in: Rebuild.
2169 * configure: Rebuild.
2170 * configure.ac: Don't use AC_HEADER_DIRENT.
2171
a3d08894
TT
21722013-11-18 Tom Tromey <tromey@redhat.com>
2173
2174 * server.h: Don't check HAVE_STRING_H.
2175 * gdbreplay.c: Don't check HAVE_STRING_H.
2176 * configure: Rebuild.
2177
0a5dd17d
TT
21782013-11-18 Tom Tromey <tromey@redhat.com>
2179
2180 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2181 LIBGNU.
2182
1bd2f0ba
TT
21832013-11-08 Tom Tromey <tromey@redhat.com>
2184
2185 * configure, config.in: Rebuild.
2186 * configure.ac: Remove unused configury.
2187
3266f10b
TT
21882013-11-08 Tom Tromey <tromey@redhat.com>
2189
2190 * acinclude.m4: Include common.m4, codeset.m4.
2191 * configure, config.in: Rebuild.
2192 * configure.ac: Use GDB_AC_COMMON.
2193
6682d959
AA
21942013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2195
2196 * linux-s390-low.c (HWCAP_S390_TE): New define.
2197 (s390_arch_setup): Consider the TE field in the HWCAP for
2198 determining 'have_regset_tdb'.
2199
fd0a4d76
SDJ
22002013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2201
2202 PR gdb/16014
2203 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2204 call to sizeof.
2205
1a3d890b
PA
22062013-10-02 Pedro Alves <palves@redhat.com>
2207
2208 * server.c (process_serial_event): Don't output "GDBserver
2209 exiting" if GDB is connected through stdio.
2210 * target.c (mywait): Likewise, be silent if GDB is connected
2211 through stdio.
2212
97ad4581
JB
22132013-10-01 Joel Brobecker <brobecker@adacore.com>
2214
2215 * lynx-low.c (lynx_add_threads_after_attach): New function.
2216 (lynx_attach): Remove call to add_thread. Add call to
2217 lynx_add_threads_after_attach instead.
2218
5b4e221c
MF
22192013-09-28 Mike Frysinger <vapier@gentoo.org>
2220
2221 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2222 * config.in, configure: Regenerated.
2223
ee47b2f8
YQ
22242013-09-18 Yao Qi <yao@codesourcery.com>
2225
2226 PR server/15959
2227 * server.c (start_inferior): Clear 'resume_info'.
2228
d6707650 22292013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2230
d6707650
JW
2231 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2232 for each register.
2233
9243dd0e 22342013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2235
9243dd0e
JW
2236 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2237 linux-tile-low.o to srv_tgtobj.
2238
c623a6ef
WN
22392013-09-16 Will Newton <will.newton@linaro.org>
2240
2241 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2242 out regs.
2243
fb71d39e
PA
22442013-09-06 Pedro Alves <palves@redhat.com>
2245
2246 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2247 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2248 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2249 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2250 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2251 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2252
8e7e9910
PA
22532013-09-06 Pedro Alves <palves@redhat.com>
2254
2255 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2256 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2257
7c3a12ca
PA
22582013-09-06 Pedro Alves <palves@redhat.com>
2259
2260 * linux-amd64-ipa.c: Include tracepoint.h.
2261 * linux-i386-ipa.c: Include tracepoint.h.
2262
8eb3d7b6
RW
22632013-09-06 Ricard Wanderlof <ricardw@axis.com>
2264
2265 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2266 (ps_get_thread_area): New function.
2267
eddddb9d
RW
22682013-09-06 Ricard Wanderlof <ricardw@axis.com>
2269
2270 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2271 (initialize_low_arch): Call init_registers_crisv32 rather than
2272 init_register_crisv32.
2273
533b0600
PA
22742013-09-05 Pedro Alves <palves@redhat.com>
2275
2276 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2277 to ...
2278 * hostio.h: ... this new file.
2279 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2280 win32-low.c: Include hostio.h.
2281
0ce3d3b5
PA
22822013-09-05 Pedro Alves <palves@redhat.com>
2283
2284 * server.h (gdb_client_data, handler_func, callback_handler_func)
2285 (delete_file_handler, add_file_handler, append_callback_event)
2286 (delete_callback_event, start_event_loop, initialize_event_loop):
2287 Move to event-loop.h and include it.
2288 * event-loop.h: New file.
2289
799cdc37
PA
22902013-09-05 Pedro Alves <palves@redhat.com>
2291
2292 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2293 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2294 (loaded_dll, unloaded_dll): Move to ...
2295 * dll.h: ... this new file.
2296 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2297
6a6bbd9d
PA
22982013-09-05 Pedro Alves <palves@redhat.com>
2299
2300 * server.h (current_process, get_thread_process, all_processes)
2301 (add_inferior_to_list, for_each_inferior, current_inferior)
2302 (remove_inferior, add_process, remove_process, find_process_pid)
2303 (have_started_inferiors_p, have_attached_inferiors_p)
2304 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2305 (clear_inferiors, find_inferior, find_inferior_id)
2306 (inferior_target_data, set_inferior_target_data)
2307 (inferior_regcache_data, set_inferior_regcache_data): Move to
2308 inferiors.h, and include it.
2309 * inferiors.h: New file.
2310
f699aaba
PA
23112013-09-05 Pedro Alves <palves@redhat.com>
2312
2313 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2314 Move ...
2315 * ax.h: ... here.
2316
c144c7a0
PA
23172013-09-05 Pedro Alves <palves@redhat.com>
2318
2319 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2320 tracepoint.h.
2321 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2322 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2323 (handle_tracepoint_general_set, handle_tracepoint_query)
2324 (tracepoint_finished_step, tracepoint_was_hit)
2325 (release_while_stepping_state_list, current_traceframe)
2326 (in_readonly_region, traceframe_read_mem)
2327 (fetch_traceframe_registers, traceframe_read_sdata)
2328 (traceframe_read_info, struct fast_tpoint_collect_status)
2329 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2330 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2331 (supply_fast_tracepoint_registers)
2332 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2333 (ipa_tdesc, claim_trampoline_space)
2334 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2335 (agent_mem_read, agent_get_trace_state_variable_value)
2336 (agent_set_trace_state_variable_value, agent_tsv_read)
2337 (agent_mem_read_string, get_raw_reg_func_addr)
2338 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2339 * tracepoint.h: ... this new file.
2340
ff42e6ab
PA
23412013-09-05 Pedro Alves <palves@redhat.com>
2342
2343 * server.h (perror_with_name, error, fatal, warning, paddress)
2344 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2345 include it.
2346 * utils.h: New file.
2347
541af0f4
PA
23482013-09-05 Pedro Alves <palves@redhat.com>
2349
2350 * server.h (remote_debug, noack_mode, transport_is_reliable)
2351 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2352 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2353 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2354 (write_enn, initialize_async_io, enable_async_io)
2355 (disable_async_io, check_remote_input_interrupt_request)
2356 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2357 (dead_thread_notify, prepare_resume_reply)
2358 (decode_address_to_semicolon, decode_address, decode_m_packet)
2359 (decode_M_packet, decode_X_packet, decode_xfer_write)
2360 (decode_search_memory_packet, unhexify, hexify)
2361 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2362 (look_up_one_symbol, relocate_instruction)
2363 (monitor_output): Move to remote-utils.h, and include it.
2364 * remote-utils.h: New file.
2365
eebdf26b
PA
23662013-09-05 Pedro Alves <palves@redhat.com>
2367
2368 * server.h (_): Delete.
2369
3aafd2ff
PA
23702013-09-02 Pedro Alves <palves@redhat.com>
2371
2372 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2373 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2374 allocated.
2375 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2376
cee83bcb
PM
23772013-09-02 Pierre Muller <muller@sourceware.org>
2378
2379 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2380 or WriteProcessMemory complete successfully and handle
2381 ERROR_PARTIAL_COPY error.
2382
9a13b2fa
PA
23832013-09-02 Pedro Alves <palves@redhat.com>
2384
2385 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2386 error instead of EIO.
2387
602e3198
JK
23882013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2389
2390 PR server/15604
2391 * linux-low.c: Include filestuff.h.
2392 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2393 * lynx-low.c: Include filestuff.h.
2394 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2395 * server.c: Include filestuff.h.
2396 (main): Call notice_open_fds.
2397 * spu-low.c: Include filestuff.h.
2398 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2399
96d7229d
LM
24002013-08-22 Luis Machado <lgustavo@codesourcery.com>
2401
2402 * Makefile.in: Explain why ../target and ../nat are not
2403 listed as include file search paths.
2404 (linux-waitpid.o): New object file rule.
2405 * configure.srv (srv_native_linux_obj): New variable.
2406 Replace all occurrences of linux native object files with
2407 $srv_native_linux_obj.
2408 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2409 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2410 (linux_enable_event_reporting): Remove declaration.
2411 (my_waitpid): Moved to common/linux-waitpid.c.
2412 (linux_wait_for_event): Pass ptid when calling
2413 linux_enable_event_reporting.
2414 (linux_supports_tracefork_flag): Remove.
2415 (linux_enable_event_reporting): Likewise.
2416 (linux_tracefork_grandchild): Remove.
2417 (STACK_SIZE): Moved to common/linux-ptrace.c.
2418 (linux_tracefork_child): Remove.
2419 (linux_test_for_tracefork): Remove.
2420 (linux_look_up_symbols): Call linux_supports_traceclone.
2421 (initialize_low): Remove call to linux_test_for_tracefork.
2422 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2423 common/linux-ptrace.h.
2424 (PTRACE_TYPE_ARG4): Likewise.
2425 Include linux-ptrace.h.
2426
32940073
PA
24272013-08-21 Pedro Alves <palves@redhat.com>
2428
2429 * config.in: Renegerate.
2430
33b60d58 24312013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2432
33b60d58
LM
2433 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2434 (SFILES): Remove $(srcdir)/common/target-common.c and
2435 add $(srcdir)/target/waitstatus.c.
2436 (OBS): Remove target-common.o and add waitstatus.o.
2437 (server_h): Remove $(srcdir)/../common/target-common.h and
2438 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2439 and $(srcdir)/../target/waitstatus.h.
2440 (target-common.o): Remove.
2441 (waitstatus.o): New target object file.
2442 * target.h: Do not include target-common.h and
2443 include target/resume.h, target/wait.h and
2444 target/waitstatus.h.
2445
b8e1b30e
LM
24462013-08-13 Luis Machado <lgustavo@codesourcery.com>
2447
2448 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2449 to PTRACE_TYPE_ARG3.
2450 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2451 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2452 PTRACE_TYPE_ARG4.
2453 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2454 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2455
7a60ad40
YQ
24562013-07-27 Jie Zhang <jie@codesourcery.com>
2457 Daniel Jacobowitz <dan@codesourcery.com>
2458 Yao Qi <yao@codesourcery.com>
2459
2460 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2461 (mips-linux-watch.o): New rule.
2462 (mips_linux_watch_h): New variable.
2463 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2464 srv_tgtobj.
2465 * linux-mips-low.c: Include mips-linux-watch.h.
2466 (struct arch_process_info, struct arch_lwp_info): New.
2467 (update_watch_registers_callback): New function.
2468 (mips_linux_new_process, mips_linux_new_thread) New functions.
2469 (mips_linux_prepare_to_resume, mips_insert_point): New
2470 functions.
2471 (mips_remove_point, mips_stopped_by_watchpoint): New
2472 functions.
2473 (rsp_bp_type_to_target_hw_bp_type): New function.
2474 (mips_stopped_data_address): New function.
2475 (the_low_target): Add watchpoint support functions.
2476
de6f69ad
YQ
24772013-07-27 Yao Qi <yao@codesourcery.com>
2478
2479 * i386-low.c: Include break-common.h.
2480 (enum target_hw_bp_type): Remove.
2481
3360c0bf
LM
24822013-07-24 Luis Machado <lgustavo@codesourcery.com>
2483
2484 * Makefile.in (SFILES): /common/target-common.c.
2485 (OBS): Add target-common.o.
2486 (server_h): Add $(srcdir)/../common/target-common.h.
2487 (target-common.o): New target.
2488 * server.c (queue_stop_reply_callback): Free
2489 status string after use.
2490 * target.c (target_waitstatus_to_string): Remove.
2491 * target.h: Include target-common.h.
2492 (resume_kind): Likewise.
2493 (target_waitkind): Likewise.
2494 (target_waitstatus): Likewise.
2495 (TARGET_WNOHANG): Likewise.
2496
bd885420
YQ
24972013-07-04 Yao Qi <yao@codesourcery.com>
2498
2499 * Makefile.in (host_alias): Use @host_noncanonical@.
2500 (target_alias): Use @target_noncanonical@.
2501 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2502 ACX_NONCANONICAL_HOST.
2503 * configure: Regenerated.
2504
2505 Revert:
2506 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2507
2508 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2509 * configure: Rebuild.
2510 * Makefile.in (version_host, version_target): Get from configure.
2511 (version.c): Use $(version_host) and $(version_target).
2512
17ef446e
PA
25132013-07-03 Pedro Alves <palves@redhat.com>
2514
2515 * Makefile.in (config.status): Depend on development.sh.
2516 * acinclude.m4: Include libmcheck.m4.
2517 * configure: Regenerate.
2518
7a9a7487
MG
25192013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2520
2521 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2522 attribute inside the parentheses.
2523 (winapi_DebugSetProcessKillOnExit): Ditto.
2524 (winapi_DebugBreakProcess): Ditto.
2525 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2526
49b64de6
MG
25272013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2528
2529 * notif.h (notif_event): Add a dummy member to avoid compiler
2530 errors.
2531
d5749ee7
PA
25322013-07-01 Pedro Alves <palves@redhat.com>
2533
2534 * hostio.c (HOSTIO_PATH_MAX): Define.
2535 (require_filename, handle_open, handle_unlink, handle_readlink):
2536 Use it.
2537
d8d2a3ee
PA
25382013-07-01 Pedro Alves <palves@redhat.com>
2539
2540 * server.h: Include "pathmax.h".
2541 * linux-low.c: Don't include sys/param.h.
2542 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2543 MAXPATHLEN.
2544 * win32-low.c: Don't include sys/param.h.
2545 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2546
bc7dea8d
PA
25472013-07-01 Pedro Alves <palves@redhat.com>
2548
2549 * event-loop.c: Don't check HAVE_UNISTD_H before including
2550 <unistd.h>.
2551 * gdbreplay.c: Likewise.
2552 * remote-utils.c: Likewise.
2553 * server.c: Likewise.
2554 * configure.ac: Don't check for unistd.h.
2555 * configure: Regenerate.
2556
d6c2da54
TT
25572013-06-28 Tom Tromey <tromey@redhat.com>
2558
2559 * Makefile.in (version.c): Use version.in, not
2560 common/version.in.
2561
257b6bec
MG
25622013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2563
2564 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2565 * configure: Rebuild.
2566 * Makefile.in (version_host, version_target): Get from configure.
2567 (version.c): Use $(version_host) and $(version_target).
2568
86ebe149
DK
25692013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2570
2571 Fix trace-status to output user name without trailing colon.
2572 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2573
f30aa5af
DK
25742013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2575
2576 Fix trace-status to output proper start-time and stop-time.
2577 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2578 output start time and stop time in hex as gdb expects.
2579
28a93511
YQ
25802013-06-26 Pedro Alves <pedro@codesourcery.com>
2581
2582 * tracepoint.c (build_traceframe_info_xml): Output trace state
2583 variables present in the trace buffer.
2584
01208463
TT
25852013-06-24 Tom Tromey <tromey@redhat.com>
2586
2587 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2588 create-version.sh.
2589 (version.o): Remove.
2590 * gdbreplay.c: Include version.h.
2591 (version, host_name): Don't declare.
2592 * server.h: Include version.h.
2593 (version, host_name): Don't declare.
2594
760256f9
PA
25952013-06-12 Pedro Alves <palves@redhat.com>
2596
2597 * linux-x86-low.c (linux_is_elf64): Delete global.
2598 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2599 with local linux_pid_exe_is_elf_64_file use.
2600
030031ee
PA
26012013-06-11 Pedro Alves <palves@redhat.com>
2602
2603 * linux-low.c (regset_disabled, disable_regset): New functions.
2604 (regsets_fetch_inferior_registers)
2605 (regsets_store_inferior_registers): Use them.
2606 (initialize_regsets_info); Don't allocate the disabled_regsets
2607 array here.
2608 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2609 comment.
2610
5da6eb0a
PA
26112013-06-11 Pedro Alves <palves@redhat.com>
2612
2613 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2614 xmalloc.
2615
7e5aaa09
PA
26162013-06-11 Pedro Alves <palves@redhat.com>
2617
2618 * linux-x86-low.c (initialize_low_arch): Call
2619 init_registers_x32_avx_linux.
2620
d878444c
JK
26212013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2622
2623 Fix compatibility with Android Bionic.
2624 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2625 it is not empty.
2626
3aee8918
PA
26272013-06-07 Pedro Alves <palves@redhat.com>
2628
5f2b57b5 2629 PR server/14823
3aee8918
PA
2630 * Makefile.in (OBS): Add tdesc.o.
2631 (IPA_OBJS): Add tdesc-ipa.o.
2632 (tdesc-ipa.o): New rule.
2633 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2634 interface.
2635 * linux-low.c (new_inferior): Delete.
2636 (disabled_regsets, num_regsets): Delete.
2637 (linux_add_process): Adjust to set the new per-process
2638 new_inferior flag.
2639 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2640 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2641 was a stop. When calling arch_setup, switch the current inferior
2642 to the thread that got an event.
2643 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2644 (regsets_fetch_inferior_registers)
2645 (regsets_store_inferior_registers): New regsets_info parameter.
2646 Adjust to use it.
2647 (linux_register_in_regsets): New regs_info parameter. Adjust to
2648 use it.
2649 (register_addr, fetch_register, store_register): New usrregs_info
2650 parameter. Adjust to use it.
2651 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2652 parameter regs_info. Adjust to use it.
2653 (linux_fetch_registers): Get the current inferior's regs_info, and
2654 adjust to use it.
2655 (linux_store_registers): Ditto.
2656 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2657 (initialize_low): Don't initialize the target_regsets here. Call
2658 initialize_low_arch.
2659 * linux-low.h (target_regsets): Delete declaration.
2660 (struct regsets_info): New.
2661 (struct usrregs_info): New.
2662 (struct regs_info): New.
2663 (struct process_info_private) <new_inferior>: New field.
2664 (struct linux_target_ops): Delete the num_regs, regmap, and
2665 regset_bitmap fields. New field regs_info.
2666 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2667 * i387-fp.c (num_xmm_registers): Delete.
2668 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2669 calls to new interface.
2670 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2671 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2672 Infer the number of xmm registers from the regcache's target
2673 description.
2674 * i387-fp.h (num_xmm_registers): Delete.
2675 * inferiors.c (add_thread): Don't install the thread's regcache
2676 here.
2677 * proc-service.c (gregset_info): Fetch the current inferior's
2678 regs_info. Adjust to use it.
2679 * regcache.c: Include tdesc.h.
2680 (register_bytes, reg_defs, num_registers)
2681 (gdbserver_expedite_regs): Delete.
2682 (get_thread_regcache): If the thread doesn't have a regcache yet,
2683 create one, instead of aborting gdbserver.
2684 (regcache_invalidate_one): Rename to ...
2685 (regcache_invalidate_thread): ... this.
2686 (regcache_invalidate_one): New.
2687 (regcache_invalidate): Only invalidate registers of the current
2688 process.
2689 (init_register_cache): Add target_desc parameter, and use it.
2690 (new_register_cache): Ditto. Assert the target description has a
2691 non zero registers_size.
2692 (regcache_cpy): Add assertions. Adjust.
2693 (realloc_register_cache, set_register_cache): Delete.
2694 (registers_to_string, registers_from_string): Adjust.
2695 (find_register_by_name, find_regno, find_register_by_number)
2696 (register_cache_size): Add target_desc parameter, and use it.
2697 (free_register_cache_thread, free_register_cache_thread_one)
2698 (regcache_release, register_cache_size): New.
2699 (register_size): Add target_desc parameter, and use it.
2700 (register_data, supply_register, supply_register_zeroed)
2701 (supply_regblock, supply_register_by_name, collect_register)
2702 (collect_register_as_string, collect_register_by_name): Adjust.
2703 * regcache.h (struct target_desc): Forward declare.
2704 (struct regcache) <tdesc>: New field.
2705 (init_register_cache, new_register_cache): Add target_desc
2706 parameter.
2707 (regcache_invalidate_thread): Declare.
2708 (regcache_invalidate_one): Delete declaration.
2709 (regcache_release): Declare.
2710 (find_register_by_number, register_cache_size, register_size)
2711 (find_regno): Add target_desc parameter.
2712 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2713 declarations.
2714 * remote-utils.c: Include tdesc.h.
2715 (outreg, prepare_resume_reply): Adjust.
2716 * server.c: Include tdesc.h.
2717 (gdbserver_xmltarget): Delete declaration.
2718 (get_features_xml, process_serial_event): Adjust.
2719 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2720 declare.
2721 (struct process_info) <tdesc>: New field.
2722 (ipa_tdesc): Declare.
2723 * tdesc.c: New file.
2724 * tdesc.h: New file.
2725 * tracepoint.c: Include tdesc.h.
2726 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2727 (get_context_regcache): Adjust to pass ipa_tdesc down.
2728 (do_action_at_tracepoint): Adjust to get the register cache size
2729 from the context regcache's description.
2730 (traceframe_walk_blocks): Adjust to get the register cache size
2731 from the current trace frame's description.
2732 (traceframe_get_pc): Adjust to get current trace frame's
2733 description and pass it down.
2734 (gdb_collect): Adjust to get the register cache size from the
2735 IPA's description.
2736 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2737 (gdbserver_xmltarget): Delete.
2738 (initialize_low_tracepoint): Set the ipa's target description.
2739 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2740 (initialize_low_tracepoint): Set the ipa's target description.
2741 * linux-x86-low.c: Include tdesc.h.
2742 [__x86_64__] (is_64bit_tdesc): New.
2743 (ps_get_thread_area, x86_get_thread_area): Use it.
2744 (i386_cannot_store_register): Rename to ...
2745 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2746 (i386_cannot_fetch_register): Rename to ...
2747 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2748 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2749 to new interface.
2750 (target_regsets): Rename to ...
2751 (x86_regsets): ... this.
2752 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2753 interface.
2754 (x86_siginfo_fixup): Use is_64bit_tdesc.
2755 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2756 (tdesc_x32_avx_linux, tdesc_x32_linux)
2757 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2758 Declare.
2759 (x86_linux_update_xmltarget): Delete.
2760 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2761 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2762 (AMD64_LINUX_USER64_CS): New.
2763 (x86_linux_read_description): New, based on
2764 x86_linux_update_xmltarget.
2765 (same_process_callback): New.
2766 (x86_arch_setup_process_callback): New.
2767 (x86_linux_update_xmltarget): New.
2768 (x86_regsets_info): New.
2769 (amd64_linux_regs_info): New.
2770 (i386_linux_usrregs_info): New.
2771 (i386_linux_regs_info): New.
2772 (x86_linux_regs_info): New.
2773 (x86_arch_setup): Reimplement.
2774 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2775 (x86_emit_ops): Ditto.
2776 (the_low_target): Adjust. Install x86_linux_regs_info,
2777 x86_cannot_fetch_register, and x86_cannot_store_register.
2778 (initialize_low_arch): New.
2779 * linux-ia64-low.c (tdesc_ia64): Declare.
2780 (ia64_fetch_register): Adjust.
2781 (ia64_usrregs_info, regs_info): New globals.
2782 (ia64_regs_info): New function.
2783 (the_low_target): Adjust.
2784 (initialize_low_arch): New function.
2785 * linux-sparc-low.c (tdesc_sparc64): Declare.
2786 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2787 Adjust.
2788 (sparc_arch_setup): New function.
2789 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2790 (the_low_target): Adjust.
2791 (initialize_low_arch): New function.
2792 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2793 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2794 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2795 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2796 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2797 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2798 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2799 (tdesc_powerpc_isa205_vsx64l): Declare.
2800 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2801 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2802 (ppc_set_pc, ppc_get_hwcap): Adjust.
2803 (ppc_usrregs_info): Forward declare.
2804 (!__powerpc64__) ppc_regmap_adjusted: New global.
2805 (ppc_arch_setup): Adjust to the current process'es target
2806 description.
2807 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2808 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2809 (ppc_store_evrregset): Adjust.
2810 (target_regsets): Rename to ...
2811 (ppc_regsets): ... this, and make static.
2812 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2813 (ppc_regs_info): New function.
2814 (the_low_target): Adjust.
2815 (initialize_low_arch): New function.
2816 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2817 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2818 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2819 (tdesc_s390x_linux64v2): Declare.
2820 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2821 (s390_fill_gregset, s390_store_last_break): Adjust.
2822 (target_regsets): Rename to ...
2823 (s390_regsets): ... this, and make static.
2824 (s390_get_pc, s390_set_pc): Adjust.
2825 (s390_get_hwcap): New target_desc parameter, and use it.
2826 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2827 (s390_arch_setup): Adjust to set the current process'es target
2828 description. Don't adjust the regmap.
2829 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2830 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2831 (regs_info_3264): New globals.
2832 (s390_regs_info): New function.
2833 (the_low_target): Adjust.
2834 (initialize_low_arch): New function.
2835 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2836 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2837 [__mips64] (init_registers_mips_linux)
2838 (init_registers_mips_dsp_linux): Delete defines.
2839 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2840 (have_dsp): New global.
2841 (mips_read_description): New, based on mips_arch_setup.
2842 (mips_arch_setup): Reimplement.
2843 (get_usrregs_info): New function.
2844 (mips_cannot_fetch_register, mips_cannot_store_register)
2845 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2846 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2847 (target_regsets): Rename to ...
2848 (mips_regsets): ... this, and make static.
2849 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2850 (dsp_regs_info, regs_info): New globals.
2851 (mips_regs_info): New function.
2852 (the_low_target): Adjust.
2853 (initialize_low_arch): New function.
2854 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2855 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2856 Declare.
2857 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2858 (arm_read_description): New, with bits factored from
2859 arm_arch_setup.
2860 (arm_arch_setup): Reimplement.
2861 (target_regsets): Rename to ...
2862 (arm_regsets): ... this, and make static.
2863 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2864 (arm_regs_info): New function.
2865 (the_low_target): Adjust.
2866 (initialize_low_arch): New function.
2867 * linux-m68k-low.c (tdesc_m68k): Declare.
2868 (target_regsets): Rename to ...
2869 (m68k_regsets): ... this, and make static.
2870 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2871 (m68k_regs_info): New function.
2872 (m68k_arch_setup): New function.
2873 (the_low_target): Adjust.
2874 (initialize_low_arch): New function.
2875 * linux-sh-low.c (tdesc_sharch): Declare.
2876 (target_regsets): Rename to ...
2877 (sh_regsets): ... this, and make static.
2878 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2879 (sh_regs_info, sh_arch_setup): New functions.
2880 (the_low_target): Adjust.
2881 (initialize_low_arch): New function.
2882 * linux-bfin-low.c (tdesc_bfin): Declare.
2883 (bfin_arch_setup): New function.
2884 (bfin_usrregs_info, regs_info): New globals.
2885 (bfin_regs_info): New function.
2886 (the_low_target): Adjust.
2887 (initialize_low_arch): New function.
2888 * linux-cris-low.c (tdesc_cris): Declare.
2889 (cris_arch_setup): New function.
2890 (cris_usrregs_info, regs_info): New globals.
2891 (cris_regs_info): New function.
2892 (the_low_target): Adjust.
2893 (initialize_low_arch): New function.
2894 * linux-cris-low.c (tdesc_crisv32): Declare.
2895 (cris_arch_setup): New function.
2896 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2897 (cris_regs_info): New function.
2898 (the_low_target): Adjust.
2899 (initialize_low_arch): New function.
2900 * linux-m32r-low.c (tdesc_m32r): Declare.
2901 (m32r_arch_setup): New function.
2902 (m32r_usrregs_info, regs_info): New globals.
2903 (m32r_regs_info): Adjust.
2904 (initialize_low_arch): New function.
2905 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2906 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2907 (tic6x_usrregs_info): Forward declare.
2908 (tic6x_read_description): New function, based on ...
2909 (tic6x_arch_setup): ... this. Reimplement.
2910 (target_regsets): Rename to ...
2911 (tic6x_regsets): ... this, and make static.
2912 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2913 (tic6x_regs_info): New function.
2914 (the_low_target): Adjust.
2915 (initialize_low_arch): New function.
2916 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2917 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2918 (target_regsets): Rename to ...
2919 (xtensa_regsets): ... this, and make static.
2920 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2921 globals.
2922 (xtensa_arch_setup, xtensa_regs_info): New functions.
2923 (the_low_target): Adjust.
2924 (initialize_low_arch): New function.
2925 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2926 (nios2_arch_setup): Set the current process'es tdesc.
2927 (target_regsets): Rename to ...
2928 (nios2_regsets): ... this.
2929 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2930 (nios2_regs_info): New function.
2931 (the_low_target): Adjust.
2932 (initialize_low_arch): New function.
a261b8f5
PA
2933 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2934 (aarch64_arch_setup): Set the current process'es tdesc.
2935 (target_regsets): Rename to ...
2936 (aarch64_regsets): ... this.
2937 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2938 (aarch64_regs_info): New function.
2939 (the_low_target): Adjust.
2940 (initialize_low_arch): New function.
3aee8918
PA
2941 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2942 globals.
2943 (target_regsets): Rename to ...
2944 (tile_regsets): ... this.
2945 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2946 (tile_regs_info): New function.
2947 (tile_arch_setup): Set the current process'es tdesc.
2948 (the_low_target): Adjust.
2949 (initialize_low_arch): New function.
2950 * spu-low.c (tdesc_spu): Declare.
2951 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2952 * win32-arm-low.c (tdesc_arm): Declare.
2953 (arm_arch_setup): New function.
2954 (the_low_target): Install arm_arch_setup instead of
2955 init_registers_arm.
2956 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2957 (init_windows_x86): Rename to ...
2958 (i386_arch_setup): ... this. Set `win32_tdesc'.
2959 (the_low_target): Adjust.
2960 * win32-low.c (win32_tdesc): New global.
2961 (child_add_thread): Don't create the thread cache here.
2962 (do_initial_child_stuff): Set the new process'es tdesc.
2963 * win32-low.h (struct target_desc): Forward declare.
2964 (win32_tdesc): Declare.
2965 * lynx-i386-low.c (tdesc_i386): Declare global.
2966 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2967 * lynx-low.c (lynx_tdesc): New global.
2968 (lynx_add_process): Set the new process'es tdesc.
2969 * lynx-low.h (struct target_desc): Forward declare.
2970 (lynx_tdesc): Declare global.
2971 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2972 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2973 * nto-low.c (nto_tdesc): New global.
2974 (do_attach): Set the new process'es tdesc.
2975 * nto-low.h (struct target_desc): Forward declare.
2976 (nto_tdesc): Declare.
2977 * nto-x86-low.c (tdesc_i386): Declare.
2978 (nto_x86_arch_setup): Set `nto_tdesc'.
2979
b1fbec62
GB
29802013-06-04 Gary Benson <gbenson@redhat.com>
2981
2982 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2983 to qSupported response when appropriate.
2984 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2985 with nonzero-length annex.
2986 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2987 arguments supplied in annex.
2988
d1ec4ce7
DE
29892013-05-31 Doug Evans <dje@google.com>
2990
ac44adcb 2991 PR server/15594
d1ec4ce7
DE
2992 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2993 64 bits in 64-cross-32 environment.
2994
9b25f2d3
PA
29952013-05-28 Pedro Alves <palves@redhat.com>
2996
2997 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2998 (aarch64-without-fpu.c): Delete rule.
2999 * configure.srv (aarch64*-*-linux*): Remove references to
3000 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3001 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3002 declaration.
3003
6740dc9c
PA
30042013-05-24 Pedro Alves <palves@redhat.com>
3005
3006 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3007 instead of strchr/decode_address. Error if the range isn't split
3008 with a ','. Don't assume there's be a ':' in the action.
3009
c2d6af84
PA
30102013-05-23 Yao Qi <yao@codesourcery.com>
3011 Pedro Alves <palves@redhat.com>
3012
3013 * linux-low.c (lwp_in_step_range): New function.
3014 (linux_wait_1): If the thread was range stepping and stopped
3015 outside the stepping range, report the stop to GDB. Otherwise,
3016 continue stepping. Add range stepping debug output.
3017 (linux_set_resume_request): Copy the step range from the resume
3018 request to the lwp.
3019 (linux_supports_range_stepping): New.
3020 (linux_target_ops) <supports_range_stepping>: Set to
3021 linux_supports_range_stepping.
3022 * linux-low.h (struct linux_target_ops)
3023 <supports_range_stepping>: New field.
3024 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3025 * linux-x86-low.c (x86_supports_range_stepping): New.
3026 (the_low_target) <supports_range_stepping>: Set to
3027 x86_supports_range_stepping.
3028 * server.c (handle_v_cont): Handle 'r' action.
3029 (handle_v_requests): Append ";r" if the target supports range
3030 stepping.
3031 * target.h (struct thread_resume) <step_range_start,
3032 step_range_end>: New fields.
3033 (struct target_ops) <supports_range_stepping>:
3034 New field.
3035 (target_supports_range_stepping): New macro.
3036
58794e1a
JB
30372013-05-17 Joel Brobecker <brobecker@adacore.com>
3038
3039 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3040 confusion in comment.
3041
d631c5a7
JB
30422013-05-17 Joel Brobecker <brobecker@adacore.com>
3043
3044 * lynx-low.c (struct process_info_private): New type.
3045 (lynx_add_process): New function.
3046 (lynx_create_inferior, lynx_attach): Replace calls to
3047 add_process by calls to lynx_add_process.
3048 (lynx_resume): If PTID is null, then try using
3049 current_process()->private->last_wait_event_ptid.
3050 Add comments.
3051 (lynx_clear_inferiors): Delete. The contents of that function
3052 has been inlined in lynx_mourn;
3053 (lynx_wait_1): Save the ptid in the process's private data.
3054 (lynx_mourn): Free the process' private data. Replace call
3055 to lynx_clear_inferiors by call to clear_inferiors.
3056
96f7a20f
YQ
30572013-05-17 Yao Qi <yao@codesourcery.com>
3058
3059 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3060 the right place.
3061
db0dfaa0
LM
30622013-05-16 Luis Machado <lgustavo@codesourcery.com>
3063
3064 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3065 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3066 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3067 PT_TEXT_END_ADDR guards. Update comments.
3068 (linux_target_op) <read_offsets>: Conditionally define to
3069 linux_read_offsets if the target is UCLIBC and if it defines
3070 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3071
68f5f838
SL
30722013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3073 Andrew Jenner <andrew@codesourcery.com>
3074
3075 * Makefile.in (SFILES): Add linux-nios2-low.c.
3076 (clean): Add action to delete nios2-linux.c.
3077 (nios2-linux.c): New rule.
3078 * configure.srv: Add nios2*-*-linux*.
3079 * linux-nios2-low.c: New.
3080
1ebff1fd
HAQ
30812013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3082
3083 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3084
f6150862
HZ
30852013-04-25 Hui Zhu <hui@codesourcery.com>
3086
3087 PR gdb/15186
f6150862
HZ
3088 * ax.c (ax_printf): Add fflush.
3089
614c279d
TT
30902013-04-22 Tom Tromey <tromey@redhat.com>
3091
3092 * Makefile.in (SFILES): Add filestuff.c.
3093 (OBS): Add filestuff.o.
3094 (filestuff.o): New target.
3095 * config.in, configure: Rebuild.
3096 * configure.ac: Check for fdwalk, pipe2.
3097
7d4e5717
PA
30982013-04-17 Pedro Alves <palves@redhat.com>
3099
3100 * configure.ac (USE_THREAD_DB): Delete variable.
3101 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3102 Don't AC_SUBST USE_THREAD_DB.
3103 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3104 * config.in, configure: Regenerate.
3105
d5c93e41
PA
31062013-04-16 Pedro Alves <palves@redhat.com>
3107
3108 * linux-low.h (struct lwp_info) <thread_known>: Move under
3109 the USE_THREAD_DB #ifdef.
3110
04f5fe89
PA
31112013-04-16 Pedro Alves <palves@redhat.com>
3112
3113 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3114 (linux-low.o): Delete rule.
3115 * linux-low.h: Always include "gdb_thread_db.h" instead of
3116 conditionally including thread_db.h.
3117 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3118 HAVE_THREAD_DB_H.
3119
480b27bf
JK
31202013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3121
3122 * Makefile.in (install-only): Fix make install regression.
3123
43662968
JK
31242013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3125
3126 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3127 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3128 installation.
3129 * gdbserver.1: Remove.
3130
3e74e146
PA
31312013-03-22 Pedro Alves <palves@redhat.com>
3132
3133 * linux-low.c (handle_extended_wait): Don't call
3134 linux_enable_event_reporting.
3135
a8347a2a
TT
31362013-03-15 Tony Theodore <tonyt@logyst.com>
3137
3138 PR build/9098:
3139 * Makefile.in (SHELL): Use @SHELL@.
3140
eeb56fa7
SDJ
31412013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3142
3143 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3144 compiler warning.
3145
4fa7e2ff
JB
31462013-03-13 Joel Brobecker <brobecker@adacore.com>
3147
3148 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3149 Remove extraneous NULL element.
3150
8ddb1965
YQ
31512013-03-13 Yao Qi <yao@codesourcery.com>
3152
3153 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3154 'V' block in trace frame.
3155
9accd112
MM
31562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3157
3158 * target.h (struct target_ops): Add btrace ops.
3159 (target_supports_btrace): New macro.
3160 (target_enable_btrace): New macro.
3161 (target_disable_btrace): New macro.
3162 (target_read_btrace): New macro.
3163 * gdbthread.h (struct thread_info): Add btrace field.
3164 * server.c: Include btrace-common.h.
3165 (handle_btrace_general_set): New function.
3166 (handle_btrace_enable): New function.
3167 (handle_btrace_disable): New function.
3168 (handle_general_set): Call handle_btrace_general_set.
3169 (handle_qxfer_btrace): New function.
3170 (struct qxfer qxfer_packets[]): Add btrace entry.
3171 * inferiors.c (remove_thread): Disable btrace.
3172 * linux-low: Include linux-btrace.h.
3173 (linux_low_enable_btrace): New function.
3174 (linux_low_read_btrace): New function.
3175 (linux_target_ops): Add btrace ops.
3176 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3177 Add srv_linux_btrace=yes.
3178 (x86_64-*-linux*): Add linux-btrace.o.
3179 Add srv_linux_btrace=yes.
3180 * configure.ac: Define HAVE_LINUX_BTRACE.
3181 * config.in: Regenerated.
3182 * configure: Regenerated.
3183
5cc22e4c
MM
31842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3185
3186 * server.c (handle_qxfer): Preserve error message if -3 is
3187 returned.
3188 (qxfer): Document the -3 return value.
3189
7c97f91e
MM
31902013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3191
3192 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3193 (linux_btrace_h): New variable.
3194 (linux-btrace.o): New rule.
3195
be9a119c 31962013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3197 Hafiz Abid Qadeer <abidh@codesourcery.com>
3198
3199 * tracepoint.c (trace_buffer_size): New global.
3200 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3201 (init_trace_buffer): Change to one-argument function. Allocate
3202 trace buffer memory.
3203 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3204 handle QTBuffer:size packet.
3205 (cmd_bigqtbuffer_size): New function.
3206 (initialize_tracepoint): Call init_trace_buffer with
3207 DEFAULT_TRACE_BUFFER_SIZE.
3208 * server.c (handle_query): Add QTBuffer:size in the
3209 supported packets.
3210
e64f7499
YQ
32112013-03-07 Yao Qi <yao@codesourcery.com>
3212
3213 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3214 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3215 of -1.
3216 (cmd_qtsp): Adjust condition. Do post increment.
3217 Set cur_action and cur_step_action back to 0.
3218
f0ae6fc3
PA
32192013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3220
3221 PR server/15236
3222 * linux-low.c (linux_write_memory): Return early success if LEN is
3223 zero.
3224
b5b0b0af
CV
32252013-03-05 Corinna Vinschen <vinschen@redhat.de>
3226
334ad4a8 3227 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3228
589bc927
TT
32292013-02-28 Tom Tromey <tromey@redhat.com>
3230
3231 * configure.ac: Invoke AC_SYS_LARGEFILE.
3232 * configure, config.in: Rebuild.
3233
dfe07582
CV
32342013-02-28 Corinna Vinschen <vinschen@redhat.com>
3235
3236 * win32-low.c: Throughout, fix format strings and casts of
3237 printf-like functions to avoid type related warnings on all
3238 platforms.
3239 (get_child_debug_event): Print dwDebugEventCode as hex since
3240 that's how it's usually documented.
3241
736cd585
YQ
32422013-02-28 Yao Qi <yao@codesourcery.com>
3243
3244 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3245 pulongest.
3246
e1f58301
JW
32472013-02-27 Jiong Wang <jiwang@tilera.com>
3248
3249 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3250 (reg-tilegx32.c): New rule.
3251 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3252 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3253 different register info initializer according to elf class.
3254 (init_registers_tilgx32): New function. The tilegx32 register info
3255 initializer.
3256 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3257 (tile_store_gregset): Likewise.
3258
d171ca78
YQ
32592013-02-27 Yao Qi <yao@codesourcery.com>
3260
3261 * server.c (process_point_options): Print debug message when
3262 debug_threads is true.
3263
282bbdf3
YQ
32642013-02-26 Yao Qi <yao@codesourcery.com>
3265
3266 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3267
aca22551
PA
32682013-02-19 Pedro Alves <palves@redhat.com>
3269 Kai Tietz <ktietz@redhat.com>
3270
3271 PR gdb/15161
3272
3273 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3274 instead of strtoul to extract address from packet.
3275 (process_serial_event) <'z'>: Likewise.
3276
4f3cee1c
YQ
32772013-02-18 Yao Qi <yao@codesourcery.com>
3278
3279 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3280
8e1d55a3
PA
32812013-02-14 Pedro Alves <palves@redhat.com>
3282
3283 Plug memory leak.
3284
3285 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3286 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3287
458820da
PA
32882013-02-14 Pedro Alves <palves@redhat.com>
3289
3290 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3291
baea0dae
PA
32922013-02-14 Pedro Alves <palves@redhat.com>
3293
3294 * tracepoint.c (save_string): Delete.
3295 (add_tracepoint_action): Use savestring instead of save_string.
3296
0b1afbb3
PA
32972013-02-12 Pedro Alves <palves@redhat.com>
3298
3299 * linux-xtensa-low.c: Ditto.
3300 * xtensa-xtregs.c: Ditto.
3301
8a4ac37e
PA
33022013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3303
3304 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3305 thread_db.
3306
148de6bb
MS
33072013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3308
3309 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3310 aarch64_num_wp_regs and aarch64_num_bp_regs to
3311 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3312
55fac6e0
MS
33132013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3314
3315 * linux-aarch64-low.c (ps_get_thread_area): Replace
3316 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3317
176eb98c
MS
33182013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3319 Marcus Shawcroft <marcus.shawcroft@arm.com>
3320 Nigel Stephens <nigel.stephens@arm.com>
3321 Yufeng Zhang <yufeng.zhang@arm.com>
3322
3323 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3324 (aarch64.c, aarch64-without-fpu.c): New targets.
3325 * configure.srv (aarch64*-*-linux*): New.
3326 * linux-aarch64-low.c: New file.
3327
56f7af9c
MS
33282013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3329
43aaf8b6 3330 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3331 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3332 (dequeue_one_deferred_signal, linux_resume_one_thread)
3333 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3334 (linux_tracefork_grandchild, linux_test_for_tracefork)
3335 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3336 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3337 where the argument is 0.
3338
60f662b0
YQ
33392013-01-25 Yao Qi <yao@codesourcery.com>
3340
3341 * event-loop.c: Include "queue.h".
3342 (gdb_event_p): New typedef.
3343 (struct gdb_event) <next_event>: Remove.
3344 (event_queue): Change to QUEUE(gdb_event_p).
3345 (async_queue_event): Remove.
3346 (gdb_event_xfree): New.
3347 (initialize_event_loop): New.
3348 (process_event): Use API from QUEUE.
3349 (wait_for_event): Likewise.
3350 * server.c (main): Call initialize_event_loop.
3351 * server.h (initialize_event_loop): Declare.
3352
5ae4861a
YQ
33532013-01-18 Yao Qi <yao@codesourcery.com>
3354
3355 * ax.h (struct eval_agent_expr_context): New.
3356 (gdb_eval_agent_expr): Update declaration.
3357 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3358 TFRAME. Add new argument CTX.
3359 * server.h (struct eval_agent_expr_context): Declare.
3360 (agent_mem_read, agent_tsv_read): Update declaration.
3361 (agent_mem_read_string): Likewise.
3362 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3363 (add_traceframe_block): Add new argument TPOINT.
3364 Increase TPOINT->traceframe_usage.
3365 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3366 eval_tracepoint_agent_expr.
3367 (condition_true_at_tracepoint): Likewise.
3368 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3369 (agent_mem_read_string, agent_tsv_read): Likewise.
3370
85e00e85
YQ
33712013-01-16 Yao Qi <yao@codesourcery.com>
3372
3373 * linux-low.c (linux_resume_one_lwp): Don't check
3374 'lwp->bp_reinsert != 0'.
3375
4039cf45
JB
33762013-01-07 Joel Brobecker <brobecker@adacore.com>
3377 Pedro Alves <palves@redhat.com>
3378
3379 * lynx-low.c (ptrace_request_to_str): Define a temporary
3380 macro and use it to simplify this function's implementation.
3381
9044dee2
JB
33822013-01-07 Joel Brobecker <brobecker@adacore.com>
3383
3384 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3385 sets errno.
3386
e6352c8f
JB
33872013-01-07 Joel Brobecker <brobecker@adacore.com>
3388
3389 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3390
50681a27
JB
33912013-01-07 Joel Brobecker <brobecker@adacore.com>
3392
3393 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3394
3f6e77ef
JB
33952013-01-07 Joel Brobecker <brobecker@adacore.com>
3396
3397 * lynx-low.c (lynx_resume): Use the resume_info parameter
3398 to determine the ptid for the lynx_ptrace call, unless
3399 it is equal to minus_one_ptid, in which case we use the
3400 ptid of the current_inferior.
3401 (lynx_wait_1): After having received a thread create/exit
3402 event, resume the inferior's execution using the signaling
3403 thread's ptid, rather than the old ptid.
3404
7fda33ae
JB
34052013-01-07 Joel Brobecker <brobecker@adacore.com>
3406
3407 * lynx-low.c (lynx_resume): Delete variable ret.
3408
b9786c74
JB
34092013-01-01 Joel Brobecker <brobecker@adacore.com>
3410
3411 * gdbreplay.c (gdbreplay_version): Update copyright year.
3412 * server.c (gdbserver_version): Likewise.
3413
8b93d60f
JB
34142012-12-17 Joel Brobecker <brobecker@adacore.com>
3415
3416 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3417 new thread.
3418
037335a7
JB
34192012-12-17 Joel Brobecker <brobecker@adacore.com>
3420
3421 * lynx-low.c (ptrace_request_to_str): Add handling for
3422 PTRACE_GETTRACESIG.
3423
52d4cbd8
JB
34242012-12-17 Joel Brobecker <brobecker@adacore.com>
3425
3426 * lynx-low.c (lynx_attach): Delete variable new_process.
3427
ab8f6ca9
JB
34282012-12-17 Joel Brobecker <brobecker@adacore.com>
3429
3430 * lynx-low.c (lynx_create_inferior): Delete variable
3431 new_process.
3432
78cbc024
JB
34332012-12-17 Joel Brobecker <brobecker@adacore.com>
3434
3435 * lynx-low.c (ptrace_request_to_str): Do not handle
3436 PTRACE_GETTHREADLIST if this macro does not exist.
3437
14a00470
YQ
34382012-12-15 Yao Qi <yao@codesourcery.com>
3439
3440 * Makefile.in (OBS): Add notif.o.
3441 * notif.c, notif.h: New.
3442 * server.c: Include "notif.h".
3443 (struct vstop_notif) <next>: Remove.
3444 <base>: New field.
3445 (queue_stop_reply): Update.
3446 (push_event, send_next_stop_reply): Remove.
3447 (discard_queued_stop_replies): Update.
3448 (notif_stop): New variable.
3449 (handle_v_stopped): Remove.
3450 (handle_v_requests): Don't call handle_v_stopped. Call
3451 handle_ack_notif instead.
3452 (queue_stop_reply_callback): Call notif_event_enque instead
3453 of queue_stop_reply.
3454 (handle_status): Don't call send_next_stop_reply, call
3455 notif_write_event instead.
3456 (kill_inferior_callback): Likewise.
3457 (detach_or_kill_inferior_callback): Likewise.
3458 (main): Call initialize_notif.
3459 (process_serial_event): Call QUEUE_is_empty.
3460 (handle_target_event): Call notif_push instead of push event.
3461 * server.h (push_event): Remove declaration.
3462
61c125b9
TT
34632012-12-10 Tom Tromey <tromey@redhat.com>
3464
3465 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3466 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3467 macros.
3468 (.c.o): Rewrite.
3469 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3470 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3471 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3472 (amd64-linux-ipa.o, ax.o): Rewrite.
3473 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3474 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3475 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3476 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3477 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3478 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3479 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3480 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3481 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3482 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3483 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3484 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3485 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3486 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3487 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3488 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3489 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3490 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3491 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3492 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3493 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3494 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3495 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3496 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3497 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3498 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3499 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3500 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3501 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3502 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3503 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3504 (reg-tilegx.o): Remove.
3505 (all_object_files): New macro.
3506 Include .deps files.
3507 * aclocal.m4, configure: Rebuild.
3508 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3509 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3510 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3511
e90e9ad9
TT
35122012-12-05 Tom Tromey <tromey@redhat.com>
3513
3514 PR gdb/14917:
3515 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3516
02d403bf 35172012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3518
3519 * configure.ac: Check for linux/perf_event.h.
3520 * config.in: Regenerated.
3521 * configure: Regenerated.
3522
0270a750
PA
35232012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3524
3525 * hostio.c (handle_readlink): Decrease buffer size
3526 parameter passed to readlink by one byte.
3527
8c29b58e
YQ
35282012-11-26 Yao Qi <yao@codesourcery.com>
3529
3530 * configure.ac (build_warnings): Append '-Wempty-body'.
3531 * configure: Regenerated.
3532 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3533 body.
3534
8bdce1ff
PM
35352012-11-15 Pierre Muller <muller@sourceware.org>
3536
3537 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3538 * config.in: Regenerate.
3539 * configure: Regenerate.
3540 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3541 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3542 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3543 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3544 header.
3545 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3546 instead of <sys/wait.h> header.
3547 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3548
02d403bf 35492012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3550
3551 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3552 (various make rules): Remove -DGDBSERVER
3553
fbd5db48
YQ
35542012-11-09 Yao Qi <yao@codesourcery.com>
3555
3556 * spu-low.c (current_ptid): Move it to ..
3557 * gdbthread.h: ... here. New.
3558 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3559 * server.c (myresume, process_serial_event): Likewise.
3560 * thread-db.c (thread_db_find_new_threads): Likewise.
3561 * tracepoint.c (run_inferior_command): Likewise.
3562
b3dc46ff
AB
35632012-10-01 Andrew Burgess <aburgess@broadcom.com>
3564
3565 * server.c (handle_search_memory_1): Include access length in
3566 warning message.
3567
07c04788
HPN
35682012-09-05 Michael Brandt <michael.brandt@axis.com>
3569
3570 * linux-crisv32-low.c: Fix compile errors.
3571
918d227b
YQ
35722012-09-04 Yao Qi <yao@codesourcery.com>
3573
3574 * tracepoint.c (cmd_qtsv): Adjust debug message.
3575 Don't check CUR_TPOINT.
3576
18c1b81a
YQ
35772012-08-28 Yao Qi <yao@codesourcery.com>
3578
3579 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3580 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3581 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3582 Remove declarations of xmalloc, xreallloc, xstrdup and
3583 freeargv.
3584 * Makefile.in (libiberty_h): New.
3585 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3586 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3587
dc82f37b
YQ
35882012-08-23 Yao Qi <yao@codesourcery.com>
3589
3590 * server.h: Remove declaration of 'xsnprintf'.
3591
406b1477
KS
35922012-08-22 Keith Seitz <keiths@redhat.com>
3593
3594 * server.h: Include build-gnulib-gbserver/config.h.
3595 * gdbreplay.c: Likewise.
3596
e6712ff1
DE
35972012-08-08 Doug Evans <dje@google.com>
3598
3599 * Makefile.in (SFILES): Add gdb_vecs.c.
3600 (OBS): Add gdb_vecs.o.
3601 (gdb_vecs_h, host_defs_h): New variables.
3602 (thread-db.o): Add $(gdb_vecs_h) dependency.
3603 (gdb_vecs.o): New rule.
3604 * thread-db.c: #include "gdb_vecs.h".
3605 (thread_db_load_search): Use a vector to iterate over path elements.
3606 Handle text appearing after "$pdir".
3607
3608 * configure.ac: Add check for strstr.
3609 * config.in: Regenerate.
3610 * configure: Regenerate.
3611
7c3270ae
UW
36122012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3613
3614 * hostio.c (handle_pread): If pread fails, fall back to attempting
3615 lseek/read.
3616 (handle_pwrite): Likewise for pwrite.
3617
b62e2b27
UW
36182012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3619
3620 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3621 between unsupported TYPE and unimplementable ADDR/LEN combination.
3622 (arm_insert_point): Act on new return value.
3623
78a99e91
PA
36242012-07-31 Pedro Alves <palves@redhat.com>
3625
3626 * server.c (process_point_options): Only skip tokens if we find
3627 one that is unrecognized. Don't treat 'X' specially while
3628 skipping unrecognized tokens.
3629
fcf303ab
UW
36302012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3631
3632 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3633 to 4-byte-align HW breakpoint addresses for Thumb.
3634
7255706c
YQ
36352012-07-27 Yao Qi <yao@codesourcery.com>
3636
3637 PR remote/14161.
3638
3639 * server.h: Declare gdb_agent_about_to_close.
3640 * target.c (kill_inferior): Include "agent.h".
3641 New. Send command 'kill'.
3642 * target.h (kill_inferior): Removed macro.
3643 * tracepoint.c (gdb_agent_about_to_close): New.
3644 (gdb_agent_helper_thread): Handle command 'close'.
3645 Wait endlessly until the inferior stops.
3646 Install gdb_agent_remove_socket to atexit hook.
3647 (agent_socket_name): New static variable.
3648 (gdb_agent_socket_init): Replace local variable 'name' with
3649 'agent_socket_name'.
3650 (gdb_agent_remove_socket): New.
3651
5a3f286f
YQ
36522012-07-27 Yao Qi <yao@codesourcery.com>
3653
3654 * server.c (process_point_options): Stop at 'X' when parsing.
3655
961bd387
ME
36562012-07-19 Michael Eager <eager@eagercon.com>
3657
a261b8f5 3658 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3659 to hw_execute.
3660 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3661 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3662 hardware breakpoint.
3663
aa7c7447
JK
36642012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3665
3666 * gdbserver/linux-low.c (initialize_low): Call
3667 linux_ptrace_init_warnings.
3668
7f216e7c
DE
36692012-07-02 Doug Evans <dje@google.com>
3670
3671 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3672 pointer to int.
3673
d3ce09f5
SS
36742012-07-02 Stan Shebs <stan@codesourcery.com>
3675
3676 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3677 (ax.o): Add it to build rule.
3678 (ax-ipa.o): Ditto.
3679 (OBS): Add format.o.
3680 (IPA_OBS): Add format.o.
3681 * server.c (handle_query): Claim support for breakpoint commands.
3682 (process_point_options): Add command case.
3683 (process_serial_event): Leave running if there are printfs in
3684 effect.
3685 * mem-break.h (any_persistent_commands): Declare.
3686 (add_breakpoint_commands): Declare.
3687 (gdb_no_commands_at_breakpoint): Declare.
3688 (run_breakpoint_commands): Declare.
3689 * mem-break.c (struct point_command_list): New struct.
3690 (struct breakpoint): New field command_list.
3691 (any_persistent_commands): New function.
3692 (add_commands_to_breakpoint): New function.
3693 (add_breakpoint_commands): New function.
3694 (gdb_no_commands_at_breakpoint): New function.
3695 (run_breakpoint_commands): New function.
3696 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3697 locally.
3698 * ax.c: Include format.h.
3699 (ax_printf): New function.
3700 (gdb_eval_agent_expr): Add printf opcode.
3701
2f8f6aed
YQ
37022012-06-13 Yao Qi <yao@codesourcery.com>
3703
3704 * server.c (start_inferior): Remove duplicated writes to fields
3705 'last_resume_kind' and 'last_status' of 'current_inferior'.
3706
0c9070b3
YQ
37072012-06-12 Yao Qi <yao@codesourcery.com>
3708 Pedro Alves <palves@redhat.com>
3709
3710 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3711 comment.
3712 * server.c (handle_v_cont): Extend comment.
3713
c52daf70
YQ
37142012-06-11 Yao Qi <yao@codesourcery.com>
3715
3716 * linux-low.c (linux_attach): Add 'static'.
3717
d38bbb0a
YQ
37182012-06-06 Yao Qi <yao@codesourcery.com>
3719
3720 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3721
89dc0afd
JK
37222012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3723
3724 Fix gcc -flto compilation warning.
3725 * server.c (main): Make variable multi_mode and attach volatile.
3726
75f62ce7
TJB
37272012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3728
3729 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3730 if the platform doesn't know about it.
3731
65f479b6
PA
37322012-05-30 Jeff Kenton <jkenton@tilera.com>
3733
3734 * Makefile.in (SFILES): Add linux-tile-low.c.
3735 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3736 * configure.srv: Handle tilegx-*-linux*.
3737 * linux-tile-low.c: New file.
3738
0c5bf5a9
JK
37392012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3740
3741 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3742
a493e3e2
PA
37432012-05-24 Pedro Alves <palves@redhat.com>
3744
3745 PR gdb/7205
3746
43aaf8b6 3747 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3748
2ea28649
PA
37492012-05-24 Pedro Alves <palves@redhat.com>
3750
3751 PR gdb/7205
3752
3753 Replace target_signal with gdb_signal throughout.
3754
8d409d16
MR
37552012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3756
3757 * linux-low.c (linux_store_registers): Avoid the copying sequence
3758 when no data has been retrieved by ptrace.
3759
23512c01
MGD
37602012-05-22 Will Deacon <will.deacon@arm.com>
3761
3762 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3763 Include asm/ptrace.h.
3764 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3765 already defined.
3766
4934b29e
MR
37672012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3768
3769 * linux-low.c (linux_store_registers): Don't re-retrieve data
3770 with ptrace that has already been obtained from /proc. Always
3771 copy any data retrieved with ptrace to the buffer supplied.
3772
bde24c0a
PA
37732012-05-11 Yao Qi <yao@codesourcery.com>
3774 Pedro Alves <palves@redhat.com>
3775
3776 * linux-low.c (enum stopping_threads_kind): New.
3777 (stopping_threads): Change type to `enum stopping_threads_kind'.
3778 (handle_extended_wait): If stopping and suspending threads, leave
3779 the new_lwp suspended too.
3780 (linux_wait_for_event): Adjust.
3781 (stop_all_lwps): Set `stopping_threads' to
3782 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3783 whether we're suspending threads or just stopping them. Assert no
3784 recursion happens.
3785
623b6bdf
YQ
37862012-04-29 Yao Qi <yao@codesourcery.com>
3787
3788 * server.h: Move some code to ...
3789 * gdbthread.h: ... here. New.
3790 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3791 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3792 (nto-low.o, win32-low.o): Likewise.
3793 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3794 * regcache.c, remote-utils.c, server.c: Likewise.
3795 * target.c, tracepoint.c, win32-low.c: Likewise.
3796
f15f9948
TJB
37972012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3798
3799 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3800 (PTRACE_ARG4_TYPE): Likewise.
3801 (PTRACE_XFER_TYPE): Likewise.
3802 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3803 ptrace to PTRACE_ARG3_TYPE.
3804 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3805 (PTRACE_ARG4_TYPE): Likewise.
3806 (PTRACE_XFER_TYPE): Likewise.
3807 (linux_detach_one_lwp): Cast fourth argument of
3808 ptrace to long then PTRACE_ARG4_TYPE.
3809 (regsets_fetch_inferior_registers): Cast third argument of
3810 ptrace to long then PTRACE_ARG3_TYPE.
3811 (regsets_store_inferior_registers): Likewise.
3812
38ea300a
PA
38132012-04-20 Pedro Alves <palves@redhat.com>
3814
3815 * configure: Regenerate.
3816
c971b7fa
PA
38172012-04-19 Pedro Alves <palves@redhat.com>
3818
43aaf8b6 3819 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3820 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3821 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3822 (all, install-only, uninstall, clean-info, all-lib, clean): No
3823 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3824 (maintainer-clean realclean distclean): Use subdir_do.
3825 (subdir_do): New.
3826 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3827 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3828 * acinclude.m4: Include acx_configure_dir.m4.
3829 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3830 calls. Call AC_PROG_RANLIB. Configure gnulib using
3831 ACX_CONFIGURE_DIR.
3832 (GNULIB): New.
3833 (GNULIB_STDINT_H): Adjust.
3834 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3835 * gdbreplay.c: Include build-gnulib/config.h.
3836 * server.h: Likewise.
3837 * aclocal.m4: Regenerate.
3838 * config.in: Regenerate.
3839 * configure: Regenerate.
c971b7fa 3840
809277f8
PA
38412012-04-19 Pedro Alves <palves@redhat.com>
3842
3843 * Makefile.in (LIBGNU, INCGNU): Adjust.
3844 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3845 (all, install-only, uninstall, clean-info, all-lib, clean)
3846 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3847 * configure.ac: Adjust AC_OUTPUT output.
3848 * aclocal.m4: Regenerate.
3849 * configure: Regenerate.
3850
fd9bb8b8
PA
38512012-04-19 Pedro Alves <palves@redhat.com>
3852
3853 * Makefile.in (generated_files): New.
3854 (server_h): Remove the explicit dependency on config.h, and depend
3855 on $generated_files.
3856
1c298c66
PA
38572012-04-19 Pedro Alves <palves@redhat.com>
3858
3859 * Makefile.in (INCGNU): Add -Ignulib.
3860
57c4b50b
PA
38612012-04-19 Pedro Alves <palves@redhat.com>
3862
3863 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3864 (INCGNU): ... this, and spell out -I here.
3865 (GNULIB_LIB): Rename to ...
3866 (LIBGNU): ... this.
3867 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3868
1030e047
PA
38692012-04-19 Pedro Alves <palves@redhat.com>
3870
3871 * config.in: Regenerate.
3872
447d4319
PA
38732012-04-19 Pedro Alves <palves@redhat.com>
3874
3875 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3876 * server.h (memmem): Remove declaration.
3877 * config.in: Regenerate.
3878 * configure: Regenerate.
3879
aad9eab9
YQ
38802012-04-19 Yao Qi <yao@codesourcery.com>
3881
3882 * Makefile.in (SFILES): Add common/vec.c.
3883 (OBS): Add vec.o.
3884 (vec.o): New rule.
3885
3e10640f
YQ
38862012-04-19 Yao Qi <yao@codesourcery.com>
3887
3888 * remote-utils.c (prepare_resume_reply): Replace with macro
3889 target_core_of_thread.
3890 * server.c (handle_qxfer_threads_proper): Likewise.
3891 * target.h (traget_core_of_thread): New macro.
3892
71622373
PA
38932012-04-18 Pedro Alves <palves@redhat.com>
3894
3895 * aclocal.m4: Regenerate.
3896 * configure: Regenerate.
3897
80d26939
YQ
38982012-04-16 Yao Qi <yao@codesourcery.com>
3899
3900 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3901 duplicated on address.
3902
42476b70
YQ
39032012-04-16 Yao Qi <yao@codesourcery.com>
3904
3905 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3906 (struct tracepoint_action_ops) <send>: New field.
3907 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3908 (agent_expr_send, x_tracepoint_action_send): New.
3909 (l_tracepoint_action_send): New.
3910 (cmd_qtdp): Download and install tracepoint
3911 according to `use_agent'.
3912 (run_inferior_command): Add one more parameter `len'.
3913 Update callers.
3914 (tracepoint_send_agent): New.
3915 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3916
7bc83639
YQ
39172012-04-16 Yao Qi <yao@codesourcery.com>
3918
3919 * tracepoint.c (download_tracepoints): Moved to ...
3920 (cmd_qtstart): ... here.
3921
5f18041e
YQ
39222012-04-14 Yao Qi <yao@codesourcery.com>
3923
3924 * tracepoint.c: Include inttypes.h.
3925 (struct collect_memory_action): Use sized types.
3926 (struct tracepoint): Likewise.
3927 (cmd_qtdp, stop_tracing): Update print specifiers.
3928 (cmd_qtp, response_tracepoint): Likewise.
3929 (collect_data_at_tracepoint): Likewise.
3930 (collect_data_at_step): Likewise.
3931
55a8c076
YQ
39322012-04-14 Yao Qi <yao@codesourcery.com>
3933
3934 Import gnulib module inttypes.
3935 * aclocal.m4, config.in, configure: Regenerated.
3936
dc750257
YQ
39372012-04-14 Yao Qi <yao@codesourcery.com>
3938
3939 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3940 Makefile and config.status at last.
3941
0ab5faf9
YQ
39422012-04-13 Yao Qi <yao@codesourcery.com>
3943
3944 * tracepoint.c: Include stdint.h unconditionally.
3945
18f5fd81
TJB
39462012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3947
3948 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3949 on BFD_HAVE_SYS_PROCFS_TYPE.
3950 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3951 * configure: Regenerate.
3952 * config.in: Likewise.
3953
4d47af5c
L
39542012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3955
3956 * Makefile.in (clean): Also remove x32.c x32-linux.c
3957 x32-avx.c x32-avx-linux.c.
3958 (x32.o): New target.
3959 (x32.c): Likewise.
3960 (x32-linux.o): Likewise.
3961 (x32-linux.c): Likewise.
3962 (x32-avx.o): Likewise.
3963 (x32-avx.c): Likewise.
3964 (x32-avx-linux.o): Likewise.
3965 (x32-avx-linux.c): Likewise.
3966
3967 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3968 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3969 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3970 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3971 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3972 i386/x32-avx-linux.xml.
3973
3974 * linux-x86-low.c (init_registers_x32_linux): New prototype.
3975 (init_registers_x32_avx_linux): Likwise.
3976 (x86_linux_update_xmltarget): Call init_registers_x32_linux
3977 or init_registers_x32_avx_linux if linux_is_elf64 is false.
3978
ecedbe58
PA
39792012-04-13 Pedro Alves <palves@redhat.com>
3980
3981 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3982 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3983 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3984 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3985 the sub-make.
3986
c92b5177
L
39872012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3988
3989 * linux-x86-low.c (compat_x32_clock_t): New.
3990 (compat_x32_siginfo_t): Likewise.
3991 (compat_x32_siginfo_from_siginfo): Likewise.
3992 (siginfo_from_compat_x32_siginfo): Likewise.
3993 (linux_is_elf64): Likewise.
3994 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3995 and siginfo_from_compat_x32_siginfo for x32.
3996 (x86_arch_setup): Set linux_is_elf64.
3997
214d508e
L
39982012-04-12 H.J. Lu <hongjiu.lu@intel.com>
3999
4000 PR gdb/13969
4001 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4002 e_machine field.
4003 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4004 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4005 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4006 compatible with process.
4007
c9a1864a
YQ
40082012-04-12 Yao Qi <yao@codesourcery.com>
4009
4010 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4011 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4012 (install-only, install-info, clean): Handle sub dir gnulib.
4013 (all-lib, am--refresh): New targets.
4014 (memmem.o): Remove target.
4015 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4016 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4017 (AC_REPLACE_FUNCS): Remove memmem.
4018 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4019 (AC_OUTPUT): Generate Makefile in gnulib/.
4020 * aclocal.m4, config.in, configure: Regenerated.
4021
367ba2c2
MR
40222012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4023
4024 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4025
9d236627
PA
40262012-04-05 Pedro Alves <palves@redhat.com>
4027
4028 -Werror=strict-aliasing
4029
4030 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4031 pointer.
4032
111217b3
PA
40332012-04-04 Pedro Alves <palves@redhat.com>
4034
4035 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4036 (sparc_store_gregset_from_stack, sparc_store_gregset)
4037 (sparc_breakpoint_at): Fix formatting.
4038
8365dcf5
TJB
40392012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4040
4041 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4042 are available.
4043 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4044 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4045 * config.in: Regenerate.
4046 * configure: Likewise.
4047
689cc2ae
PA
40482012-03-29 Pedro Alves <palves@redhat.com>
4049
4050 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4051 Correct ptrace arguments.
4052
c14dfd32
PA
40532012-03-28 Pedro Alves <palves@redhat.com>
4054
4055 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4056 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4057 (IA64_FR1_REGNUM): New defines.
4058 (ia64_fetch_register): New.
4059 (the_low_target): Install it.
4060 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4061 field.
4062 * linux-low.c (linux_fetch_registers): Try the
4063 the_low_target.fetch_register hook first.
4064
4065 * linux-arm-low.c (the_low_target): Adjust.
4066 * linux-bfin-low.c (the_low_target): Adjust.
4067 * linux-cris-low.c (the_low_target): Adjust.
4068 * linux-crisv32-low.c (the_low_target): Adjust.
4069 * linux-m32r-low.c (the_low_target): Adjust.
4070 * linux-m68k-low.c (the_low_target): Adjust.
4071 * linux-mips-low.c (the_low_target): Adjust.
4072 * linux-ppc-low.c (the_low_target): Adjust.
4073 * linux-s390-low.c (the_low_target): Adjust.
4074 * linux-sh-low.c (the_low_target): Adjust.
4075 * linux-sparc-low.c (the_low_target): Adjust.
4076 * linux-tic6x-low.c (the_low_target): Adjust.
4077 * linux-x86-low.c (the_low_target): Adjust.
4078 * linux-xtensa-low.c (the_low_target): Adjust.
4079
63c88e13
PA
40802012-03-26 Pedro Alves <palves@redhat.com>
4081
4082 * server.c (handle_qxfer_libraries): Don't bail early if
4083 the_target->qxfer_libraries_svr4 is not NULL.
4084
fb723180
PA
40852012-03-26 Pedro Alves <palves@redhat.com>
4086
4087 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4088
0afae3cf
PA
40892012-03-23 Pedro Alves <palves@redhat.com>
4090
4091 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4092 "library-list-svr4" element's start tag when the the DSO list is
4093 empty.
4094
485f1ee4
PA
40952012-03-23 Pedro Alves <palves@redhat.com>
4096
4097 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4098 a variable whose type size is the same as the inferior's pointer
4099 size.
4100
a5362b9a
TS
41012012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4102
4103 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4104 struct siginfo.
4105 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4106 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4107 * linux-low.h: Include <signal.h>.
4108 (struct siginfo): Remove forward declaration.
4109 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4110 struct siginfo.
4111
d226c142
MF
41122012-03-21 Mike Frysinger <vapier@gentoo.org>
4113
4114 * .gitignore: Ignore more files.
4115
122f36ef
PA
41162012-03-19 Pedro Alves <palves@redhat.com>
4117 Jan Kratochvil <jan.kratochvil@redhat.com>
4118
4119 * server.c (cont_thread, general_thread): Add describing comments.
4120 (start_inferior): Clear `cont_thread'.
4121 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4122 of a process.
4123
fc3e5175
YQ
41242012-03-15 Yao Qi <yao@codesourcery.com>
4125
4126 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4127 handling to ...
4128 (cmd_qtdp): ... here.
4129
8d0d92cd
YQ
41302012-03-15 Yao Qi <yao@codesourcery.com>
4131
4132 * tracepoint.c (struct tracepoint_action_ops): New.
4133 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4134 (m_tracepoint_action_download): New.
4135 (r_tracepoint_action_download): New.
4136 (x_tracepoint_action_download): New.
4137 (l_tracepoint_action_download): New.
4138 (add_tracepoint_action): Install `action->ops' according type.
4139 (download_tracepoint_1): Move code `download' function pointer
4140 of various tracepoint_action_ops.
4141
87b0bb13
JK
41422012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4143
4144 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4145 linux_ptrace_attach_warnings.
4146
5f572dec
JK
41472012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4148
4149 * Makefile.in (linux-ptrace.o): New.
4150 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4151 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4152 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4153 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4154 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4155 of these targets.
4156 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4157
f4647387
YQ
41582012-03-08 Yao Qi <yao@codesourcery.com>
4159 Pedro Alves <palves@redhat.com>
4160
4161 Fix PR server/13392.
4162 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4163 offset of JMP insn.
4164 * tracepoint.c (remove_tracepoint): New.
4165 (cmd_qtdp): Call remove_tracepoint when failed to install.
4166
9b224c5e
PA
41672012-03-07 Pedro Alves <palves@redhat.com>
4168
4169 * linux-low.c (get_detach_signal): New.
4170 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4171 Pass on pending signals to PTRACE_DETACH. Check the result of the
4172 ptrace call.
4173 * server.c (program_signals, program_signals_p): New.
4174 (handle_general_set): Handle QProgramSignals.
4175 * server.h (program_signals, program_signals_p): Declare.
4176
e237a7e2
JK
41772012-03-05 Pedro Alves <palves@redhat.com>
4178 Jan Kratochvil <jan.kratochvil@redhat.com>
4179
4180 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4181 New comment why.
4182
5808517f
YQ
41832012-03-03 Yao Qi <yao@codesourcery.com>
4184
4185 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4186 agent_look_up_symbols.
4187
58b4daa5
YQ
41882012-03-03 Yao Qi <yao@codesourcery.com>
4189
4190 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4191 (linux-x86-low.o): Likewise.
4192 * server.h: Remove in_process_agent_loaded.
4193 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4194 common/agent.c.
4195 Update callers.
4196
8ffcbaaf
YQ
41972012-03-03 Yao Qi <yao@codesourcery.com>
4198
4199 * tracepoint.c (gdb_agent_capability): New global.
4200 (in_process_agent_loaded_ust): Renamed to
4201 `in_process_agent_supports_ust'.
4202 Update callers.
4203 (in_process_agent_supports_ust): Call agent_capability_check.
4204 (clear_installed_tracepoints): Assert that agent supports
4205 agent.
4206
d1feda86
YQ
42072012-03-03 Yao Qi <yao@codesourcery.com>
4208
4209 * linux-low.c (linux_supports_agent): New.
4210 (linux_target_ops): Initialize field `supports_agent' with
4211 linux_supports_agent.
4212 * target.h (struct target_ops) <supports_agent>: New.
4213 (target_supports_agent): New macro.
4214 * server.c (handle_general_set): Handle packet 'QAgent'.
4215 (handle_query): Send `QAgent+'.
4216 * Makefile.in (server.o): Depends on agent.h.
4217
2fa291ac
YQ
42182012-03-03 Yao Qi <yao@codesourcery.com>
4219
4220 * Makefile.in (OBS): Add agent.o.
4221 Add new rule for agent.o.
4222 Track dependence of tracepoint.c on agent.h.
4223 * tracepoint.c (run_inferior_command_1):
4224 (run_inferior_command): Call agent_run_command.
4225 (gdb_ust_connect_sync_socket): Deleted. Move it to
4226 common/agent.c.
4227 (resume_thread, stop_thread): Likewise.
4228 (gdb_ust_socket_init): Renamed to ...
4229 (gdb_agent_socket_init): ... New.
4230 (gdb_ust_thread): Renamed to ...
4231 (gdb_agent_helper_thread): ... New.
4232 (gdb_ust_init): Move some code to ...
4233 (gdb_agent_init): ... here. New.
4234 [HAVE_UST]: Call gdb_ust_init.
4235 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4236 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4237 * config.in, configure: Regenerated.
4238
05044653
PA
42392012-03-02 Pedro Alves <palves@redhat.com>
4240
4241 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4242 * linux-low.c (struct simple_pid_list): New.
4243 (stopped_pids): New a struct simple_pid_list pointer.
4244 (add_to_pid_list, pull_pid_from_list): New.
4245 (handle_extended_wait): Don't assume the first signal new children
4246 report is SIGSTOP. Adjust call to pull_pid_from_list.
4247 (linux_wait_for_lwp): Adjust.
4248
8d00225b
YQ
42492012-03-02 Yao Qi <yao@codesourcery.com>
4250
4251 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4252 debug log.
4253
19560ba5
YQ
42542012-03-02 Yao Qi <yao@codesourcery.com>
4255
4256 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4257 `stop_pc' and `tpoint'. Update caller.
4258
1faeff08
MR
42592012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4260
4261 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4262 * linux-low.c (use_linux_regsets): New macro.
4263 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4264 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4265 (linux_register_in_regsets): New function.
4266 (usr_fetch_inferior_registers): Skip registers covered by
4267 regsets.
4268 (usr_store_inferior_registers): Likewise.
4269 (usr_fetch_inferior_registers): New macro.
4270 (usr_store_inferior_registers): Likewise.
4271 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4272 (linux_store_registers): Likewise.
4273 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4274 prototype.
4275 (init_registers_mips64_dsp_linux): Likewise.
4276 (init_registers_mips_linux): New macro.
4277 (init_registers_mips_dsp_linux): Likewise.
4278 (mips_dsp_num_regs): Likewise.
4279 (DSP_BASE, DSP_CONTROL): New fallback macros.
4280 (mips_base_regs): New macro.
4281 (mips_regmap): Use it. Fix the size.
4282 (mips_dsp_regmap): New variable.
4283 (mips_dsp_regset_bitmap): Likewise.
4284 (mips_arch_setup): New function.
4285 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4286 than mips_regmap.
4287 (mips_cannot_store_register): Likewise.
4288 (the_low_target): Update .arch_setup, .num_regs and .regmap
4289 initializers. Add .regset_bitmap initializer.
4290 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4291 initializer.
4292 * linux-bfin-low.c (the_low_target): Likewise.
4293 * linux-cris-low.c (the_low_target): Likewise.
4294 * linux-crisv32-low.c (the_low_target): Likewise.
4295 * linux-ia64-low.c (the_low_target): Likewise.
4296 * linux-m32r-low.c (the_low_target): Likewise.
4297 * linux-m68k-low.c (the_low_target): Likewise.
4298 * linux-ppc-low.c (the_low_target): Likewise.
4299 * linux-s390-low.c (the_low_target): Likewise.
4300 * linux-sh-low.c (the_low_target): Likewise.
4301 * linux-sparc-low.c (the_low_target): Likewise.
4302 * linux-tic6x-low.c (the_low_target): Likewise.
4303 * linux-x86-low.c (the_low_target): Likewise.
4304 * linux-xtensa-low.c (the_low_target): Likewise.
4305 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4306 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4307 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4308 srv_xmlfiles.
4309 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4310 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4311
c03e6ccc
YQ
43122012-02-29 Yao Qi <yao@codesourcery.com>
4313 Pedro Alves <palves@redhat.com>
4314
4315 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4316 `step_over_finished' is true.
4317
644cebc9
PA
43182012-02-27 Pedro Alves <palves@redhat.com>
4319
4320 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4321 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4322
c14d7ab2
PA
43232012-02-27 Pedro Alves <palves@redhat.com>
4324
4325 PR server/9684
4326 * linux-low.c (pid_is_stopped): New.
4327 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4328
412c89dd
LM
43292012-02-25 Luis Machado <lgustavo@codesourcery.com>
4330
4331 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4332 of conditions.
4333
b745defe
MR
43342012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4335
4336 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4337
9f3a5c85
LM
43382012-02-24 Luis Machado <lgustavo@codesourcery>
4339
4340 * server.c (handle_query): Advertise support for target-side
4341 breakpoint condition evaluation.
4342 (process_point_options): New function.
4343 (process_serial_event): When inserting a breakpoint, check for
4344 a target-side condition that should be evaluated.
4345
4346 * mem-break.c: Include regcache.h and ax.h.
4347 (point_cond_list_t): New data structure.
4348 (breakpoint) <cond_list>: New field.
4349 (find_gdb_breakpoint_at): Make non-static.
4350 (delete_gdb_breakpoint_at): Clear any target-side
4351 conditions.
4352 (clear_gdb_breakpoint_conditions): New function.
4353 (add_condition_to_breakpoint): Likewise.
4354 (add_breakpoint_condition): Likewise.
4355 (gdb_condition_true_at_breakpoint): Likewise.
4356 (gdb_breakpoint_here): Return result directly instead
4357 of going through a local variable.
4358
4359 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4360 (clear_gdb_breakpoint_conditions): Likewise.
4361 (add_breakpoint_condition): Likewise.
4362 (gdb_condition_true_at_breakpoint): Likewise.
4363
4364 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4365 (need_step_over_p): Take target-side breakpoint condition into
4366 consideration.
4367
5e1dc496
LM
43682012-02-24 Luis Machado <lgustavo@codesourcery>
4369
4370 * server.h: Include tracepoint.h.
4371 (agent_mem_read, agent_get_trace_state_variable_value,
4372 agent_set_trace_state_variable_value,
4373 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4374 get_set_tsv_func_addr): New prototypes.
4375
4376 * ax.h: New include file.
4377 * ax.c: New source file.
4378
4379 * tracepoint.c: Include ax.h.
4380 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4381 agent_expr, eval_result_type): Move to ax.h.
4382 (parse_agent_expr): Rename to ...
4383 (gdb_parse_agent_expr): ... this, make it non-static and move
4384 to ax.h.
4385 (unparse_agent_expr) Rename to ...
4386 (gdb_unparse_agent_expr): ... this, make it non-static and move
4387 to ax.h.
4388 (eval_agent_expr): Rename to ...
4389 (eval_tracepoint_agent_expr): ... this.
4390 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4391 forward declarations.
4392 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4393 (agent_get_trace_state_variable_value): New function.
4394 (agent_set_trace_state_variable_value): New function.
4395 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4396 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4397 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4398 (condition_true_at_tracepoint): Likewise.
4399 (parse_agent_expr): Rename to ...
4400 (gdb_parse_agent_expr): ... this and move to ax.c.
4401 (unparse_agent_expr): Rename to ...
4402 (gdb_unparse_agent_expr): ... this and move to ax.c.
4403 (gdb_agent_op_name): Move to ax.c.
4404 (eval_agent_expr): Rename to ...
4405 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4406 and move to ax.c.
4407 (eval_tracepoint_agent_expr): New function.
4408 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4409 non-static.
5e1dc496
LM
4410 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4411 ax.c.
4412 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4413 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4414 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4415 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4416 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4417 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4418 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4419 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4420 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4421 (compile_bytecodes): Remove forward declaration.
4422 (is_goto_target): Move to ax.c.
4423 (compile_bytecodes): Move to ax.c and call
4424 agent_get_trace_state_variable_value (...) and
4425 agent_set_trace_state_variable_value (...).
4426
4427 * Makefile.in: Update ax.c and IPA dependencies.
4428
277e4e52
PA
44292012-02-24 Pedro Alves <palves@redhat.com>
4430
4431 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4432 (cmd_bigqtbuffer_circular): ... this. Only handle
4433 'QTBuffer:circular:'.
4434 (handle_tracepoint_general_set): Adjust.
4435
bf4c19f7
YQ
44362012-02-16 Yao Qi <yao@codesourcery.com>
4437
4438 * inferiors.c: Move code to ...
4439 * dll.c: .... here. New.
4440 * server.h: Declare clear_dlls.
4441 * Makefile.in (SFILES): Add dll.c.
4442 (OBS): Add dll.o
4443 (dll.o): New rule.
4444
d73f2619
YQ
44452012-02-11 Yao Qi <yao@codesourcery.com>
4446
4447 * server.c: (handle_monitor_command): Add a new parameter
4448 `own_buf'.
4449 (handle_query): Update caller.
4450
f8255c2a
JB
44512012-02-09 Joel Brobecker <brobecker@adacore.com>
4452
4453 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4454 * configure, config.in: Regenerate.
4455 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4456 is not defined.
4457
da84f473
PA
44582012-02-02 Pedro Alves <palves@redhat.com>
4459
4460 Try SIGKILL first, then PTRACE_KILL.
4461 * linux-low.c (linux_kill_one_lwp): New.
4462 (linux_kill_one_lwp): Rename to ...
4463 (kill_one_lwp_callback): ... this. Use the new
4464 linux_kill_one_lwp.
4465
e886a173
PA
44662012-02-02 Pedro Alves <palves@redhat.com>
4467
4468 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4469 inferior.
4470
be07f1a2
PA
44712012-01-27 Pedro Alves <palves@redhat.com>
4472
4473 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4474 (elf_64_file_p): Make static.
4475 (linux_pid_exe_is_elf_64_file): New.
4476 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4477 Delete declarations.
4478 (linux_pid_exe_is_elf_64_file): Declare.
4479 * linux-x86-low.c (x86_arch_setup): Use
4480 linux_pid_exe_is_elf_64_file.
4481
d8301ad1
JK
44822012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4483
4484 * linux-low.c (linux_wait_for_event_1): Rename to ...
4485 (linux_wait_for_event): ... here and merge it with former
4486 linux_wait_for_event - new variable wait_ptid, use it.
4487 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4488
01b17894
PA
44892012-01-23 Pedro Alves <palves@redhat.com>
4490
4491 * server.c (main): Avoid yet another case of infinite loop while
4492 detaching/killing after a longjmp.
4493
e825046f
JK
44942012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4495
4496 Code cleanup.
4497 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4498
b9e7b9c3
UW
44992012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4500
4501 * hostio.c (handle_readlink): New function.
4502 (handle_vFile): Call it to handle "vFile:readlink" packets.
4503
901f9912
UW
45042012-01-20 Pedro Alves <palves@redhat.com>
4505 Ulrich Weigand <ulrich.weigand@linaro.org>
4506
4507 * server.c (handle_v_requests): Only support vAttach and vRun to
4508 start multiple processes when in extended protocol mode.
4509
fc1ab1a0
PA
45102012-01-17 Pedro Alves <palves@redhat.com>
4511
4512 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4513 memalign plus mprotect to allocate the scratch buffer.
4514
7d5d4e98
PA
45152012-01-13 Pedro Alves <palves@redhat.com>
4516
4517 * server.c (attach_inferior): Clear `cont_thread'.
4518
f128d5e9
PA
45192012-01-13 Pedro Alves <palves@redhat.com>
4520
4521 * server.c (main): Avoid infinite loop while detaching/killing
4522 after a longjmp.
4523
06db92f0
DE
45242012-01-09 Doug Evans <dje@google.com>
4525
4526 * server.c (start_inferior): Set last_ptid in --wrapper case.
4527
32d92999
YQ
45282012-01-06 Yao Qi <yao@codesourcery.com>
4529
4530 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4531 defined.
4532 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4533
5e0a92a9
YQ
45342012-01-04 Yao Qi <yao@codesourcery.com>
4535
4536 * tracepoint.c (cmd_qtdp): Print debug message
4537 for static tracepoint.
4538
ae639e8c
YQ
45392012-01-04 Yao Qi <yao@codesourcery.com>
4540
4541 * tracepoint.c (trace_vdebug): Differentiate debug message
4542 between gdbserver and IPA.
4543
f72429c5
YQ
45442012-01-03 Yao Qi <yao@codesourcery.com>
4545
4546 * tracepoint.c (tracepoint_was_hit): Don't collect for
4547 static tracepoint.
4548
12c3e59c
JB
45492012-01-02 Joel Brobecker <brobecker@adacore.com>
4550
4551 * terminal.h: Reformat copyright header.
4552
67827812
JB
45532012-01-02 Joel Brobecker <brobecker@adacore.com>
4554
4555 * server.c (gdbserver_version): Update copyright year.
4556 * gdbreplay.c (gdbreplay_version): Likewise.
4557
3e52c33d
JK
45582011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4559
4560 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4561
4562 Revert:
4563 2011-12-18 Hui Zhu <teawater@gmail.com>
4564 * linux-low.c (linux_create_inferior): Save return value to ret.
4565
66f1260e
HZ
45662011-12-18 Hui Zhu <teawater@gmail.com>
4567
4568 * linux-low.c (linux_create_inferior): Save return value to ret.
4569
e77616d7
DE
45702011-12-16 Doug Evans <dje@google.com>
4571
e7b06c57
DE
4572 * linux-low.c (linux_create_inferior): If stdio connection,
4573 redirect stdin from /dev/null, stdout to stderr.
4574 * remote-utils.c (remote_is_stdio): New static global.
4575 (remote_connection_is_stdio): New function.
4576 (remote_prepare): Handle stdio connection.
4577 (remote_open): Ditto.
4578 (remote_close): Don't close stdin for stdio connections.
4579 (read_prim,write_prim): New functions. Replace all calls to
4580 read/write to these.
4581 * server.c (main): Watch for "-" argument. Move call to
4582 remote_prepare before start_inferior.
4583 * server.h (STDIO_CONNECTION_NAME): New macro.
4584 (remote_connection_is_stdio): Declare.
4585
e77616d7
DE
4586 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4587 in debugging output.
4588
82067193
YQ
45892011-12-15 Yao Qi <yao@codesourcery.com>
4590
4591 * tracepoint.c: Include sys/syscall.h.
4592 (gdb_ust_thread): Remove preprocessor conditional.
4593
82bfbe7e
PA
45942011-12-14 Pedro Alves <pedro@codesourcery.com>
4595
4596 * linux-low.c (linux_detach_one_lwp): Call
4597 the_low_target.prepare_to_resume before detaching.
4598
712c6575
YQ
45992011-12-14 Yao Qi <yao@codesourcery.com>
4600
4601 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4602 of write.
4603
d54d1edf
YQ
46042011-12-14 Yao Qi <yao@codesourcery.com>
4605
4606 * i386-low.c (i386_low_stopped_data_address): Initialize local
4607 variable `control'.
4608
6210a125
PA
46092011-12-13 Pedro Alves <pedro@codesourcery.com>
4610
4611 PR remote/13492
4612
4613 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4614 DR_CONTROL unless necessary. Extend comments.
4615 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4616 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4617
2ece8244
YQ
46182011-12-13 Yao Qi <yao@codesourcery.com>
4619
4620 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4621 macros.
4622 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4623
784867a5
JK
46242011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4625
4626 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4627 Print new debug message for such case.
4628
6bf36717
JK
46292011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4630
4631 Fix overlapping memcpy.
4632 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4633 the read_inferior_memory transfer.
4634 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4635 write_inferior_memory transfer.
4636 (set_fast_tracepoint_jump): New variable buf. Use it for the
4637 read_inferior_memory and write_inferior_memory transfers.
4638 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4639 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4640 Use it for the write_inferior_memory transfer.
4641 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4642 buffers.
4643
50275556
MR
46442011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4645
4646 * linux-low.c (fetch_register, store_register): Make code
4647 consistent, fix formatting.
4648
7325beb4
MR
46492011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4650
4651 * linux-low.c (usr_store_inferior_registers): Factor out code
4652 to handle individual registers into...
4653 (store_register): ... this new function.
4654
c642a434
UW
46552011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4656
4657 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4658 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4659 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4660 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4661 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4662 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4663 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4664 (srv_xmlfiles): Add new XML files.
4665
4666 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4667 and <sys/uio.h>.
4668 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4669 (init_registers_s390_linux32v1): Add prototype.
4670 (init_registers_s390_linux32v2): Likewise.
4671 (init_registers_s390_linux64v1): Likewise.
4672 (init_registers_s390_linux64v2): Likewise.
4673 (init_registers_s390x_linux64v1): Likewise.
4674 (init_registers_s390x_linux64v2): Likewise.
4675 (s390_num_regs): Increment to 52.
4676 (s390_regmap): Add orig_r2 register.
4677 (s390_num_regs_3264): Increment to 68.
4678 (s390_regmap_3264): Add orig_r2 register.
4679 (s390_collect_ptrace_register): Handle orig_r2 register.
4680 (s390_supply_ptrace_register): Likewise.
4681 (s390_fill_last_break): New function.
4682 (s390_store_last_break): Likewise.
4683 (s390_fill_system_call): New function.
4684 (s390_store_system_call): Likewise.
4685 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4686 register sets.
4687 (s390_check_regset): New function.
4688 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4689 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4690 Update target_regsets for available register sets.
4691
2268b414
JK
46922011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4693 Jan Kratochvil <jan.kratochvil@redhat.com>
4694
4695 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4696 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4697 New.
4698 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4699 * linux-low.h (struct process_info_private): New member r_debug.
4700 * server.c (handle_qxfer_libraries): Call
4701 the_target->qxfer_libraries_svr4.
4702 (handle_qxfer_libraries_svr4): New function.
4703 (qxfer_packets): New entry "libraries-svr4".
4704 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4705 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4706 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4707 PACKET_qXfer_libraries_svr4.
4708
d6db1fab
UW
47092011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4710
4711 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4712 PSW address/mask between 8-byte and 16-byte formats.
4713 (s390_supply_ptrace_register): Likewise.
4714 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4715 basic addressing mode bit.
4716
242f5f1c
SS
47172011-11-24 Stan Shebs <stan@codesourcery.com>
4718
4719 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4720
f196051f
SS
47212011-11-17 Stan Shebs <stan@codesourcery.com>
4722
4723 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4724 (tracing_start_time): New global.
4725 (tracing_stop_time): New global.
4726 (tracing_user_name): New global.
4727 (tracing_notes): New global.
4728 (tracing_stop_note): New global.
4729 (cmd_qtstart): Set traceframe_usage, start_time.
4730 (stop_tracing): Set stop_time.
4731 (cmd_qtstatus): Report additional status.
4732 (cmd_qtp): New function.
4733 (handle_tracepoint_query): Call it.
4734 (cmd_qtnotes): New function.
4735 (handle_tracepoint_general_set): Call it.
4736 (get_timestamp): Rename from tsv_get_timestamp.
4737
405f8e94
SS
47382011-11-14 Stan Shebs <stan@codesourcery.com>
4739 Kwok Cheung Yeung <kcy@codesourcery.com>
4740
4741 * linux-x86-low.c (small_jump_insn): New.
4742 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4743 trampoline and error message, build a trampoline and issue a small
4744 jump instruction to it.
4745 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4746 trampoline and error message.
4747 (x86_get_min_fast_tracepoint_insn_len): New.
4748 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4749 * linux-low.h (struct linux_target_ops): Add arguments to
4750 install_fast_tracepoint_jump_pad operation, add new operation.
4751 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4752 arguments.
4753 (linux_get_min_fast_tracepoint_insn_len): New function.
4754 (linux_target_op): Add new operation.
4755 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4756 (gdb_trampoline_buffer_end): Ditto.
4757 (gdb_trampoline_buffer_error): Ditto.
4758 (struct ipa_sym_addresses): Add fields for new IPA variables.
4759 (symbol_list): Add entries for new IPA variables.
4760 (struct tracepoint): Add fields to hold the address range of the
4761 trampoline used by the tracepoint.
4762 (trampoline_buffer_head): New static variable.
4763 (trampoline_buffer_tail): Ditto.
4764 (claim_trampoline_space): New function.
4765 (have_fast_tracepoint_trampoline_buffer): New function.
4766 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4767 structure.
4768 (install_fast_tracepoint): Ditto, also add error buffer argument.
4769 (cmd_qtminftpilen): New function.
4770 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4771 (fast_tracepoint_from_trampoline_address): New function.
4772 (fast_tracepoint_collecting): Handle trampoline as part of jump
4773 pad space.
4774 (set_trampoline_buffer_space): New function.
4775 (initialize_tracepoint): Initialize new IPA variables.
4776 * target.h (struct target_ops): Add arguments to
4777 install_fast_tracepoint_jump_pad operation, add new
4778 get_min_fast_tracepoint_insn_len operation.
4779 (target_get_min_fast_tracepoint_insn_len): New.
4780 (install_fast_tracepoint_jump_pad): Add arguments.
4781 * server.h (IPA_BUFSIZ): Define.
4782 * linux-i386-ipa.c: Include extra header files.
4783 (initialize_fast_tracepoint_trampoline_buffer): New function.
4784 (initialize_low_tracepoint): Call it.
4785 * server.h (set_trampoline_buffer_space): Declare.
4786 (claim_trampoline_space): Ditto.
4787 (have_fast_tracepoint_trampoline_buffer): Ditto.
4788
1e4d1764
YQ
47892011-11-14 Yao Qi <yao@codesourcery.com>
4790
4791 * server.c (handle_query): Handle InstallInTrace for qSupported.
4792 * tracepoint.c (add_tracepoint): Sort list.
4793 (install_tracepoint, download_tracepoint): New.
4794 (cmd_qtdp): Call them to install and download tracepoints.
4795 (sort_tracepoints): Removed.
4796 (cmd_qtstart): Update.
4797
5c73ff4e
YQ
47982011-11-14 Yao Qi <yao@codesourcery.com>
4799
4800 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4801 * mem-break.h: Declare.
4802 * tracepoint.c (cmd_qtstart): Move some code to ...
4803 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4804 New.
4805 (download_tracepoints): Move some code to ...
4806 (download_tracepoint_1): ... here. New.
4807
86a30030
YQ
48082011-11-08 Yao Qi <yao@codesourcery.com>
4809
4810 * remote-utils.c (relocate_instruction): A comment fix.
4811
8d26e50c
JB
48122011-11-07 Joel Brobecker <brobecker@adacore.com>
4813
4814 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4815 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4816 dr_status_mirror and dr_control_mirror from debug_reg_state.
4817 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4818 (i386_initial_stuff): Remove use of deleted globals.
4819 (i386_get_thread_context, i386_set_thread_context,
4820 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4821 from debug_reg_state.
4822
a59306a3
YQ
48232011-11-05 Yao Qi <yao@codesourcery.com>
4824
4825 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4826 address as TPOINT's.
4827
3065dfb6
SS
48282011-11-02 Stan Shebs <stan@codesourcery.com>
4829
4830 * tracepoint.c (agent_mem_read_string): New function.
4831 (eval_agent_expr): Call it for tracenz.
4832 * server.c (handle_query): Report support for tracenz.
4833
fd0d8c7c
YQ
48342011-11-02 Yao Qi <yao@codesourcery.com>
4835
4836 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4837
609086b1
YQ
48382011-11-02 Yao Qi <yao@codesourcery.com>
4839
4840 * target.h: Fix a typo in comment.
4841
b9fd1791
PA
48422011-10-31 Pedro Alves <pedro@codesourcery.com>
4843
4844 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4845 clobber the breakpoints' shadows with fast tracepoint jumps.
4846 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4847 * target.c (write_inferior_memory): Also pass MYADDR down to
4848 check_mem_write.
4849
03583c20
UW
48502011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4851
4852 * configure.ac: Check support for personality routine.
4853 * configure: Regenerate.
4854 * config.in: Likewise.
4855 * linux-low.c: Include <sys/personality.h>.
4856 Define ADDR_NO_RANDOMIZE if necessary.
4857 (linux_create_inferior): Disable address space randomization when
4858 forking inferior, if requested.
4859 (linux_supports_disable_randomization): New function.
4860 (linux_target_ops): Install it.
4861 * server.h (disable_randomization): Declare.
4862 * server.c (disable_randomization): New global variable.
4863 (handle_general_set): Handle QDisableRandomization.
4864 (handle_query): Likewise for qSupported.
4865 (main): Support --disable-randomization and --no-disable-randomization
4866 command line arguments.
4867 * target.h (struct target_ops): Add supports_disable_randomization.
4868 (target_supports_disable_randomization): New macro.
4869
723b724b
MF
48702011-09-29 Mike Frysinger <vapier@gentoo.org>
4871
4872 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4873 ifdef check.
4874 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4875 [!PT_GETDSBT] (target_loadmap): New definition.
4876 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4877 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4878 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4879 and PT_GETDSBT to LINUX_LOADMAP.
4880 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4881 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4882
55329a5c 48832011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4884
4885 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4886 (arm_linux_hwbp_cap): New static variable.
4887 (arm_linux_get_hwbp_cap): Replace by ...
4888 (arm_linux_init_hwbp_cap): ... this new function.
4889 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4890 (arm_linux_get_hw_watchpoint_count): Likewise.
4891 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4892 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4893 (arm_prepare_to_resume): Use perror_with_name instead of error.
4894
55329a5c 48952011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4896
4897 * linux-arm-low.c: Include <signal.h>.
4898 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4899 (struct arm_linux_hwbp_cap): New data type.
4900 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4901 (struct arm_linux_hw_breakpoint): New data type.
4902 (MAX_BPTS, MAX_WPTS): Define.
4903 (struct arch_process_info, struct arch_lwp_info): New data types.
4904 (arm_linux_get_hwbp_cap): New function.
4905 (arm_linux_get_hw_breakpoint_count): Likewise.
4906 (arm_linux_get_hw_watchpoint_count): Likewise.
4907 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4908 (arm_hwbp_control_initialize): Likewise.
4909 (arm_hwbp_control_is_enabled): Likewise.
4910 (arm_hwbp_control_is_initialized): Likewise.
4911 (arm_hwbp_control_disable): Likewise.
4912 (arm_linux_hw_breakpoint_equal): Likewise.
4913 (arm_linux_hw_point_initialize): Likewise.
4914 (struct update_registers_data): New data structure.
4915 (update_registers_callback: New function.
4916 (arm_insert_point): Likewise.
4917 (arm_remove_point): Likewise.
4918 (arm_stopped_by_watchpoint): Likewise.
4919 (arm_stopped_data_address): Likewise.
4920 (arm_new_process): Likewise.
4921 (arm_new_thread): Likewise.
4922 (arm_prepare_to_resume): Likewise.
4923 (the_low_target): Register arm_insert_point, arm_remove_point,
4924 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4925 arm_new_thread, and arm_prepare_to_resume.
4926
6b9801d4
SS
49272011-09-15 Stan Shebs <stan@codesourcery.com>
4928
4929 * server.h (struct emit_ops): Add compare-goto fields.
4930 * tracepoint.c (gdb_agent_op_sizes): New table.
4931 (emit_eq_goto): New function.
4932 (emit_ne_goto): New function.
4933 (emit_lt_goto): New function.
4934 (emit_le_goto): New function.
4935 (emit_gt_goto): New function.
4936 (emit_ge_goto): New function.
4937 (is_goto_target): New function.
4938 (compile_bytecodes): Recognize special cases of compare-goto
4939 combinations and call specialized emitters for them.
4940 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4941 (amd64_emit_ne_goto): New function.
4942 (amd64_emit_lt_goto): New function.
4943 (amd64_emit_le_goto): New function.
4944 (amd64_emit_gt_goto): New function.
4945 (amd64_emit_ge_goto): New function.
4946 (amd64_emit_ops): Add the new functions.
4947 (i386_emit_eq_goto): New function.
4948 (i386_emit_ne_goto): New function.
4949 (i386_emit_lt_goto): New function.
4950 (i386_emit_le_goto): New function.
4951 (i386_emit_gt_goto): New function.
4952 (i386_emit_ge_goto): New function.
4953 (i386_emit_ops): Add the new functions.
4954
bf15cbda
SS
49552011-09-08 Stan Shebs <stan@codesourcery.com>
4956
4957 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4958 (i386_emit_epilogue): Restore %ebx.
4959
943ca1dd
JZ
49602011-08-31 Jie Zhang <jzhang918@gmail.com>
4961
4962 * server.c (step_thread): Remove definition.
4963 (process_serial_event): Don't handle Hs.
4964 * server.h (step_thread): Remove declaration.
4965 * target.c (set_desired_inferior): Remove use of step_thread.
4966
e3deef73
LM
49672011-08-24 Luis Machado <lgustavo@codesourcery.com>
4968
4969 * linux-low.c: Include linux-procfs.h.
4970 (linux_attach_lwp_1): Update comments.
4971 (linux_attach): Scan for existing threads when attaching to a
4972 process that is the tgid.
4973 * Makefile.in: Update dependencies.
4974
13da1c97
LM
49752011-08-24 Luis Machado <lgustavo@codesourcery.com>
4976
4977 * configure.srv: Add linux-procfs.o dependencies.
4978
881127c9
YQ
49792011-08-14 Yao Qi <yao@codesourcery.com>
4980
4981 * target.h (struct target_ops): Fix indent.
4982 * win32-low.c (win32_target_ops): Fix comment.
4983
58dbd541
YQ
49842011-08-14 Andrew Jenner <andrew@codesourcery.com>
4985 Yao Qi <yao@codesourcery.com>
4986
4987 * Makefile.in (clean): Remove tic6x-*.c files.
4988 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4989 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4990 (tic6x-c64xp-linux.c): Likewise.
4991 * configure.srv: Add support for tic6x-*-uclinux.
4992 * linux-tic6x-low.c: New.
4993 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4994
78d85199
YQ
49952011-08-14 Andrew Stubbs <ams@codesourcery.com>
4996 Yao Qi <yao@codesourcery.com>
4997
4998 * target.h (struct target_ops): Add read_loadmap.
4999 * linux-low.c (struct target_loadseg): New type.
5000 (struct target_loadmap): New type.
5001 (linux_read_loadmap): New function.
5002 (linux_target_ops): Add linux_read_loadmap.
5003 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5004 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5005 to NULL.
78d85199 5006
a959a88d
EZ
50072011-08-05 Eli Zaretskii <eliz@gnu.org>
5008
5009 * win32-low.c: Include <stdint.h>.
5010
1ced966e
PA
50112011-07-22 Pedro Alves <pedro@codesourcery.com>
5012
5013 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5014 to the inferior here.
5015 (i386_remove_aligned_watchpoint): Ditto.
5016 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5017 fit part of the watchpoint in the debug registers.
5018 (i386_update_inferior_debug_regs): New.
5019 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5020 registers, and only update the inferior on success.
5021 (i386_low_remove_watchpoint): Ditto.
5022
d26e3629
KY
50232011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5024
5025 * linux-low.c (compare_ints, unique, list_threads, show_process,
5026 linux_core_of_thread): Delete.
5027 (linux_target_ops): Change linux_core_of_thread to
5028 linux_common_core_of_thread.
5029 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5030 * utils.c (malloc_failure): Change type of argument.
5031 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5032 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5033 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5034 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5035 (IPA_OBJS): Add common-utils-ipa.o.
5036 (ptid_h, linux_osdata_h): New macros.
5037 (server_h): Add common/common-utils.h, common/xml-utils.h,
5038 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5039 common/ptid.h.
5040 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5041 ptid.o, buffer.o): New rules.
5042 (linux-low.o): Add common/linux-osdata.h as a dependency.
5043 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5044 * configure.ac: Add AC_HEADER_DIRENT check.
5045 * config.in: Regenerate.
5046 * configure: Regenerate.
5047 * remote-utils.c (xml_escape_text): Delete.
5048 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5049 buffer_xml_printf): Move to common/buffer.c.
5050 * server.c (main): Remove call to initialize_inferiors.
5051 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5052 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5053 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5054 internal_error, gdb_assert, gdb_assert_fail): Delete.
5055 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5056 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5057 common/buffer.h.
5058 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5059 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5060 initialize_inferiors): Delete.
5061
2275a1a7
PA
50622011-07-20 Pedro Alves <pedro@codesourcery.com>
5063
5064 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5065 symbol error.
5066
0a5b1e09
PA
50672011-05-31 Pedro Alves <pedro@codesourcery.com>
5068
5069 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5070 assertion.
5071 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5072
6938fd34
YQ
50732011-05-26 Yao Qi <yao@codesourcery.com>
5074
5075 * Makefile.in (thread-db.o): Track dependence to
5076 common/gdb_thread_db.h.
5077 * thread-db.c: include gdb_thread_db.h from right place.
5078
b481f9e0
TT
50792011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5080
5081 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5082 __FILE__ and __LINE__ to internal_error.
5083
98a5dd13
DE
50842011-05-13 Doug Evans <dje@google.com>
5085
5086 * thread-db.c (try_thread_db_load_from_sdir): New function.
5087 (try_thread_db_load_from_dir): New function.
5088 (thread_db_load_search): Handle $sdir, ignore $pdir.
5089 Remove trying of system directories if search of
5090 libthread-db-search-path fails, that is now done via $sdir.
5091
d248b706
KY
50922011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5093
5094 * server.c (handle_query): Add EnableDisableTracepoints to the list
5095 of supported features.
43aaf8b6 5096 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5097 tracepoints.
43aaf8b6
PA
5098 (cmd_qtenable_disable): New.
5099 (cmd_qtstart): Install tracepoints even if disabled.
5100 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5101 receiving a QTEnable or QTDisable packet.
5102 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5103 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5104 tracepoints.
5105 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5106
84e578fb
DE
51072011-05-10 Doug Evans <dje@google.com>
5108
5109 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5110
71f55dd8
DE
51112011-05-04 Doug Evans <dje@google.com>
5112
5113 * linux-low.c (linux_join): Skip process lookup.
5114 * spu-low.c (spu_join): Ditto.
5115 * server.c (join_inferiors_callback): Delete.
5116 (process_serial_event): For 'D' packet (detach) call join_inferior
5117 directly.
5118
4d393d60
JM
51192011-05-04 Joseph Myers <joseph@codesourcery.com>
5120
5121 * README: Don't mention xscale*-*-linux*.
5122 * configure.srv (xscale*-*-linux*): Don't handle target.
5123
b00ad6ff
NF
51242011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5125
5126 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5127 casting pointers.
5128 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5129 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5130 (i386_emit_void_call_2): Likewise.
5131
af96c192
YQ
51322011-04-26 Yao Qi <yao@codesourcery.com>
5133
43aaf8b6
PA
5134 * linux-low.c: Move common macros to linux-ptrace.h.
5135 Include linux-ptrace.h.
af96c192
YQ
5136 * Makefile.in (linux_ptrace_h): New.
5137 (linux-low.o): Depends on linux-ptrace.h.
5138
03f2bd59
JK
51392011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5140
5141 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5142 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5143 (remote_prepare): New function with most of the TCP code from ...
5144 (remote_open): ... here. Detect PORT here unconditionally. Move also
5145 setting transport_is_reliable.
5146 * server.c (run_once): New variable.
5147 (gdbserver_usage): Document it.
5148 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5149 the first run if RUN_ONCE.
5150 * server.h (run_once, remote_prepare): New declarations.
5151
7a9dd1b2
TT
51522011-04-19 Tom Tromey <tromey@redhat.com>
5153
5154 * win32-low.c (handle_load_dll): Remove duplicate "the".
5155
81239425
PM
51562011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5157
5158 Remove support for old Cygwin 1.5 versions.
5159 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5160 function to avoid warning.
5161 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5162 warning.
5163
9e0627f1
PM
51642011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5165
5166 * gdbserver/server.h (Macro _): Define it if not available.
5167
588eebee
MS
51682011-03-14 Michael Snyder <msnyder@vmware.com>
5169
348af9f7 5170 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5171
43f70d4c
JB
51722011-03-10 Joel Brobecker <brobecker@adacore.com>
5173
5174 * Makefile.in (maintainer-clean realclean distclean): Remove
5175 "make ... subdir_do" command.
5176
348af9f7
MS
51772011-03-10 Michael Snyder <msnyder@vmware.com>
5178
5179 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5180
5181 * server.c (handle_v_run): Free alloced buffer on early return.
5182
e637a4f5
YQ
51832011-03-09 Yao Qi <yao@codesourcery.com>
5184
5185 Revert:
5186 2011-03-04 Yao Qi <yao@codesourcery.com>
5187
5188 * Makefile.in: Remove GNU make feature --directory.
5189
5190 2011-03-05 Yao Qi <yao@codesourcery.com>
5191
5192 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5193 (subdir_do): New make target. Copied from gdb/Makefile.
5194 (maintainer-clean, realclean, distclean, clean): Call corresponding
5195 make targets in common/Makefile.
5196
5197 2011-02-11 Yao Qi <yao@codesourcery.com>
5198
5199 * configure.ac: Call AC_PROG_RANLIB.
5200 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5201 * configure: Regenerate.
5202
e6edda56
JK
52032011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5204
5205 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5206
e5141119
JB
52072011-03-06 Yao Qi <yao@codesourcery.com>
5208
5209 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5210
64794aa4
JB
52112011-03-05 Yao Qi <yao@codesourcery.com>
5212
5213 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5214 (subdir_do): New make target. Copied from gdb/Makefile.
5215 (maintainer-clean, realclean, distclean, clean): Call corresponding
5216 make targets in common/Makefile.
5217
7a762829
YQ
52182011-03-04 Yao Qi <yao@codesourcery.com>
5219
5220 * Makefile.in: Remove GNU make feature --directory.
5221
348af9f7
MS
52222011-03-04 Michael Snyder <msnyder@vmware.com>
5223
5224 * server.c (queue_stop_reply): Call xmalloc not malloc.
5225
52262011-03-02 Michael Snyder <msnyder@vmware.com>
5227
5228 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5229
9f72fee2
MS
52302011-02-28 Michael Snyder <msnyder@vmware.com>
5231
588eebee
MS
5232 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5233 (cmd_qtframe): Ditto.
5234 (cmd_qtbuffer): Ditto.
5235 (cmd_bigqtbuffer): Ditto.
5236
9f72fee2
MS
5237 * utils.c (decimal2str): Initialize 'width' to nine, then
5238 don't mess with it.
5239
8040bd49
UW
52402011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5241
5242 * hostio.c (require_data): Free *data, not data.
5243
7e52cbd0
JK
52442011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5245
5246 * hostio.c (require_data): Use free, not xfree.
5247
9130f83e
MS
52482011-02-27 Michael Snyder <msnyder@vmware.com>
5249
4b812f4e
MS
5250 * server.c (handle_query): Discard unused value.
5251
9130f83e
MS
5252 * hostio.c (require_data): Free malloc memory before returning
5253 error.
5254
69d37113
MS
52552011-02-26 Michael Snyder <msnyder@vmware.com>
5256
5257 * linux-low.c (list_threads): Call closedir for dirent.
5258
35f5825a
MS
52592011-02-27 Michael Snyder <msnyder@vmware.com>
5260
2a589cef
MS
5261 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5262 a case statement falls through.
5263
0adea5f7
MS
5264 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5265
35f5825a
MS
5266 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5267 in comparison.
5268
238f1c74
MS
52692011-02-26 Michael Snyder <msnyder@vmware.com>
5270
5271 * utils.c (decimal2str): Eliminate dead code and dead param.
5272 (pulongest): Drop dead param from call to decimal2str.
5273 (plongest): Ditto.
5274
633ff500
JB
52752011-02-24 Joel Brobecker <brobecker@adacore.com>
5276
5277 Revert the following patch (not approved yet):
5278 2011-02-21 Hui Zhu <teawater@gmail.com>
5279 * tracepoint.c (tp_printf): New function.
5280 (eval_agent_expr): Handle gdb_agent_op_printf.
5281
f9c6ff72
HZ
52822011-02-21 Hui Zhu <teawater@gmail.com>
5283
5284 * tracepoint.c (tp_printf): New function.
5285 (eval_agent_expr): Handle gdb_agent_op_printf.
5286
94d5e490
TT
52872011-02-18 Tom Tromey <tromey@redhat.com>
5288
5289 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5290 (tracepoint.o): Likewise.
5291 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5292 (gdb_agent_op_names): Likewise.
5293
c7f96d2b
TT
52942011-02-18 Tom Tromey <tromey@redhat.com>
5295
5296 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5297 gdb_agent_op_rot>: New constants.
5298 (gdb_agent_op_names): Add pick and roll.
5299 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5300 cases.
5301
0feedb2c
JK
53022011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5303
5304 * aclocal.m4: Regenerated with aclocal-1.11.1.
5305
b3b9301e
PA
53062011-02-14 Pedro Alves <pedro@codesourcery.com>
5307
5308 * server.c (handle_qxfer_traceframe_info): New.
5309 (qxfer_packets): Register "traceframe-info".
5310 (handle_query): Report support for qXfer:traceframe-info:read+.
5311 * tracepoint.c (match_blocktype): New.
5312 (traceframe_find_block_type): Rename to ...
5313 (traceframe_walk_blocks): ... this. Add callback filter argument,
5314 and use it.
5315 (traceframe_find_block_type): New, reimplemented on top of
5316 traceframe_walk_blocks.
5317 (build_traceframe_info_xml): New.
5318 (traceframe_read_info): New.
5319 * server.h (traceframe_read_info): Declare.
5320
4f3e6fb7
YQ
53212011-02-11 Yao Qi <yao@codesourcery.com>
5322
5323 * configure.ac: Call AC_PROG_RANLIB.
5324 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5325 * configure: Regenerate.
5326
764880b7
PA
53272011-02-07 Pedro Alves <pedro@codesourcery.com>
5328
5329 * server.c (gdb_read_memory): Change return semantics to allow
5330 partial transfers.
5331 (handle_search_memory_1): Adjust.
5332 (process_serial_event) <'m' packet>: Handle partial transfers.
5333 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5334
1c79eb8a
PA
53352011-01-28 Pedro Alves <pedro@codesourcery.com>
5336
5337 * regcache.c (init_register_cache): Initialize
5338 regcache->register_status.
5339 (free_register_cache): Release regcache->register_status.
5340 (regcache_cpy): Copy register_status.
5341 (registers_to_string): Print 'x's for unavailable registers.
5342 (supply_register): Mark the register's status valid or
5343 unavailable, depending on whether a buffer was passed in or not.
5344 (supply_register_zeroed): New.
5345 (supply_regblock): Mark the registers' status valid or
5346 unavailable, depending on whether a buffer was passed in or not.
5347 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5348 (struct regcache): New `register_status' field.
5349 (supply_register_zeroed): Declare.
5350 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5351 supply_register_zeroed, rather than passing a NULL buffer to
5352 supply_register.
5353 * tracepoint.c (fetch_traceframe_registers): Update comment.
5354
85724a0e
PA
53552011-01-28 Pedro Alves <pedro@codesourcery.com>
5356
5357 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5358 buffer explicit.
5359
d08aafef
PA
53602011-01-25 Pedro Alves <pedro@codesourcery.com>
5361
5362 * server.h (decode_xfer_write): Change prototype.
5363 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5364 and don't extract the annex here.
5365 * server.c (decode_xfer_read): Remove `annex' parameter,
5366 and don't extract the annex here.
5367 (decode_xfer): New.
5368 (struct qxfer): New.
5369 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5370 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5371 (handle_qxfer_statictrace): New functions, abstracted out from
5372 handle_query, and made to use the struct qxfer interface.
5373 (handle_threads_qxfer_proper): Rename to ...
5374 (handle_qxfer_threads_proper): ... this.
5375 (handle_threads_qxfer): Rename to ...
5376 (handle_qxfer_threads): ... this. Adjust.
5377 (qxfer_packets): New array.
5378 (handle_qxfer): New function.
5379 (handle_query): Use handle_qxfer.
5380
493e2a69
MS
53812011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5382
5383 * gdbreplay.c: Shorten lines of >= 80 columns.
5384 * linux-low.c: Ditto.
5385 * linux-ppc-low.c: Ditto.
5386 * linux-s390-low.c: Ditto.
5387 * linux-sparc-low.c: Ditto.
5388 * linux-x86-low.c: Ditto.
5389 * linux-xtensa-low.c: Ditto.
5390 * mem-break.c: Ditto.
5391 * nto-low.c: Ditto.
5392 * regcache.h: Ditto.
5393 * remote-utils.c: Ditto.
5394 * server.c: Ditto.
5395 * server.h: Ditto.
5396 * thread-db.c: Ditto.
5397 * tracepoint.c: Ditto.
5398 * utils.c: Ditto.
5399 * win32-low.h: Ditto.
5400
44944448
JB
54012011-01-05 Joel Brobecker <brobecker@adacore.com>
5402
5403 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5404 update.
5405
71ce852c
JB
54062011-01-01 Joel Brobecker <brobecker@adacore.com>
5407
5408 * server.c (gdbserver_version): Update copyright year in version
5409 output.
5410 * gdbreplay.c (gdbreplay_version): Ditto.
5411
eb826dc6
MF
54122010-12-29 Jie Zhang <jie.zhang@analog.com>
5413
5414 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5415 * linux-bfin-low.c: New file.
5416 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5417 PT_DATA_ADDR for BFIN targets.
5418 * Makefile.in (SFILES): Add linux-bfin-low.c.
5419 (clean): Remove reg-bfin.c.
5420 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5421 * README: Mention supported Blackfin targets.
5422
39ab222a
MF
54232010-12-23 Mike Frysinger <vapier@gentoo.org>
5424
5425 * .gitignore: New file.
5426
a1f2ce7d
MF
54272010-11-16 Mike Frysinger <vapier@gentoo.org>
5428
5429 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5430
f474844c
JZ
54312010-10-22 Jie Zhang <jie@codesourcery.com>
5432
5433 * Makefile.in: Add FLAGS_TO_PASS variable.
5434 (install): Remove dependency of install-only and recursively
5435 invoke make for install-only.
5436
f1048712
DE
54372010-10-04 Doug Evans <dje@google.com>
5438
5439 * Makefile.in (uninstall): Use $(DESTDIR).
5440
b53a1623
PA
54412010-09-24 Pedro Alves <pedro@codesourcery.com>
5442
e6ee044d
PA
5443 PR gdb/11842
5444
b53a1623
PA
5445 * linux-x86-low.c (compat_siginfo_from_siginfo)
5446 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5447 si_code is < 0. Check for si_code == SI_TIMER before checking for
5448 si_code < 0.
5449
fa1bd1e4
JB
54502010-09-13 Joel Brobecker <brobecker@adacore.com>
5451
5452 * lynx-i386-low.c: New file.
5453 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5454
47fac8f8
JB
54552010-09-13 Joel Brobecker <brobecker@adacore.com>
5456
5457 * lynx-low.c (ptrace_request_to_str): Remove handling for
5458 request values that have been removed in LynxOS 5.x.
5459
1adfc54d
JB
54602010-09-13 Joel Brobecker <brobecker@adacore.com>
5461
5462 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5463 <ptrace.h>
5464
c2a66c29
NS
54652010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5466
5467 * configure.ac: Add --enable-inprocess-agent option.
5468 * configure: Rebuilt.
5469
32fcada3
YQ
54702010-09-06 Yao Qi <yao@codesourcery.com>
5471
5472 * linux-low.c (linux_kill): Remove unused variable.
5473 (linux_stabilize_threads): Likewise.
5474 * server.c (start_inferior): Likewise.
5475 (queue_stop_reply_callback): Likewise.
5476 * tracepoint.c (do_action_at_tracepoint): Likewise.
5477
0cccb683
YQ
54782010-09-06 Yao Qi <yao@codesourcery.com>
5479
5480 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5481 on return.
5482
423ec54c
JK
54832010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5484
5485 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5486
12ac6819
PA
54872010-09-06 Pedro Alves <pedro@codesourcery.com>
5488
5489 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5490 "$(IPA_DEPFILES)".
5491
8ed54b31
JB
54922010-09-01 Joel Brobecker <brobecker@adacore.com>
5493
5494 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5495 gdbserver/lynx-ppc-low.c: New files.
5496 * Makefile.in (lynx_low_h): New variable.
5497 (lynx-low.o, lynx-ppc-low.o): New rules.
5498 * configure.ac: On LynxOS, link with -lnetinet.
5499 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5500 * configure: regenerate.
5501
bb0116a4
JB
55022010-09-01 Joel Brobecker <brobecker@adacore.com>
5503
5504 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5505 * configure.ac: Add check for vasprintf and vsnprintf.
5506 * configure, config.in: Regenerate.
5507 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5508
a778ab81 55092010-09-01 Joel Brobecker <brobecker@adacore.com>
5510
5511 * gdbreplay.c: Move include of alloca.h up, next to include of
5512 malloc.h.
5513 * server.h: Add include of malloc.h.
5514 * mem-break.c: Remove include of malloc.h.
5515 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5516
8b034a19 55172010-09-01 Joel Brobecker <brobecker@adacore.com>
5518
5519 * Makefile.in (memmem.o): Build with -Wno-error.
5520
55212010-09-01 Joel Brobecker <brobecker@adacore.com>
5522
5523 * utils.c (xsnprintf): Make non-static.
5524 * server.h: Add xsnprintf declaration.
5525 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5526 replace calls to snprintf by calls to xsnprintf throughout.
5527
55282010-09-01 Joel Brobecker <brobecker@adacore.com>
5529
5530 * configure.ac: Add configure check for alloca.
5531 * configure, config.in: Regenerate.
5532 * server.h: Include alloca.h if it exists.
5533 * gdbreplay.c: Include alloca.h if it exists.
5534
1a981360
PA
55352010-08-28 Pedro Alves <pedro@codesourcery.com>
5536
5537 * linux-low.c (__SIGRTMIN): Define if not already defined.
5538 (linux_create_inferior): Check for __ANDROID__ rather than
5539 __SIGRTMIN.
5540 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5541 are already deferred.
5542 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5543 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5544 stopped and already has a pending signal to report.
5545 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5546 a pending signal to report or is moving out of a jump pad.
5547 (linux_init_signals): Check for __ANDROID__ rather than
5548 __SIGRTMIN.
5549
b4d51a55
PA
55502010-08-28 Pedro Alves <pedro@codesourcery.com>
5551
5552 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5553 debug_threads check. Avoid a linear search when not doing debug
5554 output.
5555
ec48365d
PA
55562010-08-27 Pedro Alves <pedro@codesourcery.com>
5557
5558 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5559 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5560 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5561 (process_event): Change local fd's type to gdb_fildes_t.
5562 (create_file_handler): Adjust prototype.
5563 (delete_file_handler): Adjust prototype.
5564 (handle_file_event): Adjust prototype. Use pfildes.
5565 (create_file_event): Adjsut prototype.
5566 * remote-utils.c (remote_desc, listen_desc): Change type to
5567 gdb_fildes_t.
5568 * server.h: New gdb_fildes_t typedef.
5569 [USE_WIN32API]: Include winsock2.h.
5570 (delete_file_handler, add_file_handler): Adjust prototypes.
5571 (pfildes): Declare.
5572 * utils.c (pfildes): New.
5573
854d88f0
PA
55742010-08-27 Pedro Alves <pedro@codesourcery.com>
5575
5576 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5577 * configure: Regenerate.
5578
0146f85b
PA
55792010-08-27 Pedro Alves <pedro@codesourcery.com>
5580
5581 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5582 (linux_done_accessing_memory): ... this.
5583 (linux_target_ops): Adjust.
5584 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5585 * nto-low.c (nto_target_ops): Adjust comment.
5586 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5587 * spu-low.c (spu_target_ops): Adjust comment.
5588 * target.h (target_ops): Rename unprepare_to_access_memory field
5589 to done_accessing_memory.
5590 (unprepare_to_access_memory): Rename to ...
5591 (done_accessing_memory): ... this.
5592
90d74c30
PA
55932010-08-26 Pedro Alves <pedro@codesourcery.com>
5594
5595 * linux-low.c (linux_prepare_to_access_memory): New.
5596 (linux_unprepare_to_access_memory): New.
5597 (linux_target_ops): Install them.
5598 * server.c (read_memory): Rename to ...
5599 (gdb_read_memory): ... this. Use
5600 prepare_to_access_memory/prepare_to_access_memory.
5601 (write_memory): Rename to ...
5602 (gdb_write_memory): ... this. Use
5603 prepare_to_access_memory/prepare_to_access_memory.
5604 (handle_search_memory_1): Adjust.
5605 (process_serial_event): Adjust.
5606 * target.h (struct target_ops): New fields
5607 prepare_to_access_memory and unprepare_to_access_memory.
5608 (prepare_to_access_memory, unprepare_to_access_memory): New.
5609 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5610 prepare_to_access_memory/prepare_to_access_memory.
5611 * nto-low.c (nto_target_ops): Adjust.
5612 * spu-low.c (spu_target_ops): Adjust.
5613 * win32-low.c (win32_target_ops): Adjust.
5614
fd467969
PA
56152010-08-26 Pedro Alves <pedro@codesourcery.com>
5616
5617 * Makefile.in (WARN_CFLAGS): Get it from configure.
5618 (WERROR_CFLAGS): New.
5619 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5620 * configure.ac: Introduce --enable-werror, which adds -Werror to
5621 the compiler command line. Enabled by default. Disable with
5622 --disable-werror. Add -Wdeclaration-after-statement
5623 Wpointer-arith and -Wformat-nonliteral to warning flags.
5624 * configure: Regenerate.
5625
331e2f5f
PA
56262010-08-26 Pedro Alves <pedro@codesourcery.com>
5627
5628 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5629
e581f2b4
PA
56302010-08-26 Pedro Alves <pedro@codesourcery.com>
5631
5632 * gdbreplay.c (remote_error): New.
5633 (gdbchar): New.
5634 (expect): Use gdbchar. Check for error reading from GDB.
5635 Clarify sync error output.
5636 (play): Check for errors writing to GDB.
5637 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5638 * remote-utils.c (getpkt): Check for errors writing to the remote
5639 descriptor.
5640
3c11dd79
PA
56412010-08-25 Pedro Alves <pedro@codesourcery.com>
5642
5643 * linux-low.c (linux_wait_1): Move non-debugging code out of
5644 `debug_threads' control.
5645
d20a8ad9
PA
56462010-08-25 Pedro Alves <pedro@codesourcery.com>
5647
5648 * linux-low.c (linux_wait_1): Don't set last_status here.
5649 * server.c (push_event, queue_stop_reply_callback): Assert we're
5650 not pushing a TARGET_WAITKIND_IGNORE event.
5651 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5652 (myresume, handle_target_event): Set the thread's last_resume_kind
5653 and last_status from the target returned status.
5654
964e4306
PA
56552010-08-25 Pedro Alves <pedro@codesourcery.com>
5656
5657 PR threads/10729
5658
5659 * linux-x86-low.c (update_debug_registers_callback): New.
5660 (i386_dr_low_set_addr): Use it.
5661 (i386_dr_low_get_addr): New.
5662 (i386_dr_low_set_control): Use update_debug_registers_callback.
5663 (i386_dr_low_get_control): New.
5664 (i386_dr_low_get_status): Adjust.
5665 * linux-low.c (linux_stop_lwp): New.
5666 * linux-low.h (linux_stop_lwp): Declare.
5667
5668 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5669 argument instead of a i386_debug_reg_state.
5670 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5671 a i386_debug_reg_state.
5672 (i386_insert_aligned_watchpoint): Adjust.
5673 (i386_remove_aligned_watchpoint): Adjust.
5674 (i386_low_stopped_data_address): Read the debug registers from the
5675 inferior instead of from the mirrors.
5676 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5677 (i386_dr_low_get_addr): Declare.
5678 (i386_dr_low_get_control): Declare.
5679 (i386_dr_low_get_status): Change prototype.
5680
5681 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5682 (i386_dr_low_get_addr): New.
5683 (i386_dr_low_get_control): New.
5684 (i386_dr_low_get_status): Adjust prototype. Return
5685 dr_status_mirror.
5686 (i386_initial_stuff): Clear dr_status_mirror and
5687 dr_control_mirror.
5688 (i386_get_thread_context): Adjust.
5689 (i386_set_thread_context): Adjust.
5690 (i386_thread_added): Adjust.
5691
5f21a75b
PA
56922010-08-24 Pedro Alves <pedro@codesourcery.com>
5693
5694 * linux-low.h (linux_thread_area): Delete declaration.
5695
3e4c1235
TS
56962010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5697
5698 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5699 after its termination.
5700
1971b033
PA
57012010-08-09 Pedro Alves <pedro@codesourcery.com>
5702
5703 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5704 (gdb_wants_all_stopped): Delete.
5705 (linux_wait_1): Don't call them.
5706 * server.c (handle_v_cont): Tag all threads as want-stopped.
5707 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5708 stopped as "client-wants-stopped".
5709
310444ac
PA
57102010-07-31 Pedro Alves <pedro@codesourcery.com>
5711
5712 * Makefile.in (signals_h): New.
5713 (server_h): Depend on it.
5714 (server.o): Don't depend on $(signals_def).
5715 (signals.o): Depend on $(signals_def).
5716
a19cae16
JK
57172010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5718
5719 * Makefile.in (signals_def): New.
5720 (server_h): Append include/gdb/signals.h and signals_def.
5721 (server.o): Append signals_def.
5722
30d50328
JK
57232010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5724
5725 * server.c (handle_target_event): Use target_signal_to_host for
5726 resume_info.sig initialization.
5727 * target.h (struct thread_resume) <sig>: New comment.
5728
5c3216e2
OS
57292010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5730
c6f46ca0
OS
5731 * server.c (handle_query): strcpy() the returned string from paddress()
5732 instead of sprintf().
5c3216e2
OS
5733 * utils.c (paddress): Return phex_nz().
5734
6bd31874
JB
57352010-07-07 Joel Brobecker <brobecker@adacore.com>
5736
5737 * server.c (handle_v_cont): Call mourn_inferior if process
5738 just exited.
5739 (myresume): Likewise.
5740
0fb4aa4b
PA
57412010-07-01 Pedro Alves <pedro@codesourcery.com>
5742
5743 Static tracepoints, and integration with UST.
5744
5745 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5746 * mem-break.c (uninsert_all_breakpoints)
5747 (reinsert_all_breakpoints): New.
5748 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5749 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5750 (gdb_agent_ust_loaded, helper_thread_id)
5751 (gdb_agent_helper_thread_id): New macros.
5752 (struct ipa_sym_addresses): Add addr_ust_loaded,
5753 addr_helper_thread_id, addr_cmd_buf.
5754 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5755 (in_process_agent_loaded_ust): New.
5756 (write_e_ust_not_loaded): New.
5757 (maybe_write_ipa_ust_not_loaded): New.
5758 (struct collect_static_trace_data_action): New.
5759 (enum tracepoint_type) <static_tracepoint>: New.
5760 (struct tracepoint) <handle>: Mention static tracepoints.
5761 (struct static_tracepoint_ctx): New.
5762 (CMD_BUF_SIZE): New.
5763 (add_tracepoint_action): Handle static tracepoint actions.
5764 (unprobe_marker_at): New.
5765 (clear_installed_tracepoints): Handle static tracepoints.
5766 (cmd_qtdp): Handle static tracepoints.
5767 (probe_marker_at): New.
5768 (cmd_qtstart): Handle static tracepoints.
5769 (response_tracepoint): Handle static tracepoints.
5770 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5771 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5772 (get_context_regcache): Handle static tracepoints.
5773 (do_action_at_tracepoint): Handle static tracepoint actions.
5774 (traceframe_find_block_type): Handle static trace data blocks.
5775 (traceframe_read_sdata): New.
5776 (download_tracepoints): Download static tracepoint actions.
5777 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5778 (GDB_PROBE_NAME): New.
5779 (ust_ops): New.
5780 (GET_UST_SYM): New.
5781 (USTF): New.
5782 (dlsym_ust): New.
5783 (ust_marker_to_static_tracepoint): New.
5784 (gdb_probe): New.
5785 (collect_ust_data_at_tracepoint): New.
5786 (gdb_ust_probe): New.
5787 (UNIX_PATH_MAX, SOCK_DIR): New.
5788 (gdb_ust_connect_sync_socket): New.
5789 (resume_thread, stop_thread): New.
5790 (run_inferior_command): New.
5791 (init_named_socket): New.
5792 (gdb_ust_socket_init): New.
5793 (cstr_to_hexstr): New.
5794 (next_st): New.
5795 (first_marker, next_marker): New.
5796 (response_ust_marker): New.
5797 (cmd_qtfstm, cmd_qtsstm): New.
5798 (unprobe_marker_at, probe_marker_at): New.
5799 (cmd_qtstmat, gdb_ust_thread): New.
5800 (gdb_ust_init): New.
5801 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5802 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5803 (ST_REGENTRY): New.
5804 (x86_64_st_collect_regmap): New.
5805 (X86_64_NUM_ST_COLLECT_GREGS): New.
5806 (AMD64_RIP_REGNUM): New.
5807 (supply_static_tracepoint_registers): New.
5808 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5809 (ST_REGENTRY): New.
5810 (i386_st_collect_regmap): New.
5811 (i386_NUM_ST_COLLECT_GREGS): New.
5812 (supply_static_tracepoint_registers): New.
5813 * server.c (handle_query): Handle qXfer:statictrace:read.
5814 <qSupported>: Report support for StaticTracepoints, and
5815 qXfer:statictrace:read features.
5816 * server.h (traceframe_read_sdata)
5817 (supply_static_tracepoint_registers): Declare.
5818 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5819 (unpack_varlen_hex): Include in IPA build.
5820 * Makefile.in (ustlibs, ustinc): New.
5821 (IPA_OBJS): Add remote-utils-ipa.o.
5822 ($(IPA_LIB)): Link -ldl and -lpthread.
5823 (UST_CFLAGS): New.
5824 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5825 * config.in, configure: Regenerate.
5826
9e4344e5
PA
58272010-06-20 Ian Lance Taylor <iant@google.com>
5828 Pedro Alves <pedro@codesourcery.com>
5829
5830 * linux-x86-low.c (always_true): Delete.
5831 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5832 trying to fool the compiler with always_true.
5833
c6beb2cb
PA
58342010-06-20 Pedro Alves <pedro@codesourcery.com>
5835
5836 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5837 conditions in gdbserver.
5838
d2ed6730
UW
58392010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5840
5841 * spu-low.c (spu_read_memory): Wrap around local store limit.
5842 (spu_write_memory): Likewise.
5843
4e29fb54
PA
58442010-06-15 Pedro Alves <pedro@codesourcery.com>
5845
5846 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5847 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5848 LONGEST uses.
5849 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5850 uses.
5851 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5852 uses with LONGEST uses.
5853
6a271cae
PA
58542010-06-14 Stan Shebs <stan@codesourcery.com>
5855 Pedro Alves <pedro@codesourcery.com>
5856
5857 Bytecode compiler.
5858
5859 * linux-x86-low.c: Include limits.h.
5860 (add_insns): New.
5861 (always_true): New.
5862 (EMIT_ASM): New.
5863 (EMIT_ASM32): New.
5864 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5865 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5866 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5867 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5868 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5869 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5870 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5871 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5872 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5873 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5874 (amd64_emit_void_call_2): New.
5875 (amd64_emit_ops): New.
5876 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5877 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5878 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5879 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5880 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5881 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5882 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5883 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5884 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5885 (i386_emit_stack_adjust, i386_emit_int_call_1)
5886 (i386_emit_void_call_2): New.
5887 (i386_emit_ops): New.
5888 (x86_emit_ops): New.
5889 (the_low_target): Install x86_emit_ops.
5890 * server.h (struct emit_ops): New.
5891 (get_raw_reg_func_addr): Declare.
5892 (current_insn_ptr, emit_error): Declare.
5893 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5894 (set_trace_state_variable_value): New defines.
5895 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5896 addr_get_trace_state_variable_value and
5897 addr_set_trace_state_variable_value.
5898 (symbol_list): New fields for get_raw_reg,
5899 get_trace_state_variable_value and set_trace_state_variable_value.
5900 (condfn): New typedef.
5901 (struct tracepoint): New field `compiled_cond'.
5902 (do_action_at_tracepoint): Clear compiled_cond.
5903 (get_trace_state_variable_value, set_trace_state_variable_value):
5904 Export in the IPA.
5905 (condition_true_at_tracepoint): If there's a compiled condition,
5906 run that.
5907 (current_insn_ptr, emit_error): New globals.
5908 (struct bytecode_address): New.
5909 (get_raw_reg_func_addr): New.
5910 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5911 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5912 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5913 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5914 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5915 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5916 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5917 (compile_tracepoint_condition, compile_bytecodes): New.
5918 * target.h (emit_ops): Forward declare.
5919 (struct target_ops): New field emit_ops.
5920 (target_emit_ops): New.
5921 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5922 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5923 * linux-low.c (linux_emit_ops): New.
5924 (linux_target_ops): Install it.
5925 * linux-low.h (struct linux_target_ops): New field emit_ops.
5926
92b72907
UW
59272010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5928
5929 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5930 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5931
fa593d66
PA
59322010-06-01 Pedro Alves <pedro@codesourcery.com>
5933 Stan Shebs <stan@codesourcery.com>
5934
5935 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5936 (all): Depend on $(extra_libraries).
5937 (install-only): Install the IPA.
5938 (IPA_OBJS, IPA_LIB): New.
5939 (clean): Remove the IPA lib.
5940 (IPAGENT_CFLAGS): New.
5941 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5942 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5943 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5944 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5945 * configure.ac: Check for atomic builtins support in the compiler.
5946 (IPA_DEPFILES, extra_libraries): Define.
5947 * configure.srv (ipa_obj): Add description.
5948 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5949 (i[34567]86-*-linux*): Set ipa_obj.
5950 (x86_64-*-linux*): Set ipa_obj.
5951 * linux-low.c (stabilizing_threads): New.
5952 (supports_fast_tracepoints): New.
5953 (linux_detach): Stabilize threads before detaching.
5954 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5955 the lwp is either not stabilizing, or is moving out of a jump pad.
5956 (linux_fast_tracepoint_collecting): New.
5957 (maybe_move_out_of_jump_pad): New.
5958 (enqueue_one_deferred_signal): New.
5959 (dequeue_one_deferred_signal): New.
5960 (linux_wait_for_event_1): If moving out of a jump pad, defer
5961 pending signals to later.
5962 (linux_stabilize_threads): New.
5963 (linux_wait_1): Check if threads need moving out of jump pads, and
5964 do it if so.
5965 (stuck_in_jump_pad_callback): New.
5966 (move_out_of_jump_pad_callback): New.
5967 (lwp_running): New.
5968 (linux_resume_one_lwp): Handle moving out of jump pads.
5969 (linux_set_resume_request): Dequeue deferred signals.
5970 (need_step_over_p): Also step over fast tracepoint jumps.
5971 (start_step_over): Also uninsert fast tracepoint jumps.
5972 (finish_step_over): Also reinsert fast tracepoint jumps.
5973 (linux_install_fast_tracepoint_jump): New.
5974 (linux_target_ops): Install linux_stabilize_threads and
5975 linux_install_fast_tracepoint_jump_pad.
5976 * linux-low.h (linux_target_ops) <get_thread_area,
5977 install_fast_tracepoint_jump_pad>: New fields.
5978 (struct lwp_info) <collecting_fast_tracepoint,
5979 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5980 (linux_get_thread_area): Declare.
5981 * linux-x86-low.c (jump_insn): New.
5982 (x86_get_thread_area): New.
5983 (append_insns): New.
5984 (push_opcode): New.
5985 (amd64_install_fast_tracepoint_jump_pad): New.
5986 (i386_install_fast_tracepoint_jump_pad): New.
5987 (x86_install_fast_tracepoint_jump_pad): New.
5988 (the_low_target): Install x86_get_thread_area and
5989 x86_install_fast_tracepoint_jump_pad.
5990 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5991 (struct fast_tracepoint_jump): New.
5992 (fast_tracepoint_jump_insn): New.
5993 (fast_tracepoint_jump_shadow): New.
5994 (find_fast_tracepoint_jump_at): New.
5995 (fast_tracepoint_jump_here): New.
5996 (delete_fast_tracepoint_jump): New.
5997 (set_fast_tracepoint_jump): New.
5998 (uninsert_fast_tracepoint_jumps_at): New.
5999 (reinsert_fast_tracepoint_jumps_at): New.
6000 (set_breakpoint_at): Use write_inferior_memory.
6001 (uninsert_raw_breakpoint): Use write_inferior_memory.
6002 (check_mem_read): Mask out fast tracepoint jumps.
6003 (check_mem_write): Mask out fast tracepoint jumps.
6004 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6005 (set_fast_tracepoint_jump): Declare.
6006 (delete_fast_tracepoint_jump)
6007 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6008 (reinsert_fast_tracepoint_jumps_at): Declare.
6009 * regcache.c: Don't compile many functions when building the
6010 in-process agent library.
6011 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6012 the register buffer in the heap.
6013 (free_register_cache): If the register buffer isn't owned by the
6014 regcache, don't free it.
6015 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6016 pre-existing register caches.
6017 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6018 type.
6019 (convert_ascii_to_int): : Constify `from' parameter type.
6020 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6021 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6022 the needed buffer in-place.
6023 (relocate_instruction): New.
6024 * server.c (handle_query) <qSymbols>: If the target supports
6025 tracepoints, give it a chance of looking up symbols. Report
6026 support for fast tracepoints.
6027 (handle_status): Stabilize threads.
6028 (process_serial_event): Adjust.
6029 * server.h (struct fast_tracepoint_jump): Forward declare.
6030 (struct process_info) <fast_tracepoint_jumps>: New field.
6031 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6032 (decode_X_packet, decode_M_packet): Adjust.
6033 (relocate_instruction): Declare.
6034 (in_process_agent_loaded): Declare.
6035 (tracepoint_look_up_symbols): Declare.
6036 (struct fast_tpoint_collect_status): Declare.
6037 (fast_tracepoint_collecting): Declare.
6038 (force_unlock_trace_buffer): Declare.
6039 (handle_tracepoint_bkpts): Declare.
6040 (initialize_low_tracepoint)
6041 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6042 * target.h (struct target_ops) <stabilize_threads,
6043 install_fast_tracepoint_jump_pad>: New fields.
6044 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6045 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6046 [HAVE_STDINT_H]: Include stdint.h.
6047 (trace_debug_1): Rename to ...
6048 (trace_vdebug): ... this.
6049 (trace_debug): Rename to ...
6050 (trace_debug_1): ... this. Add `level' parameter.
6051 (trace_debug): New.
6052 (ATTR_USED, ATTR_NOINLINE): New.
6053 (IP_AGENT_EXPORT): New.
6054 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6055 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6056 (about_to_request_buffer_space, trace_buffer_is_full)
6057 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6058 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6059 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6060 (traceframe_write_count, traceframes_created)
6061 (trace_state_variables)
6062 New renaming defines.
6063 (struct ipa_sym_addresses): New.
6064 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6065 (symbol_list): New.
6066 (ipa_sym_addrs): New.
6067 (all_tracepoint_symbols_looked_up): New.
6068 (in_process_agent_loaded): New.
6069 (write_e_ipa_not_loaded): New.
6070 (maybe_write_ipa_not_loaded): New.
6071 (tracepoint_look_up_symbols): New.
6072 (debug_threads) [IN_PROCESS_AGENT]: New.
6073 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6074 (UNKNOWN_SIDE_EFFECTS): New.
6075 (stop_tracing): New.
6076 (flush_trace_buffer): New.
6077 (stop_tracing_bkpt): New.
6078 (flush_trace_buffer_bkpt): New.
6079 (read_inferior_integer): New.
6080 (read_inferior_uinteger): New.
6081 (read_inferior_data_pointer): New.
6082 (write_inferior_data_pointer): New.
6083 (write_inferior_integer): New.
6084 (write_inferior_uinteger): New.
6085 (struct collect_static_trace_data_action): Delete.
6086 (enum tracepoint_type): New.
6087 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6088 <actions_str, step_actions, step_actions_str>: Only include in
6089 GDBserver.
fa593d66
PA
6090 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6091 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6092 (tracepoints): Use IP_AGENT_EXPORT.
6093 (last_tracepoint): Don't include in the IPA.
6094 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6095 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6096 (alloced_trace_state_variables): New.
6097 (trace_state_variables): Use IP_AGENT_EXPORT.
6098 (traceframe_t): Delete unused variable.
6099 (circular_trace_buffer): Don't include in the IPA.
6100 (trace_buffer_start): Delete.
6101 (struct trace_buffer_control): New.
6102 (trace_buffer_free): Delete.
6103 (struct ipa_trace_buffer_control): New.
6104 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6105 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6106 New.
6107 (trace_buffer_ctrl): New.
6108 (TRACE_BUFFER_CTRL_CURR): New.
6109 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6110 Reimplement as macros.
6111 (trace_buffer_wrap): Delete.
6112 (traceframe_write_count, traceframe_read_count)
6113 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6114 (struct tracepoint_hit_ctx) <type>: New field.
6115 (struct fast_tracepoint_ctx): New.
6116 (memory_barrier): New.
6117 (cmpxchg): New.
6118 (record_tracepoint_error): Update atomically in the IPA.
6119 (clear_inferior_trace_buffer): New.
6120 (about_to_request_buffer_space): New.
6121 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6122 updating the same buffer.
6123 (add_tracepoint): Default the tracepoint's type to trap
6124 tracepoint, and orig_size to -1.
6125 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6126 internal variables.
6127 (create_trace_state_variable): New parameter `gdb'. Handle it.
6128 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6129 (cmd_qtdp): Handle fast tracepoints.
6130 (cmd_qtdv): Adjust.
6131 (max_jump_pad_size): New.
6132 (gdb_jump_pad_head): New.
6133 (get_jump_space_head): New.
6134 (claim_jump_space): New.
6135 (sort_tracepoints): New.
6136 (MAX_JUMP_SIZE): New.
6137 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6138 IPA.
6139 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6140 support. Upload fast traceframes, and delete internal IPA
6141 breakpoints.
6142 (stop_tracing_handler): New.
6143 (flush_trace_buffer_handler): New.
6144 (cmd_qtstop): Upload fast tracepoints.
6145 (response_tracepoint): Handle fast tracepoints.
6146 (tracepoint_finished_step): Upload fast traceframes. Set the
6147 tracepoint hit context's tracepoint type.
6148 (handle_tracepoint_bkpts): New.
6149 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6150 type. Add comment about fast tracepoints.
6151 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6152 non-existing action_str field.
6153 (get_context_regcache): Handle fast tracepoints.
6154 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6155 to the regcache.
6156 (fast_tracepoint_from_jump_pad_address): New.
6157 (fast_tracepoint_from_ipa_tpoint_address): New.
6158 (collecting_t): New.
6159 (force_unlock_trace_buffer): New.
6160 (fast_tracepoint_collecting): New.
6161 (collecting): New.
6162 (gdb_collect): New.
6163 (write_inferior_data_ptr): New.
6164 (target_tp_heap): New.
6165 (target_malloc): New.
6166 (download_agent_expr): New.
6167 (UALIGN): New.
6168 (download_tracepoints): New.
6169 (download_trace_state_variables): New.
6170 (upload_fast_traceframes): New.
6171 (IPA_FIRST_TRACEFRAME): New.
6172 (IPA_NEXT_TRACEFRAME_1): New.
6173 (IPA_NEXT_TRACEFRAME): New.
6174 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6175 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6176 (gdb_jump_pad_buffer_end): New.
6177 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6178 (initialize_tracepoint): Adjust.
6179 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6180 buffer. Initialize the low module.
6181 * utils.c (PREFIX, TOOLNAME): New.
6182 (malloc_failure): Use PREFIX.
6183 (error): In the IPA, an error causes an exit.
6184 (fatal, warning): Use PREFIX.
6185 (internal_error): Use TOOLNAME.
6186 (NUMCELLS): Increase to 10.
6187 * configure, config.in: Regenerate.
6188
d149dd1d
PA
61892010-06-01 Pedro Alves <pedro@codesourcery.com>
6190
6191 * server.c (handle_query) <qSupported>: Do two passes over the
6192 qSupported string to avoid nesting strtok.
6193
f6528abd
JK
61942010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6195
6196 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6197 (CDEPS): New.
6198 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6199 -Wl,--dynamic-list.
6200 * configure: Regenerate.
6201 * proc-service.list: New.
6202
ca2a87a0
JK
62032010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6204
6205 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6206 New comment.
6207
363a6e9f
OS
62082010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6209
6210 * gdbreplay.c (remote_open): Check error return from socket() call by
6211 its equality to -1 not by it being negative.
6212 * remote-utils.c (remote_open): Likewise.
6213
d23b6cb1
PA
62142010-05-23 Pedro Alves <pedro@codesourcery.com>
6215
6216 * config.h: Regenerate.
6217
28d3cf85
MK
62182010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6219
6220 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6221 doesn't provide PTRACE_GET_THREAD_AREA.
6222
fea36a59
MK
62232010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6224
6225 * linux-m68k-low.c: Include <asm/ptrace.h>
6226 (ps_get_thread_area): Implement.
6227
24b066ba
DE
62282010-05-03 Doug Evans <dje@google.com>
6229
6230 * event-loop.c (struct callback_event): New struct.
6231 (callback_list): New global.
6232 (append_callback_event, delete_callback_event): New functions.
6233 (process_callback): New function.
6234 (start_event_loop): Call it.
6235 * remote-utils.c (NOT_SCHEDULED): Define.
6236 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6237 moved out of readchar.
6238 (readchar): Rewrite. Call reschedule before returning.
6239 (reset_readchar): New function.
6240 (remote_close): Call it.
6241 (process_remaining, reschedule): New functions.
6242 * server.h (callback_handler_func): New typedef.
6243 (append_callback_event, delete_callback_event): Declare.
6244
9836d6ea
PA
62452010-05-03 Pedro Alves <pedro@codesourcery.com>
6246
6247 * proc-service.c (ps_pglobal_lookup): Use
6248 thread_db_look_up_one_symbol.
6249 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6250 parameter. Use it instead of all_symbols_looked_up.
6251 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6252 field.
6253 (all_symbols_looked_up): Don't declare.
6254 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6255 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6256 field.
6257 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6258 Set all_symbols_looked_up here.
6259 (thread_db_look_up_one_symbol): New.
6260 (thread_db_get_tls_address): Adjust.
6261 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6262 thread_db object on the heap, and tentatively set it in the
6263 process structure.
6264 (thread_db_init): Don't set all_symbols_looked_up here.
6265 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6266
7984d532
PA
62672010-05-03 Pedro Alves <pedro@codesourcery.com>
6268
6269 * linux-low.c (linux_kill, linux_detach): Adjust.
6270 (status_pending_p_callback): Remove redundant statement. Check
6271 for !TARGET_WAITIKIND_IGNORE, instead of
6272 TARGET_WAITKIND_STOPPED.
6273 (handle_tracepoints): Make sure LWP is locked. Adjust.
6274 (linux_wait_for_event_1): Adjust.
6275 (linux_cancel_breakpoints): New.
6276 (unsuspend_one_lwp): New.
6277 (unsuspend_all_lwps): New.
6278 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6279 (send_sigstop_callback): Change return type to int, add new
6280 `except' parameter and handle it.
6281 (suspend_and_send_sigstop_callback): New.
6282 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6283 pass them down. If SUSPEND, also increment the lwp's suspend
6284 count.
6285 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6286 (need_step_over_p): Don't consider suspended LWPs.
6287 (start_step_over): Adjust.
6288 (proceed_one_lwp): Change return type to int, add new `except'
6289 parameter and handle it.
6290 (unsuspend_and_proceed_one_lwp): New.
6291 (proceed_all_lwps): Use find_inferior instead of
6292 for_each_inferior.
6293 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6294 also decrement the suspend count of LWPs. Pass `except' down,
6295 instead of hacking its suspend count.
6296 (linux_pause_all): Add `freeze' parameter. Adjust.
6297 (linux_unpause_all): New.
6298 (linux_target_ops): Install linux_unpause_all.
6299 * server.c (handle_status): Adjust.
6300 * target.h (struct target_ops): New fields `unpause_all' and
6301 `cancel_breakpoints'. Add new parameter to `pause_all'.
6302 (pause_all): Add new `freeze' parameter.
6303 (unpause_all): New.
6304 (cancel_breakpoints): New.
6305 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6306 cancel breakpoints.
6307 (cmd_qtstart): Pause threads.
6308 (stop_tracing): Pause threads, and cancel breakpoints.
6309 * win32-low.c (win32_target_ops): Adjust.
6310
e471f25b
PA
63112010-05-03 Pedro Alves <pedro@codesourcery.com>
6312
6313 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6314 the inferior right away from here...
6315 (linux_wait_1): ... to here, and adjust to check the thread's
6316 last_resume_kind instead of the lwp's step or stop_expected flags.
6317
1915ef4f
PA
63182010-05-02 Pedro Alves <pedro@codesourcery.com>
6319
6320 * README: Use consistent `GDB' and `GDBserver' spellings.
6321
f9e39928
PA
63222010-05-02 Pedro Alves <pedro@codesourcery.com>
6323
6324 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6325 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6326 (linux_detach_one_lwp): Assume the lwp is stopped.
6327 (any_thread_of): Delete.
6328 (linux_detach): Stop all lwps here. Don't blindly delete all
6329 breakpoints.
6330 (delete_lwp_callback): New.
6331 (linux_mourn): Delete all lwps of the process that is gone.
6332 (linux_wait_1): Don't delete the last lwp of the process here.
6333 * mem-break.h (mark_breakpoints_out): Declare.
6334 * mem-break.c (mark_breakpoints_out): New.
6335 (free_all_breakpoints): Use it.
6336 * server.c (handle_target_event): If the process is gone, mark
6337 breakpoints out.
6338 * thread-db.c (struct thread_db) <create_bp>: New field.
6339 (thread_db_enable_reporting): Fix prototype. Store a thread event
6340 breakpoint reference in the thread_db struct.
6341 (thread_db_load_search): Clear the thread_db object.
6342 (try_thread_db_load_1): Ditto.
6343 (switch_to_process): New.
6344 (disable_thread_event_reporting): Use it.
6345 (remove_thread_event_breakpoints): New.
6346 (thread_db_detach, thread_db_mourn): Use it.
6347
1e7fc18c
PA
63482010-05-01 Pedro Alves <pedro@codesourcery.com>
6349
6350 * linux-low.c (linux_enable_event_reporting): New.
6351 (linux_wait_for_event_1, handle_extended_wait): Use it.
6352
02fc4de7
PA
63532010-04-30 Pedro Alves <pedro@codesourcery.com>
6354
6355 * linux-low.c (linux_kill_one_lwp, linux_kill)
6356 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6357 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6358 SIGSTOP even if the LWP is stopped.
6359 (send_sigstop_callback): New.
6360 (stop_all_lwps): Use send_sigstop_callback instead.
6361 (linux_resume_one_thread): Adjust.
6362 (proceed_one_lwp): Still proceed an LWP that the client has
6363 requested to stop, if we haven't reported it as stopped yet. Make
6364 sure that LWPs the client want stopped, have a pending SIGSTOP.
6365
bc3b5632
DE
63662010-04-26 Doug Evans <dje@google.com>
6367
ae1ada35
DE
6368 * server.c (handle_general_set): Make static.
6369
bc3b5632
DE
6370 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6371 Print received char after testing for error/eof instead of before.
6372 (input_interrupt): Tweak comment.
6373
65730243
DE
63742010-04-23 Doug Evans <dje@google.com>
6375
6376 * server.c (start_inferior): Print inferior argv if --debug.
6377
a8ae7dc0
AR
63782010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6379
6380 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6381 * nto-x86-low.c: Include server.h
6382
1c07cc19
PM
63832010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6384
6385 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6386 be consistent with other sources of this directory.
6387 (init_registers_amd64): Correct name of source file of this function
6388 in the comment.
6389
e0a61e09
PM
63902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6391
6392 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6393 64-bit executables.
6394
54709339
PM
63952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6396
6397 * win32-i386-low.c: Add 64-bit support.
6398 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6399 (init_registers_amd64): Declare.
6400 (mappings): Add 64-bit version of array.
6401 (init_windows_x86): New function.
6402 (the_low_target): Change init_arch field to init_windows_x86.
6403
e8f0053d
PM
64042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6405
6406 * win32-low.c: Adapt to support also 64-bit architecture.
6407 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6408 (get_image_name): Use SIZE_T type for local variable `done'.
6409 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6410 (toolhelp_get_dll_name): Idem.
6411 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6412 Use uintptr_t typecast to avoid warning.
6413 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6414 (handle_exception): Use phex_nz to avoid warning.
6415 (win32_wait): Remove unused local variable `process'.
6416
c481e77e
PM
64172010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6418
6419 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6420 `amd64-avx.o'.
6421
12ea4b69
PM
64222010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6423
6424 * configure.ac: Use `ws2_32' library for srv_mingw.
6425 * configure: Regenerate.
6426 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6427 * remote-utils.c: Likewise.
6428
f6d1620c
L
64292010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6430
6431 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6432 if __x86_64__ is defined.
6433
8e642873
PM
64342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6435
6436 * configure: Regenerate.
6437
711e434b
PM
64382010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6439
6440 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6441 * target.h (target_ops): New get_tib_address field.
6442 * win32-low.h (win32_thread_info): Add thread_local_base field.
6443 * win32-low.c (child_add_thread): Add tlb argument.
6444 Set thread_local_base field to TLB.
6445 (get_child_debug_event): Adapt to child_add_thread change.
6446 (win32_get_tib_address): New function.
6447 (win32_target_ops): Set get_tib_address field to
6448 win32_get_tib_address.
6449 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6450
505106cd
PA
64512010-04-12 Pedro Alves <pedro@codesourcery.com>
6452
505106cd
PA
6453 * linux-low.c (linux_mourn): Also remove the process.
6454 * server.c (handle_target_event): Don't remove the process here.
6455 * nto-low.c (nto_mourn): New.
6456 (nto_target_ops): Install it.
6457 * spu-low.c (spu_mourn): New.
6458 (spu_target_ops): Install it.
6459 * win32-low.c (win32_mourn): New.
6460 (win32_target_ops): Install it.
6461
e8470a06
PA
64622010-04-12 Pedro Alves <pedro@codesourcery.com>
6463
6464 * server.h (buffer_xml_printf): Remove redundant `;'.
6465
45ba0d02
PA
64662010-04-12 Pedro Alves <pedro@codesourcery.com>
6467
6468 * regcache.c (set_register_cache): Invalidate regcaches before
6469 changing the register cache layout.
6470 (regcache_invalidate_one): Allow a NULL regcache.
6471 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6472 regcaches before changing the register cache layout or the target
6473 regsets.
6474
59e04013
L
64752010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6476
6477 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6478 variable warning on Linux/x86-64.
6479
8336d594
PA
64802010-04-11 Pedro Alves <pedro@codesourcery.com>
6481
6482 GDBserver disconnected tracing support.
6483
6484 * linux-low.c (linux_remove_process): Delete.
6485 (add_lwp): Don't set last_resume_kind here.
6486 (linux_kill): Use `mourn'.
6487 (linux_detach): Use `thread_db_detach', and `mourn'.
6488 (linux_mourn): New.
6489 (linux_attach_lwp_1): Adjust comment.
6490 (linux_attach): last_resume_kind moved the thread_info; adjust.
6491 (status_pending_p_callback): Adjust.
6492 (linux_wait_for_event_1): Adjust.
6493 (count_events_callback, select_singlestep_lwp_callback)
6494 (select_event_lwp_callback, cancel_breakpoints_callback)
6495 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6496 (proceed_one_lwp): Adjust.
6497 (linux_async): Add debug output.
6498 (linux_thread_stopped): New.
6499 (linux_pause_all): New.
6500 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6501 linux_pause_all.
6502 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6503 (thread_db_free): Delete declaration.
6504 (thread_db_detach, thread_db_mourn): Declare.
6505 * thread-db.c (thread_db_init): Use thread_db_mourn.
6506 (thread_db_free): Delete, split in two.
6507 (disable_thread_event_reporting): New.
6508 (thread_db_detach): New.
6509 (thread_db_mourn): New.
6510
6511 * server.h (struct thread_info) <last_resume_kind>: New field.
6512 <attached>: Add comment.
6513 <gdb_detached>: New field.
6514 (handler_func): Change return type to int.
6515 (handle_serial_event, handle_target_event): Ditto.
6516 (gdb_connected): Declare.
6517 (tracing): Delete.
6518 (disconnected_tracing): Declare.
6519 (stop_tracing): Declare.
6520
6521 * server.c (handle_query) <qSupported>: Report support for
6522 disconnected tracing.
6523 (queue_stop_reply_callback): Account for running threads.
6524 (gdb_wants_thread_stopped): New.
6525 (gdb_wants_all_threads_stopped): New.
6526 (gdb_reattached_process): New.
6527 (handle_status): Clear the `gdb_detached' flag of all processes.
6528 In all-stop, stop all threads.
6529 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6530 (process_serial_event): If the remote connection breaks, or if an
6531 exit was forced with "monitor exit", force an event loop exit.
6532 Handle disconnected tracing on detach.
6533 (handle_serial_event): Adjust.
6534 (handle_target_event): If GDB isn't connected, forward events back
6535 to the inferior, unless the last process exited, in which case,
6536 exit gdbserver. Adjust interface.
6537
6538 * remote-utils.c (remote_open): Don't block in accept. Instead
6539 register an event loop source on the listen socket file
6540 descriptor. Refactor bits into ...
6541 (listen_desc): ... this new global.
6542 (gdb_connected): ... this new function.
6543 (enable_async_notification): ... this new function.
6544 (handle_accept_event): ... this new function.
6545 (remote_close): Clear remote_desc.
6546
6547 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6548
6549 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6550 New fields.
6551 (mourn_inferior): Define.
6552 (target_process_qsupported): Avoid the dangling else problem.
6553 (thread_stopped): Define.
6554 (pause_all): Define.
6555 (target_waitstatus_to_string): Declare.
6556 * target.c (target_waitstatus_to_string): New.
6557
6558 * tracepoint.c (tracing): Make extern.
6559 (disconnected_tracing): New.
6560 (stop_tracing): Make extern. Handle tracing stops due to GDB
6561 disconnecting.
6562 (cmd_qtdisconnected): New.
6563 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6564 (handle_tracepoint_general_set): Handle QTDisconnected.
6565
6566 * event-loop.c (event_handler_func): Change return type to int.
6567 (process_event): Bail out if the event handler wants the event
6568 loop to stop.
6569 (handle_file_event): Ditto.
6570 (start_event_loop): Bail out if the event handler wants the event
6571 loop to stop.
6572
6573 * nto-low.c (nto_target_ops): Adjust.
6574 * spu-low.c (spu_wait): Don't remove the process here.
6575 (spu_target_ops): Adjust.
6576 * win32-low.c (win32_wait): Don't remove the process here.
6577 (win32_target_ops): Adjust.
6578
5d267c4c
PA
65792010-04-11 Pedro Alves <pedro@codesourcery.com>
6580
6581 * regcache.c (realloc_register_cache): Invalidate inferior's
6582 regcache before recreating it.
6583
623ccd72
PA
65842010-04-09 Pedro Alves <pedro@codesourcery.com>
6585
6586 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6587
219f2f23
PA
65882010-04-09 Stan Shebs <stan@codesourcery.com>
6589 Pedro Alves <pedro@codesourcery.com>
6590
6591 * server.h (LONGEST): New.
6592 (struct thread_info) <while_stepping>: New field.
6593 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6594 Declare.
6595 (initialize_tracepoint, handle_tracepoint_general_set)
6596 (handle_tracepoint_query, tracepoint_finished_step)
6597 (tracepoint_was_hit, release_while_stepping_state_list):
6598 (current_traceframe): Declare.
6599 * server.c (handle_general_set): Handle tracepoint packets.
6600 (read_memory): New.
6601 (write_memory): New.
6602 (handle_search_memory_1): Use read_memory.
6603 (handle_query): Report support for conditional tracepoints, trace
6604 state variables, and tracepoint sources. Handle tracepoint
6605 queries.
6606 (main): Initialize the tracepoints module.
6607 (process_serial_event): Handle traceframe reads/writes.
6608
6609 * linux-low.c (handle_tracepoints): New.
6610 (linux_wait_1): Call it.
6611 (linux_resume_one_lwp): Handle while-stepping.
6612 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6613 (linux_target_ops): Install them.
6614 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6615 New field.
6616 * linux-x86-low.c (x86_supports_tracepoints): New.
6617 (the_low_target). Install it.
6618
6619 * mem-break.h (delete_breakpoint): Declare.
6620 * mem-break.c (delete_breakpoint): Make external.
6621
6622 * target.h (struct target_ops): Add `supports_tracepoints',
6623 `read_pc', and `write_pc' fields.
6624 (target_supports_tracepoints): Define.
6625 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6626 (phex_nz): New.
6627
6628 * regcache.h (struct regcache) <registers_owned>: New field.
6629 (init_register_cache, regcache_cpy): Declare.
6630 (regcache_read_pc, regcache_write_pc): Declare.
6631 (register_cache_size): Declare.
6632 (supply_regblock): Declare.
6633 * regcache.c (init_register_cache): New.
6634 (new_register_cache): Use it.
6635 (regcache_cpy): New.
6636 (register_cache_size): New.
6637 (supply_regblock): New.
6638 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6639
219f2f23
PA
6640 * tracepoint.c: New.
6641
6642 * Makefile.in (OBS): Add tracepoint.o.
6643 (tracepoint.o): New rule.
6644
3a13a53b
L
66452010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6646
6647 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6648 (i386-mmx.o): New.
6649 (i386-mmx.c): Likewise.
6650 (i386-mmx-linux.o): Likewise.
6651 (i386-mmx-linux.c): Likewise.
6652
6653 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6654 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6655 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6656 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6657
6658 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6659 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6660 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6661
1570b33e
L
66622010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6663
6664 * Makefile.in (clean): Updated.
6665 (i386-avx.o): New.
6666 (i386-avx.c): Likewise.
6667 (i386-avx-linux.o): Likewise.
6668 (i386-avx-linux.c): Likewise.
6669 (amd64-avx.o): Likewise.
6670 (amd64-avx.c): Likewise.
6671 (amd64-avx-linux.o): Likewise.
6672 (amd64-avx-linux.c): Likewise.
6673
6674 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6675 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6676 (srv_amd64_regobj): Add amd64-avx.o.
6677 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6678 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6679 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6680 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6681 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6682 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6683 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6684
6685 * i387-fp.c: Include "i386-xstate.h".
6686 (i387_xsave): New.
6687 (i387_cache_to_xsave): Likewise.
6688 (i387_xsave_to_cache): Likewise.
6689 (x86_xcr0): Likewise.
6690
6691 * i387-fp.h (i387_cache_to_xsave): Likewise.
6692 (i387_xsave_to_cache): Likewise.
6693 (x86_xcr0): Likewise.
6694
6695 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6696 * linux-crisv32-low.c (target_regsets): Likewise.
6697 * linux-m68k-low.c (target_regsets): Likewise.
6698 * linux-mips-low.c (target_regsets): Likewise.
6699 * linux-ppc-low.c (target_regsets): Likewise.
6700 * linux-s390-low.c (target_regsets): Likewise.
6701 * linux-sh-low.c (target_regsets): Likewise.
6702 * linux-sparc-low.c (target_regsets): Likewise.
6703 * linux-xtensa-low.c (target_regsets): Likewise.
6704
6705 * linux-low.c: Include <sys/uio.h>.
6706 (regsets_fetch_inferior_registers): Support nt_type.
6707 (regsets_store_inferior_registers): Likewise.
6708 (linux_process_qsupported): New.
6709 (linux_target_ops): Add linux_process_qsupported.
6710
6711 * linux-low.h (regset_info): Add nt_type.
6712 (linux_target_ops): Add process_qsupported.
6713
6714 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6715 and <sys/uio.h>.
6716 (init_registers_i386_avx_linux): New.
6717 (init_registers_amd64_avx_linux): Likewise.
6718 (xmltarget_i386_linux_no_xml): Likewise.
6719 (xmltarget_amd64_linux_no_xml): Likewise.
6720 (PTRACE_GETREGSET): Likewise.
6721 (PTRACE_SETREGSET): Likewise.
6722 (x86_fill_xstateregset): Likewise.
6723 (x86_store_xstateregset): Likewise.
6724 (use_xml): Likewise.
6725 (x86_linux_update_xmltarget): Likewise.
6726 (x86_linux_process_qsupported): Likewise.
6727 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6728 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6729 init_registers_i386_linux here. Call
6730 x86_linux_update_xmltarget.
6731 (the_low_target): Add x86_linux_process_qsupported.
6732
6733 * server.c (handle_query): Call target_process_qsupported.
6734
6735 * target.h (target_ops): Add process_qsupported.
6736 (target_process_qsupported): New.
6737
fc7238bb
PA
67382010-04-03 Pedro Alves <pedro@codesourcery.com>
6739
6740 * inferiors.c (add_thread): Set last_status kind to
6741 TARGET_WAITKIND_IGNORE.
6742 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6743 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6744 (linux_wait_1): Move `thread' local definition to block that uses
6745 it. Don't NULL initialize `event_child'.
6746 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6747 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6748 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6749
bdabb078
PA
67502010-04-01 Pedro Alves <pedro@codesourcery.com>
6751
6752 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6753 an extended waitstatus, or by a watchpoint.
6754 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6755 thread was stepping or has been stopped by a watchpoint.
6756
d3bbe7a0
PA
67572010-04-01 Pedro Alves <pedro@codesourcery.com>
6758
6759 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6760 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6761 of another, then delete the previous, and validate all
6762 breakpoints.
6763 (validate_inserted_breakpoint): New.
6764 (delete_disabled_breakpoints): New.
6765 (validate_breakpoints): New.
6766 (check_mem_read): Validate breakpoints before trusting their
6767 shadow. Delete disabled breakpoints.
6768 (check_mem_write): Validate breakpoints before trusting they
6769 should be inserted. Delete disabled breakpoints.
6770 * mem-break.h (validate_breakpoints):
6771 * server.c (handle_query): Validate breakpoints when we see a
6772 qSymbol query.
6773
8b07ae33
PA
67742010-04-01 Pedro Alves <pedro@codesourcery.com>
6775
6776 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6777 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6778 if we could tell there's a GDB breakpoint at stop_pc.
6779 (need_step_over_p): Don't do a step over if we find a GDB
6780 breakpoint at the resume PC.
6781
6782 * mem-break.c (struct raw_breakpoint): New.
6783 (enum bkpt_type): New type `gdb_breakpoint'.
6784 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6785 fields. New field `raw'.
6786 (find_raw_breakpoint_at): New.
6787 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6788 breakpoint instead.
6789 (set_breakpoint_at): Adjust.
6790 (delete_raw_breakpoint): New.
6791 (release_breakpoint): New.
6792 (delete_breakpoint): Rename to...
6793 (delete_breakpoint_1): ... this. Add proc parameter. Use
6794 release_breakpoint. Return ENOENT.
6795 (delete_breakpoint): Reimplement.
6796 (find_breakpoint_at): Delete.
6797 (find_gdb_breakpoint_at): New.
6798 (delete_breakpoint_at): Delete.
6799 (set_gdb_breakpoint_at): New.
6800 (delete_gdb_breakpoint_at): New.
6801 (gdb_breakpoint_here): New.
6802 (set_reinsert_breakpoint): Use release_breakpoint.
6803 (uninsert_breakpoint): Rename to ...
6804 (uninsert_raw_breakpoint): ... this.
6805 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6806 (reinsert_raw_breakpoint): Change parameter type to
6807 raw_breakpoint.
6808 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6809 instead.
6810 (check_breakpoints): Adjust. Use release_breakpoint.
6811 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6812 (breakpoint_inserted_here): Ditto.
6813 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6814 Don't trust the breakpoint's shadow if it is not inserted.
6815 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6816 (delete_all_breakpoints): Adjust.
6817 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6818 use delete_breakpoint_1.
6819
6820 * mem-break.h (breakpoints_supported): Delete declaration.
6821 (set_gdb_breakpoint_at): Declare.
6822 (gdb_breakpoint_here): Declare.
6823 (delete_breakpoint_at): Delete.
6824 (delete_gdb_breakpoint_at): Declare.
6825
6826 * server.h (struct raw_breakpoint): Forward declare.
6827 (struct process_info): New field `raw_breakpoints'.
6828
6829 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6830 breakpoints.
6831
6bf5e0ba
PA
68322010-03-24 Pedro Alves <pedro@codesourcery.com>
6833
6834 * linux-low.c (status_pending_p_callback): Fix comment.
6835 (linux_wait_for_event_1): Move most of the internal breakpoint
6836 handling from here...
6837 (linux_wait_1): ... to here.
6838 (count_events_callback): New.
6839 (select_singlestep_lwp_callback): New.
6840 (select_event_lwp_callback): New.
6841 (cancel_breakpoints_callback): New.
6842 (select_event_lwp): New.
6843 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6844 priority to all LWPs that have had events that should be reported
6845 to the client. Cancel breakpoints when about to reporting the
6846 event to the client, not while stopping lwps. No longer cancel
6847 finished single-steps here.
6848 (cancel_finished_single_step): Delete.
6849 (cancel_finished_single_steps): Delete.
6850
414a389f
PA
68512010-03-24 Pedro Alves <pedro@codesourcery.com>
6852
6853 * mem-break.c (enum bkpt_type): New.
6854 (struct breakpoint): New field `type'.
6855 (set_breakpoint_at): Change return type to struct breakpoint
6856 pointer. Set type to `other_breakpoint' by default.
6857 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6858 in the breakpoint list.
6859 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6860 (reinsert_breakpoint): Rename to ...
6861 (reinsert_raw_breakpoint): ... this.
6862 (reinsert_breakpoints_at): Adjust.
6863 * mem-break.h (struct breakpoint): Declare.
6864 (set_breakpoint_at): Change return type to struct breakpoint
6865 pointer.
6866
2280c721
PA
68672010-03-24 Pedro Alves <pedro@codesourcery.com>
6868
6869 * server.c (handle_query): Assign, not compare.
6870
d50171e4
PA
68712010-03-24 Pedro Alves <pedro@codesourcery.com>
6872
6873 Teach linux gdbserver to step-over-breakpoints.
6874
6875 * linux-low.c (can_hardware_single_step): New.
6876 (supports_breakpoints): New.
6877 (handle_extended_wait): If stopping threads, read the stop pc of
6878 the new cloned LWP.
6879 (get_pc): New.
6880 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6881 low target doesn't support retrieving the PC.
6882 (add_lwp): Set last_resume_kind to resume_continue.
6883 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6884 (linux_attach): Don't clear stop_expected. Set the lwp's
6885 last_resume_kind to resume_stop.
6886 (linux_detach_one_lwp): Don't check for removed breakpoints.
6887 (check_removed_breakpoint): Delete.
6888 (status_pending_p): Rename to ...
6889 (status_pending_p_callback): ... this. Don't check for removed
6890 breakpoints. Don't consider threads that are stopped from GDB's
6891 perspective.
6892 (linux_wait_for_lwp): Always read the stop_pc here.
6893 (cancel_breakpoint): New.
6894 (step_over_bkpt): New global.
6895 (linux_wait_for_event_1): Implement stepping over breakpoints.
6896 (gdb_wants_lwp_stopped): New.
6897 (gdb_wants_all_stopped): New.
6898 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6899 single-step traps here. Store the thread's last reported target
6900 wait status.
6901 (send_sigstop): Don't clear stop_expected. Always set it,
6902 instead.
6903 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6904 (cancel_finished_single_step): New.
6905 (cancel_finished_single_steps): New.
6906 (wait_for_sigstop): Don't cancel finished single-step traps here.
6907 (linux_resume_one_lwp): Don't check for removed breakpoints.
6908 Don't set `step' on non-hardware step archs.
6909 (linux_set_resume_request): Ignore resume_stop requests if already
6910 stopping or stopped. Set the lwp's last_resume_kind.
6911 (resume_status_pending_p): Don't check for removed breakpoints.
6912 (need_step_over_p): New.
6913 (start_step_over): New.
6914 (finish_step_over): New.
6915 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6916 requests. Clear the thread's last reported target waitstatus.
6917 Don't use the `suspended' flag. Don't consider pending breakpoints.
6918 (linux_resume): Start a step-over if necessary.
6919 (proceed_one_lwp): New.
6920 (proceed_all_lwps): New.
6921 (unstop_all_lwps): New.
6922 * linux-low.h (struct lwp_info): Rewrite comment for the
6923 `suspended' flag. Add the `stop_pc' field. Delete the
6924 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6925 Add `'last_resume_kind' and `need_step_over' fields.
6926 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6927 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6928 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6929 (set_raw_breakpoint_at): New.
6930 (set_breakpoint_at): Rewrite to use it.
6931 (reinsert_breakpoint_handler): Delete.
6932 (set_reinsert_breakpoint): New.
6933 (reinsert_breakpoint_by_bp): Delete.
6934 (delete_reinsert_breakpoints): New.
6935 (uninsert_breakpoint): Rewrite.
6936 (uninsert_breakpoints_at): New.
6937 (reinsert_breakpoint): Rewrite.
6938 (reinsert_breakpoints_at): New.
6939 (check_breakpoints): Rewrite.
6940 (breakpoint_here): New.
6941 (breakpoint_inserted_here): New.
6942 (check_mem_read): Adjust.
6943 * mem-break.h (breakpoints_supported, breakpoint_here)
6944 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6945 (reinsert_breakpoint_by_bp): Delete declaration.
6946 (delete_reinsert_breakpoints): Declare.
6947 (reinsert_breakpoint): Delete declaration.
6948 (reinsert_breakpoints_at): Declare.
6949 (uninsert_breakpoint): Delete declaration.
6950 (uninsert_breakpoints_at): Declare.
6951 (check_breakpoints): Adjust prototype.
6952 * server.h: Adjust include order.
6953 (struct thread_info): Declare here. Add a `last_status' field.
6954
30ba68cb
MS
69552010-03-23 Michael Snyder <msnyder@vmware.com>
6956
6957 * server.c (crc32): New function.
6958 (handle_query): Add handling for 'qCRC:' request.
6959
b9a881c2
PA
69602010-03-23 Pedro Alves <pedro@codesourcery.com>
6961
6962 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6963 lwp had been stopped by a watchpoint.
6964
e92d13d5
PA
69652010-03-16 Pedro Alves <pedro@codesourcery.com>
6966
6967 * server.h (internal_error): Declare.
6968 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6969 * utils.c (internal_error): New function.
6970
64daa791
AS
69712010-03-15 Andreas Schwab <schwab@redhat.com>
6972
6973 * configure.srv: Fix typo setting srv_regobj.
6974
f52cd8cd
PA
69752010-03-15 Pedro Alves <pedro@codesourcery.com>
6976
6977 * linux-low.c (fetch_register): Avoid passing a non string literal
6978 format to `error'.
6979 (usr_store_inferior_registers): Ditto.
6980
93ae6fdc
PA
69812010-03-14 Pedro Alves <pedro@codesourcery.com>
6982
6983 * linux-low.c (linux_write_memory): Bail out early if peeking
6984 memory failed.
6985
c3adc08c
PA
69862010-03-14 Pedro Alves <pedro@codesourcery.com>
6987
6988 * linux-low.h (struct lwp_info): New fields
6989 `stopped_by_watchpoint' and `stopped_data_address'.
6990 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6991 here, and cache them in the lwp object.
6992 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6993 directly.
6994 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6995 field.
6996 (linux_stopped_by_watchpoint): Rewrite.
6997 (linux_stopped_data_address): Rewrite.
6998
bce522a2
PA
69992010-03-06 Simo Melenius <simo.melenius@iki.fi>
7000
7001 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7002 switching the current inferior, not before.
7003
90884b2b
L
70042010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7005
7006 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7007 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7008 i386-linux.c and amd64-linux.c.
7009 (reg-i386.o): Removed.
7010 (reg-i386.c): Likewise.
7011 (reg-i386-linux.o): Likewise.
7012 (reg-i386-linux.c): Likewise.
7013 (reg-x86-64.o): Likewise.
7014 (reg-x86-64.c): Likewise.
7015 (reg-x86-64-linux.o): Likewise.
7016 (reg-x86-64-linux.c): Likewise.
7017 (i386.o): New.
7018 (i386.c): Likewise.
7019 (i386-linux.o): Likewise.
7020 (i386-linux.c): Likewise.
7021 (amd64.o): Likewise.
7022 (amd64.c): Likewise.
7023 (amd64-linux.o): Likewise.
7024 (amd64-linux.c): Likewise.
7025
7026 * configure.srv (srv_i386_regobj): New.
7027 (srv_i386_linux_regobj): Likewise.
7028 (srv_amd64_regobj): Likewise.
7029 (srv_amd64_linux_regobj): Likewise.
7030 (srv_i386_32bit_xmlfiles): Likewise.
7031 (srv_i386_64bit_xmlfiles): Likewise.
7032 (srv_i386_xmlfiles): Likewise.
7033 (srv_amd64_xmlfiles): Likewise.
7034 (srv_i386_linux_xmlfiles): Likewise.
7035 (srv_amd64_linux_xmlfiles): Likewise.
7036 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7037 srv_xmlfiles to $srv_i386_xmlfiles.
7038 (i[34567]86-*-mingw32ce*): Likewise.
7039 (i[34567]86-*-mingw*): Likewise.
7040 (i[34567]86-*-nto*): Likewise.
7041 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7042 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7043 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7044 (x86_64-*-linux*): Likewise.
7045
7046 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7047 (init_registers_amd64_linux): New.
7048 (x86_arch_setup): Replace init_registers_x86_64_linux with
7049 init_registers_amd64_linux.
7050
193f13e6
MK
70512010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7052
7053 * configure.ac: Check for libdl. If it is not available link against
7054 static libthread_db.
7055 * configure: Regenerate.
7056
85d721b8
PA
70572010-02-22 Pedro Alves <pedro@codesourcery.com>
7058
7059 PR9605
7060
7061 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7062 handing a read watchpoint.
7063 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7064
6076632b
DE
70652010-02-12 Doug Evans <dje@google.com>
7066
7067 * linux-low.c (linux_supports_tracefork_flag): Document.
7068 (linux_look_up_symbols): Add comment.
7069
3327ccf7
L
70702010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7071
7072 * regcache.c (supply_register): Clear regcache if buf is NULL.
7073
0718675c 70742010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7075 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7076
7077 * inferiors.c (find_inferior): Add function documentation.
7078 (unloaded_dll): Handle the case where the unloaded dll has not
7079 been previously registered in the dll list.
7080
177321bd
DJ
70812010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7082
7083 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7084 (thumb2_breakpoint): New.
7085 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7086
2b009048
DJ
70872010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7088
7089 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7090 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7091 breakpoints.
7092
3be029c7
PA
70932010-01-21 Pedro Alves <pedro@codesourcery.com>
7094
7095 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7096
18f5de3b
JK
70972010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7098
7099 * linux-s390-low.c (s390_collect_ptrace_register)
7100 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7101
3743bb4f
DE
71022010-01-21 Doug Evans <dje@google.com>
7103
14ce3065
DE
7104 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7105 (PTRACE_ARG4_TYPE): New macro.
7106 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7107 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7108 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7109 (usr_store_inferior_registers): Ditto.
7110 (linux_read_memory, linux_write_memory): Ditto.
7111 (linux_test_for_tracefork): Ditto.
7112
3743bb4f
DE
7113 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7114 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7115
8b315be5
PA
71162010-01-21 Pedro Alves <pedro@codesourcery.com>
7117
7118 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7119 target.
7120
85492558
PA
71212010-01-21 Pedro Alves <pedro@codesourcery.com>
7122
7123 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7124 prototype to take a regcache. Adjust.
7125
442ea881
PA
71262010-01-20 Pedro Alves <pedro@codesourcery.com>
7127
7128 * regcache.h (struct thread_info): Forward declare.
7129 (struct regcache): New.
7130 (new_register_cache): Adjust prototype.
7131 (get_thread_regcache): Declare.
7132 (free_register_cache): Adjust prototype.
7133 (registers_to_string, registers_from_string): Ditto.
7134 (supply_register, supply_register_by_name, collect_register)
7135 (collect_register_as_string, collect_register_by_name): Ditto.
7136 * regcache.c (struct inferior_regcache_data): Delete.
7137 (get_regcache): Rename to ...
7138 (get_thread_regcache): ... this. Adjust. Switch inferior before
7139 fetching registers.
7140 (regcache_invalidate_one): Adjust.
7141 (regcache_invalidate): Fix prototype.
7142 (new_register_cache): Return the new register cache.
7143 (free_register_cache): Change prototype.
7144 (realloc_register_cache): Adjust.
7145 (registers_to_string): Change prototype to take a regcache. Adjust.
7146 (registers_from_string): Ditto.
7147 (register_data): Ditto.
7148 (supply_register): Ditto.
7149 (supply_register_by_name): Ditto.
7150 (collect_register): Ditto.
7151 (collect_register_as_string): Ditto.
7152 (collect_register_by_name): Ditto.
7153 * server.c (process_serial_event): Adjust.
7154 * linux-low.h (regset_fill_func, regset_store_func): Change
7155 prototype.
7156 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7157 Change prototype.
7158 * linux-low.c (get_stop_pc): Adjust.
7159 (check_removed_breakpoint): Adjust.
7160 (linux_wait_for_event): Adjust.
7161 (linux_resume_one_lwp): Adjust.
7162 (fetch_register): Add regcache parameter. Adjust.
7163 (usr_store_inferior_registers): Ditto.
7164 (regsets_fetch_inferior_registers): Ditto.
7165 (regsets_store_inferior_registers): Ditto.
7166 (linux_fetch_registers, linux_store_registers): Ditto.
7167 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7168 regcache. Adjust.
43aaf8b6
PA
7169 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7170 Ditto.
442ea881
PA
7171 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7172 prototype to take a regcache.
7173 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7174 * remote-utils.c (convert_ascii_to_int, outreg)
7175 (prepare_resume_reply): Change prototype to take a regcache.
7176 Adjust.
7177 * target.h (struct target_ops) <fetch_registers, store_registers>:
7178 Change prototype to take a regcache.
7179 (fetch_inferior_registers, store_inferior_registers): Change
7180 prototype to take a regcache. Adjust.
7181 * proc-service.c (ps_lgetregs): Adjust.
7182 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7183 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7184 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7185 take a regcache. Adjust.
7186 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7187 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7188 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7189 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7190 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7191 (cris_cannot_fetch_register):
7192 (cris_breakpoint_at): Change prototype to take a regcache.
7193 Adjust.
7194 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7195 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7196 to take a regcache. Adjust.
7197 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7198 Adjust.
7199 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7200 take a regcache. Adjust.
7201 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7202 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7203 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7204 * linux-mips-low.c (mips_get_pc):
7205 (mips_set_pc): Change prototype to take a regcache. Adjust.
7206 (mips_reinsert_addr): Adjust.
7207 (mips_collect_register): Change prototype to take a regcache.
7208 Adjust.
7209 (mips_supply_register):
7210 (mips_collect_register_32bit, mips_supply_register_32bit)
7211 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7212 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7213 * linux-ppc-low.c (ppc_supply_ptrace_register)
7214 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7215 (parse_spufs_run): Adjust.
7216 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7217 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7218 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7219 take a regcache. Adjust.
7220 * linux-s390-low.c (s390_collect_ptrace_register)
7221 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7222 (s390_set_pc): Change prototype to take a regcache. Adjust.
7223 (s390_arch_setup): Adjust.
7224 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7225 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7226 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7227 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7228 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7229 regcache. Adjust.
7230 (sparc_breakpoint_at): Adjust.
7231 * linux-xtensa-low.c (xtensa_fill_gregset):
7232 (xtensa_store_gregset):
7233 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7234 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7235 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7236 prototype to take a regcache. Adjust.
7237 * win32-arm-low.c (arm_fetch_inferior_register)
7238 (arm_store_inferior_register): Change prototype to take a
7239 regcache. Adjust.
7240 * win32-i386-low.c (i386_fetch_inferior_register)
7241 (i386_store_inferior_register): Change prototype to take a
7242 regcache. Adjust.
7243 * win32-low.c (child_fetch_inferior_registers)
7244 (child_store_inferior_registers): Change prototype to take a
7245 regcache. Adjust.
7246 (win32_wait): Adjust.
7247 (win32_fetch_inferior_registers): Change prototype to take a
7248 regcache. Adjust.
7249 (win32_store_inferior_registers): Adjust.
7250 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7251 store_inferior_register>: Change prototype to take a regcache.
7252
60c3d7b0
DE
72532010-01-20 Doug Evans <dje@google.com>
7254
7255 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7256 #ifdef.
7257 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7258 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7259
dc146f7c
VP
72602010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7261
7262 * linux-low.c (linux_core_of_thread): New.
7263 (compare_ints, show_process, list_threads): New.
7264 (linux_qxfer_osdata): Report threads and cores.
7265 (linux_target_op): Register linux_core_of_thread.
7266 * remote-utils.c (prepare_resume_reply): Report the core.
7267 (buffer_xml_printf): Support %d specifier.
7268 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7269 New.
7270 (handle_query): Handle qXfer:threads. Announce availability
7271 thereof.
7272 * target.h (struct target_ops): New field core_of_thread.
7273
7803799a
UW
72742010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7275
7276 * Makefile.in (clean): Remove new generated files.
7277 (reg-s390.o, reg-s390.c): Remove rules.
7278 (reg-s390x.o, reg-s390x.c): Likewise.
7279 (s390-linux32.o, s390-linux32.c): Add rules.
7280 (s390-linux64.o, s390-linux64.c): Likewise.
7281 (s390x-linux64.o, s390x-linux64.c): Likewise.
7282 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7283 * linux-s390-low.c: Include <elf.h>.
7284 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7285 (init_registers_s390): Remove prototype.
7286 (init_registers_s390x): Likewise.
7287 (init_registers_s390_linux32): Add prototype.
7288 (init_registers_s390_linux64): Likewise.
7289 (init_registers_s390x_linux64): Likewise.
7290 (s390_num_regs_3264): New define.
7291 (s390_regmap_3264): New global variable.
7292 (s390_cannot_fetch_register): Remove obsolete check.
7293 (s390_cannot_store_register): Likewise.
7294 (s390_collect_ptrace_register): Handle upper/lower register halves.
7295 (s390_supply_ptrace_register): Likewise.
7296 (s390_fill_gregset): Update to register number changes.
7297 (s390_get_hwcap): New routine.
7298 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7299 Install appropriate regmap and register set.
7300
6e7ffa39
JB
73012010-01-01 Joel Brobecker <brobecker@adacore.com>
7302
7303 * server.c (gdbserver_version): Update copyright year to 2010.
7304 * gdbreplay.c (gdbreplay_version): Likewise.
7305
957f3f49
DE
73062009-12-28 Doug Evans <dje@google.com>
7307
7308 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7309 elf/external.h. Include <elf.h> instead but only if necessary.
7310
ca5c370d
PA
73112009-12-28 Pedro Alves <pedro@codesourcery.com>
7312
7313 * linux-low.c (linux_remove_process): Remove `detaching'
7314 parameter. Don't release/detach from thread_db here.
7315 (linux_kill): Release/detach from thread_db here, ...
7316 (linux_detach): ... and here, before actually detaching.
7317 (linux_wait_1): ... and here, when a process exits.
7318 * thread-db.c (any_thread_of): New.
7319 (thread_db_free): Switch the current inferior to a thread of the
7320 passed in process.
7321
4ee62156
DE
73222009-12-21 Doug Evans <dje@google.com>
7323
d90e6a88
DE
7324 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7325
c5f62d5f
DE
7326 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7327 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7328 warning ifndef __NR_tkill. Move setting of errno there too.
7329 Delete unnecessary resetting of errno after syscall.
7330 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7331
10e86dd7
DE
7332 * configure.ac: Check for dladdr.
7333 * config.in: Regenerate.
7334 * configure: Regenerate.
7335 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7336 (try_thread_db_load): Update.
7337
4ee62156
DE
7338 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7339
00f515da
DE
73402009-12-18 Doug Evans <dje@google.com>
7341
e9464885
DE
7342 * event-loop.c: Include unistd.h if it exists.
7343
07d4f67e
DE
7344 * linux-low.c (my_waitpid): Move definition away from being in
7345 between linux_tracefork_child/linux_test_for_tracefork.
7346
00f515da
DE
7347 * gdb_proc_service.h (psaddr_t): Fix type.
7348 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7349 signature to match glibc.
7350
1de1badb
DE
73512009-12-16 Doug Evans <dje@google.com>
7352
7353 * linux-low.c (linux_read_memory): Fix argument to read.
7354
aeeb81d1
PA
73552009-11-26 Pedro Alves <pedro@codesourcery.com>
7356
7357 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7358 events, don't leave current_inferior pointing at null.
7359
10357975
PA
73602009-11-26 Pedro Alves <pedro@codesourcery.com>
7361
7362 * win32-low.c (LOG): Delete.
7363 (OUTMSG): Output to stderr.
7364 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7365 on compile time LOG macro.
7366 (win32_wait): Fix debug output.
7367
cf6e3471
PA
73682009-11-26 Pedro Alves <pedro@codesourcery.com>
7369
7370 * win32-low.c (win32_add_one_solib): If the dll name is
7371 "ntdll.dll", prepend the system directory to the dll path.
7372
0c85e18e
MK
73732009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7374
7375 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7376
9ac544ce 73772009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7378 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7379
7380 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7381 * configure.ac: Check for __mcoldfire__ and set
7382 gdb_cv_m68k_is_coldfire.
7383 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7384 reg-cf.o and reg-m68k.o.
7385 * configure: Regenerated.
7386
fd7dd3e6
PA
73872009-11-16 Pedro Alves <pedro@codesourcery.com>
7388
7389 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7390 Pass it to thread_db_free.
7391 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7392 proper `detaching' argument to linux_remove_process.
7393 * linux-low.h (thread_db_free): Add `detaching' parameter.
7394 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7395 to thread_db_free.
7396 (thread_db_free): Add `detaching' parameter. Only
7397 call td_ta_clear_event if detaching from process.
7398
75aa492e
MK
73992009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7400
7401 * thread-db.c (thread_db_free): Fix typo.
7402
21e1bee4
PP
74032009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7404
7405 PR gdb/10838
7406 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7407
8838b45e
NS
74082009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7409
7410 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7411 with an i686 compiler.
7412 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7413 needed.
7414 * configure: Rebuilt.
7415
8a35fb51
SL
74162009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7417
7418 PR gdb/10783
7419
7420 * server.c (handle_search_memory_1): Correct read_addr initialization
7421 in loop for searching subsequent chunks.
7422
96f15937
PP
74232009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7424
7425 * configure.ac: New --with-libthread-db option.
7426 * thread-db.c: Allow direct dependence on libthread_db.
7427 (thread_db_free): Adjust.
7428 * config.in: Regenerate.
7429 * configure: Likewise.
889bf7c5 7430
5f7d1694
PP
74312009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7432
7433 PR gdb/10757
7434 * thread-db.c (attach_thread): New function.
7435 (maybe_attach_thread): Return success/failure.
7436 (find_new_threads_callback): Adjust.
889bf7c5
PA
7437 (thread_db_find_new_threads): Loop until no new threads.
7438
88e3b899
PA
74392009-10-13 Pedro Alves <pedro@codesourcery.com>
7440
7441 * proc-service.c (ps_lgetregs): Formatting.
7442
cdbfd419
PP
74432009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7444
7445 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7446 * configure.ac: Adjust.
7447 * linux-low.h (struct process_info_private): Move members to struct
7448 thread_db.
7449 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7450 * linux-low.c (linux_remove_process): Adjust.
7451 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7452 * server.c (handle_query): Move code ...
7453 (handle_monitor_command): ... here. New function.
7454 * target.h (struct target_ops): New member.
7455 * thread-db.c (struct thread_db): New.
7456 (libthread_db_search_path): New variable.
7457 (thread_db_create_event, thread_db_enable_reporting)
7458 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7459 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7460 (try_thread_db_load_1, dladdr_to_soname): New functions.
7461 (try_thread_db_load, thread_db_load_search): New functions.
7462 (thread_db_init): Search for libthread_db.
7463 (thread_db_free): New function.
7464 (thread_db_handle_monitor_command): Likewise.
7465 * config.in: Regenerate.
7466 * configure: Regenerate.
889bf7c5 7467
4168d2d6
UW
74682009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7469
7470 * spu-low.c (spu_kill): Wait for inferior to terminate.
7471 Call clear_inferiors.
7472 (spu_detach): Call clear_inferiors.
7473
81ecdfbb
RW
74742009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7475
7476 * aclocal.m4: Regenerate.
7477 * config.in: Likewise.
7478 * configure: Likewise.
7479
0b9ff2c0
UW
74802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7481
7482 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7483 (parse_spufs_run): New function.
7484 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7485 (ppc_breakpoint_at): Handle SPU breakpoints.
7486
efcbbd14
UW
74872009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7488
7489 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7490 (SPUFS_MAGIC): Define.
7491 (spu_enumerate_spu_ids): New function.
7492 (linux_qxfer_spu): New function.
7493 (linux_target_ops): Install linux_qxfer_spu.
7494
f4d9bade
UW
74952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7496
7497 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7498 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7499 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7500 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7501 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7502 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7503 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7504 (init_registers_powerpc_cell32l): Add prototype.
7505 (init_registers_powerpc_cell64l): Likewise.
7506 (ppc_arch_setup): Detect Cell/B.E. architecture.
7507
96e946ca
RW
75082009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7509
7510 * Makefile.in (datarootdir): New variable.
7511
58d6951d
DJ
75122009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7513
7514 * linux-low.c (linux_write_memory): Update debugging output.
7515 * Makefile.in (clean): Add new descriptions.
7516 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7517 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7518 * configure.srv: Add new files for arm*-*-linux*.
7519 * linux-arm-low.c: Add new declarations.
7520 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7521 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7522 (HWCAP_VFPv3D16): New.
7523 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7524 instead of __IWMMXT__.
7525 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7526 (arm_arch_setup): New.
7527 (target_regsets): Remove #ifdef. Add VFP regset.
7528 (the_low_target): Use arm_arch_setup.
7529
12b42a12
DJ
75302009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7531
7532 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7533 the main thread again.
7534
ac8c974e
AR
75352009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7536
7537 Adding Neutrino gdbserver.
7538 * configure: Regenerated.
7539 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7540 * configure.srv (i[34567]86-*-nto*): New target.
7541 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7542 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7543 (nto_comctrl) [__QNX__]: New function.
7544 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7545
4424e0c3 75462009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7547
7548 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7549 srv_tgtobj.
7550
912cf4ba
PA
75512009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7552 Pedro Alves <pedro@codesourcery.com>
7553
7554 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7555 don't support CONTEXT_EXTENDED_REGISTERS.
7556 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7557 (the_low_target): Install them.
7558 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7559 failing with ERROR_PIPE_NOT_CONNECTED.
7560
aa5ca48f
DE
75612009-06-30 Doug Evans <dje@google.com>
7562 Pierre Muller <muller@ics.u-strasbg.fr>
7563
7564 Add h/w watchpoint support to x86-linux, win32-i386.
7565 * Makefile.in (SFILES): Add i386-low.c
7566 (i386_low_h): Define.
7567 (i386-low.o): Add dependencies.
7568 (linux-x86-low.o): Add i386-low.h dependency.
7569 (win32-i386-low.o): Ditto.
7570 * i386-low.c: New file.
7571 * i386-low.h: New file.
7572 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7573 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7574 * linux-low.c (linux_add_process): Initialize arch_private.
7575 (linux_remove_process): Free arch_private.
7576 (add_lwp): Initialize arch_private.
7577 (delete_lwp): Free arch_private.
7578 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7579 provided.
7580 * linux-low.h (process_info_private): New member arch_private.
7581 (lwp_info): New member arch_private.
7582 (linux_target_ops): New members new_process, new_thread,
7583 prepare_to_resume.
7584 (ptid_of): New macro.
7585 * linux-x86-low.c: Include stddef.h, i386-low.h.
7586 (arch_process_info): New struct.
7587 (arch_lwp_info): New struct.
7588 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7589 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7590 (i386_dr_low_get_status): New function.
7591 (x86_insert_point, x86_remove_point): New functions.
7592 (x86_stopped_by_watchpoint): New function.
7593 (x86_stopped_data_address): New function.
7594 (x86_linux_new_process, x86_linux_new_thread): New functions.
7595 (x86_linux_prepare_to_resume): New function.
7596 (the_low_target): Add entries for insert_point, remove_point,
7597 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7598 prepare_to_resume.
7599 * server.c (debug_hw_points): New global.
7600 (monitor_show_help): Document set debug-hw-points.
7601 (handle_query): Process "set debug-hw-points".
7602 * server.h (debug_hw_points): Declare.
7603 (paddress): Declare.
7604 * utils.c (NUMCELLS, CELLSIZE): New macros.
7605 (get_sell, xsnprintf, paddress): New functions.
7606 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7607 remove_point, stopped_by_watchpoint, stopped_data_address.
7608 * win32-i386-low.c: Include i386-low.h.
7609 (debug_reg_state): Replaces dr.
7610 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7611 (i386_dr_low_get_status): New function.
7612 (i386_insert_point, i386_remove_point): New functions.
7613 (i386_stopped_by_watchpoint): New function.
7614 (i386_stopped_data_address): New function.
7615 (i386_initial_stuff): Update.
7616 (get_thread_context,set_thread_context,i386_thread_added): Update.
7617 (the_low_target): Add entries for insert_point,
7618 remove_point, stopped_by_watchpoint, stopped_data_address.
7619 * win32-low.c (win32_insert_watchpoint): New function.
7620 (win32_remove_watchpoint): New function.
7621 (win32_stopped_by_watchpoint): New function.
7622 (win32_stopped_data_address): New function.
7623 (win32_target_ops): Add entries for insert_watchpoint,
7624 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7625 * win32-low.h (win32_target_ops): New members insert_point,
7626 remove_point, stopped_by_watchpoint, stopped_data_address.
7627
d993e290
PA
76282009-06-25 Pedro Alves <pedro@codesourcery.com>
7629
7630 * server.c (process_serial_event): Re-return unsupported, not
7631 error, if the type isn't recognized. Re-allow supporting only
7632 insert or remove packets. Also call require_running for
7633 breakpoints. Add missing break statement to default case. Tidy.
7634 * target.h (struct target_ops): Rename insert_watchpoint to
7635 insert_point, and remove_watchpoint to remove_point.
7636
7637 * linux-low.h (struct linux_target_ops): Likewise.
7638 * linux-low.c (linux_insert_watchpoint): Rename to ...
7639 (linux_insert_point): ... this. Adjust.
7640 (linux_remove_watchpoint): Rename to ...
7641 (linux_remove_point): ... this. Adjust.
7642 (linux_target_ops): Adjust.
7643 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7644 (cris_insert_point): ... this.
7645 (cris_remove_watchpoint): Rename to ...
7646 (cris_remove_point): ... this.
7647 (the_low_target): Adjust.
7648
0f54c268
PM
76492009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7650
7651 * server.c (handle_v_kill): Pass signal_pid to
7652 kill_inferior if multi_process is zero.
7653
c6314022
AR
76542009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7655
7656 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7657 * target.h (target_ops): Comment for *_watchpoint to make it clear
7658 the functions can get types '0' and '1'.
7659
4463ce24
AR
76602009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7661
7662 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7663 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7664 * regcache.c (get_regcache): Likewise.
7665 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7666 * win32-low.c (child_fetch_inferior_registers): Remove check for
7667 regno 0.
7668
cf8fd78b
PA
76692009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7670 Pedro Alves <pedro@codesourcery.com>
7671
7672 * target.h (struct target_ops) <supports_multi_process>: New
7673 callback.
7674 (target_supports_multi_process): New.
7675 * server.c (handle_query): Even if GDB reports support, only
7676 enable multi-process if the target also supports it. Report
7677 multi-process support only if the target backend supports it.
7678 * linux-low.c (linux_supports_multi_process): New function.
7679 (linux_target_ops): Install it as target_supports_multi_process
7680 callback.
7681
47c0c975
DE
76822009-05-24 Doug Evans <dje@google.com>
7683
e09875d4
DE
7684 Global renaming of find_thread_pid to find_thread_ptid.
7685 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7686 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7687 All callers updated.
7688
e27d73f6
DE
7689 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7690 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7691 directly.
7692
47c0c975
DE
7693 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7694 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7695 (linux_resume_one_lwp): Ditto.
7696
2acc282a
DE
76972009-05-23 Doug Evans <dje@google.com>
7698
7699 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7700 from struct inferior_list_entry * to struct lwp_info *.
7701 All callers updated.
7702
9f1036c1
DE
77032009-05-13 Doug Evans <dje@google.com>
7704
7705 * linux-x86-low.c: Don't include assert.h.
7706 (x86_siginfo_fixup): Use fatal, not assert.
7707 (x86_arch_setup): Fix comment.
7708
d0722149
DE
77092009-05-12 Doug Evans <dje@google.com>
7710
7711 Biarch support for i386/amd64 gdbserver.
7712 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7713 Add linux-x86-low.c.
7714 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7715 (linux-x86-low.o): Add.
7716 * linux-x86-64-low.c: Delete.
7717 * linux-i386-low.c: Delete.
7718 * linux-x86-low.c: New file.
7719 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7720 linux-x86-low.o.
7721 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7722 linux-x86-low.o.
7723 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7724 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7725 (linux_child_pid_to_exec_file): New function.
7726 (elf_64_header_p, elf_64_file_p): New functions.
7727 (siginfo_fixup): New function.
7728 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7729 give target a chance to convert layout.
7730 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7731 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7732
fdeb2a12
DE
77332009-05-07 Doug Evans <dje@google.com>
7734
7735 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7736 (regsets_store_inferior_registers): Ditto.
7737
a6dbe5df
PA
77382009-05-06 Pedro Alves <pedro@codesourcery.com>
7739
7740 PR server/10048
7741
7742 * linux-low.c (must_set_ptrace_flags): Delete.
7743 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7744 of the global.
7745 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7746 `lwp->must_set_ptrace_flags' instead.
ba42693b 7747 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7748 (linux_wait_1): ... not here.
7749
5091eb23
DE
77502009-04-30 Doug Evans <dje@google.com>
7751
9f767825
DE
7752 * inferiors.c (started_inferior_callback): New function.
7753 (attached_inferior_callback): New function.
7754 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7755 * server.c (print_started_pid, print_attached_pid): New functions.
7756 (detach_or_kill_for_exit): New function.
7757 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7758 * server.h (have_started_inferiors_p): Declare.
7759 (have_attached_inferiors_p): Declare.
7760
5091eb23
DE
7761 * inferiors.c (remove_process): Fix memory leak, free process.
7762 * linux-low.c (linux_remove_process): New function.
7763 (linux_kill): Call it instead of remove_process.
7764 (linux_detach, linux_wait_1): Ditto.
7765
155c8968
PA
77662009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7767
7768 * configure.srv: Add x86 Windows CE target.
7769
7fe519cb
UW
77702009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7771
7772 * inferiors.c (get_thread_process): Make global.
7773 * server.h (get_thread_process): Add prototype.
7774 * thread-db.c (find_one_thread): Use get_thread_process
7775 instead of current_process.
7776 (thread_db_get_tls_address): Do not crash if called when
7777 thread layer is not yet initialized.
7778
5472f405
UW
77792009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7780
7781 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7782 * spu-low.c (current_tid): Rename to ...
7783 (current_ptid): ... this.
7784 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7785 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7786 ptid_get_lwp (current_ptid) instead of current_tid.
7787 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7788 instead of current_tid. Use find_process_pid to verify pid
7789 argument is valid. Pass proper argument to remove_process.
7790 (spu_thread_alive): Compare current_ptid instead of current_tid.
7791 (spu_resume): Likewise.
7792
55ac2b99
PA
77932009-04-02 Pedro Alves <pedro@codesourcery.com>
7794
7795 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7796 variable.
7797
95954743
PA
77982009-04-01 Pedro Alves <pedro@codesourcery.com>
7799
7800 Implement the multiprocess extensions, and add linux multiprocess
7801 support.
7802
7803 * server.h (ULONGEST): Declare.
7804 (struct ptid, ptid_t): New.
7805 (minus_one_ptid, null_ptid): Declare.
7806 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7807 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7808 (struct inferior_list_entry): Change `id' type from unsigned from
7809 to ptid_t.
7810 (struct sym_cache, struct breakpoint, struct
7811 process_info_private): Forward declare.
7812 (struct process_info): Declare.
7813 (current_process): Declare.
7814 (all_processes): Declare.
7815 (initialize_inferiors): Declare.
7816 (add_thread): Adjust to use ptid_t.
7817 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7818 (add_process, remove_process, find_thread_pid): Declare.
7819 (find_inferior_id): Adjust to use ptid_t.
7820 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7821 (multi_process): Declare.
7822 (push_event): Adjust to use ptid_t.
7823 (read_ptid, write_ptid): Declare.
7824 (prepare_resume_reply): Adjust to use ptid_t.
7825 (clear_symbol_cache): Declare.
7826 * inferiors.c (all_processes): New.
7827 (null_ptid, minus_one_ptid): New.
7828 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7829 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7830 (add_thread): Change unsigned long to ptid. Remove gdb_id
7831 parameter. Adjust.
7832 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7833 (gdb_id_to_thread): Rename to ...
7834 (find_thread_pid): ... this. Change unsigned long to ptid.
7835 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7836 (loaded_dll, pull_pid_from_list): Adjust.
7837 (add_process, remove_process, find_process_pid)
7838 (get_thread_process, current_process, initialize_inferiors): New.
7839 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7840 (struct target_waitstatus) <related_pid>: Ditto.
7841 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7842 return type to int.
7843 (struct target_ops) <join>: Add `pid' argument.
7844 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7845 (struct target_ops) <wait>: Add `ptid' field. Change return type
7846 to ptid.
7847 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7848 (mywait): Add `ptid' argument. Change return type to ptid_t.
7849 (target_pid_to_str): Declare.
7850 * target.c (set_desired_inferior): Adjust to use ptids.
7851 (mywait): Add new `ptid' argument. Adjust.
7852 (target_pid_to_str): New.
7853 * mem-break.h (free_all_breakpoints): Declare.
7854 * mem-break.c (breakpoints): Delelete.
7855 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7856 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7857 to use per-process breakpoint list.
7858 (free_all_breakpoints): New.
7859 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7860 (symbol_cache, all_symbols_looked_up): Delete.
7861 (hexchars): New.
7862 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7863 read_ptid): New.
7864 (prepare_resume_reply): Change ptid argument's type from unsigned
7865 long to ptid_t. Adjust. Implement W;process and X;process.
7866 (free_sym_cache, clear_symbol_cache): New.
7867 (look_up_one_symbol): Adjust to per-process symbol cache. *
7868 * server.c (cont_thread, general_thread, step_thread): Change type
7869 to ptid_t.
7870 (attached): Delete.
7871 (multi_process): New.
7872 (last_ptid): Change type to ptid_t.
7873 (struct vstop_notif) <ptid>: Change type to ptid_t.
7874 (queue_stop_reply, push_event): Change `ptid' argument's type to
7875 ptid_t.
7876 (discard_queued_stop_replies): Add `pid' argument.
7877 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7878 changes. Don't reference the `attached' global.
7879 (attach_inferior): Adjust to mywait interface changes.
7880 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7881 features. Handle and report "multiprocess+". Handle
7882 "qAttached:PID".
7883 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7884 changes.
7885 (handle_v_kill): New.
7886 (handle_v_stopped): Adjust to use target_pid_to_str.
7887 (handle_v_requests): Allow multiple attaches and runs when
7888 multiprocess extensions are in effect. Handle "vKill".
7889 (myresume): Adjust to use ptids.
7890 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7891 (handle_status): Adjust to discard_queued_stop_replies interface
7892 change.
7893 (first_thread_of, kill_inferior_callback)
7894 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7895 (main): Call initialize_inferiors. Adjust to use ptids, killing
7896 and detaching from all inferiors. Handle multiprocess packet
7897 variants.
7898 * linux-low.h: Include gdb_proc_service.h.
7899 (struct process_info_private): New.
7900 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7901 <lwpid_of>: Use ptid_get_lwp.
7902 (get_lwp_thread): Adjust.
7903 (struct lwp_info): Add `dead' member.
7904 (find_lwp_pid): Declare.
7905 * linux-low.c (thread_db_active): Delete.
7906 (new_inferior): Adjust comment.
7907 (inferior_pid): Delete.
7908 (linux_add_process): New.
7909 (handle_extended_wait): Adjust.
7910 (add_lwp): Change unsigned long to ptid.
7911 (linux_create_inferior): Add process to processes table. Adjust
7912 to use ptids. Don't set new_inferior here.
7913 (linux_attach_lwp): Rename to ...
7914 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7915 it. Adjust to use ptids.
7916 (linux_attach_lwp): New.
7917 (linux_attach): Add process to processes table. Don't set
7918 new_inferior here.
7919 (struct counter): New.
7920 (second_thread_of_pid_p, last_thread_of_process_p): New.
7921 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7922 multiple processes.
7923 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7924 processes. Remove process from process table.
7925 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7926 to multiple processes.
7927 (any_thread_of): New.
7928 (linux_detach): Add `pid' argument, and handle it. Remove process
7929 from processes table.
7930 (linux_join): Add `pid' argument. Handle it.
7931 (linux_thread_alive): Change unsighed long argument to ptid_t.
7932 Consider dead lwps as not being alive.
7933 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7934 threads we're not interested in.
7935 (same_lwp, find_lwp_pid): New.
7936 (linux_wait_for_lwp): Change `pid' argument's type from int to
7937 ptid_t. Adjust.
7938 (linux_wait_for_event): Rename to ...
7939 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7940 from int to ptid_t. Adjust.
7941 (linux_wait_for_event): New.
7942 (linux_wait_1): Add `ptid' argument. Change return type to
7943 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7944 that exit from the process table.
7945 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7946 Adjust.
7947 (mark_lwp_dead): New.
7948 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7949 stopping all threads, mark its main lwp as dead.
7950 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7951 ptids.
7952 (fetch_register, usr_store_inferior_registers)
7953 (regsets_fetch_inferior_registers)
7954 (regsets_store_inferior_registers, linux_read_memory)
7955 (linux_write_memory): Inline `inferior_pid'.
7956 (linux_look_up_symbols): Adjust to use per-process
7957 `thread_db_active'.
7958 (linux_request_interrupt): Adjust to use ptids.
7959 (linux_read_auxv): Inline `inferior_pid'.
7960 (initialize_low): Don't reference thread_db_active.
7961 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7962 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7963 (ps_getpid): Return the pid of the current inferior.
7964 * thread-db.c (proc_handle, thread_agent): Delete.
7965 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7966 per-process data.
7967 (find_one_thread): Change argument type to ptid_t. Adjust to
7968 per-process data.
7969 (maybe_attach_thread): Adjust to per-process data and ptids.
7970 (thread_db_find_new_threads): Ditto.
7971 (thread_db_init): Ditto.
7972 * spu-low.c (spu_create_inferior, spu_attach): Add process to
7973 processes table. Adjust to use ptids.
7974 (spu_kill, spu_detach): Adjust interface. Remove process from
7975 processes table.
7976 (spu_join, spu_thread_alive): Adjust interface.
7977 (spu_wait): Adjust interface. Remove process from processes
7978 table. Adjust to use ptids.
7979 * win32-low.c (current_inferior_tid): Delete.
7980 (current_inferior_ptid): New.
7981 (debug_event_ptid): New.
7982 (thread_rec): Take a ptid. Adjust.
7983 (child_add_thread): Add `pid' argument. Adjust to use ptids.
7984 (child_delete_thread): Ditto.
7985 (do_initial_child_stuff): Add `attached' argument. Add process to
7986 processes table.
7987 (child_fetch_inferior_registers, child_store_inferior_registers):
7988 Adjust.
7989 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7990 (win32_attach): Pass 1 to do_initial_child_stuff.
7991 (win32_kill): Adjust interface. Remove process from processes
7992 table.
7993 (win32_detach): Ditto.
7994 (win32_join): Adjust interface.
7995 (win32_thread_alive): Take a ptid.
7996 (win32_resume): Adjust to use ptids.
7997 (get_child_debug_event): Ditto.
7998 (win32_wait): Adjust interface. Remove exiting process from
7999 processes table.
8000
bd99dc85
PA
80012009-04-01 Pedro Alves <pedro@codesourcery.com>
8002
8003 Non-stop mode support.
8004
8005 * server.h (non_stop): Declare.
8006 (gdb_client_data, handler_func): Declare.
8007 (delete_file_handler, add_file_handler, start_event_loop):
8008 Declare.
8009 (handle_serial_event, handle_target_event, push_event)
8010 (putpkt_notif): Declare.
8011 * target.h (enum resume_kind): New.
8012 (struct thread_resume): Replace `step' field by `kind' field.
8013 (TARGET_WNOHANG): Define.
8014 (struct target_ops) <wait>: Add `options' argument.
8015 <supports_non_stop, async, start_non_stop>: New fields.
8016 (target_supports_non_stop, target_async): New.
8017 (start_non_stop): Declare.
8018 (mywait): Add `options' argument.
8019 * target.c (mywait): Add `options' argument. Print child exit
8020 notifications here.
8021 (start_non_stop): New.
8022 * server.c (non_stop, own_buf, mem_buf): New globals.
8023 (struct vstop_notif): New.
8024 (notif_queue): New global.
8025 (queue_stop_reply, push_event, discard_queued_stop_replies)
8026 (send_next_stop_reply): New.
8027 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8028 interface changes.
8029 (attach_inferior): In non-stop mode, don't wait for the target
8030 here.
8031 (handle_general_set): Handle QNonStop.
8032 (handle_query): When handling qC, return the current general
8033 thread, instead of the first thread of the list.
8034 (handle_query): If the backend supports non-stop mode, include
8035 QNonStop+ in the qSupported query response.
8036 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8037 and non-stop mode.
8038 (handle_v_attach, handle_v_run): Handle non-stop mode.
8039 (handle_v_stopped): New.
8040 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8041 (myresume): Adjust to use resume_kind. Handle non-stop.
8042 (queue_stop_reply_callback): New.
8043 (handle_status): Handle non-stop mode.
8044 (main): Clear non_stop flag on reconnection. Use the event-loop.
8045 Refactor serial protocol handling from here ...
8046 (process_serial_event): ... to this new function. When GDB
8047 selects any thread, select one here. In non-stop mode, wait until
8048 GDB acks all pending events before exiting.
8049 (handle_serial_event, handle_target_event): New.
8050 * remote-utils.c (remote_open): Install remote_desc in the event
8051 loop.
8052 (remote_close): Remove remote_desc from the event loop.
8053 (putpkt_binary): Rename to...
8054 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8055 (putpkt_binary): New as wrapper around putpkt_binary_1.
8056 (putpkt_notif): New.
8057 (prepare_resume_reply): In non-stop mode, don't change the
8058 general_thread.
8059 * event-loop.c: New.
8060 * Makefile.in (OBJ): Add event-loop.o.
8061 (event-loop.o): New rule.
8062
8063 * linux-low.h (pid_of): Moved here.
8064 (lwpid_of): New.
8065 (get_lwp_thread): Use lwpid_of.
8066 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8067 * linux-low.c (pid_of): Delete.
8068 (inferior_pid): Use lwpid_of.
8069 (linux_event_pipe): New.
8070 (target_is_async_p): New.
8071 (delete_lwp): New.
8072 (handle_extended_wait): Use lwpid_of.
8073 (add_lwp): Don't set lwpid field.
8074 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8075 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8076 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8077 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8078 first. Adjust to linux_wait_for_event interface changes. Use
8079 lwpid_of.
8080 (linux_detach): Don't delete the main lwp here.
8081 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8082 (status_pending_p): Don't consider explicitly suspended lwps.
8083 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8084 pointer. Add OPTIONS argument. Change return type to int. Use
8085 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8086 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8087 pointer. Add status pointer argument. Return a pid instead of a
8088 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8089 changes. In non-stop mode, don't switch to a random thread.
8090 (linux_wait): Rename to...
8091 (linux_wait_1): ... this. Add target_options argument, and handle
8092 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8093 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8094 clean exit and signal exit code. Don't stop all threads in
8095 non-stop mode. In all-stop mode, only stop all threads when
8096 reporting a stop to GDB. Handle explicit thread stop requests.
8097 (async_file_flush, async_file_mark): New.
8098 (linux_wait): New.
8099 (send_sigstop): Use lwpid_of.
8100 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8101 interface changes. In non-stop mode, don't switch to a random
8102 thread.
8103 (linux_resume_one_lwp): Use lwpid_of.
8104 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8105 (linux_resume_one_thread): ... this. Handle resume_stop. In
8106 non-stop mode, don't look for pending flag in all threads.
8107 (resume_status_pending_p): Don't consider explicitly suspended
8108 threads.
8109 (my_waitpid): Reimplement. Emulate __WALL.
8110 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8111 Use lwpid_of.
8112 (sigchld_handler, linux_supports_non_stop, linux_async)
8113 (linux_start_non_stop): New.
8114 (linux_target_ops): Register linux_supports_non_stop, linux_async
8115 and linux_start_non_stop.
8116 (initialize_low): Install SIGCHLD handler.
8117 * thread-db.c (thread_db_create_event, find_one_thread)
8118 (thread_db_get_tls_address): Use lwpid_of.
8119 * win32-low.c (win32_detach): Adjust to use resume_kind.
8120 (win32_wait): Add `options' argument.
8121 * spu-low.c (spu_resume): Adjust to use resume_kind.
8122 (spu_wait): Add `options' argument.
8123
5b1c542e
PA
81242009-04-01 Pedro Alves <pedro@codesourcery.com>
8125
8126 Decouple target code from remote protocol.
8127
8128 * target.h (enum target_waitkind): New.
8129 (struct target_waitstatus): New.
8130 (struct target_ops) <wait>: Return an unsigned long. Take a
8131 target_waitstatus pointer instead of a char pointer.
8132 (mywait): Likewise.
8133 * target.c (mywait): Change prototype to return an unsigned long.
8134 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8135 * server.h (thread_from_wait, old_thread_from_wait): Delete
8136 declarations.
8137 (prepare_resume_reply): Change prototype to take a
8138 target_waitstatus.
8139 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8140 (last_status, last_ptid): New.
8141 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8142 pid instead of a signal.
8143 (attach_inferior): Remove "status" and "signal" parameters.
8144 Adjust.
8145 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8146 not as an address.
8147 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8148 (handle_v_requests, myresume): Remove "status" and "signal"
8149 parameters. Adjust.
8150 (handle_status): New.
8151 (main): Delete local `status'. Adjust.
8152 * remote-utils.c: Include target.h.
8153 (prepare_resume_reply): Change prototype to take a
8154 target_waitstatus. Adjust.
8155
8156 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8157 interface.
8158 * spu-low.c (spu_wait): Adjust.
8159 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8160 Delete.
8161 (win32_wait): Adjust.
8162
2bd7c093
PA
81632009-04-01 Pedro Alves <pedro@codesourcery.com>
8164
8165 * target.h (struct thread_resume): Delete leave_stopped member.
8166 (struct target_ops): Add a `n' argument to the `resume' callback.
8167 * server.c (start_inferior): Adjust.
8168 (handle_v_cont, myresume): Adjust.
8169 * linux-low.c (check_removed_breakpoint): Adjust to resume
8170 interface change, and to removed leave_stopped field.
8171 (resume_ptr): Delete.
8172 (struct thread_resume_array): New.
8173 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8174 resume interface change.
8175 (linux_continue_one_thread, linux_queue_one_thread)
8176 (resume_status_pending_p): Check if the resume field is NULL
8177 instead of checking the leave_stopped member.
8178 (linux_resume): Adjust to the target resume interface change.
8179 * spu-low.c (spu_resume): Adjust to the target resume interface
8180 change.
8181 * win32-low.c (win32_detach, win32_resume): Ditto.
8182
c35fafde
PA
81832009-04-01 Pedro Alves <pedro@codesourcery.com>
8184
8185 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8186 flag.
8187 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8188 pending.
8189 (linux_continue_one_thread): Only preserve the stepping flag if
8190 there's a pending breakpoint.
8191
0a59d50b
PA
81922009-03-31 Pedro Alves <pedro@codesourcery.com>
8193
8194 * server.c (main): After the inferior having exited, call
8195 remote_close before exiting gdbserver.
8196
f04c6d38
TJB
81972009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8198
8199 Fix size of FPSCR in Power 7 processors.
8200 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8201 (PPC_FEATURE_HAS_DFP): New #define.
8202 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8203 size of the FPSCR.
8204
78e5cee6
PA
82052009-03-23 Pedro Alves <pedro@codesourcery.com>
8206
8207 * server.c (handle_query) Whitespace and formatting.
8208
1b3f6016
PA
82092009-03-22 Pedro Alves <pedro@codesourcery.com>
8210
8211 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8212 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8213 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8214 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8215 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8216 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8217 Makefile.in, configure.ac: Fix whitespace throughout.
8218 * configure: Regenerate.
8219
a07b2135
PA
82202009-03-22 Pedro Alves <pedro@codesourcery.com>
8221
8222 * inferiors.c (find_inferior): Make it safe for the callback
8223 function to delete the currently iterated inferior.
8224
67cc2626
PA
82252009-03-22 Pedro Alves <pedro@codesourcery.com>
8226
8227 * Makefile.in (linuw_low_h): Move higher.
8228 (thread-db.o): Depend on $(linux_low_h).
8229
54a0b537
PA
82302009-03-17 Pedro Alves <pedro@codesourcery.com>
8231
8232 Rename "process" to "lwp" throughout.
8233
8234 * linux-low.c (all_processes): Rename to...
8235 (all_lwps): ... this.
8236 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8237 (add_process): Rename to ...
8238 (add_lwp): ... this. Adjust.
8239 (linux_create_inferior): Adjust.
8240 (linux_attach_lwp): Adjust.
8241 (linux_attach): Adjust.
8242 (linux_kill_one_process): Rename to ...
8243 (linux_kill_one_lwp): ... this. Adjust.
8244 (linux_kill): Adjust.
8245 (linux_detach_one_process): Rename to ...
8246 (linux_detach_one_lwp): ... this. Adjust.
8247 (linux_detach): Adjust.
8248 (check_removed_breakpoint): Adjust.
8249 (status_pending_p): Adjust.
8250 (linux_wait_for_process): Rename to ...
8251 (linux_wait_for_lwp): ... this. Adjust.
8252 (linux_wait_for_event): Adjust.
8253 (send_sigstop): Adjust.
8254 (wait_for_sigstop): Adjust.
8255 (stop_all_processes): Rename to ...
8256 (stop_all_lwps): ... this.
8257 (linux_resume_one_process): Rename to ...
8258 (linux_resume_one_lwp): ... this. Adjust.
8259 (linux_set_resume_request, linux_continue_one_thread)
8260 (linux_queue_one_thread, resume_status_pending_p)
8261 (usr_store_inferior_registers, regsets_store_inferior_registers)
8262 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8263 Adjust.
8264 * linux-low.h (get_process): Rename to ...
8265 (get_lwp): ... this. Adjust.
8266 (get_thread_process): Rename to ...
8267 (get_thread_lwp): ... this. Adjust.
8268 (get_process_thread): Rename to ...
8269 (get_lwp_thread): ... this. Adjust.
8270 (struct process_info): Rename to ...
8271 (struct lwp_info): ... this.
8272 (all_processes): Rename to ...
8273 (all_lwps): ... this.
8274 * proc-service.c (ps_lgetregs): Adjust.
8275 * thread-db.c (thread_db_create_event, find_one_thread)
8276 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8277
0b16c5cf
PA
82782009-03-14 Pedro Alves <pedro@codesourcery.com>
8279
8280 * server.c (handle_query): Handle "qAttached".
8281
32de4b9d
NS
82822009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8283
8284 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8285 GPLv3, update license URL.
8286
2aecd87f
DE
82872009-03-01 Doug Evans <dje@google.com>
8288
93efd302 8289 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8290 (server_h): Add gdb_signals.h.
8291 (signals.o): Update.
8292 * server.h (target_signal_from_host,target_signal_to_host_p)
8293 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8294
86b1f9c5
PM
82952009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8296
8297 * remote-utils.c (getpkt): Also generate remote-debug
8298 information if noack_mode is set.
8299
4aa995e1
PA
83002009-02-06 Pedro Alves <pedro@codesourcery.com>
8301
8302 * server.c (handle_query): Report qXfer:siginfo:read and
8303 qXfer:siginfo:write as supported and handle them.
8304 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8305 * linux-low.c (linux_xfer_siginfo): New.
8306 (linux_target_ops): Set it.
8307
62709adf
PA
83082009-01-26 Pedro Alves <pedro@codesourcery.com>
8309
8310 * server.c (gdbserver_usage): Mention --remote-debug.
8311 (main): Accept '--remote-debug' switch.
8312
aef93bd7
DE
83132009-01-18 Doug Evans <dje@google.com>
8314
8315 * regcache.c (new_register_cache): No need to check result of xcalloc.
8316 * server.c (handle_search_memory): Back out calls to xmalloc,
8317 result is checked and error is returned to user upon failure.
8318 (handle_query): Ditto. Add more checks for result of malloc.
8319 (handle_v_cont): Check result of malloc, report error back to
8320 user upon failure.
8321 (handle_v_run): Ditto. Call freeargv.
8322 * server.h (freeargv): Declare.
8323 * utils.c (freeargv): New fn.
8324
54363045
DE
83252009-01-15 Doug Evans <dje@google.com>
8326
f626972c
DE
8327 * gdbreplay.c (perror_with_name): Make arg const char *.
8328 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8329 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8330 * utils.c (perror_with_name): Make arg const char *.
54363045 8331
18aae699
PA
83322009-01-14 Pedro Alves <pedro@codesourcery.com>
8333
8334 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8335 when handling a EXIT_PROCESS_DEBUG_EVENT.
8336
ff703abe
JB
83372009-01-06 Joel Brobecker <brobecker@adacore.com>
8338
8339 * gdbreplay.c (gdbreplay_version): Update copyright year.
8340 * server.c (gdbserver_version): Likewise.
8341
f21cc1a2 83422009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8343
8344 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8345 (handle_extended_wait): Improve comment.
0e21c1ec 8346
bca929d3
DE
83472008-12-13 Doug Evans <dje@google.com>
8348
8349 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8350 * server.h (ATTR_MALLOC): New macro.
8351 (xmalloc,xcalloc,xstrdup): Declare.
8352 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8353 * inferiors.c: Ditto.
8354 * linux-low.c: Ditto.
8355 * mem-break.c: Ditto.
8356 * regcache.c: Ditto.
8357 * remote-utils.c: Ditto.
8358 * server.c: Ditto.
8359 * target.c: Ditto.
8360 * win32-low.c: Ditto.
8361
97438e3f
DE
83622008-12-12 Doug Evans <dje@google.com>
8363
896c7fbb
DE
8364 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8365 in debugging printf.
8366
97438e3f
DE
8367 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8368
e3b886f8
DE
83692008-12-09 Doug Evans <dje@google.com>
8370
8371 * linux-low.h (struct process_info): Delete member tid, unused.
8372 * thread-db.c (find_one_thread): Update.
8373 (maybe_attach_thread): Update.
8374
07e059b5
VP
83752008-12-02 Pedro Alves <pedro@codesourcery.com>
8376
889bf7c5
PA
8377 * target.h (struct target_ops): Add qxfer_osdata member.
8378 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8379 and dirent.h.
8380 (linux_qxfer_osdata): New functions.
8381 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8382 callback.
8383 * server.c (handle_query): Handle "qXfer:osdata:read:".
8384 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8385 (buffer_xml_printf): New functions.
8386 * server.h (struct buffer): New.
8387 (buffer_grow_str, buffer_grow_str0): New macros.
8388 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8389 (buffer_xml_printf): Declare.
07e059b5 8390
4cab47ab
DE
83912008-11-24 Doug Evans <dje@google.com>
8392
8393 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8394
f142445f
DJ
83952008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8396
8397 * server.c (handle_v_run): Always use the supplied argument list.
8398
d0107bb6 83992008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8400
d0107bb6
BW
8401 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8402 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8403
2c4ad781
TJB
84042008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8405
8406 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8407 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8408 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8409 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8410 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8411 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8412 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8413 XML target descriptions.
8414 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8415 when inferior is running on an ISA 2.05 or later processor. Add
8416 special case to return offset for full 64-bit slot of FPSCR when
8417 in 32-bits.
8418
dfb64f85
DJ
84192008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8420
8421 * Makefile.in (SFILES, clean): Added sparc64 files.
8422 (reg-sparc64.o, reg-sparc64.c): New.
8423 * configure.srv (sparc*-*-linux*): New configuration.
8424 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8425 syscall arguments for SPARC.
8426 (regsets_store_inferior_registers): Likewise.
8427 * linux-sparc-low.c: New file.
8428
66b6e1dd
DE
84292008-10-21 Doug Evans <dje@google.com>
8430
8431 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8432 (READLINE_DIR,READLINE_DEP): Delete.
8433 (INTERNAL_CFLAGS): Update.
8434 (LINTFLAGS): Update.
8435
9b710a42
PA
84362008-10-10 Pedro Alves <pedro@codesourcery.com>
8437
8438 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8439 whole argv from the last run, not just argv[0].
8440
5822d809
PA
84412008-09-08 Pedro Alves <pedro@codesourcery.com>
8442
8443 * regcache.c (new_register_cache): Return NULL if the register
8444 cache size isn't known yet.
8445 (free_register_cache): Avoid dereferencing a NULL regcache.
8446
74aac56f
DJ
84472008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8448
8449 * configure.srv: Merge MIPS and MIPS64.
8450
400b20f5
MR
84512008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8452
8453 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8454
677c5bb1
LM
84552008-08-18 Luis Machado <luisgpm@br.ibm.com>
8456
8457 * Makefile.in: Add required vsx dependencies.
8458
8459 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8460 Declare init_registers_powerpc_vsx32l.
8461 Declare init_registers_powerpc_vsx64l.
8462 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8463 (ppc_arch_setup): Check for VSX in hwcap.
8464 (ppc_fill_vsxregset): New function.
8465 (ppc_store_vsxregset): New function.
8466 Add new VSX entry in regset_info target_regsets.
8467
8468 * configure.srv: Add new VSX dependencies.
8469
a6f3e723
SL
84702008-08-12 Pedro Alves <pedro@codesourcery.com>
8471
8472 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8473 (remote_open): Set or clear transport_is_reliable.
8474 (putpkt_binary): Don't expect acks in noack mode.
8475 (getpkt): Don't send ack/nac in noack mode.
8476 * server.c (handle_general_set): Handle QStartNoAckMode.
8477 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8478 qSupported.
8479 (main): Reset noack_mode on every connection.
8480 * server.h (noack_mode): Declare.
8481
a417dc56
RW
84822008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8483
8484 * Makefile.in (GDBREPLAY_OBS): New variable.
8485 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8486
3221518c
UW
84872008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8488 Daniel Jacobowitz <dan@codesourcery.com>
8489
8490 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8491 (usr_store_inferior_registers): Likewise.
8492 (regsets_store_inferior_registers): Likewise.
8493
ec56be1b
PA
84942008-07-31 Rolf Jansen <rj@surtec.com>
8495 Pedro Alves <pedro@codesourcery.com>
8496
8497 * configure.ac: Check for memmem declaration.
8498 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8499 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8500 (disable_packet_qfThreadInfo): Unconditionally compile.
8501 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8502 * configure, config.in: Regenerate.
8503
2fe5e3ff
DE
85042008-07-28 Doug Kwan <dougkwan@google.com>
8505
8506 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8507 (linux_write_memory): Remove declaration of errno.
8508
836acd6d
UW
85092008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8510
8511 * linux-low.c (handle_extended_wait): Do not use "status"
8512 variable uninitialized.
8513
aeba519e
PA
85142008-07-07 Pedro Alves <pedro@codesourcery.com>
8515
8516 * server.c (handle_v_attach): Inhibit reporting dll changes.
8517
db42f210
PA
85182008-06-27 Pedro Alves <pedro@codesourcery.com>
8519
8520 * remote-utils.c (prepare_resume_reply): If requested, don't
8521 output "thread:TID" in the T stop reply.
8522
8523 * server.c (disable_packet_vCont, disable_packet_Tthread)
8524 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8525 (handle_query): If requested, disable support for qC, qfThreadInfo
8526 and qsThreadInfo.
8527 (handle_v_requests): If requested, disable support for vCont.
8528 (gdbserver_show_disableable): New.
8529 (main): Handle --disable-packet and --disable-packet=LIST.
8530
8531 * server.h (disable_packet_vCont, disable_packet_Tthread)
8532 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8533
8e4c5421
CD
85342008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8535
8536 * server.c (gdbserver_usage): Mention --version.
8537
6e23a804
DJ
85382008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8539
8540 * Makefile.in (gdbreplay.o): New rule.
8541
90aa6a40
JM
85422008-06-06 Joseph Myers <joseph@codesourcery.com>
8543
8544 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8545 message, not gdbserver.
8546
c16158bc 85472008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8548 Nathan Sidwell <nathan@codesourcery.com>
8549 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8550
8551 * acinclude.m4: Include ../../config/acx.m4.
8552 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8553 * configure, config.in: Regenerate.
8554 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8555 * server.c (gdbserver_version): Print PKGVERSION.
8556 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8557 (main): Adjust gdbserver_usage calls.
8558 * gdbreplay.c (version, host_name): Add declarations.
8559 (gdbreplay_version, gdbreplay_usage): New.
8560 (main): Accept --version and --help options.
8561
aeb75bf5
DJ
85622008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8563
8564 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8565 (arm_breakpoint_at): Handle Thumb.
8566 (the_low_target): Add comment.
8567
76b233dd
UW
85682008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8569
8570 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8571
08388c79
DE
85722008-05-09 Doug Evans <dje@google.com>
8573
a3c83fae
DE
8574 * server.h (decode_search_memory_packet): Declare.
8575 * remote-utils.c (decode_search_memory_packet): New fn.
8576 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8577 (handle_search_memory): New fn.
8578 (handle_query): Process qSearch:memory packets.
8579
bb9c3d36
UW
85802008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8581
8582 * regcache.c (registers_length): Remove.
8583 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8584 full register packet.
8585 * regcache.h (registers_length): Remove prototype.
8586 * server.h (PBUFSIZ): Define to 16384.
8587
7284e1be
UW
85882008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8589
8590 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8591 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8592 powerpc-64l.o, and powerpc-altivec64l.o.
8593 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8594 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8595 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8596 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8597 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8598 to srv_xmlfiles.
8599
8600 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8601 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8602 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8603 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8604 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8605 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8606 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8607 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8608 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8609 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8610 (clean): Update.
8611
8612 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8613 (init_registers_powerpc_32l): ... this new prototype.
8614 (init_registers_powerpc_32): Remove, replace by ...
8615 (init_registers_powerpc_altivec32l): ... this new prototype.
8616 (init_registers_powerpc_e500): Remove, replace by ...
8617 (init_registers_powerpc_e500l): ... this new prototype.
8618 (init_registers_ppc64): Remove, replace by ...
8619 (init_registers_powerpc_64l): ... this new prototype.
8620 (init_registers_powerpc_64): Remove, replace by ...
8621 (init_registers_powerpc_altivec64l): ... this new prototype.
8622 (ppc_num_regs): Set to 73.
8623 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8624 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8625 (ppc_cannot_store_register): Handle orig_r3 and trap.
8626 (ppc_arch_setup): Update init_registers_... calls.
8627 (ppc_fill_gregset): Handle orig_r3 and trap.
8628
8629 * inferiors.c (clear_inferiors): Reset current_inferior.
8630
fdc59709
PB
86312008-04-23 Paolo Bonzini <bonzini@gnu.org>
8632
889bf7c5
PA
8633 * acinclude.m4: Add override.m4.
8634 * configure: Regenerate.
fdc59709 8635
c9b2f845
UW
86362008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8637
8638 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8639 initial call to init_register_ppc64.
8640
550512b8
UW
86412008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8642
43aaf8b6
PA
8643 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8644 single powerpc*-*-linux* case.
550512b8
UW
8645 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8646
b6430ec3
UW
86472008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8648
8649 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8650 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8651 from reg_xmlfiles.
8652 * linux-ppc-low.c: Include <elf.h>.
8653 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8654 (ppc_hwcap): New global variable.
8655 (ppc_regmap): Remove __SPE__ #ifdef sections.
8656 (ppc_regmap_e500): New global variable.
8657 (ppc_cannot_store_register): Update __SPE__ special case.
8658 (ppc_get_hwcap): New function.
8659 (ppc_arch_setup): Use it to determine whether inferior supports
8660 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8661 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8662 Do not access registers if target does not support AltiVec.
8663 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8664 Do not access registers if target does not support SPE.
8665 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8666
52fa2412
UW
86672008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8668
8669 * linux-low.c (disabled_regsets, num_regsets): New.
8670 (use_regsets_p): Delete.
8671 (linux_wait_for_process): Clear disabled_regsets.
8672 (regsets_fetch_inferior_registers): Check and set it.
8673 (regsets_store_inferior_registers): Likewise.
8674 (linux_fetch_registers, linux_store_registers): Do not use
8675 use_regsets_p.
8676 (initialize_low): Allocate disabled_regsets.
8677
e28b3332
DJ
86782008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8679
8680 * Makefile.in (LIBOBJS): New.
8681 (OBS): Use LIBOBJS.
8682 (memmem.o): New rule.
8683 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8684 * configure: Regenerated.
8685
4536995d
UW
86862008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8687
8688 * server.c (handle_query): Never return "unsupported" for
8689 qXfer:features:read queries.
8690
221c031f
UW
86912008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8692
8693 * server.c (get_features_xml): Fix inverted condition.
8694 (handle_query): Always support qXfer:feature:read.
8695
ccd213ac
DJ
86962008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8697
8698 * server.c (wrapper_argv): New.
8699 (start_inferior): Handle wrapper_argv. If set, expect an extra
8700 trap.
8701 (gdbserver_usage): Document --wrapper.
8702 (main): Parse --wrapper.
8703
6fe305f7
UW
87042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8705
8706 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8707 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8708 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8709 (ppc_set_pc): Likewise.
8710 (ppc_arch_setup): New function.
8711 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8712 of collect_register.
889bf7c5 8713 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8714
5b0a002e
UW
87152008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8716
8717 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8718 instead of linux-ppc64-low.o.
8719 * linux-ppc64-low.c: Remove file.
8720 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8721 (linux-ppc64-low.o): Remove rule.
8722
8723 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8724 (init_registers_powerpc_64): Likewise.
8725 (ppc_regmap): Conditionally define depending on __powerpc64__.
8726 (ppc_cannot_store_register): Do not special-case "fpscr" when
8727 compiled on __powerpc64__.
8728 (ppc_collect_ptrace_register): New function.
8729 (ppc_supply_ptrace_register): New function.
8730 (ppc_breakpoint): Change type to "unsigned int".
8731 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8732 (the_low_target): Conditionally provide initializers for the
889bf7c5 8733 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8734 collect_ptrace_register and supply_ptrace_register members.
8735
9b4b61c8
UW
87362008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8737
8738 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8739 * server.c (gdbserver_xmltarget): Define.
8740 (get_features_xml): Use it to replace "target.xml" and arch_string.
8741
8742 * configure.srv: Remove srv_xmltarget. Add XML files that were
8743 mentioned there to srv_xmlfiles instead. Remove conditional tests
8744 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8745 srv_xmlfiles and srv_regobj to include all possible choices.
8746 * configure.ac (srv_xmltarget): Remove.
8747 (srv_xmlfiles): Do not add "target.xml".
8748 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8749 checks for supplementary target information.
8750 * configure: Regenerate.
8751 * Makefile.in (XML_TARGET): Remove.
8752 (target.xml): Remove rule.
8753 (clean): Do not clean up target.xml.
8754 (.PRECIOUS): Do not mention target.xml.
8755
8756 * target.h (struct target_ops): Remove arch_string member.
8757 * linux-low.c (linux_arch_string): Remove.
8758 (linux_target_ops): Remove arch_string initializer.
8759 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8760 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8761 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8762 * spu-low.c (spu_arch_string): Remove.
8763 (spu_target_ops): Remove arch_string initializer.
8764 * win32-low.c (win32_arch_string): Remove.
8765 (win32_target_ops): Remove arch_string initializer.
8766 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8767 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8768 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8769
ee1a7ae4
UW
87702008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8771
8772 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8773 by collect_ptrace_register and supply_ptrace_register hooks.
8774 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8775 instead of checking for the_low_target.left_pad_xfer.
8776 (usr_store_inferior_registers): Use collect_ptrace_register callback
8777 instead of checking for the_low_target.left_pad_xfer.
8778
8779 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8780 (s390_supply_ptrace_register): Likewise.
8781 (s390_fill_gregset): Call s390_collect_ptrace_register.
8782 (the_low_target): Update.
8783
8784 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8785 (ppc_supply_ptrace_register): Likewise.
8786 (the_low_target): Update.
8787
8788 * linux-i386-low.c (the_low_target): Update.
8789 * linux-x86-64-low.c (the_low_target): Update.
8790
d61ddec4
UW
87912008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8792
8793 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8794 reg-s390.o and reg-s390x.o.
8795
8796 * linux-low.c (new_inferior): New global variable.
8797 (linux_create_inferior, linux_attach): Set it.
8798 (linux_wait_for_process): Call the_low_target.arch_setup after the
8799 target has stopped for the first time.
8800 (initialize_low): Do not call the_low_target.arch_setup.
8801
8802 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8803 (s390_set_pc): Likewise.
8804 (s390_arch_setup): New function.
8805 (the_low_target): Use s390_arch_setup as arch_setup routine.
8806
8807 * regcache.c (realloc_register_cache): New function.
8808 (set_register_cache): Call it for each existing regcache.
8809
d05b4ac3
UW
88102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8811
8812 * server.h (init_registers): Remove prototype.
8813
8814 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8815 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8816 instead of init_registers ().
8817 * linux-arm-low.c (init_registers_arm): Add prototype.
8818 (init_registers_arm_with_iwmmxt): Likewise.
8819 (the_low_target): Add initializer for arch_setup field.
8820 * linux-cris-low.c (init_registers_cris): Add prototype.
8821 (the_low_target): Add initializer for arch_setup field.
8822 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8823 (the_low_target): Add initializer for arch_setup field.
8824 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8825 (the_low_target): Add initializer for arch_setup field.
8826 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8827 (the_low_target): Add initializer for arch_setup field.
8828 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8829 (the_low_target): Add initializer for arch_setup field.
8830 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8831 (the_low_target): Add initializer for arch_setup field.
8832 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8833 (init_registers_mips64_linux): Likewise.
8834 (the_low_target): Add initializer for arch_setup field.
8835 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8836 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8837 (the_low_target): Add initializer for arch_setup field.
8838 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8839 (init_registers_powerpc_64): Likewise.
8840 (the_low_target): Add initializer for arch_setup field.
8841 * linux-s390-low.c (init_registers_s390): Add prototype.
8842 (init_registers_s390x): Likewise.
8843 (the_low_target): Add initializer for arch_setup field.
8844 * linux-sh-low.c (init_registers_sh): Add prototype.
8845 (the_low_target): Add initializer for arch_setup field.
8846 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8847 (the_low_target): Add initializer for arch_setup field.
8848 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8849 (the_low_target): Add initializer for arch_setup field.
8850
8851 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8852 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8853 instead of init_registers ().
8854 * win32-arm-low.c (init_registers_arm): Add prototype.
8855 (the_low_target): Add initializer for arch_setup field.
8856 * win32-i386-low.c (init_registers_i386): Add prototype.
8857 (the_low_target): Add initializer for arch_setup field.
8858
8859 * spu-low.c (init_registers_spu): Add prototype.
8860 (initialize_low): Call initialie_registers_spu () instead of
8861 initialize_registers ().
8862
fd96d250
PA
88632008-02-19 Pedro Alves <pedro@codesourcery.com>
8864
8865 * server.c (handle_v_requests): When handling the vRun and vAttach
8866 packets, if already debugging a process, don't kill it. Return an
8867 error instead.
8868
d41b6bb4
DJ
88692008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8870
8871 * server.c (handle_query): Correct length check.
8872
5ac588cf
PA
88732008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8874
8875 * win32-low.c (do_initial_child_stuff): Add process handle
8876 parameter. Set current_process_handle and current_process_id from the
8877 parameters. Clear globals.
8878 (win32_create_inferior): Don't set current_process_handle and
8879 current_process_id here. Instead pass them on the call to
8880 do_initial_child_stuff.
8881 (win32_attach): Likewise.
8882 (win32_clear_inferiors): New.
8883 (win32_kill): Don't close the current process handle or the
8884 current thread handle here. Instead call win32_clear_inferiors.
8885 (win32_detach): Don't open a new handle to the process. Call
8886 win32_clear_inferiors.
8887 (win32_join): Don't rely on current_process_handle; open a new
8888 handle using the process id.
8889 (win32_wait): Call win32_clear_inferiors when the inferior process
8890 has exited.
8891
ecd7ecbc
DJ
88922008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8893
8894 * server.c (monitor_show_help): Add "exit".
8895
1525d545
MG
88962008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8897
ecd7ecbc 8898 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8899 (clean): Add reg-xtensa.c.
8900 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8901 * configure.srv (xtensa*-*-linux*) New target.
8902 * linux-xtensa-low.c: New.
8903 * xtensa-xtregs.c: New.
1525d545 8904
59a016f0
PA
89052008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8906
8907 * hostio.c: Don't include errno.h.
8908 (errno_to_fileio_errno): Move to hostio-errno.
8909 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8910 error number outputting to the target->hostio_last_error callback.
8911 (hostio_packet_error): Use FILEIO_EINVAL directly.
8912 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8913 calls to hostio_error.
8914 * hostio-errno.c: New.
8915 * server.h (hostio_last_error_from_errno): Declare.
8916 * target.h (target_ops): Add hostio_last_error member.
8917 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8918 as hostio_last_error handler.
889bf7c5 8919 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8920 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8921 (wince_hostio_last_error): New functions.
8922 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8923 as hostio_last_error handler.
8924 (win32_target_ops) [!_WIN32_WCE]: Register
8925 hostio_last_error_from_errno as hostio_last_error handler.
8926 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8927 (hostio-errno.o): New rule.
8928 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8929 * configure.srv (srv_hostio_err_objs): New variable. Default to
8930 hostio-errno.o.
8931 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8932 * configure: Regenerate.
8933
2d717e4f
DJ
89342008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8935
8936 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8937 (linux_kill, linux_detach): Clean up the process list.
8938 * remote-utils.c (remote_open): Improve port number parsing.
8939 (putpkt_binary, input_interrupt): Only send interrupts if the target
8940 is running.
8941 * server.c (extended_protocol): Make static.
8942 (attached): Define earlier.
8943 (exit_requested, response_needed, program_argv): New variables.
8944 (target_running): New.
8945 (start_inferior): Clear attached here.
8946 (attach_inferior): Set attached here.
8947 (require_running): Define.
8948 (handle_query): Use require_running and target_running. Implement
8949 "monitor exit".
8950 (handle_v_attach, handle_v_run): New.
8951 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8952 (gdbserver_usage): Update.
8953 (main): Redo argument parsing. Handle --debug and --multi. Handle
8954 --attach along with other options or after the port. Save
8955 program_argv. Support no initial program. Resynchronize
8956 communication with GDB after an error. Handle "monitor exit".
8957 Use require_running and target_running. Always allow the extended
8958 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8959 restart in extended mode.
8960 * README: Refer to the GDB manual. Update --attach usage.
8961
7407e2de
AS
89622007-12-20 Andreas Schwab <schwab@suse.de>
8963
8964 * linux-low.c (STACK_SIZE): Define.
8965 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8966 (linux_test_for_tracefork): Likewise.
8967
b65d95c5
DJ
89682007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8969
8970 * linux-low.c (linux_wait_for_event): Update messages. Do not
8971 reinsert auto-delete breakpoints.
8972 * mem-break.c (struct breakpoint): Change return type of handler to
8973 int.
8974 (set_breakpoint_at): Update handler type.
8975 (reinsert_breakpoint_handler): Return 1 instead of calling
8976 delete_breakpoint.
8977 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8978 setting a new one.
8979 (check_breakpoints): Delete auto-delete breakpoints and return 2.
8980 * mem-break.h (set_breakpoint_at): Update handler type.
8981 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8982 * win32-low.c (auto_delete_breakpoint): New.
8983 (get_child_debug_event): Use it.
8984
4e799345
DJ
89852007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
8986
8987 * configure.ac: Check for pread and pwrite.
8988 * hostio.c (handle_pread): Fall back to lseek and read.
8989 (handle_pwrite): Fall back to lseek and write.
8990 * config.in, configure: Regenerated.
8991
27524b67
DJ
89922007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
8993
8994 * server.c (myresume): Add own_buf argument.
8995 (main): Update calls.
8996
a20d5e98
DJ
89972007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
8998
8999 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9000 * remote-utils.c (remote_open): Do not call disable_async_io.
9001 (block_async_io): Delete.
9002 (unblock_async_io): Make static.
9003 (initialize_async_io): New.
9004 * server.c (handle_v_cont): Handle async I/O here.
9005 (myresume): Likewise. Move other common resume tasks here...
9006 (main): ... from here. Call initialize_async_io. Disable async
9007 I/O before the main loop.
9008 * server.h (initialize_async_io): Declare.
9009 (block_async_io, unblock_async_io): Delete prototypes.
9010 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9011
b79d787e
DJ
90122007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9013
9014 * remote-utils.c (readchar): Allow binary data in received messages.
9015
d97903b2
PA
90162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9017
9018 * win32-low.c (attaching): New global.
9019 (win32_create_inferior): Clear the `attaching' global.
9020 (win32_attach): Set the `attaching' global.
9021 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9022 attaching. Only set a breakpoint at the entry point if not
9023 attaching.
9024
311de423
PA
90252007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9026
9027 * server.c (main): Don't report dll events on the initial
9028 connection on attaches.
9029
6c2d16d2
PA
90302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9031
9032 * server.c (main): Relax numerical bases supported for the pid of
9033 the --attach command line argument.
9034
5ca906e6
PA
90352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9036
9037 * win32-low.c (win32_attach): Call OpenProcess before
9038 DebugActiveProcess, not after. Add last error output to error
9039 call.
9040
9c6c8194
PA
90412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9042
9043 * win32-low.c (win32_get_thread_context)
9044 (win32_set_thread_context): New functions.
9045 (thread_rec): Use win32_get_thread_context.
9046 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9047 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9048 field.
9049
4d5d1aaa
PA
90502007-12-03 Leo Zayas
9051 Pedro Alves <pedro_alves@portugalmail.pt>
9052
9053 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9054 global variables.
9055 (child_add_thread): Minor cleanup.
9056 (child_continue): Resume artificially suspended threads before
9057 calling ContinueDebugEvent.
9058 (suspend_one_thread): New.
9059 (fake_breakpoint_event): New.
9060 (get_child_debug_event): Change return type to int. Check here if
9061 gdb sent an interrupt request. If a soft interrupt was requested,
9062 fake a breakpoint event. Return 0 if there is no event to handle,
9063 and 1 otherwise.
9064 (win32_wait): Don't check here if gdb sent an interrupt request.
9065 Ensure there is a valid event to handle.
9066 (win32_request_interrupt): Add soft interruption method as last
9067 resort.
9068
c436e841
PA
90692007-12-03 Leo Zayas
9070 Pedro Alves <pedro_alves@portugalmail.pt>
9071
9072 * win32-low.h (win32_thread_info): Add descriptions to the
9073 structure members. Replace `suspend_count' counter by a
9074 `suspended' flag.
9075 * win32-low.c (thread_rec): Update condition of when to get the
9076 context from the inferior. Rely on ContextFlags being set if it
9077 has already been retrieved. Only suspend the inferior thread if
9078 we haven't already. Warn if that fails.
9079 (continue_one_thread): s/suspend_count/suspended/. Only call
9080 ResumeThread once. Warn if that fails.
9081
e7b5fa67
PA
90822007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9083
9084 * win32-low.c (win32_wait): Don't read from the inferior when it
9085 has already exited.
9086
a385171d
PA
90872007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9088
9089 * Makefile.in (win32_low_h): New variable.
9090 (win32-low.o): Add dependency on $(win32_low_h).
9091 (win32-arm-low.o, win32-i386-low.o): New rules.
9092
f80c84b3
DJ
90932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9094
9095 * hostio.c: Correct copyright year.
9096
a6b151f1
DJ
90972007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9098
9099 * Makefile.in (OBS): Add hostio.o.
9100 (hostio.o): New rule.
9101 * server.h (handle_vFile): Declare.
9102 * hostio.c: New file.
9103 * server.c (handle_v_requests): Take packet_len and new_packet_len
9104 for binary packets. Call handle_vFile.
9105 (main): Update call to handle_v_requests.
9106
f9387fc3
DJ
91072007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9108
9109 * linux-low.c: Include <sched.h>.
9110
51c2684e
DJ
91112007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9112
9113 * linux-low.c (linux_tracefork_grandchild): New.
9114 (linux_tracefork_child): Use clone.
9115 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9116
75f83163
JB
91172007-10-31 Joel Brobecker <brobecker@adacore.com>
9118
9119 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9120
da5898ce
DJ
91212007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9122
9123 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9124
24a09b5f
DJ
91252007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9126
9127 * inferiors.c (change_inferior_id): Delete.
9128 (add_pid_to_list, pull_pid_from_list): New.
9129 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9130 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9131 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9132 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9133 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9134 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9135 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9136 (using_threads): Always set to 1.
9137 (handle_extended_wait): New.
9138 (add_process): Do not set TID.
9139 (linux_create_inferior): Set must_set_ptrace_flags.
9140 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9141 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9142 (linux_thread_alive): Rename TID argument to LWPID.
9143 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9144 (linux_wait_for_event): Do not use TID or check using_threads. Update
9145 call to dead_thread_notify. Call handle_extended_wait.
9146 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9147 (send_sigstop): Delete sigstop_sent.
9148 (wait_for_sigstop): Avoid TID.
9149 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9150 (linux_test_for_tracefork): New.
9151 (linux_lookup_signals): Use thread_db_active and
9152 linux_supports_tracefork_flag.
9153 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9154 * linux-low.h (get_process_thread): Avoid TID.
9155 (struct process_ifo): Move thread_known and tid to the end. Remove
9156 sigstop_sent.
9157 (linux_attach_lwp, thread_db_init): Update prototypes.
9158 * server.h (change_inferior_id): Delete prototype.
9159 (add_pid_to_list, pull_pid_from_list): New prototypes.
9160 * thread-db.c (thread_db_use_events): New.
9161 (find_first_thread): Rename to...
9162 (find_one_thread): ...this. Update callers and messages. Do not
9163 call fatal. Check thread_db_use_events. Do not call
9164 change_inferior_id or new_thread_notify.
9165 (maybe_attach_thread): Update. Do not call new_thread_notify.
9166 (thread_db_init): Set thread_db_use_events. Check use_events.
9167 * utils.c (fatal, warning): Correct message prefix.
9168
30ed0a8f
DJ
91692007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9170
9171 * Makefile.in (clean): Remove new files.
9172 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9173 (powerpc-64.o, powerpc-64.c): New rules.
9174 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9175 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9176 with SPE.
9177 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9178 SPE targets.
9179 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9180 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9181 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9182 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9183 (target_regsets): Add AltiVec and SPE register sets.
9184 * configure.ac: Check for AltiVec and SPE.
9185 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9186 (ppc_fill_vrregset, ppc_store_vrregset): New.
9187 (target_regsets): Add AltiVec register set.
9188 * configure: Regenerated.
9189
fd462a61
DJ
91902007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9191
9192 * linux-low.c (O_LARGEFILE): Define.
9193 (linux_read_memory): Use /proc/PID/mem.
9194 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9195 * configure, config.in: Regenerated.
9196
69f223ed
DJ
91972007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9198
9199 * linux-low.c (linux_wait_for_event): Do not pass signals while
9200 single-stepping.
9201
aec18585
PA
92022007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9203
9204 * win32-low.c (create_process): New.
9205 (win32_create_inferior): Use create_process instead of
9206 CreateProcess. If create_process failed retry appending an ".exe"
9207 suffix. Store the GetLastError result immediatelly after
9208 create_process calls and use it on the call to error.
9209
34d86ddd
PA
92102007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9211
9212 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9213
5a0e3bd0
JB
92142007-08-23 Joel Brobecker <brobecker@adacore.com>
9215
9216 * configure.ac: Switch license to GPLv3.
9217
f88c79e6
MS
92182007-08-01 Michael Snyder <msnyder@access-company.com>
9219
9220 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9221
6b3d9b83
PA
92222007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9223
9224 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9225 typedef.
9226 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9227 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9228 CloseToolhelp32Snapshot.
9229 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9230 CloseToolhelp32Snapshot.
9231
c588c53c
MS
92322007-07-27 Michael Snyder <michael.snyder@access-company.com>
9233
9234 * server.c (main): Check for inferior exit before main loop.
9235
aa0403d9
PA
92362007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9237
9238 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9239 instead of on tmp_desc.
9240
255e7678
DJ
92412007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9242 Daniel Jacobowitz <dan@codesourcery.com>
9243
9244 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9245 (add_thread): Minor cleanups.
9246 (clear_inferiors): Move lower in the file. Clear the DLL
9247 list.
9248 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9249 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9250 (xml_escape_text): New.
9251 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9252 for qSupported.
9253 (handle_v_cont): Report errors.
9254 (gdbserver_version): Update.
9255 (main): Correct size of own_buf. Do not report initial DLL events.
9256 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9257 (unloaded_dll, xml_escape_text): New.
9258 * win32-low.c (enum target_waitkind): Update comments.
9259 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9260 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9261 (win32_EnumProcessModules, win32_GetModuleInformation)
9262 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9263 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9264 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9265 (win32_Module32First, win32_Module32Next, load_toolhelp)
9266 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9267 (get_child_debug_event): Handle DLL events.
9268 (win32_wait): Likewise.
9269
0d37add9
DJ
92702007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9271
9272 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9273 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9274
45e2715e
PA
92752007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9276
9277 * win32-low.c (handle_output_debug_string): Ignore event if not
9278 waiting.
9279
c5674cf1
PA
92802007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9281
9282 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9283
2bbe3cc1
DJ
92842007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9285
9286 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9287
ae13219e
DJ
92882007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9289
9290 * inferiors.c (change_inferior_id): Add comment.
9291 * linux-low.c (check_removed_breakpoint): Add an early
9292 prototype. Improve debug output.
9293 (linux_attach): Doc update.
9294 (linux_detach_one_process, linux_detach): Clean up before releasing
9295 each process.
9296 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9297 * linux-low.h (struct process_info): Doc improvement.
9298 * mem-break.c (delete_all_breakpoints): New.
9299 * mem-break.h (delete_all_breakpoints): New prototype.
9300 * thread-db.c (find_first_thread): New.
9301 (thread_db_create_event): Call it instead of
9302 thread_db_find_new_threads. Clean up unused variables.
9303 (maybe_attach_thread): Remove first thread handling.
9304 (thread_db_find_new_threads): Use find_first_thread.
9305 (thread_db_get_tls_address): Likewise.
9306
4105de34
DJ
93072007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9308
9309 * thread-db.c (thread_db_find_new_threads): Add prototype.
9310 (thread_db_create_event): Check for the main thread before adding
9311 a new thread.
9312 (maybe_attach_thread): Only enable event reporting if TID == 0.
9313 (thread_db_get_tls_address): Check for new threads.
9314
2b876972
DJ
93152007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9316
9317 * linux-low.c (linux_create_inferior): Try execv before execvp.
9318 * spu-low.c (spu_create_inferior): Likewise.
9319
7a245884
DJ
93202007-06-13 Mike Frysinger <vapier@gentoo.org>
9321
9322 * linux-low.c (linux_create_inferior): Change execv to execvp.
9323 * spu-low.c (spu_create_inferior): Likewies.
9324
117ce543
DJ
93252007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9326
9327 * Makefile.in (clean): Clean new files instead of deleted ones.
9328 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9329 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9330 rules.
9331 * configure.srv: Specify XML files and new regformats for MIPS and
9332 MIPS64 GNU/Linux.
9333 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9334 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9335 an entry for the restart register.
9336 (mips_cannot_fetch_register, mips_cannot_store_register)
9337 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9338 register names to match the XML descriptions.
9339 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9340 restart register instead of $0.
9341
0e7f50da
UW
93422007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9343 Markus Deuling <deuling@de.ibm.com>
9344
9345 * remote-utils.c (decode_xfer_write): New function.
9346 * server.h (decode_xfer_write): Add prototype.
9347 * server.c (handle_query): Add PACKET_LEN argument. Support
9348 qXfer:spu:read and qXfer:spu:write packets.
9349 (main): Pass packet_len to handle_query.
9350 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9351 * target.h (target_ops): Add qxfer_spu.
9352
374c1d38
UW
93532007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9354
9355 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9356 accessing non-seekable spufs files.
9357
bb63802a
UW
93582007-05-16 Markus Deuling <deuling@de.ibm.com>
9359
889bf7c5 9360 * server.c (handle_query): Add reply for qC packet.
bb63802a 9361
7390519e
PA
93622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9363 Leo Zayas <lerele@champenstudios@com>
9364
9365 * server.h (check_remote_input_interrupt_request): New function.
9366 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9367 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9368 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9369 (check_remote_input_interrupt_request): New function.
9370 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9371 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9372 winapi_GenerateConsoleCtrlEvent): New typedefs.
9373 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9374 to 250 ms.
9375 (win32_wait): Check for remote interrupt request
9376 with check_remote_input_interrupt_request.
9377 (win32_request_interrupt): New function.
9378 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9379
34b34921
PA
93802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9381
9382 * win32-low.c (debug_registers_changed,
9383 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9384 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9385 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9386 (thread_rec): Get context using the low target.
9387 (child_add_thread): Call thread_added on the low target,
9388 which does the same thing.
9389 (regptr): Delete.
9390 (do_initial_child_stuff): Remove debug registers references.
9391 Set context using the low target. Resume threads after
9392 setting the contexts.
9393 (child_continue): Remove dead variable. Remove debug
9394 registers references.
9395 (child_fetch_inferior_registers): Go through the low target.
9396 (do_child_store_inferior_registers): Remove.
9397 (child_store_inferior_registers): Go through the low target.
9398 (win32_resume): Remove debug registers references.
9399 Set context using the low target.
9400 (handle_exception): Change return type to void. Don't record
9401 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9402 first chance exception.
889bf7c5 9403 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9404 goto loop. Always return after waiting for debug event.
9405 (win32_wait): Convert to switch statement. Handle spurious
9406 events.
9407
9408 * win32-i386-low.c (debug_registers_changed,
9409 debug_registers_used): New.
9410 (initial_stuff): Rename to ...
9411 (i386_initial_stuff): ... this. Clear debug registers
9412 state variables.
9413 (store_debug_registers): Delete.
9414 (i386_get_thread_context): New.
9415 (load_debug_registers): Delete.
9416 (i386_set_thread_context): New.
9417 (i386_thread_added): New.
9418 (single_step): Rename to ...
9419 (i386_single_step): ... this.
9420 (do_fetch_inferior_registers): Rename to ...
9421 (i386_fetch_inferior_register): ... this.
9422 (i386_store_inferior_register): New.
9423 (the_low_target): Adapt to new interface.
9424
9425 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9426 (arm_get_thread_context): New.
9427 (arm_set_thread_context): New.
9428 (regptr): New.
9429 (do_fetch_inferior_registers): Rename to ...
9430 (arm_fetch_inferior_register): ... this.
9431 (arm_store_inferior_register): New.
9432 (arm_wince_breakpoint): Reimplement as unsigned long.
9433 (arm_wince_breakpoint_len): Define.
9434 (the_low_target): Adapt to new interface.
9435
9436 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9437 load_debug_registers. Add get_thread_context, set_thread_context,
9438 thread_added and store_inferior_register. Rename
9439 fetch_inferior_registers to fetch_inferior_register.
9440 (regptr): Remove declaration.
9441
dd6953e1
PA
94422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9443
9444 * linux-low.c (linux_detach): Change return type to int. Return 0.
9445 * spu-low.c (spu_detach): Likewise.
9446
444d6139
PA
94472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9448
9449 * target.h (target_ops): Change return type of detach to int.
9450 Add join.
9451 (join_inferior): New.
9452 * server.c (main): Don't skip detach support on mingw32.
9453 If the inferior doesn't support detaching return error.
9454 Call join_inferior instead of using waitpid.
9455 * linux-low.c (linux_join): New.
9456 (linux_target_op): Add linux_join.
9457 * spu-low.c (spu_join): New.
9458 (spu_target_ops): Add spu_join.
9459 * win32-low.c (win32_detach): Adapt to new interface.
9460 Reopen current_process_handle before detaching. Issue a child
9461 resume before detaching.
9462 (win32_join): New.
9463 (win32_target_op): Add win32_join.
9464
1d5315fe
PA
94652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9466
9467 * win32-low.c (win32-attach): Fix return value.
9468 * target.h (target_ops): Describe ATTACH return values.
9469
bf914831
PA
94702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9471
9472 * win32-low.c (GETPROCADDRESS): Define.
9473 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9474 (winapi_DebugSetProcessKillOnExit): Likewise.
9475 (win32_create_inferior): Force usage of ansi CreateProcessA.
9476 (win32_attach): Use GETPROCADDRESS.
9477 (win32_detach): Likewise.
9478
f72f3e60
PA
94792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9480
9481 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9482
ed50f18f
PA
94832007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9484
9485 * win32-low.c: Commit leftover changes from 2007-03-29.
9486
0c2ead7e
DJ
94872007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9488
9489 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9490 fields short instead of int. Add explicit padding.
9491 (i387_cache_to_fsave): Remove unnecessary casts.
9492 (i387_fsave_to_cache): Doc fix.
9493 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9494
73725ff3
DJ
94952007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9496
9497 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9498 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9499
d99f33d8
PA
95002007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9501
9502 * configure.srv (arm*-*-mingw32ce*): Move near the other
9503 arm targets.
9504
68070c10
PA
95052007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9506
2482afc6 9507 * configure.ac: Add errno checking.
68070c10
PA
9508 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9509 sys/file.h and malloc.h.
9510 (AC_CHECK_DECLS): Add perror.
9511 (srv_mingwce): Handle.
2482afc6 9512 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9513 win32-i386-low.o to srv_tgtobj.
9514 (i[34567]86-*-mingw*): Likewise.
9515 (arm*-*-mingw32ce*): Add case.
9516 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9517 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9518 [__MINGW32CE__] (strerror): New function.
9519 [__MINGW32CE__] (errno): Define to GetLastError.
9520 [__MINGW32CE__] (COUNTOF): New macro.
9521 (remote_open): Remove extra close call.
9522 * mem-break.c (delete_breakpoint_at): New function.
9523 * mem-break.h (delete_breakpoint_at): Declare.
9524 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9525 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9526 [USE_WIN32API] (read, write): Add char* casts.
9527 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9528 * server.h: Include wincecompat.h on Windows CE.
9529 [HAVE_ERRNO_H]: Check.
9530 (perror): Declare if not declared.
9531 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9532 (perror_with_name): Remove errno declaration.
9533 * wincecompat.h: New.
9534 * wincecompat.c: New.
9535 * win32-low.h: New.
9536 * win32-arm-low.c: New.
9537 * win32-i386-low.c: New.
9538 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9539 (OUTMSG2): Make it safe.
9540 (_T): New macro.
9541 (COUNTOF): New macro.
9542 (NUM_REGS): Get it from the low target.
9543 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9544 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9545 (thread_rec): Let low target handle debug registers.
9546 (child_add_thread): Likewise.
9547 (child_init_thread_list): Likewise.
9548 (continue_one_thread): Likewise.
9549 (regptr): New.
9550 (do_child_fetch_inferior_registers): Move to ...
9551 * win32-i386-low.c: ... here, and rename to ...
9552 (do_fetch_inferior_registers): ... this.
889bf7c5 9553 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9554 Go through the low target.
9555 (do_child_store_inferior_registers): Use regptr.
9556 (strwinerror): New function.
9557 (win32_create_inferior): Handle Windows CE.
9558 Use strwinerror instead of strerror on Windows error
9559 codes. Add program to the error output.
9560 Don't close the main thread handle on Windows CE.
9561 (win32_attach): Use coredll.dll on Windows CE.
9562 (win32_kill): Close current process and current
9563 thread handles.
9564 (win32_detach): Use coredll.dll on Windows CE.
9565 (win32_resume): Let low target handle debug registers, and
9566 step request.
9567 (handle_exception): Add/Remove initial breakpoint. Avoid
9568 non-existant WSTOPSIG on Windows CE.
9569 (win32_read_inferior_memory): Cast to remove warning.
9570 (win32_arch_string): Go through the low target.
9571 (initialize_low): Call set_breakpoint_data with the low
9572 target's breakpoint.
9573 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9574 FOP_REGNUM, mappings): Move to ...
9575 * win32-i386-low.c: ... here.
9576 * win32-low.c (win32_thread_info): Move to ...
9577 * win32-low.h: ... here.
9578 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9579 win32-arm-low.c and wincecompat.c.
9580 (all:): Add $EXEEXT.
9581 (install-only:): Likewise.
9582 (gdbserver:): Likewise.
9583 (gdbreplay:): Likewise.
9584 * config.in: Regenerate.
9585 * configure: Regenerate.
9586
41093d81
PA
95872007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9588
9589 * win32-low.c: Rename typedef thread_info to
9590 win32_thread_info throughout.
9591
544afa54
PA
95922007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9593
9594 * win32-i386-low.c: Rename to ...
9595 * win32-low.c: ... this.
9596 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9597 * Makefile.in: Likewise.
9598
bce7165d
PA
95992007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9600
9601 * remote-utils.c (monitor_output): Constify msg parameter.
9602 * server.h (monitor_output): Likewise.
9603 * win32-i386-low.c (handle_output_debug_string): New.
9604 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9605 handle_output_debug_string.
9606 (get_child_debug_event): Likewise.
9607
506c7aa0
DJ
96082007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9609
9610 * server.c (main): Correct strtoul check.
9611
42c81e2a
DJ
96122007-03-27 Jon Ringle <jon@ringle.org>
9613
9614 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9615
9453113a
DJ
96162007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9617
9618 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9619
64a69107
DJ
96202007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9621
9622 * terminal.h: Check HAVE_SGTTY_H.
9623
96242007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9625
9626 * remote-utils.c (remote_open): Print out the assigned port number.
9627
c74d0ad8
DJ
96282007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9629
9630 * remote-utils.c (monitor_output): New function.
9631 * server.c (debug_threads): Define here.
9632 (monitor_show_help): New function.
9633 (handle_query): Handle qRcmd.
9634 (main): Do not handle 'd' packet.
9635 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9636 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9637 of debug_threads.
9638
de7c3b4a
PA
96392007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9640
9641 * Makefile.in (EXEEXT): New.
9642 (clean): Use $(EXEEXT).
9643
ef57601b
PA
96442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9645
9646 * target.h (target_ops): Rename send_signal to request_interrupt,
9647 and remove enum target_signal parameter.
9648 * linux-low.c (linux_request_interrupt): Rename from
9649 linux_send_signal, and always send SIGINT.
9650 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9651 and always send SIGINT.
9652 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9653 of send_signal.
9654 (input_interrupt): Likewise.
9655
820f2bda
PA
96562007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9657
9658 * server.c (get_features_xml): Check if target implemented
9659 arch_string.
9660 * win32-i386-low.c (win32_arch_string): New.
9661 (win32_target_ops): Add win32_arch_string as arch_string member.
9662
ab39bf24
UW
96632007-02-22 Markus Deuling <deuling@de.ibm.com>
9664
9665 * spu-low.c (spu_arch_string): New.
9666 (spu_target_ops): Add spu_arch_string.
9667
61ff6e04
DJ
96682007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9669
9670 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9671 * configure.ac: Do not check for terminal.h.
9672 * configure, config.in: Regenerated.
9673
fb1e4ffc
DJ
96742007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * Makefile.in (OBS): Add $(XML_BUILTIN).
9677 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9678 (clean): Update.
9679 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9680 (arm-with-iwmmxt.c): New.
9681 * config.in, configure: Regenerate.
9682 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9683 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9684 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9685 (arm*-*-linux*): Add iWMMXt and regset support.
9686 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9687 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9688 (arm_store_wmmxregset, target_regsets): New.
9689 * server.c (get_features_xml): Take annex argument. Check builtin
9690 XML documents.
9691 (handle_query): Handle multiple annexes.
9692
0f48aa01
DJ
96932007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9694
9695 * remote-utils.c [USE_WIN32API] (read, write): Define.
9696 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9697 write.
9698
23181151
DJ
96992007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9700
9701 * linux-i386-low.c (the_low_target): Set arch_string.
9702 * linux-x86-64-low.c (the_low_target): Likewise.
9703 * linux-low.c (linux_arch_string): New.
9704 (linux_target_ops): Add it.
9705 * linux-low.h (struct linux_target_ops): Add arch_string.
9706 * server.c (write_qxfer_response): Use const void * for DATA.
9707 (get_features_xml): New.
9708 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9709 * target.h (struct target_ops): Add arch_string method.
9710
9d606399
DJ
97112007-01-03 Denis Pilat <denis.pilat@st.com>
9712 Daniel Jacobowitz <dan@codesourcery.com>
9713
9714 * linux-low.c (linux_kill): Handle being called with no threads.
9715 * win32-i386-low.c (win32_kill): Likewise.
9716 (get_child_debug_event): Clear current_process_handle.
9717
97182006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9719 Daniel Jacobowitz <dan@codesourcery.com>
9720
9721 * remote-utils.c (remote_open): Check the type of specified
9722 serial port devices before opening them.
9723 * server.c (main): Kill the inferior if an error occurs during
9724 the first remote_open.
9725
a5e13d24
DJ
97262006-12-05 Markus Deuling <deuling@de.ibm.com>
9727
9728 * README: Update supported targets.
9729
186947f7
DJ
97302006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9731
9732 * Makefile.in (clean): Remove reg-mips64.c.
9733 (reg-mips64.c, reg-mips64.o): New rules.
9734 * configure.srv: Handle mips64. Include regset support for mips.
9735 * linux-mips-low.c (union mips_register): New.
9736 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9737 (mips_breakpoint, mips_breakpoint_at): Use int.
9738 (mips_collect_register, mips_supply_register)
9739 (mips_collect_register_32bit, mips_supply_register_32bit)
9740 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9741 (mips_store_fpregset, target_regsets): New.
9742 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9743
a13e2c95
UW
97442006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9745
9746 * configure.srv: Add target "spu*-*-*".
9747 * Makefile.in (clean): Remove reg-spu.c.
9748 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9749 * spu-low.c: New file.
9750
cb7283db
DJ
97512006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9752
9753 * configure.ac: Correct td_thr_tls_get_addr test.
9754 * configure: Regenerated.
9755
89be2091
DJ
97562006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9757
9758 * linux-low.c (linux_wait_for_event): Reformat. Use the
9759 pass_signals array.
9760 * remote-utils.c (decode_address_to_semicolon): New.
9761 * server.c (pass_signals, handle_general_set): New.
9762 (handle_query): Mention QPassSignals for qSupported.
9763 (main): Call handle_general_set.
9764 * server.h (pass_signals, decode_address_to_semicolon): New.
9765
000ef4f0
DJ
97662006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9767
9768 * server.c (handle_query): Correct error handling for read_auxv.
9769
b7149293
UW
97702005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9771
9772 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9773 and srv_linux_thread_db to yes.
9774 * linux-s390-low.c (s390_fill_gregset): New function.
9775 (target_regsets): Define data structure.
9776
dae5f5cf
DJ
97772006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9778
9779 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9780 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9781 * config.in, configure: Regenerated.
9782 * inferiors.c (gdb_id_to_thread): New function.
9783 (gdb_id_to_thread_id): Use it.
9784 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9785 * linux-low.h (struct process_info): Add th member.
9786 (thread_db_get_tls_address): New prototype.
9787 * remote-utils.c (decode_address): Make non-static.
9788 * server.c (handle_query): Handle qGetTLSAddr.
9789 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9790 * target.h (struct target_ops): Add get_tls_address.
9791 * thread-db.c (maybe_attach_thread): Save the thread handle.
9792 (thread_db_get_tls_address): New.
9793
32ca6d61
DJ
97942006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9795
9796 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9797 (linux_resume_one_process): Take a siginfo_t *. Update all
9798 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9799 (struct pending_signals): Add a siginfo_t.
9800 (linux_wait_for_process): Always set last_status.
9801 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9802 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9803 * linux-low.h (struct process_info): Add last_status.
9804
5ffff7c1
DJ
98052006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9806
9807 * remote-utils.c (try_rle): New function.
9808 (putpkt_binary): Use it.
9809
8695c747
DJ
98102006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9811
9812 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9813 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9814 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9815 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9816 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9817 point registers.
9818
290fadea
RS
98192006-08-08 Richard Sandiford <richard@codesourcery.com>
9820
9821 * server.c (terminal_fd): New variable.
9822 (old_foreground_pgrp): Likewise.
9823 (restore_old_foreground_pgrp): New function.
9824 (start_inferior): Record the terminal file descriptor in terminal_fd
9825 and its original foreground group in old_foreground_pgrp. Register
9826 restore_old_foreground_pgrp with atexit().
9827
9f2e1e63
DJ
98282006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9829
9830 * server.c (handle_query): Correct qPart to qXfer.
9831
b80864fb
DJ
98322006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9833
9834 * configure.ac: Check for more headers which are missing on
9835 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9836 * configure.srv: Add Cygwin and mingw32.
9837 * remote-utils.c: Don't include headers unconditionally which
9838 are missing on mingw32. Include <winsock.h> for mingw32.
9839 (remote_open): Adjust for mingw32 support. Flush
9840 standard error after writing to it.
9841 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9842 (unblock_async_io, enable_async_io, disable_async_io)
9843 (readchar, getpkt): Update for Winsock support.
9844 (prepare_resume_reply): Expect a protocol signal number.
9845 * server.c: Disable <sys/wait.h> on mingw32.
9846 (start_inferior): Adjust for mingw32 support. Flush
9847 standard error after writing to it.
9848 (attach_inferior): Likewise. Use protocol signal
9849 numbers.
9850 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9851 and names.
9852 * win32-i386-low.c: New file.
9853 * Makefile.in (XM_CLIBS): Set.
9854 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9855 (win32-i386-low.o): New dependency rule.
9856 * linux-low.c (linux_wait): Use target signal numbers.
9857 * target.h (struct target_ops): Doc fix.
9858 * server.h (target_signal_to_name): New prototype.
9859 * gdbreplay.c: Don't include headers unconditionally which
9860 are missing on mingw32. Include <winsock.h> for mingw32.
9861 (remote_close, remote_open): Adjust for Winsock support.
9862 * configure, config.in: Regenerated.
9863
0876f84a
DJ
98642006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9865
9866 * server.c (decode_xfer_read, write_qxfer_response): New.
9867 (handle_query): Take a packet length argument. Handle
9868 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9869 the qSupported response.
9870 (main): Update call to handle_query.
9871
01f9e8fa
DJ
98722006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9873
9874 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9875 (putpkt_binary): Renamed from putpkt and adjusted for binary
9876 data.
9877 (putpkt): New wrapper for putpkt_binary.
9878 (readchar): Don't mask off the high bit.
9879 (decode_X_packet): New function.
9880 * server.c (main): Call putpkt_binary if a handler sets the packet
9881 length. Save the length of the incoming packet. Handle 'X'.
9882 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9883
be2a5f71
DJ
98842006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9885
9886 * server.c (handle_query): Handle qSupported.
9887
ea025f5f
DJ
98882006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9889
9890 * remote-utils.c (all_symbols_looked_up): New variable.
9891 (look_up_one_symbol): Check it.
9892 * server.h (look_up_one_symbol): New declaration.
9893 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9894
9308fc88
DJ
98952006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9896
9897 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9898 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9899 (PTRACE_GET_THREAD_AREA): Define.
9900 (ps_get_thread_area): New function.
9901
52fb6437
NS
99022006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9903
9904 * configure.srv (m68k*-*-uclinux*): New target.
9905 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9906 (linux_resume_one_process): Remove extraneous cast.
9907 (linux_read_offsets): New.
9908 (linux_target_op): Add linux_read_offsets on mmuless systems.
9909 * server.c (handle_query): Add qOffsets logic.
9910 * target.h (struct target_ops): Add read_offsets.
9911
21b0f40c
DJ
99122006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9913
9914 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9915 (PTRACE_GET_THREAD_AREA): Define.
9916 (ps_get_thread_area): New function.
9917 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9918 (linux-x86-64-low.o): Update.
9919
0050a760
DJ
99202006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9921
9922 * configure.ac: Remove checks for prfpregset_t.
9923 * gdb_proc_service.h: New file.
9924 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9925 new "gdb_proc_service.h".
9926 * proc-service.c: Likewise.
9927 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9928 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9929 * Makefile.in (gdb_proc_service_h): Updated.
9930 * configure, config.in: Regenerated.
9931
b92a518e
DJ
99322006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9933
9934 * remote-utils.c (prepare_resume_reply): Move declaration
9935 of gdb_id_from_wait to the top of the block.
9936
545587ee
DJ
99372006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9938
9939 * linux-low.c (regsets_store_inferior_registers): Read the regset
9940 from the target before filling it.
9941
9db87ebd
DJ
99422006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9943
9944 * server.c (attach_inferior): Return SIGTRAP for a successful
9945 attach.
9946
dd24457d
DJ
99472006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9948
9949 * Makefile.in (OBS): Add version.o.
9950 (STAGESTUFF): Delete.
9951 (version.o): Add dependencies.
9952 (version.c): Replace rule.
9953 (clean): Remove version.c.
9954 * server.c (gdbserver_version): New.
9955 (gdbserver_usage): Use printf.
9956 (main): Handle --version and --help.
9957 * server.h (version, host_name): Add declarations.
9958
6f0f660e
EZ
99592005-12-23 Eli Zaretskii <eliz@gnu.org>
9960
889bf7c5
PA
9961 * linux-arm-low.c:
9962 * linux-arm-low.c:
9963 * inferiors.c:
9964 * i387-fp.h:
9965 * i387-fp.c:
9966 * gdbreplay.c:
9967 * regcache.c:
9968 * proc-service.c:
9969 * mem-break.h:
9970 * mem-break.c:
9971 * linux-x86-64-low.c:
9972 * linux-sh-low.c:
9973 * linux-s390-low.c:
9974 * linux-ppc64-low.c:
9975 * linux-ppc-low.c:
9976 * linux-mips-low.c:
9977 * linux-m68k-low.c:
9978 * linux-m32r-low.c:
9979 * linux-low.h:
9980 * linux-low.c:
9981 * linux-ia64-low.c:
9982 * linux-i386-low.c:
9983 * linux-crisv32-low.c:
9984 * thread-db.c:
9985 * terminal.h:
9986 * target.h:
9987 * target.c:
9988 * server.h:
9989 * server.c:
9990 * remote-utils.c:
9991 * regcache.h:
9992 * utils.c:
9993 * Makefile.in:
9994 * configure.ac:
6f0f660e
EZ
9995 * gdbserver.1: Add (C) after Copyright. Update the FSF
9996 address.
9997
9d1fb177
DJ
99982005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
9999
10000 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10001 (arm_breakpoint_at): Recognize both breakpoints.
10002 (the_low_target): Use the correct breakpoint instruction.
10003
011a70c2
DJ
100042005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10005
10006 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10007 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10008 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10009 (the_low_target): Update.
10010
7fb85e41
AS
100112005-10-25 Andreas Schwab <schwab@suse.de>
10012
10013 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10014
10015 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10016 (ia64_num_regs): Reduce to 462.
10017
3db0444b
DJ
100182005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10019
10020 * acinclude.m4: Correct quoting.
10021 * aclocal.m4: Regenerated.
10022
10023 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10024 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10025 (thread_db_init): Call thread_db_err_str.
10026 * configure.ac: Check for TD_VERSION.
10027 * config.in, configure: Regenerated.
10028
bee0189a
DJ
100292005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10030
10031 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10032
e9d25b98
DJ
100332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10034
10035 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10036 is not available. Define HAVE_PTRACE_GETREGS if it is.
10037 * config.in, configure: Regenerated.
10038 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10039 * linux-i386-low.c, linux-m68k-low.c: Update to use
10040 HAVE_PTRACE_GETREGS.
10041 * linux-low.c (regsets_fetch_inferior_registers)
10042 (regsets_store_inferior_registers): Only return 0 if we processed
10043 GENERAL_REGS.
10044 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10045 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10046
a06660f7
DJ
100472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * inferiors.c (struct thread_info): Add gdb_id.
10050 (add_thread): Add gdb_id argument.
10051 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10052 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10053 calls to add_thread.
10054 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10055 * server.c (handle_query): Use thread_to_gdb_id.
10056 (handle_v_cont, main): Use gdb_id_to_thread_id.
10057 * server.h (add_thread): Update prototype.
10058 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10059 prototypes.
10060
5a1f5858
DJ
100612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10062
10063 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10064 left-padded registers.
10065 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10066 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10067
e122f1f5
SE
100682005-07-01 Steve Ellcey <sje@cup.hp.com>
10069
10070 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10071 * configure: Regenerate.
10072 * config.in: Regenerate.
10073 * server.h (NEED_DECLARATION_STRERROR):
10074 Replace with !HAVE_DECL_STRERROR.
10075
d592fa2f
DJ
100762005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10077
10078 * linux-low.c (linux_wait, linux_send_signal): Don't test
10079 an unsigned long variable for > 0 if it could be MAX_ULONG.
10080 * server.c (myresume): Likewise.
10081 * target.c (set_desired_inferior): Likewise.
10082
ccbd4912
MK
100832005-06-13 Mark Kettenis <kettenis@gnu.org>
10084
10085 * configure.ac: Simplify and improve check for socklen_t.
10086 * configure, config.in: Regenerate.
10087
f450004a
DJ
100882005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10089
10090 * acconfig.h: Remove.
10091 * configure.ac: Add a test for socklen_t. Use three-argument
10092 AC_DEFINE throughout.
10093 * config.in: Regenerated using autoheader 2.59.
10094 * configure: Regenerated.
10095
10096 * gdbreplay.c (socklen_t): Provide a default.
10097 (remote_open): Use socklen_t.
10098 * remote-utils.c (socklen_t): Provide a default.
10099 (remote_open): Use socklen_t.
10100 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10101 unsigned char.
10102
10103 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10104 char for buffers.
10105 * linux-low.c (linux_read_memory, linux_write_memory)
10106 (linux_read_auxv): Likewise.
10107 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10108 (check_mem_write): Likewise.
10109 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10110 Likewise.
10111 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10112 (registers_from_string, register_data): Likewise.
10113 * server.c (handle_query, main): Likewise.
10114 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10115 (decode_M_packet): Likewise.
10116 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10117 * target.h (struct target_ops): Update read_memory, write_memory,
10118 and read_auxv.
10119 (read_inferior_memory, write_inferior_memory): Update.
10120 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10121 to unsigned char *.
10122 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10123 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10124 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10125 linux-s390-low.c, linux-sh-low.c: Update for changes in
10126 read_inferior_memory and the_low_target->breakpoint.
10127
eee84df1
DJ
101282005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10129
10130 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10131 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10132 * configure.srv: Add powerpc64-*-linux*.
10133 * linux-ppc64-low.c: New file.
10134
45b134e5
OF
101352005-05-23 Orjan Friberg <orjanf@axis.com>
10136
10137 * linux-cris-low.c: New file with support for CRIS.
10138 * linux-crisv32-low.c: Ditto for CRISv32.
10139 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10140 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10141 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10142 reg-crisv32.o, and reg-crisv32.c to make rules.
10143 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10144 recognized targets.
10145
48d93c75
UW
101462005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10147
10148 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10149 of sizeof (PTRACE_XFER_TYPE).
10150 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10151
e013ee27
OF
101522005-05-12 Orjan Friberg <orjanf@axis.com>
10153
889bf7c5 10154 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10155 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10156 pointers for hardware watchpoint support.
10157 * linux-low.h (struct linux_target_ops): Ditto.
10158 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10159 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10160 to linux_target_ops.
10161 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10162 reply packet.
10163 * server.c (main): Recognize 'Z' and 'z' packets.
10164
b0ded00b
UW
101652005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10166
10167 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10168 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10169 (the_low_target): Add new members.
10170
8643e2ad
DJ
101712005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10172
10173 * proc-service.c (ps_lgetregs): Search all_processes instead of
10174 all_threads.
10175
fc620387
DJ
101762005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10177
10178 * server.c (start_inferior): Change return type to int.
10179 (attach_inferior): Change sigptr to int *.
10180 (handle_v_cont, handle_v_requests): Change signal to int *.
10181 (main): Change signal to int.
10182
101832005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10184
10185 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10186 * configure.srv: Add m32r*-*-linux*.
10187 * linux-m32r-low.c: New file.
10188
e0e76420
DJ
101892005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10190
10191 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10192
a1928bad
DJ
101932005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10196 Take unsigned long arguments for PIDs.
10197 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10198 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10199 (wait_for_sigstop, linux_resume_one_process)
10200 (regsets_fetch_inferior_registers, linux_send_signal)
10201 (linux_read_auxv): Likewise. Update the types of variables holding
10202 PIDs. Update format string specifiers.
10203 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10204 * remote-utils.c (prepare_resume_reply): Likewise.
10205 * server.c (cont_thread, general_thread, step_thread)
10206 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10207 unsigned long.
10208 (handle_query): Update format specifiers.
10209 (handle_v_cont, main): Use strtoul for thread IDs.
10210 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10211 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10212 (general_thread, step_thread, thread_from_wait)
10213 (old_thread_from_wait): Update.
10214 * target.h (struct thread_resume): Use unsigned long for THREAD.
10215 (struct target_ops): Use unsigned long for arguments to attach and
10216 thread_alive.
10217
dcdb98d2
DJ
102182005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10219
10220 * acinclude.m4: Include bfd/bfd.m4 directly.
10221 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10222 <agriffis@toolchain.org>.
10223 * aclocal.m4, configure: Regenerated.
10224
bec39cab
AC
102252005-01-07 Andrew Cagney <cagney@gnu.org>
10226
10227 * configure.ac: Rename configure.in, require autoconf 2.59.
10228 * configure: Re-generate.
10229
434c4c77
DJ
102302004-12-08 Daniel Jacobowitz <dan@debian.org>
10231
10232 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10233 LIBS when finished.
10234 * aclocal.m4: Regenerated.
10235 * configure: Regenerated.
10236
db1d3e1b
AS
102372004-11-21 Andreas Schwab <schwab@suse.de>
10238
10239 * linux-m68k-low.c (m68k_num_gregs): Define.
10240 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10241 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10242 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10243 (m68k_breakpoint_at): New. Add to the_low_target.
10244
10245 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10246 srv_linux_thread_db to yes.
10247
43360365
JB
102482004-10-20 Joel Brobecker <brobecker@gnat.com>
10249
10250 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10251 (ARCH_SET_FS): Likewise.
10252 (ARCH_GET_FS): Likewise.
10253 (ARCH_GET_GS): Likewise.
10254
fd500816
DJ
102552004-10-16 Daniel Jacobowitz <dan@debian.org>
10256
10257 * linux-i386-low.c (ps_get_thread_area): New.
10258 * linux-x86-64-low.c (ps_get_thread_area): New.
10259 * linux-low.c: Include <sys/syscall.h>.
10260 (linux_kill_one_process): Don't kill the first thread here.
10261 (linux_kill): Kill the first thread here.
10262 (kill_lwp): New function.
10263 (send_sigstop, linux_send_signal): Use it.
10264 * proc-service.c: Clean up #ifdefs.
10265 (fpregset_info): Delete.
10266 (ps_lgetregs): Update and enable implementation.
10267 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10268 implementations.
10269 * remote-utils.c (struct sym_cache, symbol_cache): New.
10270 (input_interrupt): Print a clearer message.
10271 (async_io_enabled): New variable.
10272 (enable_async_io, disable_async_io): Use it. Update comments.
10273 (look_up_one_symbol): Use the symbol cache.
10274 * thread-db.c (thread_db_look_up_symbols): New function.
10275 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10276
f6de3c42
DJ
102772004-10-16 Daniel Jacobowitz <dan@debian.org>
10278
10279 * configure.in: Test for -rdynamic.
10280 * configure: Regenerated.
10281 * Makefile (INTERNAL_LDFLAGS): New.
10282 (gdbserver, gdbreplay): Use it.
10283
2c0fc042
AC
102842004-09-02 Andrew Cagney <cagney@gnu.org>
10285
10286 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10287
075b3282
DJ
102882004-03-23 Daniel Jacobowitz <drow@mvista.com>
10289
10290 * linux-low.c (linux_wait): Clear all_processes list also.
10291
fa6a77dc
DJ
102922004-03-12 Daniel Jacobowitz <drow@mvista.com>
10293
10294 * linux-low.c: Include <errno.h>. Remove extern declaration of
10295 errno.
10296
6d782a97
DJ
102972004-03-12 Daniel Jacobowitz <drow@mvista.com>
10298
10299 * gdbreplay.c, server.h, utils.c: Update copyright years.
10300
3a7fb99b
DJ
103012004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10302
10303 * server.c (main): Print child status or termination signal from
10304 variable 'signal', not 'sig'.
10305
c3e735a6
DJ
103062004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10307
10308 * linux-low.c (linux_read_memory): Change return type to
10309 int. Check for and return error from ptrace().
10310 * target.c (read_inferior_memory): Change return type to int. Pass
10311 back return status from the_target->read_memory().
10312 * target.h (struct target_ops): Adapt *read_memory() prototype.
10313 Update comment.
10314 (read_inferior_memory): Adapt prototype.
10315 * server.c (main): Return an error packet if
10316 read_inferior_memory() returns an error.
10317
a59d1c82
DJ
103182004-03-04 Daniel Jacobowitz <drow@mvista.com>
10319
10320 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10321 Unify with other clean targets.
10322
dc3f8883
DJ
103232004-02-29 Daniel Jacobowitz <drow@mvista.com>
10324
10325 * server.c (handle_v_cont): Call set_desired_inferior.
10326
89a208da
DJ
103272004-02-29 Daniel Jacobowitz <drow@mvista.com>
10328
10329 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10330
62ea82f5
DJ
103312004-02-29 Daniel Jacobowitz <drow@mvista.com>
10332
10333 * linux-low.c (linux_wait): Unblock async I/O.
10334 (linux_resume): Block and enable async I/O.
10335 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10336 * server.h (block_async_io, unblock_async_io): Add prototypes.
10337
6910d122
DJ
103382004-02-29 Daniel Jacobowitz <drow@mvista.com>
10339
10340 * remote-utils.c (remote_open): Print a status notice after
10341 opening a TCP port.
10342 * server.c (attach_inferior): Print a status notice after
10343 attaching.
10344
103452004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10346
10347 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10348
c89dc5d4
DJ
103492004-02-26 Daniel Jacobowitz <drow@mvista.com>
10350
10351 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10352 error packet.
10353 * server.c, target.h: Update copyright years.
10354
4b8dad4a
RM
103552004-02-25 Roland McGrath <roland@redhat.com>
10356
10357 * target.h (struct target_ops): New member `read_auxv'.
10358 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10359 * linux-low.c (linux_read_auxv): New function.
10360 (linux_target_ops): Initialize `read_auxv' member to that.
10361
d7446758
JB
103622004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10363
10364 Committed by Jim Blandy <jimb@redhat.com>.
10365
10366 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10367 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10368 instead of GPR_SIZE to distiguish s390 and s390x targets.
10369
5544ad89
DJ
103702004-01-31 Daniel Jacobowitz <drow@mvista.com>
10371
10372 * linux-low.c: Update copyright year.
10373 (check_removed_breakpoint): Clear pending_is_breakpoint.
10374 (linux_set_resume_request, linux_queue_one_thread)
10375 (resume_status_pending_p): New functions.
10376 (linux_continue_one_thread): Use process->resume.
10377 (linux_resume): Only resume threads if there are no pending events.
10378 * linux-low.h (struct process_info): Add resume request
10379 pointer.
10380
2a68b70e
DJ
103812004-01-30 Daniel Jacobowitz <drow@mvista.com>
10382
10383 * regcache.c (new_register_cache): Clear the allocated register
10384 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10385
64386c31
DJ
103862003-10-13 Daniel Jacobowitz <drow@mvista.com>
10387
10388 * linux-low.c (linux_resume): Take a struct thread_resume *
10389 argument.
10390 (linux_wait): Update call.
10391 (resume_ptr): New static variable.
10392 (linux_continue_one_thread): Renamed from
10393 linux_continue_one_process. Use resume_ptr.
10394 (linux_resume): Use linux_continue_one_thread.
10395 * server.c (handle_v_cont, handle_v_requests): New functions.
10396 (myresume): New function.
10397 (main): Handle 'v' case.
10398 * target.h (struct thread_resume): New type.
10399 (struct target_ops): Change argument of "resume" to struct
10400 thread_resume *.
10401 (myresume): Delete macro.
10402
c938e9b0
L
104032003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10404
10405 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10406 (uninstall): Support DESTDIR.
10407
7f313d07
BC
10408Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10409
10410 * configure.srv: Add xscale*linux copy of arm*linux entry.
10411
3b2fc2ea
DJ
104122003-07-24 Daniel Jacobowitz <drow@mvista.com>
10413
10414 * linux-arm-low.c (arm_reinsert_addr): New function.
10415 (the_low_target): Add arm_reinsert_addr.
10416
1c0a559e
MK
104172003-07-08 Mark Kettenis <kettenis@gnu.org>
10418
10419 * mem-break.c: Remove whitespace at end of file.
10420
43d5792c
DJ
104212003-06-28 Daniel Jacobowitz <drow@mvista.com>
10422
10423 * configure.in: Check whether we need to prototype strerror.
10424 * server.h: Optionally prototype strerror.
10425 * gdbreplay.c (perror_with_name): Use strerror.
10426 * linux-low.c (linux_attach_lwp): Use strerror.
10427 * utils.c (perror_with_name): Use strerror.
10428 * config.in, configure: Regenerated.
10429
c8a86edf
DJ
104302003-06-28 Daniel Jacobowitz <drow@mvista.com>
10431
10432 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10433 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10434
73d37363
DJ
104352003-06-20 Daniel Jacobowitz <drow@mvista.com>
10436
10437 * Makefile.in (SFILES): Update.
10438 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10439 low-sun3.c: Remove files.
10440
6ad8ae5c
DJ
104412003-06-17 Daniel Jacobowitz <drow@mvista.com>
10442
10443 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10444 (linux_detach_one_process, linux_detach): New functions.
10445 (linux_target_ops): Add linux_detach.
10446 * server.c (main): Handle 'D' packet.
10447 * target.h (struct target_ops): Add "detach" member.
10448 (detach_inferior): Define.
10449
1581182a
MK
104502003-06-13 Mark Kettenis <kettenis@gnu.org>
10451
10452 From Kelley Cook <kelleycook@wideopenwest.com>:
10453 * configure.srv: Accept i[34567]86 variants.
10454
e5379b03
DJ
104552003-06-05 Daniel Jacobowitz <drow@mvista.com>
10456
10457 * linux-low.c (linux_wait_for_event): Correct comment typos.
10458 (linux_resume_one_process): Call check_removed_breakpoint.
10459 (linux_send_signal): New function.
10460 (linux_target_ops): Add linux_send_signal.
10461 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10462 of kill.
10463 * target.h (struct target_ops): Add send_signal.
10464
2ff29de4
JB
104652003-05-29 Jim Blandy <jimb@redhat.com>
10466
10467 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10468 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10469 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10470 away part of the register's value.
10471
254787d4
DJ
104722003-03-26 Daniel Jacobowitz <drow@mvista.com>
10473
10474 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10475 (linux_wait_for_event, linux_init_signals): Likewise.
10476
94e10508
DJ
104772003-03-17 Daniel Jacobowitz <drow@mvista.com>
10478
10479 * configure.in: Check for stdlib.h.
10480 * configure: Regenerated.
10481 * config.in: Regenerated.
10482
4c0711e0
DJ
104832003-01-04 Andreas Schwab <schwab@suse.de>
10484
10485 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10486
ef66e766
AC
104872003-01-02 Andrew Cagney <ac131313@redhat.com>
10488
10489 * Makefile.in: Remove obsolete code.
10490
a1358604
DJ
104912002-11-20 Daniel Jacobowitz <drow@mvista.com>
10492
10493 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10494 defined(PT_FPR0_HI).
10495
23ce3b1c
DJ
104962002-11-17 Stuart Hughes <seh@zee2.com>
10497
10498 * linux-arm-low.c (arm_num_regs): Increase.
10499 (arm_regmap): Include status register.
10500
105012002-11-17 Daniel Jacobowitz <drow@mvista.com>
10502
10503 * linux-low.c (register_addr): Remove incorrect -1 check.
10504
a9fa9f7d
DJ
105052002-08-29 Daniel Jacobowitz <drow@mvista.com>
10506
10507 * linux-low.c (linux_create_inferior): Call setpgid. Return
10508 the new PID.
10509 (unstopped_p, linux_signal_pid): Remove.
10510 (linux_target_ops): Remove linux_signal_pid.
10511 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10512 global instead of target method.
10513 * target.h (struct target_ops): Remove signal_pid. Update comment
10514 for create_inferior.
10515 * server.c (signal_pid): New variable.
10516 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10517 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10518 (attach_inferior): Set signal_pid.
10519
17574093
DJ
105202002-08-23 Daniel Jacobowitz <drow@mvista.com>
10521
10522 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10523
105242002-08-20 Jim Blandy <jimb@redhat.com>
10525
10526 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10527 default for this.
10528
105292002-08-01 Andrew Cagney <cagney@redhat.com>
10530
10531 * Makefile.in: Make chill references obsolete.
10532
105332002-07-24 Kevin Buettner <kevinb@redhat.com>
10534
10535 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10536 * configure: Regenerate.
10537 * config.in: Regenerate.
10538
105392002-07-09 David O'Brien <obrien@FreeBSD.org>
10540
10541 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10542 (perror_with_name, remote_close, remote_open, expect, play): Static.
10543
105442002-07-04 Michal Ludvig <mludvig@suse.cz>
10545
4b8dad4a 10546 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10547 byte offsets instead of an array of indexes.
10548 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10549
105502002-06-13 Daniel Jacobowitz <drow@mvista.com>
10551
10552 * regcache.c: Add comment.
10553
105542002-06-11 Daniel Jacobowitz <drow@mvista.com>
10555
10556 * thread-db.c: New file.
10557 * proc-service.c: New file.
10558 * acinclude.m4: New file.
10559 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10560 proc-service.o, and thread-db.o.
10561 (linux-low.o): Add USE_THREAD_DB.
10562 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10563 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10564 * aclocal.m4: Regenerated.
10565 * config.in: Regenerated.
10566 * configure: Regenerated.
10567 * configure.in: Check for proc_service.h, sys/procfs.h,
10568 thread_db.h, and linux/elf.h headrs.
10569 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10570 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10571 Check for -lthread_db and thread support.
10572 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10573 PowerPC, and SuperH.
10574 * i387-fp.c: Constify arguments.
10575 * i387-fp.h: Likewise.
10576 * inferiors.c: (struct thread_info): Renamed from
10577 `struct inferior_info'. Remove PID member. Use generic inferior
10578 list header. All uses updated.
10579 (inferiors, signal_pid): Removed.
10580 (all_threads): New variable.
10581 (get_thread): Define.
10582 (add_inferior_to_list): New function.
10583 (for_each_inferior): New function.
10584 (change_inferior_id): New function.
10585 (add_inferior): Removed.
10586 (remove_inferior): New function.
10587 (add_thread): New function.
10588 (free_one_thread): New function.
10589 (remove_thread): New function.
10590 (clear_inferiors): Use for_each_inferior and free_one_thread.
10591 (find_inferior): New function.
10592 (find_inferior_id): New function.
10593 (inferior_target_data): Update argument type.
10594 (set_inferior_target_data): Likewise.
10595 (inferior_regcache_data): Likewise.
10596 (set_inferior_regcache_data): Likewise.
10597 * linux-low.c (linux_bp_reinsert): Remove.
10598 (all_processes, stopping_threads, using_thrads)
10599 (struct pending_signals, debug_threads, pid_of): New.
10600 (inferior_pid): Replace with macro.
10601 (struct inferior_linux_data): Remove.
10602 (get_stop_pc, add_process): New functions.
10603 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10604 Use add_process and add_thread.
10605 (linux_attach_lwp): New function, based on old linux_attach. Use
10606 add_process and add_thread. Set stop_expected for new threads.
10607 (linux_attach): New function.
10608 (linux_kill_one_process): New function.
10609 (linux_kill): Kill all LWPs.
10610 (linux_thread_alive): Use find_inferior_id.
10611 (check_removed_breakpoints, status_pending_p): New functions.
10612 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10613 Update. Use WNOHANG. Wait for cloned processes also. Update process
10614 struct for the found process.
10615 (linux_wait_for_event): New function.
10616 (linux_wait): Use it. Support LWPs.
10617 (send_sigstop, wait_for_sigstop, stop_all_processes)
10618 (linux_resume_one_process, linux_continue_one_process): New functions.
10619 (linux_resume): Support LWPs.
10620 (REGISTER_RAW_SIZE): Remove.
10621 (fetch_register): Use register_size instead. Call supply_register.
10622 (usr_store_inferior_registers): Likewise. Call collect_register.
10623 Fix recursive case.
10624 (regsets_fetch_inferior_registers): Improve error message.
10625 (regsets_store_inferior_registers): Add debugging.
10626 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10627 (unstopped_p, linux_signal_pid): New functions.
10628 (linux_target_ops): Add linux_signal_pid.
10629 (linux_init_signals): New function.
10630 (initialize_low): Call it. Initialize using_threads.
10631 * regcache.c (inferior_regcache_data): Add valid
10632 flag.
10633 (get_regcache): Fetch registers lazily. Add fetch argument
10634 and update all callers.
10635 (regcache_invalidate_one, regcache_invalidate): New
10636 functions.
10637 (new_register_cache): Renamed from create_register_cache.
10638 Return the new regcache.
10639 (free_register_cache): Change argument to a void *.
10640 (registers_to_string, registers_from_string): Call get_regcache
10641 with fetch flag set.
10642 (register_data): Make static. Pass fetch flag to get_regcache.
10643 (supply_register): Call get_regcache with fetch flag clear.
10644 (collect_register): Call get_regcache with fetch flag set.
10645 (collect_register_as_string): New function.
10646 * regcache.h: Update.
10647 * remote-utils.c (putpkt): Flush after debug output and use
10648 stderr.
10649 Handle input interrupts while waiting for an ACK.
10650 (input_interrupt): Use signal_pid method.
10651 (getpkt): Flush after debug output and use stderr.
10652 (outreg): Use collect_register_as_string.
10653 (new_thread_notify, dead_thread_notify): New functions.
10654 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10655 and general_thread.
10656 (look_up_one_symbol): Flush after debug output.
10657 * server.c (step_thread, server_waiting): New variables.
10658 (start_inferior): Don't use signal_pid. Update call to mywait.
10659 (attach_inferior): Update call to mywait.
10660 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10661 (main): Don't fetch/store registers explicitly. Use
10662 set_desired_inferior. Support proposed ``Hs'' packet. Update
10663 calls to mywait.
10664 * server.h: Update.
10665 (struct inferior_list, struct_inferior_list_entry): New.
10666 * target.c (set_desired_inferior): New.
10667 (write_inferior_memory): Constify.
10668 (mywait): New function.
10669 * target.h: Update.
10670 (struct target_ops): New signal_pid method.
10671 (mywait): Removed macro, added prototype.
10672
10673 * linux-low.h (regset_func): Removed.
10674 (regset_fill_func, regset_store_func): New.
10675 (enum regset_type): New.
10676 (struct regset_info): Add type field. Use new operation types.
10677 (struct linux_target_ops): stop_pc renamed to get_pc.
10678 Add decr_pc_after_break and breakpoint_at.
10679 (get_process, get_thread_proess, get_process_thread)
10680 (strut process_info, all_processes, linux_attach_lwp)
10681 (thread_db_init): New.
10682
10683 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10684 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10685 (the_low_target): Add new members.
10686 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10687 (i386_store_fpxregset): Constify.
10688 (target_regsets): Add new kind identifier.
10689 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10690 (i386_set_pc): Add debugging.
10691 (i386_breakpoint_at): New function.
10692 (the_low_target): Add new members.
10693 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10694 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10695 (mips_breakpoint_at): New.
10696 (the_low_target): Add new members.
10697 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10698 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10699 (the_low_target): Add new members.
10700 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10701 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10702 (the_low_target): Add new members.
10703 * linux-x86-64-low.c (target_regsets): Add new kind
10704 identifier.
10705
107062002-05-15 Daniel Jacobowitz <drow@mvista.com>
10707
10708 From Martin Pool <mbp@samba.org>:
10709 * server.c (gdbserver_usage): New function.
10710 (main): Call it.
10711
107122002-05-14 Daniel Jacobowitz <drow@mvista.com>
10713
10714 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10715 stop_at -> stop_pc.
10716
107172002-05-04 Andrew Cagney <ac131313@redhat.com>
10718
10719 * Makefile.in: Remove obsolete code.
10720
107212002-04-24 Michal Ludvig <mludvig@suse.cz>
10722
10723 * linux-low.c (regsets_fetch_inferior_registers),
10724 (regsets_store_inferior_registers): Removed cast to int from
10725 ptrace() calls.
10726 * regcache.h: Added declaration of struct inferior_info.
10727
107282002-04-20 Daniel Jacobowitz <drow@mvista.com>
10729
10730 * inferiors.c (struct inferior_info): Add regcache_data.
10731 (add_inferior): Call create_register_cache.
10732 (clear_inferiors): Call free_register_cache.
10733 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10734 * regcache.c (struct inferior_regcache_data): New.
10735 (registers): Remove.
10736 (get_regcache): New function.
10737 (create_register_cache, free_register_cache): New functions.
10738 (set_register_cache): Don't initialize the register cache here.
10739 (registers_to_string, registers_from_string, register_data): Call
10740 get_regcache.
10741 * regcache.h: Add prototypes.
10742 * server.h: Likewise.
10743
107442002-04-20 Daniel Jacobowitz <drow@mvista.com>
10745
10746 * mem-break.c: New file.
10747 * mem-break.h: New file.
10748 * Makefile.in: Add mem-break.o rule; update server.h
10749 dependencies.
10750 * inferiors.c (struct inferior_info): Add target_data
10751 member.
10752 (clear_inferiors): Free target_data member if set.
10753 (inferior_target_data, set_inferior_target_data): New functions.
10754 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10755 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10756 * linux-low.c (linux_bp_reinsert): New variable.
10757 (struct inferior_linux_data): New.
10758 (linux_create_inferior): Use set_inferior_target_data.
10759 (linux_attach): Likewise. Call add_inferior.
10760 (linux_wait_for_one_inferior): New function.
10761 (linux_wait): Call it.
10762 (linux_write_memory): Add const.
10763 (initialize_low): Call set_breakpoint_data.
10764 * linux-low.h (struct linux_target_ops): Add breakpoint
10765 handling members.
10766 * server.c (attach_inferior): Remove extra add_inferior
10767 call.
10768 * server.h: Include mem-break.h. Update inferior.c
10769 prototypes.
10770 * target.c (read_inferior_memory)
10771 (write_inferior_memory): New functions.
10772 * target.h (read_inferior_memory)
10773 (write_inferior_memory): Change macros to prototypes.
10774 (struct target_ops): Update comments. Add const to write_memory
10775 definition.
10776
107772002-04-11 Daniel Jacobowitz <drow@mvista.com>
10778
10779 * linux-low.c (usr_store_inferior_registers): Support
10780 registers which are allowed to fail to store.
10781 * linux-low.h (linux_target_ops): Likewise.
10782 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10783 (ppc_cannot_store_register): FPSCR may not be storable.
10784
107852002-04-09 Daniel Jacobowitz <drow@mvista.com>
10786
10787 * server.h: Include <string.h> if HAVE_STRING_H.
10788 * ChangeLog: Correct paths in last ChangeLog entry.
10789
107902002-04-09 Daniel Jacobowitz <drow@mvista.com>
10791
10792 * linux-low.h: Remove obsolete prototypes.
10793 (struct linux_target_ops): New.
10794 (extern the_low_target): New.
10795 * linux-low.c (num_regs, regmap): Remove declarations.
10796 (register_addr): Use the_low_target explicitly.
10797 (fetch_register): Likewise.
10798 (usr_fetch_inferior_registers): Likewise.
10799 (usr_store_inferior_registers): Likewise.
10800 * linux-arm-low.c (num_regs): Remove.
10801 (arm_num_regs): Define.
10802 (arm_regmap): Renamed from regmap, made static.
10803 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10804 made static.
10805 (arm_cannot_store_register): Renamed from cannot_store_register,
10806 made static.
10807 (the_low_target): New.
10808 * linux-i386-low.c (num_regs): Remove.
10809 (i386_num_regs): Define.
10810 (i386_regmap): Renamed from regmap, made static.
10811 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10812 made static.
10813 (i386_cannot_store_register): Renamed from cannot_store_register,
10814 made static.
10815 (the_low_target): New.
10816 * linux-ia64-low.c (num_regs): Remove.
10817 (ia64_num_regs): Define.
10818 (ia64_regmap): Renamed from regmap, made static.
10819 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10820 made static.
10821 (ia64_cannot_store_register): Renamed from cannot_store_register,
10822 made static.
10823 (the_low_target): New.
10824 * linux-m68k-low.c (num_regs): Remove.
10825 (m68k_num_regs): Define.
10826 (m68k_regmap): Renamed from regmap, made static.
10827 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10828 made static.
10829 (m68k_cannot_store_register): Renamed from cannot_store_register,
10830 made static.
10831 (the_low_target): New.
10832 * linux-mips-low.c (num_regs): Remove.
10833 (mips_num_regs): Define.
10834 (mips_regmap): Renamed from regmap, made static.
10835 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10836 made static.
10837 (mips_cannot_store_register): Renamed from cannot_store_register,
10838 made static.
10839 (the_low_target): New.
10840 * linux-ppc-low.c (num_regs): Remove.
10841 (ppc_num_regs): Define.
10842 (ppc_regmap): Renamed from regmap, made static.
10843 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10844 made static.
10845 (ppc_cannot_store_register): Renamed from cannot_store_register,
10846 made static.
10847 (the_low_target): New.
10848 * linux-s390-low.c (num_regs): Remove.
10849 (s390_num_regs): Define.
10850 (s390_regmap): Renamed from regmap, made static.
10851 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10852 made static.
10853 (s390_cannot_store_register): Renamed from cannot_store_register,
10854 made static.
10855 (the_low_target): New.
10856 * linux-sh-low.c (num_regs): Remove.
10857 (sh_num_regs): Define.
10858 (sh_regmap): Renamed from regmap, made static.
10859 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10860 made static.
10861 (sh_cannot_store_register): Renamed from cannot_store_register,
10862 made static.
10863 (the_low_target): New.
10864 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10865 (the_low_target): New.
10866
108672002-04-09 Daniel Jacobowitz <drow@mvista.com>
10868
10869 * Makefile.in: Add stamp-h target.
10870 * configure.in: Create stamp-h.
10871 * configure: Regenerated.
10872
108732002-04-09 Daniel Jacobowitz <drow@mvista.com>
10874
10875 * inferiors.c: New file.
10876 * target.c: New file.
10877 * target.h: New file.
10878 * Makefile.in: Add target.o and inferiors.o. Update
10879 dependencies.
10880 * linux-low.c (inferior_pid): New static variable,
10881 moved from server.c.
10882 (linux_create_inferior): Renamed from create_inferior.
10883 Call add_inferior. Return 0 on success instead of a PID.
10884 (linux_attach): Renamed from myattach.
10885 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10886 (linux_thread_alive): Renamed from mythread_alive.
10887 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10888 child dies.
10889 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10890 (regsets_store_inferior_registers): Correct error message.
10891 Add missing ``return 0''.
10892 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10893 (linux_store_registers): Renamed from store_inferior_registers.
10894 (linux_read_memory): Renamed from read_inferior_memory.
10895 (linux_write_memory): Renamed from write_inferior_memory.
10896 (linux_target_ops): New structure.
10897 (initialize_low): Call set_target_ops ().
10898 * remote-utils.c (unhexify): New function.
10899 (hexify): New function.
10900 (input_interrupt): Send signals to ``signal_pid''.
10901 * server.c (inferior_pid): Remove.
10902 (start_inferior): Update create_inferior call.
10903 (attach_inferior): Call add_inferior.
10904 (handle_query): New function.
10905 (main): Call handle_query for `q' packets.
10906 * server.h: Include "target.h". Remove obsolete prototypes.
10907 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10908
109092002-04-09 Daniel Jacobowitz <drow@mvista.com>
10910
10911 * Makefile.in: Add WARN_CFLAGS. Update configury
10912 dependencies.
10913 * configure.in: Check for <string.h>
10914 * configure: Regenerate.
10915 * config.in: Regenerate.
10916 * gdbreplay.c: Include needed system headers.
10917 (remote_open): Remove strchr prototype.
10918 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10919 * regcache.c (supply_register): Change buf argument to const void *.
10920 (supply_register_by_name): Likewise.
10921 (collect_register): Change buf argument to void *.
10922 (collect_register_by_name): Likewise.
10923 * regcache.h: Add missing prototypes.
10924 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10925 * server.c (handle_query): New function.
10926 (attached): New static variable, moved out of main.
10927 (main): Quiet longjmp clobber warnings.
10928 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10929 * utils.c (error): Remove NORETURN.
10930 (fatal): Likewise.