Introduce current_lwp_ptid
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7b669087
GB
12015-03-24 Gary Benson <gbenson@redhat.com>
2
3 * linux-low.c (current_lwp_ptid): New function.
4 * linux-x86-low.c: Include nat/linux-nat.h.
5 (x86_dr_low_get_addr): Use current_lwp_ptid.
6 (x86_dr_low_get_control): Likewise.
7 (x86_dr_low_get_status): Likewise.
8
eef49a3d
PA
92015-03-20 Pedro Alves <palves@redhat.com>
10
11 * tracepoint.c (cmd_qtstatus): Make "str" const.
12
b2333d22
PA
132015-03-20 Pedro Alves <palves@redhat.com>
14
15 * server.c (handle_general_set): Make "req_str" const.
16
23f238d3
PA
172015-03-19 Pedro Alves <palves@redhat.com>
18
19 * linux-low.c (linux_resume_one_lwp): Rename to ...
20 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
21 instead call perror_with_name.
22 (check_ptrace_stopped_lwp_gone): New function.
23 (linux_resume_one_lwp): Reimplement as wrapper around
24 linux_resume_one_lwp_throw that swallows errors if the LWP is
25 gone.
26
91baf43f
PA
272015-03-19 Pedro Alves <palves@redhat.com>
28
29 * linux-low.c (count_events_callback, select_event_lwp_callback):
30 No longer check whether the thread has resume_stop as last resume
31 kind.
32
8bf3b159
PA
332015-03-19 Pedro Alves <palves@redhat.com>
34
35 * linux-low.c (count_events_callback, select_event_lwp_callback):
36 Use the lwp's status_pending_p field, not the thread's.
37
b90fc188
PA
382015-03-19 Pedro Alves <palves@redhat.com>
39
40 * linux-low.c (select_event_lwp_callback): Update comments to
41 no longer mention SIGTRAP.
42
464b0089
GB
432015-03-18 Gary Benson <gbenson@redhat.com>
44
45 * server.c (handle_query): Do not report vFile:fstat as supported.
46
aa9e327f
GB
472015-03-11 Gary Benson <gbenson@redhat.com>
48
49 * hostio.c (sys/types.h): New include.
50 (sys/stat.h): Likewise.
51 (common-remote-fileio.h): Likewise.
52 (handle_fstat): New function.
53 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 54
791c0056
GB
552015-03-11 Gary Benson <gbenson@redhat.com>
56
57 * configure.ac (AC_CHECK_MEMBERS): Add checks for
58 struct stat.st_blocks and struct stat.st_blksize.
59 * configure: Regenerate.
60 * config.in: Likewise.
61 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
62 (OBS): Add common-remote-fileio.o.
63 (common-remote-fileio.o): New rule.
64
9a9df970
PA
652015-03-09 Pedro Alves <palves@redhat.com>
66
67 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
68 'struct sockaddr' pointer in 'accept' call.
69
9eb1356e
PA
702015-03-09 Pedro Alves <palves@redhat.com>
71
72 Revert:
73 2015-03-07 Pedro Alves <palves@redhat.com>
74 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
75 or <winsock2.h> here. Instead include "gdb_socket.h".
76 (remote_open): Use union gdb_sockaddr_u.
77 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
78 or <winsock2.h> here. Instead include "gdb_socket.h".
79 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
80 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
81 or <sys/un.h>.
82 (init_named_socket, gdb_agent_helper_thread): Use union
83 gdb_sockaddr_u.
84
aac331e4
PA
852015-03-07 Pedro Alves <palves@redhat.com>
86
87 * configure.ac (build_warnings): Move
88 -Wdeclaration-after-statement to the C-specific set.
89 * configure: Regenerate.
90
366c75fc
PA
912015-03-07 Pedro Alves <palves@redhat.com>
92
93 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
94 or <winsock2.h> here. Instead include "gdb_socket.h".
95 (remote_open): Use union gdb_sockaddr_u.
96 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
97 or <winsock2.h> here. Instead include "gdb_socket.h".
98 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
99 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
100 or <sys/un.h>.
101 (init_named_socket, gdb_agent_helper_thread): Use union
102 gdb_sockaddr_u.
103
492d29ea
PA
1042015-03-07 Pedro Alves <palves@redhat.com>
105
106 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
107 instead.
108
60a191ed
YQ
1092015-03-06 Yao Qi <yao.qi@linaro.org>
110
111 * linux-aarch64-low.c (aarch64_insert_point): Use
112 show_debug_regs as a boolean.
113 (aarch64_remove_point): Likewise.
114
f5771b1d
PA
1152015-03-05 Pedro Alves <palves@redhat.com>
116
117 * lynx-low.c (lynx_target_ops): Install NULL hooks for
118 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
119 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
120 * nto-low.c (nto_target_ops): Likewise.
121 * spu-low.c (spu_target_ops): Likewise.
122 * win32-low.c (win32_target_ops): Likewise.
123
3e572f71
PA
1242015-03-04 Pedro Alves <palves@redhat.com>
125
126 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
127 Decide whether a breakpoint triggered based on the SIGTRAP's
128 siginfo.si_code.
129 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
130 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
131 (linux_low_filter_event): Check for breakpoints before checking
132 watchpoints.
133 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
134 siginfo.si_code.
135 (linux_stopped_by_sw_breakpoint)
136 (linux_supports_stopped_by_sw_breakpoint)
137 (linux_stopped_by_hw_breakpoint)
138 (linux_supports_stopped_by_hw_breakpoint): New functions.
139 (linux_target_ops): Install new target methods.
140
1ec68e26
PA
1412015-03-04 Pedro Alves <palves@redhat.com>
142
143 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
144 * server.c (swbreak_feature, hwbreak_feature): New globals.
145 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
146 (captured_main): Clear swbreak_feature and hwbreak_feature.
147 * server.h (swbreak_feature, hwbreak_feature): Declare.
148 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
149 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
150 supports_stopped_by_hw_breakpoint>: New fields.
151 (target_supports_stopped_by_sw_breakpoint)
152 (target_stopped_by_sw_breakpoint)
153 (target_supports_stopped_by_hw_breakpoint)
154 (target_stopped_by_hw_breakpoint): Declare.
155
15c66dd6
PA
1562015-03-04 Pedro Alves <palves@redhat.com>
157
158 enum lwp_stop_reason -> enum target_stop_reason
159 * linux-low.c (check_stopped_by_breakpoint): Adjust.
160 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
161 (linux_wait_1, stuck_in_jump_pad_callback)
162 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
163 (linux_stopped_by_watchpoint):
164 * linux-low.h (enum lwp_stop_reason): Delete.
165 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
166 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
167
98fc70d6
YQ
1682015-03-04 Yao Qi <yao.qi@linaro.org>
169
170 * Makefile.in (SFILES): Add linux-aarch64-low.c.
171
dd2ac174
GB
1722015-03-03 Gary Benson <gbenson@redhat.com>
173
174 * hostio.c (handle_vFile): Fix prefix lengths.
175
d68e53f4
MM
1762015-03-03 Markus Metzger <markus.t.metzger@intel.com>
177
178 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
179 ptr_bits.
180
bf2d68ab
AA
1812015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
182
183 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
184 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
185 (clean): Add "rm -f" for above C files.
186 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
187 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
188 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
189 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
190 * linux-s390-low.c (HWCAP_S390_VX): New macro.
191 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
192 (init_registers_s390x_vx_linux64)
193 (init_registers_s390x_tevx_linux64)
194 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
195 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
196 declarations.
197 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
198 (s390_store_vxrs_high): New functions.
199 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
200 NT_S390_VXRS_HIGH.
201 (s390_arch_setup): Add logic for selecting one of the new target
202 descriptions. Activate the new vector regsets if applicable.
203 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
204 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
205 and init_registers_s390x_tevx_linux64.
206
c966a859
PA
2072015-03-01 Pedro Alves <palves@redhat.com>
208
209 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
210 parameter.
211
4180215b
PA
2122015-02-27 Pedro Alves <palves@redhat.com>
213
214 * linux-x86-low.c (u_debugreg_offset): New function.
215 (x86_linux_dr_get, x86_linux_dr_set): Use it.
216
749bab01
PA
2172015-02-27 Pedro Alves <palves@redhat.com>
218
219 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
220 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
221 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
222 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
223 (ps_lsetfpregs, ps_getpid)
224 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
225 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
226 (ps_lsetxregs, ps_plog): Declare.
227
3c14e5a3
PA
2282015-02-27 Pedro Alves <palves@redhat.com>
229
230 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
231 IP_AGENT_EXPORT_FUNC.
232 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
233 IP_AGENT_EXPORT_FUNC.
234 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
235 (IP_AGENT_EXPORT): Delete.
236 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
237 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
238 (gdb_trampoline_buffer_error, collecting, gdb_collect)
239 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
240 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
241 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
242 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
243 (traceframe_read_count, traceframe_write_count)
244 (traceframes_created, trace_state_variables, get_raw_reg)
245 (get_trace_state_variable_value, set_trace_state_variable_value)
246 (ust_loaded, helper_thread_id, cmd_buf): Use
247 IPA_SYM_EXPORTED_NAME.
248 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
249 (tracepoints) Use IP_AGENT_EXPORT_VAR.
250 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
251 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
252 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
253 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
254 EXTERN_C_PUSH/EXTERN_C_POP.
255 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
256 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
257 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
258 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
259 (traceframe_write_count, traceframe_read_count)
260 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
261 (about_to_request_buffer_space, get_trace_state_variable_value)
262 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
263 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
264 EXTERN_C_PUSH/EXTERN_C_POP.
265 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
266 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
267 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
268 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
269 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
270 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
271 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
272 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
273 Define.
274 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
275 (IP_AGENT_EXPORT_VAR_DECL): Define.
276 (tracing): Declare.
277 (gdb_agent_get_raw_reg): Declare.
278
fe978cb0
PA
2792015-02-27 Tom Tromey <tromey@redhat.com>
280 Pedro Alves <palves@redhat.com>
281
282 Rename symbols whose names are reserved C++ keywords throughout.
283
3bc3d82a
PA
2842015-02-27 Pedro Alves <palves@redhat.com>
285
286 * Makefile.in (COMPILER): New, get it from autoconf.
287 (CXX): Get from autoconf instead.
288 (COMPILE.pre): Use COMPILER.
289 (CC-LD): Rename to ...
290 (CC_LD): ... this. Use COMPILER.
291 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
292 (CXX_FOR_TARGET): Default to g++ instead of gcc.
293 * acinclude.m4: Include build-with-cxx.m4.
294 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
295 Disable -Werror by default if building in C++ mode.
296 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
297 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
298 the C++ compiler. Save/restore CXXFLAGS too.
299 * configure: Regenerate.
300
07697489
PA
3012015-02-27 Pedro Alves <palves@redhat.com>
302
303 * acinclude.m4: Include libiberty.m4.
304 * configure.ac: Call libiberty_INIT.
305 * config.in, configure: Regenerate.
306
9beb7c4e
PA
3072015-02-26 Pedro Alves <palves@redhat.com>
308
309 * linux-low.c (linux_wait_1): When incrementing the PC past a
310 program breakpoint always use the_low_target.breakpoint_len as
311 increment, rather than the maximum between that and
312 the_low_target.decr_pc_after_break.
313
8090aef2
PA
3142015-02-23 Pedro Alves <palves@redhat.com>
315
316 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
317 thread was doing a step-over; always adjust the PC if
318 we stepped over a permanent breakpoint.
319 (linux_wait_1): If we stepped over breakpoint that was on top of a
320 permanent breakpoint, manually advance the PC past it.
321
bc9540e8
PA
3222015-02-23 Pedro Alves <palves@redhat.com>
323
324 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
325 modes.
326 (x86_fill_gregset, x86_store_gregset): Use it when handling
327 $orig_eax.
328
2db9a427
PA
3292015-02-20 Pedro Alves <palves@redhat.com>
330
331 * thread-db.c: Include "nat/linux-procfs.h".
332 (thread_db_init): Skip listing new threads if the kernel supports
333 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
334
afa8d396
PA
3352015-02-20 Pedro Alves <palves@redhat.com>
336
337 * linux-low.c (status_pending_p_callback): Use ptid_match.
338
c9587f88
AT
3392015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
340
341 PR breakpoints/16812
342 * linux-low.c (wstatus_maybe_breakpoint): Remove.
343 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
344 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
345
b05ec7a5
AT
3462015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
347
348 PR breakpoints/15956
349 * tracepoint.c (cmd_qtinit): Add check for current_thread.
350
d33501a5
MM
3512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
352
353 * linux-low.c (linux_low_btrace_conf): Print size.
354 * server.c (handle_btrace_conf_general_set): New.
355 (hanle_general_set): Call handle_btrace_conf_general_set.
356 (handle_query): Report Qbtrace-conf:bts:size as supported.
357
f4abbc16
MM
3582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
359
360 * linux-low.c (linux_low_enable_btrace): Update parameters.
361 (linux_low_btrace_conf): New.
362 (linux_target_ops)<to_btrace_conf>: Initialize.
363 * server.c (current_btrace_conf): New.
364 (handle_btrace_enable): Rename to ...
365 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
366 to target_enable_btrace. Update comment. Update users.
367 (handle_qxfer_btrace_conf): New.
368 (qxfer_packets): Add btrace-conf entry.
369 (handle_query): Report qXfer:btrace-conf:read as supported packet.
370 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
371 (target_ops)<read_btrace_conf>: New.
372 (target_enable_btrace): Update parameters.
373 (target_read_btrace_conf): New.
374
043c3577
MM
3752015-02-09 Markus Metzger <markus.t.metzger@intel.com>
376
377 * server.c (handle_btrace_general_set): Remove call to
378 target_supports_btrace.
379 (supported_btrace_packets): New.
380 (handle_query): Call supported_btrace_packets.
381 * target.h: include btrace-common.h.
382 (btrace_target_info): Removed.
383 (supports_btrace, target_supports_btrace): Update parameters.
384
734b0e4b
MM
3852015-02-09 Markus Metzger <markus.t.metzger@intel.com>
386
387 * Makefile.in (SFILES): Add common/btrace-common.c.
388 (OBS): Add common/btrace-common.o.
389 (btrace-common.o): Add build rules.
390 * linux-low: Include btrace-common.h.
391 (linux_low_read_btrace): Use struct btrace_data. Call
392 btrace_data_init and btrace_data_fini.
393
d6c146e9
PA
3942015-02-06 Pedro Alves <palves@redhat.com>
395
396 * thread-db.c (find_new_threads_callback): Add debug output.
397
20ba1ce6
PA
3982015-02-04 Pedro Alves <palves@redhat.com>
399
400 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
401 (resume_stopped_resumed_lwps): New function.
402 (linux_wait_for_event_filtered): Use it.
403
8cc73a39
SDJ
4042015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
405
406 * Makefile.in (SFILES): Add linux-personality.c.
407 (linux-personality.o): New rule.
408 * configure.srv (srv_linux_obj): Add linux-personality.o to the
409 list of objects to be built.
410 * linux-low.c: Include nat/linux-personality.h.
411 (linux_create_inferior): Remove code to disable address space
412 randomization (moved to ../nat/linux-personality.c). Create
413 cleanup to disable address space randomization.
414
fb23d554
SDJ
4152015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
416
417 * Makefile.in (posix-strerror.o): New rule.
418 (mingw-strerror.o): Likewise.
419 * configure: Regenerated.
420 * configure.ac: Source file ../common/common.host. Initialize new
421 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
422
cdf43629
YQ
4232015-01-14 Yao Qi <yao@codesourcery.com>
424
425 * Makefile.in (SFILES): Add nat/ppc-linux.c.
426 (ppc-linux.o): New rule.
427 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
428 * configure.ac: AC_CHECK_FUNCS(getauxval).
429 * config.in: Re-generated.
430 * configure: Re-generated.
431 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
432 ppc64_64bit_inferior_p
433
514c5338
YQ
4342015-01-14 Yao Qi <yao@codesourcery.com>
435
436 * linux-ppc-low.c: Include "nat/ppc-linux.h".
437 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
438 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
439 (PT_ORIG_R3, PT_TRAP): Likewise.
440 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
441 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
442 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
443
3368c1e5
JB
4442015-01-10 Joel Brobecker <brobecker@adacore.com>
445
446 * i387-fp.c (i387_cache_to_xsave): In look over
447 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
448 zmmh_low_space field by use of zmmh_high_space.
449
582511be
PA
4502015-01-09 Pedro Alves <palves@redhat.com>
451
452 * linux-low.c (step_over_bkpt): Move higher up in the file.
453 (handle_extended_wait): Don't store the stop_pc here.
454 (get_stop_pc): Adjust comments and rename to ...
455 (check_stopped_by_breakpoint): ... this. Record whether the LWP
456 stopped for a software breakpoint or hardware breakpoint.
457 (thread_still_has_status_pending_p): New function.
458 (status_pending_p_callback): Use
459 thread_still_has_status_pending_p. If the event is no longer
460 interesting, resume the LWP.
461 (handle_tracepoints): Add assert.
462 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
463 (wstatus_maybe_breakpoint): New function.
464 (cancel_breakpoint): Delete function.
465 (check_stopped_by_watchpoint): New function, factored out from
466 linux_low_filter_event.
467 (lp_status_maybe_breakpoint): Delete function.
468 (linux_low_filter_event): Remove filter_ptid argument.
469 Leave thread group exits pending here. Store the LWP's stop PC.
470 Always leave events pending.
471 (linux_wait_for_event_filtered): Pull all events out of the
472 kernel, and leave them all pending.
473 (count_events_callback, select_event_lwp_callback): Consider all
474 events.
475 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
476 (select_event_lwp): Only give preference to the stepping LWP in
477 all-stop mode. Adjust comments.
478 (ignore_event): New function.
479 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
480 references to cancel_breakpoints. Adjust to renames. Also give
481 equal priority to all LWPs that have had events in non-stop mode.
482 If reporting a software breakpoint event, unadjust the LWP's PC.
483 (linux_wait): If linux_wait_1 returned an ignored event, retry.
484 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
485 Adjust.
486 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
487 (resume_status_pending_p): Use thread_still_has_status_pending_p.
488 (linux_stopped_by_watchpoint): Adjust.
489 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
490 * linux-low.h (enum lwp_stop_reason): New.
491 (struct lwp_info) <stop_pc>: Adjust comment.
492 <stopped_by_watchpoint>: Delete field.
493 <stop_reason>: New field.
494 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
495 * mem-break.c (software_breakpoint_inserted_here)
496 (hardware_breakpoint_inserted_here): New function.
497 * mem-break.h (software_breakpoint_inserted_here)
498 (hardware_breakpoint_inserted_here): Declare.
499 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
500 (cancel_breakpoints): Delete.
501 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
502 (upload_fast_traceframes): Remove references to
503 cancel_breakpoints.
504
a33e3959
PA
5052015-01-09 Pedro Alves <palves@redhat.com>
506
507 * thread-db.c (find_new_threads_callback): Ignore thread if the
508 kernel thread ID is -1.
509
8784d563
PA
5102015-01-09 Pedro Alves <palves@redhat.com>
511
512 * linux-low.c (linux_attach_fail_reason_string): Move to
513 nat/linux-ptrace.c, and rename.
514 (linux_attach_lwp): Update comment.
515 (attach_proc_task_lwp_callback): New function.
516 (linux_attach): Adjust to rename and use
517 linux_proc_attach_tgid_threads.
518 (linux_attach_fail_reason_string): Delete declaration.
519
76f2b779
JB
5202015-01-01 Joel Brobecker <brobecker@adacore.com>
521
522 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
523 * server.c (gdbserver_version): Likewise.
524
fafcc06a
SDJ
5252014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
526
527 * remote-utils.c: Include ctype.h.
528 (input_interrupt): Explicitly handle the case when the char
529 received is the NUL byte. Improve the printing of non-ASCII
530 characters.
531
beed38b8
JB
5322014-12-16 Joel Brobecker <brobecker@adacore.com>
533
534 * linux-low.c (linux_low_filter_event): Update call to
535 linux_enable_event_reporting following the addition of
536 a new parameter to that function.
537
bf330350
CU
5382014-12-16 Catalin Udma <catalin.udma@freescale.com>
539
540 PR server/17457
541 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
542 (AARCH64_FPCR_REGNO): Likewise.
543 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
544 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
545 (aarch64_store_fpregset): Likewise.
546
5227d625
JB
5472014-12-15 Joel Brobecker <brobecker@adacore.com>
548
549 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
550 Remove FIXME comment about assumption about N.
551
f93b65a0
JB
5522014-12-13 Joel Brobecker <brobecker@adacore.com>
553
554 * configure.ac: If large-file support is disabled in GDBserver,
555 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
556 * configure: Regenerate.
557
e5a9158d
AA
5582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
559
560 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
561 warning upon ENODATA from ptrace.
562 * linux-s390-low.c (s390_store_tdb): New.
563 (s390_regsets): Add regset for NT_S390_TDB.
564
feea5f36
AA
5652014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
566
567 * linux-low.c (regsets_store_inferior_registers): Skip regsets
568 without a fill_function.
569 * linux-s390-low.c (s390_fill_last_break): Remove.
570 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
571 (s390_arch_setup): Use regset's size instead of fill_function for
572 loop end condition.
573
098dbe61
AA
5742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
575
576 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
577 the regset's store function when ptrace returned an error.
578 * regcache.c (get_thread_regcache): Invalidate register cache
579 before fetching inferior's registers.
580
28eef672
AA
5812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
582
583 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
584 while-loop as for-loop.
585 (regsets_store_inferior_registers): Likewise.
586
bdca27a2
YQ
5872014-11-28 Yao Qi <yao@codesourcery.com>
588
589 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
590 * config.in, configure: Re-generate.
591 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
592 is defined.
593
9c232dda
YQ
5942014-11-21 Yao Qi <yao@codesourcery.com>
595
596 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
597 (AC_CHECK_HEADERS): Remove malloc.h.
598 * configure: Re-generated.
599 * config.in: Re-generated.
600 * server.h: Don't include alloca.h and malloc.h.
601 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
602 Don't include malloc.h.
603
43968415
JB
6042014-11-17 Joel Brobecker <brobecker@adacore.com>
605
606 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
607 corresponding ERRNO check in same block.
608
40e91bc7
PA
6092014-11-12 Pedro Alves <palves@redhat.com>
610
611 * server.c (cont_thread): Update comment.
612 (start_inferior, attach_inferior): No longer clear cont_thread.
613 (handle_v_cont): No longer set cont_thread.
614 (captured_main): Clear cont_thread each time a GDB connects.
615
c2c118cf
PA
6162014-11-12 Pedro Alves <palves@redhat.com>
617
618 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
619 thread, and don't resume all threads if the Hc thread has exited.
620
78708b7c
PA
6212014-11-12 Pedro Alves <palves@redhat.com>
622
623 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
624 the process group instead of to a specific LWP.
625
a2abc7de
PA
6262014-10-15 Pedro Alves <palves@redhat.com>
627
628 PR server/17487
629 * win32-arm-low.c (arm_set_thread_context): Remove current_event
630 parameter.
631 (arm_set_thread_context): Delete.
632 (the_low_target): Adjust.
633 * win32-i386-low.c (debug_registers_changed)
634 (debug_registers_used): Delete.
635 (update_debug_registers_callback): New function.
636 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
637 needing to update their debug registers.
638 (win32_get_current_dr): New function.
639 (x86_dr_low_get_addr, x86_dr_low_get_control)
640 (x86_dr_low_get_status): Fetch the debug register from the thread
641 record's context.
642 (i386_initial_stuff): Adjust.
643 (i386_get_thread_context): Remove current_event parameter. Don't
644 clear debug_registers_changed nor copy DR values to
645 debug_reg_state.
646 (i386_set_thread_context): Delete.
647 (i386_prepare_to_resume): New function.
648 (i386_thread_added): Mark the thread as needing to update irs
649 debug registers.
650 (the_low_target): Remove i386_set_thread_context and install
651 i386_prepare_to_resume.
652 * win32-low.c (win32_get_thread_context): Adjust.
653 (win32_set_thread_context): Use SetThreadContext
654 directly.
655 (win32_prepare_to_resume): New function.
656 (win32_require_context): New function, factored out from ...
657 (thread_rec): ... this.
658 (continue_one_thread): Call win32_prepare_to_resume on each thread
659 we're about to continue.
660 (win32_resume): Call win32_prepare_to_resume on the event thread.
661 * win32-low.h (struct win32_thread_info)
662 <debug_registers_changed>: New field.
663 (struct win32_target_ops): Change prototype of set_thread_context,
664 delete set_thread_context and add prepare_to_resume.
665 (win32_require_context): New declaration.
666
a442d071
GB
6672014-10-08 Gary Benson <gbenson@redhat.com>
668
669 * server.h: Do not include common-exceptions.h.
670
6f1947e8
GB
6712014-10-08 Gary Benson <gbenson@redhat.com>
672
673 * server.h: Do not include cleanups.h.
674
63b434a4
JH
6752014-09-30 James Hogan <james.hogan@imgtec.com>
676
677 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
678 mips64-dsp-linux.c.
679
c4d9ceb6
YQ
6802014-09-23 Yao Qi <yao@codesourcery.com>
681
682 * linux-low.c (lp_status_maybe_breakpoint): New function.
683 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
684 (count_events_callback): Likewise.
685 (select_event_lwp_callback): Likewise.
686 (cancel_breakpoints_callback): Likewise.
687
89a5711c
DB
6882014-09-19 Don Breazeal <donb@codesourcery.com>
689
690 * linux-low.c (handle_extended_wait): Call
691 linux_ptrace_get_extended_event.
692 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
693 linux_is_extended_waitstatus.
694
bffc0964
JB
6952014-09-16 Joel Brobecker <brobecker@adacore.com>
696
697 * Makefile.in (CPPFLAGS): Define.
698 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
699 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
700
0bfdf32f
GB
7012014-09-16 Gary Benson <gbenson@redhat.com>
702
703 * inferiors.h (current_inferior): Renamed as...
704 (current_thread): New variable. All uses updated.
705 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
706 (maybe_move_out_of_jump_pad): Likewise.
707 (cancel_breakpoint): Likewise.
708 (linux_low_filter_event): Likewise.
709 (wait_for_sigstop): Likewise.
710 (linux_resume_one_lwp): Likewise.
711 (need_step_over_p): Likewise.
712 (start_step_over): Likewise.
713 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
714 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
715 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
716 and save_inferior as saved_thread.
717 * regcache.c (get_thread_regcache): Renamed saved_inferior as
718 saved_thread.
719 (regcache_invalidate_thread): Likewise.
720 * remote-utils.c (prepare_resume_reply): Likewise.
721 * thread-db.c (thread_db_get_tls_address): Likewise.
722 (disable_thread_event_reporting): Likewise.
723 (remove_thread_event_breakpoints): Likewise.
724 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
725 as saved_thread.
726 * target.h (set_desired_inferior): Renamed as...
727 (set_desired_thread): New declaration. All uses updated.
728 * server.c (myresume): Updated comment to reference thread instead
729 of inferior.
730 (handle_serial_event): Likewise.
731 (handle_target_event): Likewise.
732
361c8ade
GB
7332014-09-12 Tom Tromey <tromey@redhat.com>
734 Gary Benson <gbenson@redhat.com>
735
736 * regcache.h: Include common-regcache.h.
737 (regcache_read_pc): Don't declare.
738 * regcache.c (get_thread_regcache_for_ptid): New function.
739
bd9269f7
GB
7402014-09-11 Tom Tromey <tromey@redhat.com>
741 Gary Benson <gbenson@redhat.com>
742
743 * symbol.c: New file.
744 * Makefile.in (SFILES): Add symbol.c.
745 (OBS): Add symbol.o.
746
f8c1d06b
GB
7472014-09-11 Gary Benson <gbenson@redhat.com>
748
749 * target.c (target_stop_ptid, target_continue_ptid): New
750 functions.
751
721ec300
GB
7522014-09-11 Tom Tromey <tromey@redhat.com>
753 Gary Benson <gbenson@redhat.com>
754
755 * target.h: Include target/target.h.
756 * target.c (target_read_memory, target_read_uint32)
757 (target_write_memory): New functions.
758
c5e92cca
GB
7592014-09-11 Gary Benson <gbenson@redhat.com>
760
761 * server.h (debug_hw_points): Don't declare.
762 * server.c (debug_hw_points): Don't define. Replace all uses
763 with show_debug_regs.
764 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
765 all uses with show_debug_regs.
766
2e4bb98a
EBM
7672014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
768
769 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
770 endianness into account.
771 (ppc_supply_ptrace_register): Likewise.
772
ac740bc7
JH
7732014-09-03 James Hogan <james.hogan@imgtec.com>
774
775 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
776 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
777
97ea6506
GB
7782014-09-03 Gary Benson <gbenson@redhat.com>
779
780 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
781 ALL_DEBUG_ADDRESS_REGISTERS.
782
df7e5265
GB
7832014-09-02 Gary Benson <gbenson@redhat.com>
784
785 * i386-low.h: Renamed as...
786 * x86-low.h: New file. All type, function and variable name
787 prefixes changed from "i386_" to "x86_". All references updated.
788 * i386-low.c: Renamed as...
789 * x86-low.c: New file. All type, function and variable name
790 prefixes changed from "i386_" to "x86_". All references updated.
791
ed859da7
GB
7922014-09-02 Gary Benson <gbenson@redhat.com>
793
794 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
795 (x86_linux_new_thread): Likewise.
796
860789c7
GB
7972014-08-29 Gary Benson <gbenson@redhat.com>
798
799 * server.h (setjmp.h): Do not include.
800 (toplevel): Do not declare.
801 (common-exceptions.h): Include.
802 (cleanups.h): Likewise.
803 * server.c (toplevel): Do not define.
804 (exit_code): New static global.
805 (detach_or_kill_for_exit_cleanup): New function.
806 (main): New function. Original main renamed to...
807 (captured_main): New function.
808 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
809
ff55e1b5
GB
8102014-08-29 Gary Benson <gbenson@redhat.com>
811
812 * Makefile.in (SFILES): Add common/common-exceptions.c.
813 (OBS): Add common-exceptions.o.
814 (common-exceptions.o): New rule.
815 * utils.c (prepare_to_throw_exception): New function.
816
e9bcb658
GB
8172014-08-29 Gary Benson <gbenson@redhat.com>
818
819 * config.in: Regenerate.
820 * configure: Likewise.
821
e3180625
GB
8222014-08-29 Gary Benson <gbenson@redhat.com>
823
824 * Makefile.in (SFILES): Add common/cleanups.c.
825 (OBS): cleanups.o.
826 (cleanups.o): New rule.
827
e3d6ba5d
GB
8282014-08-29 Gary Benson <gbenson@redhat.com>
829
830 * utils.c (internal_vwarning): New function.
831
7096e886
GB
8322014-08-28 Gary Benson <gbenson@redhat.com>
833
834 * utils.h (fatal): Remove declaration.
835 * utils.c (fatal): Remove function.
836
14ce3192
GB
8372014-08-28 Gary Benson <gbenson@redhat.com>
838
839 * tracepoint.c (gdb_agent_init): Replace fatal with
840 perror_with_name.
841 (initialize_tracepoint): Likewise.
842
50278d59
GB
8432014-08-28 Gary Benson <gbenson@redhat.com>
844
845 * remote-utils.c (remote_prepare): Replace fatal with error.
846
aa96c426
GB
8472014-08-28 Gary Benson <gbenson@redhat.com>
848
849 * linux-low.c (linux_async): Replace fatal with warning.
850 Tidy up and return.
851 (linux_start_non_stop): Return -1 if linux_async failed.
852
f7160e97
GB
8532014-08-28 Gary Benson <gbenson@redhat.com>
854
855 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
856 gdb_assert.
857 (i386_dr_low_get_addr): Remove vague comment.
858 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
859 gdb_assert.
860
38e08fca
GB
8612014-08-28 Gary Benson <gbenson@redhat.com>
862
863 * inferiors.c (get_thread_process): Replace check with gdb_assert.
864 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
865 internal_error.
866 (linux_resume_one_lwp): Likewise.
867 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
868 gdb_assert.
869 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
870 with internal_error.
871 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
872 (init_register_cache): Replace fatal with gdb_assert_not_reached.
873 (find_register_by_name): Replace fatal with internal_error.
874 (find_regno): Likewise.
875 * tdesc.c (init_target_desc): Replace check with gdb_assert.
876 * thread-db.c (thread_db_create_event): Likewise.
877 (thread_db_load_search): Likewise.
878 (try_thread_db_load_1): Likewise.
879 * tracepoint.c (get_jump_space_head): Replace fatal with
880 internal_error.
881 (claim_trampoline_space): Likewise.
882 (have_fast_tracepoint_trampoline_buffer): Likewise.
883 (cmd_qtstart): Likewise.
884 (stop_tracing): Likewise.
885 (fast_tracepoint_collecting): Likewise.
886 (target_malloc): Likewise.
887 (download_tracepoint): Likewise.
888 (download_trace_state_variables): Replace check with gdb_assert.
889 (upload_fast_traceframes): Replace fatal with internal_error.
890
34abf635
GB
8912014-08-19 Tom Tromey <tromey@redhat.com>
892 Gary Benson <gbenson@redhat.com>
893
894 * Makefile.in (SFILES): Add common/common-debug.c.
895 (OBS): Add common-debug.o.
896 (common-debug.o): New rule.
897 * debug.h (debug_printf): Don't declare.
898 * debug.c (debug_printf): Renamed and rewritten as...
899 (debug_vprintf): New function.
900
f6e94d78
GB
9012014-08-19 Gary Benson <gbenson@redhat.com>
902
903 * utils.h: Do not include print-utils.h.
904
9239eeab
GB
9052014-08-19 Tom Tromey <tromey@redhat.com>
906 Gary Benson <gbenson@redhat.com>
907
908 * server.h: Add static assertion.
909 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
910
ef87c8bb
GB
9112014-08-19 Tom Tromey <tromey@redhat.com>
912 Gary Benson <gbenson@redhat.com>
913
914 * Makefile.in (SFILES): Add common/errors.c.
915 (OBS): Add errors.o.
916 (IPA_OBS): Add errors-ipa.o.
917 (errors.o): New rule.
918 (errors-ipa.o): Likewise.
919 * utils.h (perror_with_name, error, warning): Don't declare.
920 * utils.c (warning): Renamed and rewritten as...
921 (vwarning): New function.
922 (error): Renamed and rewritten as...
923 (verror): New function.
924 (internal_error): Renamed and rewritten as...
925 (internal_verror): New function.
926
bb974a24
GB
9272014-08-07 Gary Benson <gbenson@redhat.com>
928
929 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
930 * configure: Regenerate.
931 * config.in: Likewise.
932 * server.h: Do not include errno.h.
933 * event-loop.c: Likewise.
934 * hostio-errno.c: Likewise.
935 * linux-low.c: Likewise.
936 * remote-utils.c: Likewise.
937 * spu-low.c: Likewise.
938 * utils.c: Likewise.
939 * gdbreplay.c: Unconditionally include errno.h.
940
6d3d12eb
GB
9412014-08-07 Gary Benson <gbenson@redhat.com>
942
943 * server.h: Do not include string.h.
944 * event-loop.c: Likewise.
945 * linux-low.c: Likewise.
946 * regcache.c: Likewise.
947 * remote-utils.c: Likewise.
948 * spu-low.c: Likewise.
949 * utils.c: Likewise.
950
dccbb609
GB
9512014-08-07 Gary Benson <gbenson@redhat.com>
952
953 * server.h: Do not include gdb_assert.h.
954
e76df0d0
GB
9552014-08-07 Gary Benson <gbenson@redhat.com>
956
957 * server.h: Do not include common-utils.h.
958
4cb9c816
GB
9592014-08-07 Gary Benson <gbenson@redhat.com>
960
961 * server.h: Do not include ptid.h.
962 * notif.h: Likewise.
963
3995eeee
GB
9642014-08-07 Gary Benson <gbenson@redhat.com>
965
966 * server.h: Do not include gdb_locale.h.
967
cb9f1a9b
GB
9682014-08-07 Gary Benson <gbenson@redhat.com>
969
970 * server.h: Do not include gdb/signals.h.
971 * win32-low.c: Likewise.
972
a5fceff8
GB
9732014-08-07 Gary Benson <gbenson@redhat.com>
974
975 * server.h: Do not include pathmax.h.
976
b9391142
GB
9772014-08-07 Gary Benson <gbenson@redhat.com>
978
979 * server.h: Do not include libiberty.h.
980 * linux-bfin-low.c: Likewise.
981
0e443c87
GB
9822014-08-07 Gary Benson <gbenson@redhat.com>
983
984 * server.h: Do not include ansidecl.h.
985
8ebb3f56
GB
9862014-08-07 Gary Benson <gbenson@redhat.com>
987
988 * linux-x86-low.c: Do not include stddef.h.
989 * lynx-ppc-low.c: Likewise.
990 * tracepoint.c: Likewise.
991
8980bdf6
GB
9922014-08-07 Gary Benson <gbenson@redhat.com>
993
994 * server.h: Do not include stdarg.h.
995 * nto-low.c: Likewise.
996
d7096f71
GB
9972014-08-07 Gary Benson <gbenson@redhat.com>
998
999 * server.h: Do not include stdlib.h.
1000 * inferiors.c: Likewise.
1001 * linux-low.c: Likewise.
1002 * regcache.c: Likewise.
1003 * spu-low.c: Likewise.
1004 * tracepoint.c: Likewise.
1005 * utils.c: Likewise.
1006
d02f550d
GB
10072014-08-07 Gary Benson <gbenson@redhat.com>
1008
1009 * server.h: Do not include stdio.h.
1010 * linux-low.c: Likewise.
1011 * remote-utils.c: Likewise.
1012 * spu-low.c: Likewise.
1013 * utils.c: Likewise.
1014 * wincecompat.c: Likewise.
1015
87f6c4e3
GB
10162014-08-06 Gary Benson <gbenson@redhat.com>
1017
1018 * regcache.c (init_register_cache): Move conditionals inside if.
1019
7089dca4
GB
10202014-08-06 Gary Benson <gbenson@redhat.com>
1021
1022 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1023
462f517e
GB
10242014-07-31 Gary Benson <gbenson@redhat.com>
1025
1026 * ax.h: Do not include server.h.
1027 * gdbthread.h: Likewise.
1028 * lynx-low.h: Likewise.
1029 * notif.h: Likewise.
1030
976411d6
GB
10312014-07-30 Gary Benson <gbenson@redhat.com>
1032
1033 * server.h: Include common-defs.h.
1034 Do not include config.h or build-gnulib-gdbserver/config.h.
1035
d41f6d8e
GB
10362014-07-30 Gary Benson <gbenson@redhat.com>
1037
1038 * hostio-errno.c: Move server.h to top of includes list.
1039 * inferiors.c: Likewise.
1040 * linux-x86-low.c: Likewise.
1041 * notif.c: Include server.h.
1042
314c6a35
TT
10432014-07-24 Tom Tromey <tromey@redhat.com>
1044 Gary Benson <gbenson@redhat.com>
1045
1046 * server.h (CORE_ADDR): Now unsigned.
1047
69ff6be5
PA
10482014-07-16 Pedro Alves <palves@redhat.com>
1049
1050 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1051
ce9e3fe7
PA
10522014-07-15 Pedro Alves <palves@redhat.com>
1053
1054 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1055 copy.
1056
e76126e8
PA
10572014-07-11 Pedro Alves <palves@redhat.com>
1058
1059 * linux-low.c (kill_wait_lwp): New function, based on
1060 kill_one_lwp_callback, but use my_waitpid directly.
1061 (kill_one_lwp_callback, linux_kill): Use it.
1062
8e9db26e
PA
10632014-06-23 Pedro Alves <palves@redhat.com>
1064
1065 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1066 before setting DR0..DR3.
1067
698b3e08
GB
10682014-06-20 Gary Benson <gbenson@redhat.com>
1069
1070 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1071 * configure: Regenerated.
1072 * config.in: Likewise.
1073
125f8a3d
GB
10742014-06-20 Gary Benson <gbenson@redhat.com>
1075
1076 * Makefile.in (SFILES): Update locations for files moved
1077 from common to nat.
1078 (object file files): Reordered.
1079
42995dbd
GB
10802014-06-20 Gary Benson <gbenson@redhat.com>
1081
1082 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1083 (i386_dr_low_set_addr): Likewise.
1084 (i386_dr_low_get_addr): Likewise.
1085 (i386_dr_low_can_set_control): Likewise.
1086 (i386_dr_low_set_control): Likewise.
1087 (i386_dr_low_get_control): Likewise.
1088 (i386_dr_low_get_status): Likewise.
1089 (i386_get_debug_register_length): Likewise.
1090 * linux-x86-low.c (i386_dr_low_set_addr):
1091 Changed signature. Made static.
1092 (i386_dr_low_get_addr): Likewise.
1093 (i386_dr_low_set_control): Likewise.
1094 (i386_dr_low_get_control): Likewise.
1095 (i386_dr_low_get_status): Likewise.
1096 (i386_dr_low): New global variable.
1097 * win32-i386-low.c (i386_dr_low_set_addr):
1098 Changed signature. Made static.
1099 (i386_dr_low_get_addr): Likewise.
1100 (i386_dr_low_set_control): Likewise.
1101 (i386_dr_low_get_control): Likewise.
1102 (i386_dr_low_get_status): Likewise.
1103 (i386_dr_low): New global variable.
1104
e1d2394b
MS
11052014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1106
1107 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1108 * Makefile.in (AR, AR_FLAGS): Define.
1109 * configure: Regenerate.
1110
3a8ee006
GB
11112014-06-19 Gary Benson <gbenson@redhat.com>
1112
1113 * Makefile.in (i386-dregs.o): New rule.
1114 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1115 * i386-low.c (target.h): Remove include.
1116 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1117 (DR_CONTROL_SHIFT): Likewise.
1118 (DR_CONTROL_SIZE): Likewise.
1119 (DR_RW_EXECUTE): Likewise.
1120 (DR_RW_WRITE): Likewise.
1121 (DR_RW_READ): Likewise.
1122 (DR_RW_IORW): Likewise.
1123 (DR_LEN_1): Likewise.
1124 (DR_LEN_2): Likewise.
1125 (DR_LEN_4): Likewise.
1126 (DR_LEN_8): Likewise.
1127 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1128 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1129 (DR_ENABLE_SIZE): Likewise.
1130 (DR_LOCAL_SLOWDOWN): Likewise.
1131 (DR_GLOBAL_SLOWDOWN): Likewise.
1132 (DR_CONTROL_RESERVED): Likewise.
1133 (I386_DR_CONTROL_MASK): Likewise.
1134 (I386_DR_VACANT): Likewise.
1135 (I386_DR_LOCAL_ENABLE): Likewise.
1136 (I386_DR_GLOBAL_ENABLE): Likewise.
1137 (I386_DR_DISABLE): Likewise.
1138 (I386_DR_SET_RW_LEN): Likewise.
1139 (I386_DR_GET_RW_LEN): Likewise.
1140 (I386_DR_WATCH_HIT): Likewise.
1141 (i386_wp_op_t): Likewise.
1142 (i386_show_dr): Likewise.
1143 (i386_length_and_rw_bits): Likewise.
1144 (i386_insert_aligned_watchpoint): Likewise.
1145 (i386_remove_aligned_watchpoint): Likewise.
1146 (i386_handle_nonaligned_watchpoint): Likewise.
1147 i386_update_inferior_debug_regs(): Likewise.
1148 (i386_dr_insert_watchpoint): Likewise.
1149 (i386_dr_remove_watchpoint): Likewise.
1150 (i386_dr_region_ok_for_watchpoint): Likewise.
1151 (i386_dr_stopped_data_address): Likewise.
1152 (i386_dr_stopped_by_watchpoint): Likewise.
1153
8f26655c
GB
11542014-06-19 Gary Benson <gbenson@redhat.com>
1155
1156 * i386-low.c (i386_dr_show): Renamed to
1157 i386_show_dr and made static. All uses updated.
1158 (i386_dr_length_and_rw_bits): Renamed to
1159 i386_length_and_rw_bits and made static.
1160 All uses updated.
1161 (i386_dr_insert_aligned_watchpoint): Renamed to
1162 i386_insert_aligned_watchpoint and made static.
1163 All uses updated.
1164 (i386_dr_remove_aligned_watchpoint): Renamed to
1165 i386_remove_aligned_watchpoint and made static.
1166 All uses updated.
1167 (i386_dr_update_inferior_debug_regs): Renamed to
1168 i386_update_inferior_debug_regs and made static.
1169 All uses updated.
1170
b9228891
GB
11712014-06-18 Gary Benson <gbenson@redhat.com>
1172
5171def3
GB
1173 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1174 (i386_dr_low_can_set_control): Likewise.
1175 (i386_get_debug_register_length): Likewise.
1176 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1177 (i386_dr_low_can_set_control): Likewise.
1178 (i386_get_debug_register_length): Likewise.
1179
11802014-06-17 Gary Benson <gbenson@redhat.com>
1181
b9228891
GB
1182 * i386-low.h (i386-dregs.h): New include.
1183 (DR_FIRSTADDR): Now in i386-dregs.h.
1184 (DR_LASTADDR): Likewise.
1185 (DR_NADDR): Likewise.
1186 (DR_STATUS): Likewise.
1187 (DR_CONTROL): Likewise.
1188 (i386_debug_reg_state): Likewise.
1189 (i386_dr_insert_watchpoint): Likewise.
1190 (i386_dr_remove_watchpoint): Likewise.
1191 (i386_dr_region_ok_for_watchpoint): Likewise.
1192 (i386_dr_stopped_data_address): Likewise.
1193 (i386_dr_stopped_by_watchpoint): Likewise.
1194 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1195
4be83cc2
GB
11962014-06-18 Gary Benson <gbenson@redhat.com>
1197
1198 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1199 i386_dr_insert_watchpoint.
1200 (i386_low_remove_watchpoint): Renamed to
1201 i386_dr_remove_watchpoint.
1202 (i386_low_region_ok_for_watchpoint): Renamed to
1203 i386_dr_region_ok_for_watchpoint.
1204 (i386_low_stopped_data_address): Renamed to
1205 i386_dr_stopped_data_address.
1206 (i386_low_stopped_by_watchpoint): Renamed to
1207 i386_dr_stopped_by_watchpoint.
1208 * i386-low.c (i386_show_dr): Renamed to
1209 i386_dr_show and made nonstatic. All uses updated.
1210 (i386_length_and_rw_bits): Renamed to
1211 i386_dr_length_and_rw_bits and made nonstatic.
1212 All uses updated.
1213 (i386_insert_aligned_watchpoint): Renamed to
1214 i386_dr_insert_aligned_watchpoint and made nonstatic.
1215 All uses updated.
1216 (i386_remove_aligned_watchpoint): Renamed to
1217 i386_dr_remove_aligned_watchpoint and made nonstatic.
1218 All uses updated.
1219 (i386_update_inferior_debug_regs): Renamed to
1220 i386_dr_update_inferior_debug_regs and made nonstatic.
1221 All uses updated.
1222 (i386_low_insert_watchpoint): Renamed to
1223 i386_dr_insert_watchpoint. All uses updated.
1224 (i386_low_remove_watchpoint): Renamed to
1225 i386_dr_remove_watchpoint. All uses updated.
1226 (i386_low_region_ok_for_watchpoint): Renamed to
1227 i386_dr_region_ok_for_watchpoint. All uses updated.
1228 (i386_low_stopped_data_address): Renamed to
1229 i386_dr_stopped_data_address. All uses updated.
1230 (i386_low_stopped_by_watchpoint): Renamed to
1231 i386_dr_stopped_by_watchpoint. All uses updated.
1232
131aa0d4
GB
12332014-06-18 Gary Benson <gbenson@redhat.com>
1234
1235 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1236 (i386_dr_low_can_set_control): Likewise.
1237 (i386_insert_aligned_watchpoint): New check.
1238
d9305f7f
GB
12392014-06-18 Gary Benson <gbenson@redhat.com>
1240
1241 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1242 Renamed to state.
1243
e927c9fc
GB
12442014-06-18 Gary Benson <gbenson@redhat.com>
1245
1246 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1247 instead of fatal and error.
1248 (i386_handle_nonaligned_watchpoint): Likewise.
1249
1b6d4134
GB
12502014-06-18 Gary Benson <gbenson@redhat.com>
1251
1252 * i386-low.c (i386_get_debug_register_length): New macro.
1253 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1254 (i386_show_dr): Use debug_printf instead of fprintf. Use
1255 phex to format values.
1256
6e62758f
GB
12572014-06-18 Gary Benson <gbenson@redhat.com>
1258
1259 * i386-low.h: Comment changes.
1260 * i386-low.c: Likewise.
1261
fc6e2f03
GB
12622014-06-18 Gary Benson <gbenson@redhat.com>
1263
1264 * i386-low.c: Whitespace changes.
1265
f9d1eeed
TT
12662014-06-12 Tom Tromey <tromey@redhat.com>
1267
1268 * utils.c (freeargv): Remove.
1269
0b04e523
TT
12702014-06-12 Tom Tromey <tromey@redhat.com>
1271
1272 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1273 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1274 (parse_debug_format_options): Likewise.
1275 (gdbserver_usage): Likewise.
1276 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1277 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1278 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1279 against libiberty.
1280 ($(LIBGNU)): Depend on libiberty.
1281 (all-lib): Recurse into all subdirs.
1282 (install-only): Invoke "install" target in subdirs.
1283 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1284 targets.
1285 * configure: Rebuild.
1286 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1287 for vasprintf, vsnprintf, or gettimeofday.
1288 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1289 srv_tgtobj.
1290
270c9937
JB
12912014-06-05 Joel Brobecker <brobecker@adacore.com>
1292
1293 * development.sh: Delete.
1294 * Makefile.in (config.status): Adjust dependency on development.sh.
1295 * configure.ac: Adjust development.sh source call.
1296 * configure: Regenerate.
1297
0a261ed8
PA
12982014-06-02 Pedro Alves <palves@redhat.com>
1299
1300 * ax.c (gdb_free_agent_expr): New function.
1301 * ax.h (gdb_free_agent_expr): New declaration.
1302 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1303 list.
1304 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1305 static.
1306 (clear_breakpoint_conditions_and_commands): New function.
1307 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1308 (clear_breakpoint_conditions_and_commands): New declaration.
1309
e9dae05e
RR
13102014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1311
1312 * linux-aarch64-low.c (asm/ptrace.h): Include.
1313
5876f503
JK
13142014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1315
1316 Fix TLS access for -static -pthread.
1317 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1318 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1319 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1320
802e8e6d
PA
13212014-05-20 Pedro Alves <palves@redhat.com>
1322
1323 * linux-aarch64-low.c (aarch64_insert_point)
1324 (aarch64_remove_point): No longer check whether the type is
1325 supported here. Adjust to new interface.
1326 (the_low_target): Install aarch64_supports_z_point_type as
1327 supports_z_point_type method.
1328 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1329 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1330 instead of a Z packet char. Adjust.
1331 (arm_supports_z_point_type): New function.
1332 (arm_insert_point, arm_remove_point): Adjust to new interface.
1333 (the_low_target): Install arm_supports_z_point_type.
1334 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1335 (cris_insert_point, cris_remove_point): Adjust to new interface.
1336 Don't check whether the type is supported here.
1337 (the_low_target): Install cris_supports_z_point_type.
1338 * linux-low.c (linux_supports_z_point_type): New function.
1339 (linux_insert_point, linux_remove_point): Adjust to new interface.
1340 * linux-low.h (struct linux_target_ops) <insert_point,
1341 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1342 raw_breakpoint pointer parameter.
1343 <supports_z_point_type>: New method.
1344 * linux-mips-low.c (mips_supports_z_point_type): New function.
1345 (mips_insert_point, mips_remove_point): Adjust to new interface.
1346 Use mips_supports_z_point_type.
1347 (the_low_target): Install mips_supports_z_point_type.
1348 * linux-ppc-low.c (the_low_target): Install NULL as
1349 supports_z_point_type method.
1350 * linux-s390-low.c (the_low_target): Install NULL as
1351 supports_z_point_type method.
1352 * linux-sparc-low.c (the_low_target): Install NULL as
1353 supports_z_point_type method.
1354 * linux-x86-low.c (x86_supports_z_point_type): New function.
1355 (x86_insert_point): Adjust to new insert_point interface. Use
1356 insert_memory_breakpoint. Adjust to new
1357 i386_low_insert_watchpoint interface.
1358 (x86_remove_point): Adjust to remove_point interface. Use
1359 remove_memory_breakpoint. Adjust to new
1360 i386_low_remove_watchpoint interface.
1361 (the_low_target): Install x86_supports_z_point_type.
1362 * lynx-low.c (lynx_target_ops): Install NULL as
1363 supports_z_point_type callback.
1364 * nto-low.c (nto_supports_z_point_type): New.
1365 (nto_insert_point, nto_remove_point): Adjust to new interface.
1366 (nto_target_ops): Install nto_supports_z_point_type.
1367 * mem-break.c: Adjust intro comment.
1368 (struct raw_breakpoint) <raw_type, size>: New fields.
1369 <inserted>: Update comment.
1370 <shlib_disabled>: Delete field.
1371 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1372 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1373 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1374 (raw_bkpt_type_to_target_hw_bp_type): New function.
1375 (find_enabled_raw_code_breakpoint_at): New function.
1376 (find_raw_breakpoint_at): New type and size parameters. Use them.
1377 (insert_memory_breakpoint): New function, based off
1378 set_raw_breakpoint_at.
1379 (remove_memory_breakpoint): New function.
1380 (set_raw_breakpoint_at): Reimplement.
1381 (set_breakpoint): New, based on set_breakpoint_at.
1382 (set_breakpoint_at): Reimplement.
1383 (delete_raw_breakpoint): Go through the_target->remove_point
1384 instead of assuming memory breakpoints.
1385 (find_gdb_breakpoint_at): Delete.
1386 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1387 (find_gdb_breakpoint): New function.
1388 (set_gdb_breakpoint_at): Delete.
1389 (z_type_supported): New function.
1390 (set_gdb_breakpoint_1): New function, loosely based off
1391 set_gdb_breakpoint_at.
1392 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1393 (delete_gdb_breakpoint_at): Delete.
1394 (delete_gdb_breakpoint_1): New function, loosely based off
1395 delete_gdb_breakpoint_at.
1396 (delete_gdb_breakpoint): New function.
1397 (clear_gdb_breakpoint_conditions): Rename to ...
1398 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1399 breakpoint.
1400 (add_condition_to_breakpoint): Make static.
1401 (add_breakpoint_condition): Take a struct breakpoint pointer
1402 instead of an address. Adjust.
1403 (gdb_condition_true_at_breakpoint): Rename to ...
1404 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1405 z_type parameter.
1406 (gdb_condition_true_at_breakpoint): Reimplement.
1407 (add_breakpoint_commands): Take a struct breakpoint pointer
1408 instead of an address. Adjust.
1409 (gdb_no_commands_at_breakpoint): Rename to ...
1410 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1411 parameter. Return true if no breakpoint was found. Change debug
1412 output.
1413 (gdb_no_commands_at_breakpoint): Reimplement.
1414 (run_breakpoint_commands): Rename to ...
1415 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1416 and change return type to boolean.
1417 (run_breakpoint_commands): New function.
1418 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1419 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1420 breakpoint. Go through the_target->remove_point instead of
1421 assuming memory breakpoint.
1422 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1423 software and hardware breakpoints.
1424 (reinsert_raw_breakpoint): Go through the_target->insert_point
1425 instead of assuming memory breakpoint.
1426 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1427 software and hardware breakpoints.
1428 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1429 Check both software and hardware breakpoints.
1430 (validate_inserted_breakpoint): Assert the breakpoint is a
1431 software breakpoint. Set the inserted flag to -1 instead of
1432 setting shlib_disabled.
1433 (delete_disabled_breakpoints): Adjust.
1434 (validate_breakpoints): Only validate software breakpoints.
1435 Adjust to inserted flag change.
1436 (check_mem_read, check_mem_write): Skip breakpoint types other
1437 than software breakpoints. Adjust to inserted flag change.
1438 * mem-break.h (enum raw_bkpt_type): New enum.
1439 (raw_breakpoint, struct process_info): Forward declare.
1440 (Z_packet_to_target_hw_bp_type): Delete declaration.
1441 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1442 (set_gdb_breakpoint, delete_gdb_breakpoint)
1443 (clear_breakpoint_conditions): New declarations.
1444 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1445 (breakpoint_inserted_here): Update comment.
1446 (add_breakpoint_condition, add_breakpoint_commands): Replace
1447 address parameter with a breakpoint pointer parameter.
1448 (gdb_breakpoint_here): Update comment.
1449 (delete_gdb_breakpoint_at): Delete.
1450 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1451 * server.c (process_point_options): Take a struct breakpoint
1452 pointer instead of an address. Adjust.
1453 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1454 delete_gdb_breakpoint.
1455 * spu-low.c (spu_target_ops): Install NULL as
1456 supports_z_point_type method.
1457 * target.h: Include mem-break.h.
1458 (struct target_ops) <prepare_to_access_memory>: Update comment.
1459 <supports_z_point_type>: New field.
1460 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1461 instead of a char. Also take a raw breakpoint pointer.
1462 * win32-arm-low.c (the_low_target): Install NULL as
1463 supports_z_point_type.
1464 * win32-i386-low.c (i386_supports_z_point_type): New function.
1465 (i386_insert_point, i386_remove_point): Adjust to new interface.
1466 (the_low_target): Install i386_supports_z_point_type.
1467 * win32-low.c (win32_supports_z_point_type): New function.
1468 (win32_insert_point, win32_remove_point): Adjust to new interface.
1469 (win32_target_ops): Install win32_supports_z_point_type.
1470 * win32-low.h (struct win32_target_ops):
1471 <supports_z_point_type>: New method.
1472 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1473 instead of a char. Also take a raw breakpoint pointer.
1474
932539e3
PA
14752014-05-20 Pedro Alves <palves@redhat.com>
1476
1477 * mem-break.h: Include break-common.h.
1478 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1479 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1480 (Z_packet_to_target_hw_bp_type): New declaration.
1481 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1482 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1483 (Z_PACKET_ACCESS_WP): Delete macros.
1484 (Z_packet_to_hw_type): Delete function.
1485 * i386-low.h: Don't include break-common.h here.
1486 (Z_packet_to_hw_type): Delete declaration.
1487 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1488 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1489 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1490 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1491 * linux-aarch64-low.c: Don't include break-common.h here.
1492 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1493 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1494 (Z_packet_to_target_hw_bp_type): Delete function.
1495 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1496 function.
1497 (mips_insert_point, mips_remove_point): Use
1498 Z_packet_to_target_hw_bp_type.
1499
4ff0d3d8
PA
15002014-05-20 Pedro Alves <palves@redhat.com>
1501
1502 * linux-aarch64-low.c: Include break-common.h.
1503 (enum target_point_type): Delete.
1504 (Z_packet_to_point_type): Rename to ...
1505 (Z_packet_to_target_hw_bp_type): ... this, and return a
1506 target_hw_bp_type instead.
1507 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1508 instead of an enum target_point_type.
1509 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1510 breakpoint type.
1511 (aarch64_dr_state_insert_one_point)
1512 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1513 (aarch64_handle_aligned_watchpoint)
1514 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1515 Take an enum target_hw_bp_type instead of an enum
1516 target_point_type.
1517 (aarch64_supports_z_point_type): New function.
1518 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1519 use Z_packet_to_target_hw_bp_type.
1520
786dc519
JB
15212014-05-20 Joel Brobecker <brobecker@adacore.com>
1522
1523 * configure.ac: Only use -Werror by default when DEVELOPMENT
1524 is true.
1525 * configure: Regenerate.
1526
9e0aa64f
JK
15272014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1528
1529 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1530 * linux-x86-low.c (X86_64_USER_REGS): New.
1531 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1532
2b577b92
YQ
15332014-04-28 Yao Qi <yao@codesourcery.com>
1534
1535 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1536 name.
1537
94611da2
PA
15382014-04-25 Pedro Alves <palves@redhat.com>
1539
1540 PR server/16255
1541 * linux-low.c (linux_attach_fail_reason_string): New function.
1542 (linux_attach_lwp): Delete.
1543 (linux_attach_lwp_1): Rename to ...
1544 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1545 argument. Remove "initial" parameter. Return int instead of
1546 void. Don't error or warn here.
1547 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1548 failure to attach to the tgid. Call warning when failing to
1549 attach to an lwp.
1550 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1551 argument. Remove "initial" parameter. Return int instead of
1552 void. Don't error or warn here.
1553 (linux_attach_fail_reason_string): New declaration.
1554 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1555 interface change. Use linux_attach_fail_reason_string.
1556
01f9f808
MS
15572014-04-24 Michael Sturm <michael.sturm@mintel.com>
1558 Walfred Tedeschi <walfred.tedeschi@intel.com>
1559
1560 * Makefile.in: Added rules to handle new files
1561 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1562 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1563 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1564 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1565 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1566 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1567 x32-avx512-linux.o.
1568 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1569 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1570 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1571 i386/x32-avx512.xml.
1572 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1573 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1574 i386/x32-avx512-linux.xml.
1575 * i387-fp.c (num_avx512_k_registers): New constant for number
1576 of K registers.
1577 (num_avx512_zmmh_low_registers): New constant for number of
1578 lower ZMM registers (0-15).
1579 (num_avx512_zmmh_high_registers): New constant for number of
1580 higher ZMM registers (16-31).
1581 (num_avx512_ymmh_registers): New contant for number of higher
1582 YMM registers (ymm16-31 added by avx521 on x86_64).
1583 (num_avx512_xmm_registers): New constant for number of higher
1584 XMM registers (xmm16-31 added by AVX512 on x86_64).
1585 (struct i387_xsave): Add space for AVX512 registers.
1586 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1587 Add code to handle AVX512 registers.
1588 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1589 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1590 prototypei from generated file.
1591 (tdesc_amd64_avx512_linux): Likewise.
1592 (init_registers_x32_avx512_linux): Likewise.
1593 (tdesc_x32_avx512_linux): Likewise.
1594 (init_registers_i386_avx512_linux): Likewise.
1595 (tdesc_i386_avx512_linux): Likewise.
1596 (x86_64_regmap): Add AVX512 registers.
1597 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1598 mask.
1599 (initialize_low_arch): Add code to initialize AVX512 registers.
1600
51aa91f9
PA
16012014-04-23 Pedro Alves <palves@redhat.com>
1602
1603 * mem-break.c (find_gdb_breakpoint_at): Make static.
1604 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1605
a4165e94
PA
16062014-04-23 Pedro Alves <palves@redhat.com>
1607
1608 * i386-low.c: Don't include break-common.h here.
1609 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1610 prototype to take target_hw_bp_type as argument instead of a Z
1611 packet char.
1612 * i386-low.h: Include break-common.h here.
1613 (Z_packet_to_hw_type): Declare.
1614 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1615 prototypes.
1616 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1617 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1618 (x86_remove_point): Convert the packet number to a
1619 target_hw_bp_type before calling i386_low_remove_watchpoint.
1620 * win32-i386-low.c (i386_insert_point): Convert the packet number
1621 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1622 (i386_remove_point): Convert the packet number to a
1623 target_hw_bp_type before calling i386_low_remove_watchpoint.
1624
b8acf843
PA
16252014-04-23 Pedro Alves <palves@redhat.com>
1626
1627 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1628
d708bcd1
PA
16292014-04-10 Pedro Alves <palves@redhat.com>
1630
1631 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1632 Check if the condition or command is NULL before checking if the
1633 breakpoint is known. On success, return true.
1634 * mem-break.h (add_breakpoint_condition): Document return.
1635 (add_breakpoint_commands): Add describing comment.
1636 * server.c (skip_to_semicolon): New function.
1637 (process_point_options): Use it.
1638
2eec7d5b
PA
16392014-04-09 Pedro Alves <palves@redhat.com>
1640
1641 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1642 to lwpid_of.
1643
fa96cb38
PA
16442014-02-27 Pedro Alves <palves@redhat.com>
1645
1646 PR 12702
1647 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1648 macros.
1649 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1650 output.
1651 (last_thread_of_process_p): Take a PID argument instead of a
1652 thread pointer.
1653 (linux_wait_for_lwp): Delete.
1654 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1655 functions.
1656 (linux_low_filter_event): New function, party factored out from
1657 linux_wait_for_event.
1658 (linux_wait_for_event): Rename to ...
1659 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1660 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1661 sigsuspend. Check for zombie leaders.
1662 (linux_wait_for_event): Reimplement as wrapper around
1663 linux_wait_for_event_filtered.
1664 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1665 a normal or signal exit is seen, it's the whole process exiting.
1666 (wait_for_sigstop): No longer a for_each_inferior callback.
1667 Rewrite on top of linux_wait_for_event_filtered.
1668 (stop_all_lwps): Call wait_for_sigstop directly.
1669 * server.c (resume, handle_target_event): Handle
1670 TARGET_WAITKIND_NO_RESUMED.
1671
d763de10
JB
16722014-02-26 Joel Brobecker <brobecker@adacore.com>
1673
1674 * win32-low.c (psapi_get_dll_name,
1675 * win32_CreateToolhelp32Snapshot): Delete.
1676 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1677 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1678 Delete.
1679 (handle_load_dll): Add function description.
1680 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1681
850a0f76
JB
16822014-02-26 Joel Brobecker <brobecker@adacore.com>
1683
1684 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1685 Add comment.
1686 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1687 base address when calling win32_add_one_solib.
1688 (handle_load_dll): Delete local variable load_addr.
1689 Remove 0x1000 offset applied to DLL base address when calling
1690 win32_add_one_solib.
1691 (handle_unload_dll): Add comment.
1692
f25b3fc3
JB
16932014-02-26 Joel Brobecker <brobecker@adacore.com>
1694
1695 * win32-low.c (win32_add_all_dlls): Renames
1696 win32_ensure_ntdll_loaded. Rewrite function documentation.
1697 Adjust implementation to always load all DLLs.
1698 Add 0x1000 offset to DLL base address when calling
1699 win32_add_one_solib.
1700 (child_initialization_done): New static global.
1701 (do_initial_child_stuff): Set child_initialization_done to
1702 zero during child initialization, and 1 after. Replace call
1703 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1704 Add comment.
1705 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1706 (handle_unload_dll): Add function documentation.
1707 (get_child_debug_event): Ignore load and unload DLL events
1708 during child initialization.
1709
d86d4aaf
DE
17102014-02-20 Doug Evans <dje@google.com>
1711
3bc32da3 1712 Remove global all_lwps.
d86d4aaf
DE
1713 * inferiors.h (ptid_of): Move here from linux-low.h.
1714 (pid_of, lwpid_of): Ditto.
1715 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1716 parameter is a struct thread_info * now.
1717 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1718 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1719 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1720 directly.
1721 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1722 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1723 * linux-arm-low.c (update_registers_callback): Update, "entry"
1724 parameter is a struct thread_info * now.
1725 Fetch lwpid from current_inferior directly.
1726 (arm_insert_point): Pass &all_threads to find_inferior instead of
1727 &all_lwps.
1728 (arm_remove_point): Ditto.
1729 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1730 (arm_prepare_to_resume): Fetch pid from thread.
1731 (arm_read_description): Fetch lwpid from current_inferior directly.
1732 * linux-low.c (all_lwps): Delete.
1733 (delete_lwp): Delete call to remove_inferior.
1734 (handle_extended_wait): Fetch lwpid from thread.
1735 (add_lwp): Don't set lwp->entry.id. Remove call to
1736 add_inferior_to_list.
1737 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1738 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1739 (kill_one_lwp_callback): Ditto.
1740 (linux_kill): Don't dereference NULL pointer.
1741 Fetch ptid,lwpid from thread.
1742 (get_detach_signal): Fetch ptid from thread.
1743 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1744 Simplify call to regcache_invalidate_thread.
1745 (delete_lwp_callback): Update, "entry" parameter is a
1746 struct thread_info * now. Fetch pid from thread.
1747 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1748 (status_pending_p_callback): Update, "entry" parameter is a
1749 struct thread_info * now. Fetch ptid from thread.
1750 (find_lwp_pid): Update, "entry" parameter is a
1751 struct thread_info * now.
1752 (linux_wait_for_lwp): Fetch pid from thread.
1753 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1754 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1755 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1756 (dequeue_one_deferred_signal): Ditto.
1757 (cancel_breakpoint): Fetch ptid from current_inferior.
1758 (linux_wait_for_event): Pass &all_threads to find_inferior,
1759 not &all_lwps. Fetch ptid, lwpid from thread.
1760 (count_events_callback): Update, "entry" parameter is a
1761 struct thread_info * now.
1762 (select_singlestep_lwp_callback): Ditto.
1763 (select_event_lwp_callback): Ditto.
1764 (cancel_breakpoints_callback): Ditto.
1765 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1766 not &all_lwps.
1767 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1768 (unsuspend_one_lwp): Update, "entry" parameter is a
1769 struct thread_info * now.
1770 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1771 not &all_lwps.
1772 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1773 Fetch lwpid from thread, not lwp.
1774 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1775 Pass &all_threads to find_inferior, not &all_lwps.
1776 (send_sigstop): Fetch lwpid from thread, not lwp.
1777 (send_sigstop_callback): Update, "entry" parameter is a
1778 struct thread_info * now.
1779 (suspend_and_send_sigstop_callback): Ditto.
1780 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1781 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1782 struct thread_info * now.
1783 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1784 from thread, lwp.
1785 (lwp_running): Update, "entry" parameter is a
1786 struct thread_info * now.
1787 (stop_all_lwps): Fetch ptid from thread.
1788 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1789 (linux_resume_one_lwp): Fetch lwpid from thread.
1790 (linux_set_resume_request): Update, "entry" parameter is a
1791 struct thread_info * now. Fetch pid, lwpid from thread.
1792 (resume_status_pending_p): Update, "entry" parameter is a
1793 struct thread_info * now.
1794 (need_step_over_p): Ditto. Fetch lwpid from thread.
1795 (start_step_over): Fetch lwpid from thread.
1796 (linux_resume_one_thread): Update, "entry" parameter is a
1797 struct thread_info * now. Fetch lwpid from thread.
1798 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1799 (proceed_one_lwp): Update, "entry" parameter is a
1800 struct thread_info * now. Fetch lwpid from thread.
1801 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1802 struct thread_info * now.
1803 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1804 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1805 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1806 directly.
1807 (regsets_store_inferior_registers): Ditto.
1808 (fetch_register, store_register): Ditto.
1809 (linux_read_memory, linux_write_memory): Ditto.
1810 (linux_request_interrupt): Ditto.
1811 (linux_read_auxv): Ditto.
1812 (linux_xfer_siginfo): Ditto.
1813 (linux_qxfer_spu): Ditto.
1814 (linux_qxfer_libraries_svr4): Ditto.
1815 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1816 moved to inferiors.h.
1817 (get_lwp): Delete.
1818 (get_thread_lwp): Update.
1819 (struct lwp_info): Delete member "entry". Simplify comment for
1820 member "thread".
1821 (all_lwps): Delete.
1822 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1823 current_inferior directly.
1824 (update_watch_registers_callback): Update, "entry" parameter is a
1825 struct thread_info * now. Fetch pid from thread.
1826 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1827 (mips_insert_point): Fetch lwpid from current_inferior.
1828 Pass &all_threads to find_inferior, not &all_lwps.
1829 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1830 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1831 directly.
1832 (mips_stopped_data_address): Ditto.
1833 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1834 directly.
1835 * linux-tile-low.c (tile_arch_setup): Ditto.
1836 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1837 (update_debug_registers_callback): Update, "entry" parameter is a
1838 struct thread_info * now. Fetch pid from thread.
1839 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1840 Pass &all_threads to find_inferior, not &all_lwps.
1841 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1842 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1843 Pass &all_threads to find_inferior, not &all_lwps.
1844 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1845 (i386_dr_low_get_status): Ditto.
1846 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1847 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1848 (x86_linux_read_description): Ditto.
1849 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1850
3b8361aa
DE
18512014-02-20 Doug Evans <dje@google.com>
1852
1853 * inferiors.c (get_first_inferior): Fix buglet.
1854
f7667f0d
DE
18552014-02-19 Doug Evans <dje@google.com>
1856
1857 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1858 * inferiors.c (add_thread): Change result type to struct thread_info *.
1859 All callers updated.
1860 (add_lwp): Call add_thread here instead of in callers.
1861 All callers updated.
1862 * linux-low.h (get_lwp_thread): Rewrite.
1863 (struct lwp_info): New member "thread".
1864
b3312d80
DE
18652014-02-19 Doug Evans <dje@google.com>
1866
1867 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1868 All callers updated.
1869
ecc6f45c
DE
18702014-02-19 Doug Evans <dje@google.com>
1871
1872 * inferiors.c (add_thread): Fix whitespace.
1873
649ebbca
DE
18742014-02-19 Doug Evans <dje@google.com>
1875
1876 * dll.c (clear_dlls): Replace accessing list implemention details
1877 with API function.
1878 * gdbthread.h (get_first_thread): Declare.
1879 * inferiors.c (for_each_inferior_with_data): New function.
1880 (get_first_thread): New function.
1881 (find_thread_ptid): Simplify.
1882 (get_first_inferior): New function.
1883 (clear_list): Delete.
1884 (one_inferior_p): New function.
1885 (clear_inferior_list): New function.
1886 (clear_inferiors): Update.
1887 * inferiors.h (for_each_inferior_with_data): Declare.
1888 (clear_inferior_list): Declare.
1889 (one_inferior_p): Declare.
1890 (get_first_inferior): Declare.
1891 * linux-low.c (linux_wait_for_event): Replace accessing list
1892 implemention details with API function.
1893 * server.c (target_running): Ditto.
1894 (accumulate_file_name_length): New function.
1895 (emit_dll_description): New function.
1896 (handle_qxfer_libraries): Replace accessing list implemention
1897 details with API function.
1898 (handle_qxfer_threads_worker): New function.
1899 (handle_qxfer_threads_proper): Replace accessing list implemention
1900 details with API function.
1901 (handle_query): Ditto.
1902 (visit_actioned_threads_callback_ftype): New typedef.
1903 (visit_actioned_threads_data): New struct.
1904 (visit_actioned_threads): Rewrite to be find_inferior callback.
1905 (resume): Call find_inferior.
1906 (handle_status): Replace accessing list implemention
1907 details with API function.
1908 (process_serial_event): Replace accessing list implemention details
1909 with API function.
1910 * target.c (set_desired_inferior): Replace accessing list implemention
1911 details with API function.
1912 * tracepoint.c (same_process_p): New function.
1913 (gdb_agent_about_to_close): Replace accessing list implemention
1914 details with API function.
1915 * win32-low.c (child_delete_thread): Replace accessing list
1916 implemention details with API function.
1917 (match_dll_by_basename): New function.
1918 (dll_is_loaded_by_basename): New function.
1919 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1920 details call to dll_is_loaded_by_basename.
1921
80894984
DE
19222014-02-19 Doug Evans <dje@google.com>
1923
1924 * dll.h (struct dll_info): Add comment.
1925 * gdbthread.h (struct thread_info): Add comment.
1926 (current_ptid): Simplify.
1927 * inferiors.c (add_process): Update.
1928 (remove_process): Update.
1929 * inferiors.h (struct process_info): Rename member "head" to "entry".
1930 * linux-low.c (delete_lwp): Update.
1931 (add_lwp): Update.
1932 (last_thread_of_process_p): Update.
1933 (kill_one_lwp_callback, linux_kill): Update.
1934 (status_pending_p_callback): Update.
1935 (wait_for_sigstop): Update. Simplify read of ptid.
1936 (start_step_over): Update.
1937 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1938 (get_lwp_thread): Update.
1939 (struct lwp_info): Rename member "head" to "entry".
1940 * regcache.h (inferior_list_entry): Delete.
1941 * server.c (kill_inferior_callback): Update.
1942 (detach_or_kill_inferior_callback): Update.
1943 (print_started_pid): Update.
1944 (print_attached_pid): Update.
1945 (process_serial_event): Simplify read of ptid.
1946 * thread-db.c (thread_db_create_event): Update.
1947 (thread_db_get_tls_address): Update.
1948 * win32-low.c (current_inferior_ptid): Simplify.
1949
46917d26
TT
19502014-02-19 Tom Tromey <tromey@redhat.com>
1951
1952 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1953 argument.
1954 (target_supports_btrace): Update.
1955
0759a81e
YQ
19562014-02-14 Yao Qi <yao@codesourcery.com>
1957
1958 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1959 (rsp-low-ipa.o): New target.
1960
a7191e8b
TT
19612014-02-12 Tom Tromey <tromey@redhat.com>
1962
1963 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1964 convert_ascii_to_int.
1965 * regcache.c (registers_to_string): Likewise.
1966 * remote-utils.c (decode_M_packet): Likewise.
1967 * server.c (process_serial_event): Likewise.
1968
ff0e980e
TT
19692014-02-12 Tom Tromey <tromey@redhat.com>
1970
1971 * server.c (handle_query, handle_v_run): Use hex2bin, not
1972 unhexify.
1973 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1974
e9371aff
TT
19752014-02-12 Tom Tromey <tromey@redhat.com>
1976
1977 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1978 convert_int_to_ascii.
1979 * regcache.c (registers_to_string, collect_register_as_string):
1980 Likewise.
1981 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1982 Likewise.
1983 * server.c (process_serial_event): Likewise.
1984 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1985 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1986
971dc0b8
TT
19872014-02-12 Tom Tromey <tromey@redhat.com>
1988
1989 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1990 bin2hex, not hexify.
1991 * tracepoint.c (cmd_qtstatus): Likewise.
1992
0a822afb
TT
19932014-02-12 Tom Tromey <tromey@redhat.com>
1994
1995 * remote-utils.c (monitor_output): Pass explicit length to
1996 hexify.
1997
9c3d6531
TT
19982014-02-12 Tom Tromey <tromey@redhat.com>
1999
2000 * tracepoint.c: Include rsp-low.h.
2001 * server.c: Include rsp-low.h.
2002 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2003 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2004 declare.
2005 * remote-utils.c: Include rsp-low.h.
2006 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2007 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2008 (convert_int_to_ascii, convert_ascii_to_int): Move to
2009 common/rsp-low.c.
2010 * regcache.c: Include rsp-low.h.
2011 * ax.c: Include rsp-low.h.
2012 * Makefile.in (SFILES): Add common/rsp-low.c.
2013 (OBS): Add rsp-low.o.
2014 (rsp-low.o): New target.
2015
01fd3ea5
TT
20162014-02-12 Tom Tromey <tromey@redhat.com>
2017
2018 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2019 Include print-utils.h.
2020 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2021 (plongest, thirty_two, phex_nz): Remove.
2022 * Makefile.in (SFILES): Add common/print-utils.c.
2023 (OBS): Add print-utils.o.
2024 (print-utils-ipa.o): New target.
2025 (print-utils.o): New target.
2026 (IPA_OBJS): Add print-utils-ipa.o.
2027
e99dc820
TT
20282014-02-06 Tom Tromey <tromey@redhat.com>
2029
2030 * Makefile.in (SFILES): Fix indentation.
2031
ee1e2d4f
DE
20322014-02-05 Doug Evans <dje@google.com>
2033
2034 * linux-low.c (linux_wait_for_event): Improve comment.
2035 (linux_wait_1): Keep current_inferior in sync with event_child.
2036
f5a02773
DE
20372014-01-22 Doug Evans <dje@google.com>
2038
2039 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2040
87ce2a04
DE
20412014-01-22 Doug Evans <dje@google.com>
2042
2043 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2044 * configure: Regenerate.
2045 * config.in: Regenerate.
2046 * Makefile.in (SFILES): Add debug.c.
2047 (OBS): Add debug.o.
2048 * debug.c: New file.
2049 * debug.h: New file.
2050 * linux-aarch64-low.c (*): Update all debugging printfs to use
2051 debug_printf instead of fprintf.
2052 * linux-arm-low.c (*): Ditto.
2053 * linux-cris-low.c (*): Ditto.
2054 * linux-crisv32-low.c (*): Ditto.
2055 * linux-m32r-low.c (*): Ditto.
2056 * linux-sparc-low.c (*): Ditto.
2057 * linux-x86.c (*): Ditto.
2058 * linux-low.c (*): Ditto.
2059 (linux_wait_1): Add calls to debug_enter, debug_exit.
2060 (linux_wait): Remove redundant debugging printf.
2061 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2062 (linux_resume, unstop_all_lwps): Ditto.
2063 * mem-break.c (*): Update all debugging printfs to use
2064 debug_printf instead of fprintf.
2065 * remote-utils.c (*): Ditto.
2066 * thread-db.c (*): Ditto.
2067 * server.c #include <ctype.h>, "gdb_vecs.h".
2068 (debug_threads): Moved to debug.c.
2069 (*): Update all debugging printfs to use debug_printf instead of
2070 fprintf.
2071 (start_inferior): Replace call to fflush with call to debug_flush.
2072 (monitor_show_help): Mention set debug-format.
2073 (parse_debug_format_options): New function.
2074 (handle_monitor_command): Handle "monitor set debug-format".
2075 (gdbserver_usage): Mention --debug-format.
2076 (main): Parse --debug-format.
2077 * server.h (debug_threads): Declaration moved to debug.h.
2078 #include "debug.h".
2079 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2080 trace_debug_1 that uses debug_printf.
2081 (tracepoint_look_up_symbols): Update all debugging printfs to use
2082 debug_printf instead of fprintf.
2083
e671835b
BS
20842014-01-20 Baruch Siach <baruch@tkos.co.il>
2085
2086 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2087 sys/ptrace.h.
2088
b5737fa9
PA
20892014-01-17 Pedro Alves <palves@redhat.com>
2090
ea38d2a9 2091 PR build/16445
c7faa97a
PA
2092 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2093 defined after including gdb_proc_service.h.
b5737fa9 2094
40ed484e
DE
20952014-01-16 Doug Evans <dje@google.com>
2096
2097 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2098 (match_dll): Use it.
2099
969c39fb
MM
21002014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2101
2102 * target.h (target_ops) <read_btrace>: Change parameters and
2103 return type to allow error reporting.
2104 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2105 trace reading errors on.
2106 * linux-low.c (linux_low_read_btrace): Pass trace reading
2107 errors on.
2108 (linux_low_disable_btrace): New.
2109
ab7f45ba
DE
21102014-01-15 Doug Evans <dje@google.com>
2111
2112 * inferiors.c (thread_id_to_gdb_id): Delete.
2113 * inferiors.h (thread_id_to_gdb_id): Delete.
2114
66af0f44
EZ
21152014-01-13 Eli Zaretskii <eliz@gnu.org>
2116
2117 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2118 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2119 versions.
2120
9939e131
PA
21212014-01-08 Pedro Alves <palves@redhat.com>
2122
2123 * server.c (handle_status): Don't discard previous queued stop
2124 replies or thread's pending status here.
2125 (main) <disconnection>: Do it here instead.
2126
b7ea362b
PA
21272014-01-08 Pedro Alves <palves@redhat.com>
2128
2129 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2130 * server.c (visit_actioned_threads, handle_pending_status): New
2131 function.
2132 (handle_v_cont): Factor out parts to ...
2133 (resume): ... this new function. If in all-stop, and a thread
2134 being resumed has a pending status, report it without actually
2135 resuming.
2136 (myresume): Adjust to use the new 'resume' function.
2137 (clear_pending_status_callback, set_pending_status_callback)
2138 (find_status_pending_thread_callback): New functions.
2139 (handle_status): Handle the case of multiple threads having
2140 interesting statuses to report. Report threads' real last signal
2141 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2142 with an interesting thread to report the status for, instead of
2143 always reporting the status of the first thread.
2144
28498c42
JB
21452014-01-01 Joel Brobecker <brobecker@adacore.com>
2146
2147 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2148 * gdbreplay.c (gdbreplay_version): Likewise.
2149
f45c82da
YZ
21502013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2151
2152 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2153 iov.iov_len with the real length in use.
2154
379a5e2d
JB
21552013-12-13 Joel Brobecker <brobecker@adacore.com>
2156
2157 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2158 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2159 for all targets that use win32-low.c.
2160 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2161 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2162
4210d83e
PA
21632013-12-13 Pedro Alves <palves@redhat.com>
2164
2165 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2166 if equal to TARGET_WAITKIND_LOADED.
2167 * win32-low.c (cached_status): New static global.
2168 (win32_wait): Add declaration.
2169 (do_initial_child_stuff): Flush all initial pending debug events
2170 up to the initial breakpoint.
2171 (win32_wait): If CACHED_STATUS was set, return that instead
2172 of doing a real wait. Remove the code resuming the execution
2173 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2174 during the initial phase. Also remove the code changing
2175 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2176 TARGET_WAITKIND_STOPPED.
2177
e7f0d979
YQ
21782013-12-11 Yao Qi <yao@codesourcery.com>
2179
2180 * notif.c (handle_notif_ack): Return 0 if no notification
2181 matches.
2182
ebcf782c
DE
21832013-11-20 Doug Evans <dje@google.com>
2184
2185 * linux-low.c (linux_set_resume_request): Fix comment.
2186
20ad9378
DE
21872013-11-20 Doug Evans <dje@google.com>
2188
2189 * linux-low.c (resume_status_pending_p): Tweak comment.
2190
a196ebeb
WT
21912013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2192
2193 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2194 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2195 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2196 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2197 (srv_amd64_regobj): Add amd64-mpx.o.
2198 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2199 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2200 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2201 * i387-fp.c (num_pl_bnd_register) Added constant.
2202 (num_pl_bnd_cfg_registers) Added constant.
2203 (struct i387_xsave) Added reserved area and MPX fields.
2204 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2205 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2206 function.
2207 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2208 (init_registers_amd64_mpx_linux): Declare new function.
2209 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2210 (x86_64_regmap): Add MPX registers.
2211 (x86_linux_read_description): Add MPX case.
2212 (initialize_low_arch): Initialize MPX targets.
2213
0080a2f6
TT
22142013-11-18 Tom Tromey <tromey@redhat.com>
2215
2216 * configure: Rebuild.
2217 * configure.ac: Don't check for stdlib.h.
2218 * gdbreplay.c: Unconditionally include stdlib.h.
2219
2978b111
TT
22202013-11-18 Tom Tromey <tromey@redhat.com>
2221
2222 * config.in: Rebuild.
2223 * configure: Rebuild.
2224 * configure.ac: Don't use AC_HEADER_DIRENT.
2225
a3d08894
TT
22262013-11-18 Tom Tromey <tromey@redhat.com>
2227
2228 * server.h: Don't check HAVE_STRING_H.
2229 * gdbreplay.c: Don't check HAVE_STRING_H.
2230 * configure: Rebuild.
2231
0a5dd17d
TT
22322013-11-18 Tom Tromey <tromey@redhat.com>
2233
2234 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2235 LIBGNU.
2236
1bd2f0ba
TT
22372013-11-08 Tom Tromey <tromey@redhat.com>
2238
2239 * configure, config.in: Rebuild.
2240 * configure.ac: Remove unused configury.
2241
3266f10b
TT
22422013-11-08 Tom Tromey <tromey@redhat.com>
2243
2244 * acinclude.m4: Include common.m4, codeset.m4.
2245 * configure, config.in: Rebuild.
2246 * configure.ac: Use GDB_AC_COMMON.
2247
6682d959
AA
22482013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2249
2250 * linux-s390-low.c (HWCAP_S390_TE): New define.
2251 (s390_arch_setup): Consider the TE field in the HWCAP for
2252 determining 'have_regset_tdb'.
2253
fd0a4d76
SDJ
22542013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2255
2256 PR gdb/16014
2257 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2258 call to sizeof.
2259
1a3d890b
PA
22602013-10-02 Pedro Alves <palves@redhat.com>
2261
2262 * server.c (process_serial_event): Don't output "GDBserver
2263 exiting" if GDB is connected through stdio.
2264 * target.c (mywait): Likewise, be silent if GDB is connected
2265 through stdio.
2266
97ad4581
JB
22672013-10-01 Joel Brobecker <brobecker@adacore.com>
2268
2269 * lynx-low.c (lynx_add_threads_after_attach): New function.
2270 (lynx_attach): Remove call to add_thread. Add call to
2271 lynx_add_threads_after_attach instead.
2272
5b4e221c
MF
22732013-09-28 Mike Frysinger <vapier@gentoo.org>
2274
2275 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2276 * config.in, configure: Regenerated.
2277
ee47b2f8
YQ
22782013-09-18 Yao Qi <yao@codesourcery.com>
2279
2280 PR server/15959
2281 * server.c (start_inferior): Clear 'resume_info'.
2282
d6707650 22832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2284
d6707650
JW
2285 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2286 for each register.
2287
9243dd0e 22882013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2289
9243dd0e
JW
2290 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2291 linux-tile-low.o to srv_tgtobj.
2292
c623a6ef
WN
22932013-09-16 Will Newton <will.newton@linaro.org>
2294
2295 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2296 out regs.
2297
fb71d39e
PA
22982013-09-06 Pedro Alves <palves@redhat.com>
2299
2300 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2301 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2302 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2303 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2304 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2305 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2306
8e7e9910
PA
23072013-09-06 Pedro Alves <palves@redhat.com>
2308
2309 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2310 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2311
7c3a12ca
PA
23122013-09-06 Pedro Alves <palves@redhat.com>
2313
2314 * linux-amd64-ipa.c: Include tracepoint.h.
2315 * linux-i386-ipa.c: Include tracepoint.h.
2316
8eb3d7b6
RW
23172013-09-06 Ricard Wanderlof <ricardw@axis.com>
2318
2319 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2320 (ps_get_thread_area): New function.
2321
eddddb9d
RW
23222013-09-06 Ricard Wanderlof <ricardw@axis.com>
2323
2324 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2325 (initialize_low_arch): Call init_registers_crisv32 rather than
2326 init_register_crisv32.
2327
533b0600
PA
23282013-09-05 Pedro Alves <palves@redhat.com>
2329
2330 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2331 to ...
2332 * hostio.h: ... this new file.
2333 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2334 win32-low.c: Include hostio.h.
2335
0ce3d3b5
PA
23362013-09-05 Pedro Alves <palves@redhat.com>
2337
2338 * server.h (gdb_client_data, handler_func, callback_handler_func)
2339 (delete_file_handler, add_file_handler, append_callback_event)
2340 (delete_callback_event, start_event_loop, initialize_event_loop):
2341 Move to event-loop.h and include it.
2342 * event-loop.h: New file.
2343
799cdc37
PA
23442013-09-05 Pedro Alves <palves@redhat.com>
2345
2346 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2347 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2348 (loaded_dll, unloaded_dll): Move to ...
2349 * dll.h: ... this new file.
2350 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2351
6a6bbd9d
PA
23522013-09-05 Pedro Alves <palves@redhat.com>
2353
2354 * server.h (current_process, get_thread_process, all_processes)
2355 (add_inferior_to_list, for_each_inferior, current_inferior)
2356 (remove_inferior, add_process, remove_process, find_process_pid)
2357 (have_started_inferiors_p, have_attached_inferiors_p)
2358 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2359 (clear_inferiors, find_inferior, find_inferior_id)
2360 (inferior_target_data, set_inferior_target_data)
2361 (inferior_regcache_data, set_inferior_regcache_data): Move to
2362 inferiors.h, and include it.
2363 * inferiors.h: New file.
2364
f699aaba
PA
23652013-09-05 Pedro Alves <palves@redhat.com>
2366
2367 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2368 Move ...
2369 * ax.h: ... here.
2370
c144c7a0
PA
23712013-09-05 Pedro Alves <palves@redhat.com>
2372
2373 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2374 tracepoint.h.
2375 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2376 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2377 (handle_tracepoint_general_set, handle_tracepoint_query)
2378 (tracepoint_finished_step, tracepoint_was_hit)
2379 (release_while_stepping_state_list, current_traceframe)
2380 (in_readonly_region, traceframe_read_mem)
2381 (fetch_traceframe_registers, traceframe_read_sdata)
2382 (traceframe_read_info, struct fast_tpoint_collect_status)
2383 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2384 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2385 (supply_fast_tracepoint_registers)
2386 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2387 (ipa_tdesc, claim_trampoline_space)
2388 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2389 (agent_mem_read, agent_get_trace_state_variable_value)
2390 (agent_set_trace_state_variable_value, agent_tsv_read)
2391 (agent_mem_read_string, get_raw_reg_func_addr)
2392 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2393 * tracepoint.h: ... this new file.
2394
ff42e6ab
PA
23952013-09-05 Pedro Alves <palves@redhat.com>
2396
2397 * server.h (perror_with_name, error, fatal, warning, paddress)
2398 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2399 include it.
2400 * utils.h: New file.
2401
541af0f4
PA
24022013-09-05 Pedro Alves <palves@redhat.com>
2403
2404 * server.h (remote_debug, noack_mode, transport_is_reliable)
2405 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2406 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2407 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2408 (write_enn, initialize_async_io, enable_async_io)
2409 (disable_async_io, check_remote_input_interrupt_request)
2410 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2411 (dead_thread_notify, prepare_resume_reply)
2412 (decode_address_to_semicolon, decode_address, decode_m_packet)
2413 (decode_M_packet, decode_X_packet, decode_xfer_write)
2414 (decode_search_memory_packet, unhexify, hexify)
2415 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2416 (look_up_one_symbol, relocate_instruction)
2417 (monitor_output): Move to remote-utils.h, and include it.
2418 * remote-utils.h: New file.
2419
eebdf26b
PA
24202013-09-05 Pedro Alves <palves@redhat.com>
2421
2422 * server.h (_): Delete.
2423
3aafd2ff
PA
24242013-09-02 Pedro Alves <palves@redhat.com>
2425
2426 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2427 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2428 allocated.
2429 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2430
cee83bcb
PM
24312013-09-02 Pierre Muller <muller@sourceware.org>
2432
2433 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2434 or WriteProcessMemory complete successfully and handle
2435 ERROR_PARTIAL_COPY error.
2436
9a13b2fa
PA
24372013-09-02 Pedro Alves <palves@redhat.com>
2438
2439 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2440 error instead of EIO.
2441
602e3198
JK
24422013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2443
2444 PR server/15604
2445 * linux-low.c: Include filestuff.h.
2446 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2447 * lynx-low.c: Include filestuff.h.
2448 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2449 * server.c: Include filestuff.h.
2450 (main): Call notice_open_fds.
2451 * spu-low.c: Include filestuff.h.
2452 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2453
96d7229d
LM
24542013-08-22 Luis Machado <lgustavo@codesourcery.com>
2455
2456 * Makefile.in: Explain why ../target and ../nat are not
2457 listed as include file search paths.
2458 (linux-waitpid.o): New object file rule.
2459 * configure.srv (srv_native_linux_obj): New variable.
2460 Replace all occurrences of linux native object files with
2461 $srv_native_linux_obj.
2462 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2463 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2464 (linux_enable_event_reporting): Remove declaration.
2465 (my_waitpid): Moved to common/linux-waitpid.c.
2466 (linux_wait_for_event): Pass ptid when calling
2467 linux_enable_event_reporting.
2468 (linux_supports_tracefork_flag): Remove.
2469 (linux_enable_event_reporting): Likewise.
2470 (linux_tracefork_grandchild): Remove.
2471 (STACK_SIZE): Moved to common/linux-ptrace.c.
2472 (linux_tracefork_child): Remove.
2473 (linux_test_for_tracefork): Remove.
2474 (linux_look_up_symbols): Call linux_supports_traceclone.
2475 (initialize_low): Remove call to linux_test_for_tracefork.
2476 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2477 common/linux-ptrace.h.
2478 (PTRACE_TYPE_ARG4): Likewise.
2479 Include linux-ptrace.h.
2480
32940073
PA
24812013-08-21 Pedro Alves <palves@redhat.com>
2482
2483 * config.in: Renegerate.
2484
33b60d58 24852013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2486
33b60d58
LM
2487 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2488 (SFILES): Remove $(srcdir)/common/target-common.c and
2489 add $(srcdir)/target/waitstatus.c.
2490 (OBS): Remove target-common.o and add waitstatus.o.
2491 (server_h): Remove $(srcdir)/../common/target-common.h and
2492 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2493 and $(srcdir)/../target/waitstatus.h.
2494 (target-common.o): Remove.
2495 (waitstatus.o): New target object file.
2496 * target.h: Do not include target-common.h and
2497 include target/resume.h, target/wait.h and
2498 target/waitstatus.h.
2499
b8e1b30e
LM
25002013-08-13 Luis Machado <lgustavo@codesourcery.com>
2501
2502 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2503 to PTRACE_TYPE_ARG3.
2504 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2505 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2506 PTRACE_TYPE_ARG4.
2507 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2508 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2509
7a60ad40
YQ
25102013-07-27 Jie Zhang <jie@codesourcery.com>
2511 Daniel Jacobowitz <dan@codesourcery.com>
2512 Yao Qi <yao@codesourcery.com>
2513
2514 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2515 (mips-linux-watch.o): New rule.
2516 (mips_linux_watch_h): New variable.
2517 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2518 srv_tgtobj.
2519 * linux-mips-low.c: Include mips-linux-watch.h.
2520 (struct arch_process_info, struct arch_lwp_info): New.
2521 (update_watch_registers_callback): New function.
2522 (mips_linux_new_process, mips_linux_new_thread) New functions.
2523 (mips_linux_prepare_to_resume, mips_insert_point): New
2524 functions.
2525 (mips_remove_point, mips_stopped_by_watchpoint): New
2526 functions.
2527 (rsp_bp_type_to_target_hw_bp_type): New function.
2528 (mips_stopped_data_address): New function.
2529 (the_low_target): Add watchpoint support functions.
2530
de6f69ad
YQ
25312013-07-27 Yao Qi <yao@codesourcery.com>
2532
2533 * i386-low.c: Include break-common.h.
2534 (enum target_hw_bp_type): Remove.
2535
3360c0bf
LM
25362013-07-24 Luis Machado <lgustavo@codesourcery.com>
2537
2538 * Makefile.in (SFILES): /common/target-common.c.
2539 (OBS): Add target-common.o.
2540 (server_h): Add $(srcdir)/../common/target-common.h.
2541 (target-common.o): New target.
2542 * server.c (queue_stop_reply_callback): Free
2543 status string after use.
2544 * target.c (target_waitstatus_to_string): Remove.
2545 * target.h: Include target-common.h.
2546 (resume_kind): Likewise.
2547 (target_waitkind): Likewise.
2548 (target_waitstatus): Likewise.
2549 (TARGET_WNOHANG): Likewise.
2550
bd885420
YQ
25512013-07-04 Yao Qi <yao@codesourcery.com>
2552
2553 * Makefile.in (host_alias): Use @host_noncanonical@.
2554 (target_alias): Use @target_noncanonical@.
2555 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2556 ACX_NONCANONICAL_HOST.
2557 * configure: Regenerated.
2558
2559 Revert:
2560 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2561
2562 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2563 * configure: Rebuild.
2564 * Makefile.in (version_host, version_target): Get from configure.
2565 (version.c): Use $(version_host) and $(version_target).
2566
17ef446e
PA
25672013-07-03 Pedro Alves <palves@redhat.com>
2568
2569 * Makefile.in (config.status): Depend on development.sh.
2570 * acinclude.m4: Include libmcheck.m4.
2571 * configure: Regenerate.
2572
7a9a7487
MG
25732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2574
2575 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2576 attribute inside the parentheses.
2577 (winapi_DebugSetProcessKillOnExit): Ditto.
2578 (winapi_DebugBreakProcess): Ditto.
2579 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2580
49b64de6
MG
25812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2582
2583 * notif.h (notif_event): Add a dummy member to avoid compiler
2584 errors.
2585
d5749ee7
PA
25862013-07-01 Pedro Alves <palves@redhat.com>
2587
2588 * hostio.c (HOSTIO_PATH_MAX): Define.
2589 (require_filename, handle_open, handle_unlink, handle_readlink):
2590 Use it.
2591
d8d2a3ee
PA
25922013-07-01 Pedro Alves <palves@redhat.com>
2593
2594 * server.h: Include "pathmax.h".
2595 * linux-low.c: Don't include sys/param.h.
2596 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2597 MAXPATHLEN.
2598 * win32-low.c: Don't include sys/param.h.
2599 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2600
bc7dea8d
PA
26012013-07-01 Pedro Alves <palves@redhat.com>
2602
2603 * event-loop.c: Don't check HAVE_UNISTD_H before including
2604 <unistd.h>.
2605 * gdbreplay.c: Likewise.
2606 * remote-utils.c: Likewise.
2607 * server.c: Likewise.
2608 * configure.ac: Don't check for unistd.h.
2609 * configure: Regenerate.
2610
d6c2da54
TT
26112013-06-28 Tom Tromey <tromey@redhat.com>
2612
2613 * Makefile.in (version.c): Use version.in, not
2614 common/version.in.
2615
257b6bec
MG
26162013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2617
2618 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2619 * configure: Rebuild.
2620 * Makefile.in (version_host, version_target): Get from configure.
2621 (version.c): Use $(version_host) and $(version_target).
2622
86ebe149
DK
26232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2624
2625 Fix trace-status to output user name without trailing colon.
2626 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2627
f30aa5af
DK
26282013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2629
2630 Fix trace-status to output proper start-time and stop-time.
2631 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2632 output start time and stop time in hex as gdb expects.
2633
28a93511
YQ
26342013-06-26 Pedro Alves <pedro@codesourcery.com>
2635
2636 * tracepoint.c (build_traceframe_info_xml): Output trace state
2637 variables present in the trace buffer.
2638
01208463
TT
26392013-06-24 Tom Tromey <tromey@redhat.com>
2640
2641 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2642 create-version.sh.
2643 (version.o): Remove.
2644 * gdbreplay.c: Include version.h.
2645 (version, host_name): Don't declare.
2646 * server.h: Include version.h.
2647 (version, host_name): Don't declare.
2648
760256f9
PA
26492013-06-12 Pedro Alves <palves@redhat.com>
2650
2651 * linux-x86-low.c (linux_is_elf64): Delete global.
2652 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2653 with local linux_pid_exe_is_elf_64_file use.
2654
030031ee
PA
26552013-06-11 Pedro Alves <palves@redhat.com>
2656
2657 * linux-low.c (regset_disabled, disable_regset): New functions.
2658 (regsets_fetch_inferior_registers)
2659 (regsets_store_inferior_registers): Use them.
2660 (initialize_regsets_info); Don't allocate the disabled_regsets
2661 array here.
2662 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2663 comment.
2664
5da6eb0a
PA
26652013-06-11 Pedro Alves <palves@redhat.com>
2666
2667 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2668 xmalloc.
2669
7e5aaa09
PA
26702013-06-11 Pedro Alves <palves@redhat.com>
2671
2672 * linux-x86-low.c (initialize_low_arch): Call
2673 init_registers_x32_avx_linux.
2674
d878444c
JK
26752013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2676
2677 Fix compatibility with Android Bionic.
2678 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2679 it is not empty.
2680
3aee8918
PA
26812013-06-07 Pedro Alves <palves@redhat.com>
2682
5f2b57b5 2683 PR server/14823
3aee8918
PA
2684 * Makefile.in (OBS): Add tdesc.o.
2685 (IPA_OBJS): Add tdesc-ipa.o.
2686 (tdesc-ipa.o): New rule.
2687 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2688 interface.
2689 * linux-low.c (new_inferior): Delete.
2690 (disabled_regsets, num_regsets): Delete.
2691 (linux_add_process): Adjust to set the new per-process
2692 new_inferior flag.
2693 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2694 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2695 was a stop. When calling arch_setup, switch the current inferior
2696 to the thread that got an event.
2697 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2698 (regsets_fetch_inferior_registers)
2699 (regsets_store_inferior_registers): New regsets_info parameter.
2700 Adjust to use it.
2701 (linux_register_in_regsets): New regs_info parameter. Adjust to
2702 use it.
2703 (register_addr, fetch_register, store_register): New usrregs_info
2704 parameter. Adjust to use it.
2705 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2706 parameter regs_info. Adjust to use it.
2707 (linux_fetch_registers): Get the current inferior's regs_info, and
2708 adjust to use it.
2709 (linux_store_registers): Ditto.
2710 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2711 (initialize_low): Don't initialize the target_regsets here. Call
2712 initialize_low_arch.
2713 * linux-low.h (target_regsets): Delete declaration.
2714 (struct regsets_info): New.
2715 (struct usrregs_info): New.
2716 (struct regs_info): New.
2717 (struct process_info_private) <new_inferior>: New field.
2718 (struct linux_target_ops): Delete the num_regs, regmap, and
2719 regset_bitmap fields. New field regs_info.
2720 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2721 * i387-fp.c (num_xmm_registers): Delete.
2722 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2723 calls to new interface.
2724 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2725 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2726 Infer the number of xmm registers from the regcache's target
2727 description.
2728 * i387-fp.h (num_xmm_registers): Delete.
2729 * inferiors.c (add_thread): Don't install the thread's regcache
2730 here.
2731 * proc-service.c (gregset_info): Fetch the current inferior's
2732 regs_info. Adjust to use it.
2733 * regcache.c: Include tdesc.h.
2734 (register_bytes, reg_defs, num_registers)
2735 (gdbserver_expedite_regs): Delete.
2736 (get_thread_regcache): If the thread doesn't have a regcache yet,
2737 create one, instead of aborting gdbserver.
2738 (regcache_invalidate_one): Rename to ...
2739 (regcache_invalidate_thread): ... this.
2740 (regcache_invalidate_one): New.
2741 (regcache_invalidate): Only invalidate registers of the current
2742 process.
2743 (init_register_cache): Add target_desc parameter, and use it.
2744 (new_register_cache): Ditto. Assert the target description has a
2745 non zero registers_size.
2746 (regcache_cpy): Add assertions. Adjust.
2747 (realloc_register_cache, set_register_cache): Delete.
2748 (registers_to_string, registers_from_string): Adjust.
2749 (find_register_by_name, find_regno, find_register_by_number)
2750 (register_cache_size): Add target_desc parameter, and use it.
2751 (free_register_cache_thread, free_register_cache_thread_one)
2752 (regcache_release, register_cache_size): New.
2753 (register_size): Add target_desc parameter, and use it.
2754 (register_data, supply_register, supply_register_zeroed)
2755 (supply_regblock, supply_register_by_name, collect_register)
2756 (collect_register_as_string, collect_register_by_name): Adjust.
2757 * regcache.h (struct target_desc): Forward declare.
2758 (struct regcache) <tdesc>: New field.
2759 (init_register_cache, new_register_cache): Add target_desc
2760 parameter.
2761 (regcache_invalidate_thread): Declare.
2762 (regcache_invalidate_one): Delete declaration.
2763 (regcache_release): Declare.
2764 (find_register_by_number, register_cache_size, register_size)
2765 (find_regno): Add target_desc parameter.
2766 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2767 declarations.
2768 * remote-utils.c: Include tdesc.h.
2769 (outreg, prepare_resume_reply): Adjust.
2770 * server.c: Include tdesc.h.
2771 (gdbserver_xmltarget): Delete declaration.
2772 (get_features_xml, process_serial_event): Adjust.
2773 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2774 declare.
2775 (struct process_info) <tdesc>: New field.
2776 (ipa_tdesc): Declare.
2777 * tdesc.c: New file.
2778 * tdesc.h: New file.
2779 * tracepoint.c: Include tdesc.h.
2780 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2781 (get_context_regcache): Adjust to pass ipa_tdesc down.
2782 (do_action_at_tracepoint): Adjust to get the register cache size
2783 from the context regcache's description.
2784 (traceframe_walk_blocks): Adjust to get the register cache size
2785 from the current trace frame's description.
2786 (traceframe_get_pc): Adjust to get current trace frame's
2787 description and pass it down.
2788 (gdb_collect): Adjust to get the register cache size from the
2789 IPA's description.
2790 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2791 (gdbserver_xmltarget): Delete.
2792 (initialize_low_tracepoint): Set the ipa's target description.
2793 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2794 (initialize_low_tracepoint): Set the ipa's target description.
2795 * linux-x86-low.c: Include tdesc.h.
2796 [__x86_64__] (is_64bit_tdesc): New.
2797 (ps_get_thread_area, x86_get_thread_area): Use it.
2798 (i386_cannot_store_register): Rename to ...
2799 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2800 (i386_cannot_fetch_register): Rename to ...
2801 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2802 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2803 to new interface.
2804 (target_regsets): Rename to ...
2805 (x86_regsets): ... this.
2806 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2807 interface.
2808 (x86_siginfo_fixup): Use is_64bit_tdesc.
2809 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2810 (tdesc_x32_avx_linux, tdesc_x32_linux)
2811 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2812 Declare.
2813 (x86_linux_update_xmltarget): Delete.
2814 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2815 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2816 (AMD64_LINUX_USER64_CS): New.
2817 (x86_linux_read_description): New, based on
2818 x86_linux_update_xmltarget.
2819 (same_process_callback): New.
2820 (x86_arch_setup_process_callback): New.
2821 (x86_linux_update_xmltarget): New.
2822 (x86_regsets_info): New.
2823 (amd64_linux_regs_info): New.
2824 (i386_linux_usrregs_info): New.
2825 (i386_linux_regs_info): New.
2826 (x86_linux_regs_info): New.
2827 (x86_arch_setup): Reimplement.
2828 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2829 (x86_emit_ops): Ditto.
2830 (the_low_target): Adjust. Install x86_linux_regs_info,
2831 x86_cannot_fetch_register, and x86_cannot_store_register.
2832 (initialize_low_arch): New.
2833 * linux-ia64-low.c (tdesc_ia64): Declare.
2834 (ia64_fetch_register): Adjust.
2835 (ia64_usrregs_info, regs_info): New globals.
2836 (ia64_regs_info): New function.
2837 (the_low_target): Adjust.
2838 (initialize_low_arch): New function.
2839 * linux-sparc-low.c (tdesc_sparc64): Declare.
2840 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2841 Adjust.
2842 (sparc_arch_setup): New function.
2843 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2844 (the_low_target): Adjust.
2845 (initialize_low_arch): New function.
2846 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2847 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2848 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2849 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2850 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2851 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2852 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2853 (tdesc_powerpc_isa205_vsx64l): Declare.
2854 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2855 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2856 (ppc_set_pc, ppc_get_hwcap): Adjust.
2857 (ppc_usrregs_info): Forward declare.
2858 (!__powerpc64__) ppc_regmap_adjusted: New global.
2859 (ppc_arch_setup): Adjust to the current process'es target
2860 description.
2861 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2862 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2863 (ppc_store_evrregset): Adjust.
2864 (target_regsets): Rename to ...
2865 (ppc_regsets): ... this, and make static.
2866 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2867 (ppc_regs_info): New function.
2868 (the_low_target): Adjust.
2869 (initialize_low_arch): New function.
2870 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2871 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2872 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2873 (tdesc_s390x_linux64v2): Declare.
2874 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2875 (s390_fill_gregset, s390_store_last_break): Adjust.
2876 (target_regsets): Rename to ...
2877 (s390_regsets): ... this, and make static.
2878 (s390_get_pc, s390_set_pc): Adjust.
2879 (s390_get_hwcap): New target_desc parameter, and use it.
2880 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2881 (s390_arch_setup): Adjust to set the current process'es target
2882 description. Don't adjust the regmap.
2883 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2884 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2885 (regs_info_3264): New globals.
2886 (s390_regs_info): New function.
2887 (the_low_target): Adjust.
2888 (initialize_low_arch): New function.
2889 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2890 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2891 [__mips64] (init_registers_mips_linux)
2892 (init_registers_mips_dsp_linux): Delete defines.
2893 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2894 (have_dsp): New global.
2895 (mips_read_description): New, based on mips_arch_setup.
2896 (mips_arch_setup): Reimplement.
2897 (get_usrregs_info): New function.
2898 (mips_cannot_fetch_register, mips_cannot_store_register)
2899 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2900 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2901 (target_regsets): Rename to ...
2902 (mips_regsets): ... this, and make static.
2903 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2904 (dsp_regs_info, regs_info): New globals.
2905 (mips_regs_info): New function.
2906 (the_low_target): Adjust.
2907 (initialize_low_arch): New function.
2908 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2909 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2910 Declare.
2911 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2912 (arm_read_description): New, with bits factored from
2913 arm_arch_setup.
2914 (arm_arch_setup): Reimplement.
2915 (target_regsets): Rename to ...
2916 (arm_regsets): ... this, and make static.
2917 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2918 (arm_regs_info): New function.
2919 (the_low_target): Adjust.
2920 (initialize_low_arch): New function.
2921 * linux-m68k-low.c (tdesc_m68k): Declare.
2922 (target_regsets): Rename to ...
2923 (m68k_regsets): ... this, and make static.
2924 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2925 (m68k_regs_info): New function.
2926 (m68k_arch_setup): New function.
2927 (the_low_target): Adjust.
2928 (initialize_low_arch): New function.
2929 * linux-sh-low.c (tdesc_sharch): Declare.
2930 (target_regsets): Rename to ...
2931 (sh_regsets): ... this, and make static.
2932 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2933 (sh_regs_info, sh_arch_setup): New functions.
2934 (the_low_target): Adjust.
2935 (initialize_low_arch): New function.
2936 * linux-bfin-low.c (tdesc_bfin): Declare.
2937 (bfin_arch_setup): New function.
2938 (bfin_usrregs_info, regs_info): New globals.
2939 (bfin_regs_info): New function.
2940 (the_low_target): Adjust.
2941 (initialize_low_arch): New function.
2942 * linux-cris-low.c (tdesc_cris): Declare.
2943 (cris_arch_setup): New function.
2944 (cris_usrregs_info, regs_info): New globals.
2945 (cris_regs_info): New function.
2946 (the_low_target): Adjust.
2947 (initialize_low_arch): New function.
2948 * linux-cris-low.c (tdesc_crisv32): Declare.
2949 (cris_arch_setup): New function.
2950 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2951 (cris_regs_info): New function.
2952 (the_low_target): Adjust.
2953 (initialize_low_arch): New function.
2954 * linux-m32r-low.c (tdesc_m32r): Declare.
2955 (m32r_arch_setup): New function.
2956 (m32r_usrregs_info, regs_info): New globals.
2957 (m32r_regs_info): Adjust.
2958 (initialize_low_arch): New function.
2959 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2960 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2961 (tic6x_usrregs_info): Forward declare.
2962 (tic6x_read_description): New function, based on ...
2963 (tic6x_arch_setup): ... this. Reimplement.
2964 (target_regsets): Rename to ...
2965 (tic6x_regsets): ... this, and make static.
2966 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2967 (tic6x_regs_info): New function.
2968 (the_low_target): Adjust.
2969 (initialize_low_arch): New function.
2970 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2971 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2972 (target_regsets): Rename to ...
2973 (xtensa_regsets): ... this, and make static.
2974 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2975 globals.
2976 (xtensa_arch_setup, xtensa_regs_info): New functions.
2977 (the_low_target): Adjust.
2978 (initialize_low_arch): New function.
2979 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2980 (nios2_arch_setup): Set the current process'es tdesc.
2981 (target_regsets): Rename to ...
2982 (nios2_regsets): ... this.
2983 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2984 (nios2_regs_info): New function.
2985 (the_low_target): Adjust.
2986 (initialize_low_arch): New function.
a261b8f5
PA
2987 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2988 (aarch64_arch_setup): Set the current process'es tdesc.
2989 (target_regsets): Rename to ...
2990 (aarch64_regsets): ... this.
2991 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2992 (aarch64_regs_info): New function.
2993 (the_low_target): Adjust.
2994 (initialize_low_arch): New function.
3aee8918
PA
2995 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2996 globals.
2997 (target_regsets): Rename to ...
2998 (tile_regsets): ... this.
2999 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3000 (tile_regs_info): New function.
3001 (tile_arch_setup): Set the current process'es tdesc.
3002 (the_low_target): Adjust.
3003 (initialize_low_arch): New function.
3004 * spu-low.c (tdesc_spu): Declare.
3005 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3006 * win32-arm-low.c (tdesc_arm): Declare.
3007 (arm_arch_setup): New function.
3008 (the_low_target): Install arm_arch_setup instead of
3009 init_registers_arm.
3010 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3011 (init_windows_x86): Rename to ...
3012 (i386_arch_setup): ... this. Set `win32_tdesc'.
3013 (the_low_target): Adjust.
3014 * win32-low.c (win32_tdesc): New global.
3015 (child_add_thread): Don't create the thread cache here.
3016 (do_initial_child_stuff): Set the new process'es tdesc.
3017 * win32-low.h (struct target_desc): Forward declare.
3018 (win32_tdesc): Declare.
3019 * lynx-i386-low.c (tdesc_i386): Declare global.
3020 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3021 * lynx-low.c (lynx_tdesc): New global.
3022 (lynx_add_process): Set the new process'es tdesc.
3023 * lynx-low.h (struct target_desc): Forward declare.
3024 (lynx_tdesc): Declare global.
3025 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3026 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3027 * nto-low.c (nto_tdesc): New global.
3028 (do_attach): Set the new process'es tdesc.
3029 * nto-low.h (struct target_desc): Forward declare.
3030 (nto_tdesc): Declare.
3031 * nto-x86-low.c (tdesc_i386): Declare.
3032 (nto_x86_arch_setup): Set `nto_tdesc'.
3033
b1fbec62
GB
30342013-06-04 Gary Benson <gbenson@redhat.com>
3035
3036 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3037 to qSupported response when appropriate.
3038 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3039 with nonzero-length annex.
3040 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3041 arguments supplied in annex.
3042
d1ec4ce7
DE
30432013-05-31 Doug Evans <dje@google.com>
3044
ac44adcb 3045 PR server/15594
d1ec4ce7
DE
3046 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3047 64 bits in 64-cross-32 environment.
3048
9b25f2d3
PA
30492013-05-28 Pedro Alves <palves@redhat.com>
3050
3051 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3052 (aarch64-without-fpu.c): Delete rule.
3053 * configure.srv (aarch64*-*-linux*): Remove references to
3054 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3055 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3056 declaration.
3057
6740dc9c
PA
30582013-05-24 Pedro Alves <palves@redhat.com>
3059
3060 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3061 instead of strchr/decode_address. Error if the range isn't split
3062 with a ','. Don't assume there's be a ':' in the action.
3063
c2d6af84
PA
30642013-05-23 Yao Qi <yao@codesourcery.com>
3065 Pedro Alves <palves@redhat.com>
3066
3067 * linux-low.c (lwp_in_step_range): New function.
3068 (linux_wait_1): If the thread was range stepping and stopped
3069 outside the stepping range, report the stop to GDB. Otherwise,
3070 continue stepping. Add range stepping debug output.
3071 (linux_set_resume_request): Copy the step range from the resume
3072 request to the lwp.
3073 (linux_supports_range_stepping): New.
3074 (linux_target_ops) <supports_range_stepping>: Set to
3075 linux_supports_range_stepping.
3076 * linux-low.h (struct linux_target_ops)
3077 <supports_range_stepping>: New field.
3078 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3079 * linux-x86-low.c (x86_supports_range_stepping): New.
3080 (the_low_target) <supports_range_stepping>: Set to
3081 x86_supports_range_stepping.
3082 * server.c (handle_v_cont): Handle 'r' action.
3083 (handle_v_requests): Append ";r" if the target supports range
3084 stepping.
3085 * target.h (struct thread_resume) <step_range_start,
3086 step_range_end>: New fields.
3087 (struct target_ops) <supports_range_stepping>:
3088 New field.
3089 (target_supports_range_stepping): New macro.
3090
58794e1a
JB
30912013-05-17 Joel Brobecker <brobecker@adacore.com>
3092
3093 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3094 confusion in comment.
3095
d631c5a7
JB
30962013-05-17 Joel Brobecker <brobecker@adacore.com>
3097
3098 * lynx-low.c (struct process_info_private): New type.
3099 (lynx_add_process): New function.
3100 (lynx_create_inferior, lynx_attach): Replace calls to
3101 add_process by calls to lynx_add_process.
3102 (lynx_resume): If PTID is null, then try using
3103 current_process()->private->last_wait_event_ptid.
3104 Add comments.
3105 (lynx_clear_inferiors): Delete. The contents of that function
3106 has been inlined in lynx_mourn;
3107 (lynx_wait_1): Save the ptid in the process's private data.
3108 (lynx_mourn): Free the process' private data. Replace call
3109 to lynx_clear_inferiors by call to clear_inferiors.
3110
96f7a20f
YQ
31112013-05-17 Yao Qi <yao@codesourcery.com>
3112
3113 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3114 the right place.
3115
db0dfaa0
LM
31162013-05-16 Luis Machado <lgustavo@codesourcery.com>
3117
3118 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3119 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3120 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3121 PT_TEXT_END_ADDR guards. Update comments.
3122 (linux_target_op) <read_offsets>: Conditionally define to
3123 linux_read_offsets if the target is UCLIBC and if it defines
3124 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3125
68f5f838
SL
31262013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3127 Andrew Jenner <andrew@codesourcery.com>
3128
3129 * Makefile.in (SFILES): Add linux-nios2-low.c.
3130 (clean): Add action to delete nios2-linux.c.
3131 (nios2-linux.c): New rule.
3132 * configure.srv: Add nios2*-*-linux*.
3133 * linux-nios2-low.c: New.
3134
1ebff1fd
HAQ
31352013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3136
3137 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3138
f6150862
HZ
31392013-04-25 Hui Zhu <hui@codesourcery.com>
3140
3141 PR gdb/15186
f6150862
HZ
3142 * ax.c (ax_printf): Add fflush.
3143
614c279d
TT
31442013-04-22 Tom Tromey <tromey@redhat.com>
3145
3146 * Makefile.in (SFILES): Add filestuff.c.
3147 (OBS): Add filestuff.o.
3148 (filestuff.o): New target.
3149 * config.in, configure: Rebuild.
3150 * configure.ac: Check for fdwalk, pipe2.
3151
7d4e5717
PA
31522013-04-17 Pedro Alves <palves@redhat.com>
3153
3154 * configure.ac (USE_THREAD_DB): Delete variable.
3155 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3156 Don't AC_SUBST USE_THREAD_DB.
3157 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3158 * config.in, configure: Regenerate.
3159
d5c93e41
PA
31602013-04-16 Pedro Alves <palves@redhat.com>
3161
3162 * linux-low.h (struct lwp_info) <thread_known>: Move under
3163 the USE_THREAD_DB #ifdef.
3164
04f5fe89
PA
31652013-04-16 Pedro Alves <palves@redhat.com>
3166
3167 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3168 (linux-low.o): Delete rule.
3169 * linux-low.h: Always include "gdb_thread_db.h" instead of
3170 conditionally including thread_db.h.
3171 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3172 HAVE_THREAD_DB_H.
3173
480b27bf
JK
31742013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3175
3176 * Makefile.in (install-only): Fix make install regression.
3177
43662968
JK
31782013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3179
3180 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3181 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3182 installation.
3183 * gdbserver.1: Remove.
3184
3e74e146
PA
31852013-03-22 Pedro Alves <palves@redhat.com>
3186
3187 * linux-low.c (handle_extended_wait): Don't call
3188 linux_enable_event_reporting.
3189
a8347a2a
TT
31902013-03-15 Tony Theodore <tonyt@logyst.com>
3191
3192 PR build/9098:
3193 * Makefile.in (SHELL): Use @SHELL@.
3194
eeb56fa7
SDJ
31952013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3196
3197 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3198 compiler warning.
3199
4fa7e2ff
JB
32002013-03-13 Joel Brobecker <brobecker@adacore.com>
3201
3202 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3203 Remove extraneous NULL element.
3204
8ddb1965
YQ
32052013-03-13 Yao Qi <yao@codesourcery.com>
3206
3207 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3208 'V' block in trace frame.
3209
9accd112
MM
32102013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3211
3212 * target.h (struct target_ops): Add btrace ops.
3213 (target_supports_btrace): New macro.
3214 (target_enable_btrace): New macro.
3215 (target_disable_btrace): New macro.
3216 (target_read_btrace): New macro.
3217 * gdbthread.h (struct thread_info): Add btrace field.
3218 * server.c: Include btrace-common.h.
3219 (handle_btrace_general_set): New function.
3220 (handle_btrace_enable): New function.
3221 (handle_btrace_disable): New function.
3222 (handle_general_set): Call handle_btrace_general_set.
3223 (handle_qxfer_btrace): New function.
3224 (struct qxfer qxfer_packets[]): Add btrace entry.
3225 * inferiors.c (remove_thread): Disable btrace.
3226 * linux-low: Include linux-btrace.h.
3227 (linux_low_enable_btrace): New function.
3228 (linux_low_read_btrace): New function.
3229 (linux_target_ops): Add btrace ops.
3230 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3231 Add srv_linux_btrace=yes.
3232 (x86_64-*-linux*): Add linux-btrace.o.
3233 Add srv_linux_btrace=yes.
3234 * configure.ac: Define HAVE_LINUX_BTRACE.
3235 * config.in: Regenerated.
3236 * configure: Regenerated.
3237
5cc22e4c
MM
32382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3239
3240 * server.c (handle_qxfer): Preserve error message if -3 is
3241 returned.
3242 (qxfer): Document the -3 return value.
3243
7c97f91e
MM
32442013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3245
3246 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3247 (linux_btrace_h): New variable.
3248 (linux-btrace.o): New rule.
3249
be9a119c 32502013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3251 Hafiz Abid Qadeer <abidh@codesourcery.com>
3252
3253 * tracepoint.c (trace_buffer_size): New global.
3254 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3255 (init_trace_buffer): Change to one-argument function. Allocate
3256 trace buffer memory.
3257 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3258 handle QTBuffer:size packet.
3259 (cmd_bigqtbuffer_size): New function.
3260 (initialize_tracepoint): Call init_trace_buffer with
3261 DEFAULT_TRACE_BUFFER_SIZE.
3262 * server.c (handle_query): Add QTBuffer:size in the
3263 supported packets.
3264
e64f7499
YQ
32652013-03-07 Yao Qi <yao@codesourcery.com>
3266
3267 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3268 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3269 of -1.
3270 (cmd_qtsp): Adjust condition. Do post increment.
3271 Set cur_action and cur_step_action back to 0.
3272
f0ae6fc3
PA
32732013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3274
3275 PR server/15236
3276 * linux-low.c (linux_write_memory): Return early success if LEN is
3277 zero.
3278
b5b0b0af
CV
32792013-03-05 Corinna Vinschen <vinschen@redhat.de>
3280
334ad4a8 3281 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3282
589bc927
TT
32832013-02-28 Tom Tromey <tromey@redhat.com>
3284
3285 * configure.ac: Invoke AC_SYS_LARGEFILE.
3286 * configure, config.in: Rebuild.
3287
dfe07582
CV
32882013-02-28 Corinna Vinschen <vinschen@redhat.com>
3289
3290 * win32-low.c: Throughout, fix format strings and casts of
3291 printf-like functions to avoid type related warnings on all
3292 platforms.
3293 (get_child_debug_event): Print dwDebugEventCode as hex since
3294 that's how it's usually documented.
3295
736cd585
YQ
32962013-02-28 Yao Qi <yao@codesourcery.com>
3297
3298 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3299 pulongest.
3300
e1f58301
JW
33012013-02-27 Jiong Wang <jiwang@tilera.com>
3302
3303 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3304 (reg-tilegx32.c): New rule.
3305 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3306 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3307 different register info initializer according to elf class.
3308 (init_registers_tilgx32): New function. The tilegx32 register info
3309 initializer.
3310 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3311 (tile_store_gregset): Likewise.
3312
d171ca78
YQ
33132013-02-27 Yao Qi <yao@codesourcery.com>
3314
3315 * server.c (process_point_options): Print debug message when
3316 debug_threads is true.
3317
282bbdf3
YQ
33182013-02-26 Yao Qi <yao@codesourcery.com>
3319
3320 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3321
aca22551
PA
33222013-02-19 Pedro Alves <palves@redhat.com>
3323 Kai Tietz <ktietz@redhat.com>
3324
3325 PR gdb/15161
3326
3327 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3328 instead of strtoul to extract address from packet.
3329 (process_serial_event) <'z'>: Likewise.
3330
4f3cee1c
YQ
33312013-02-18 Yao Qi <yao@codesourcery.com>
3332
3333 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3334
8e1d55a3
PA
33352013-02-14 Pedro Alves <palves@redhat.com>
3336
3337 Plug memory leak.
3338
3339 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3340 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3341
458820da
PA
33422013-02-14 Pedro Alves <palves@redhat.com>
3343
3344 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3345
baea0dae
PA
33462013-02-14 Pedro Alves <palves@redhat.com>
3347
3348 * tracepoint.c (save_string): Delete.
3349 (add_tracepoint_action): Use savestring instead of save_string.
3350
0b1afbb3
PA
33512013-02-12 Pedro Alves <palves@redhat.com>
3352
3353 * linux-xtensa-low.c: Ditto.
3354 * xtensa-xtregs.c: Ditto.
3355
8a4ac37e
PA
33562013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3357
3358 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3359 thread_db.
3360
148de6bb
MS
33612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3362
3363 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3364 aarch64_num_wp_regs and aarch64_num_bp_regs to
3365 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3366
55fac6e0
MS
33672013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3368
3369 * linux-aarch64-low.c (ps_get_thread_area): Replace
3370 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3371
176eb98c
MS
33722013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3373 Marcus Shawcroft <marcus.shawcroft@arm.com>
3374 Nigel Stephens <nigel.stephens@arm.com>
3375 Yufeng Zhang <yufeng.zhang@arm.com>
3376
3377 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3378 (aarch64.c, aarch64-without-fpu.c): New targets.
3379 * configure.srv (aarch64*-*-linux*): New.
3380 * linux-aarch64-low.c: New file.
3381
56f7af9c
MS
33822013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3383
43aaf8b6 3384 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3385 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3386 (dequeue_one_deferred_signal, linux_resume_one_thread)
3387 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3388 (linux_tracefork_grandchild, linux_test_for_tracefork)
3389 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3390 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3391 where the argument is 0.
3392
60f662b0
YQ
33932013-01-25 Yao Qi <yao@codesourcery.com>
3394
3395 * event-loop.c: Include "queue.h".
3396 (gdb_event_p): New typedef.
3397 (struct gdb_event) <next_event>: Remove.
3398 (event_queue): Change to QUEUE(gdb_event_p).
3399 (async_queue_event): Remove.
3400 (gdb_event_xfree): New.
3401 (initialize_event_loop): New.
3402 (process_event): Use API from QUEUE.
3403 (wait_for_event): Likewise.
3404 * server.c (main): Call initialize_event_loop.
3405 * server.h (initialize_event_loop): Declare.
3406
5ae4861a
YQ
34072013-01-18 Yao Qi <yao@codesourcery.com>
3408
3409 * ax.h (struct eval_agent_expr_context): New.
3410 (gdb_eval_agent_expr): Update declaration.
3411 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3412 TFRAME. Add new argument CTX.
3413 * server.h (struct eval_agent_expr_context): Declare.
3414 (agent_mem_read, agent_tsv_read): Update declaration.
3415 (agent_mem_read_string): Likewise.
3416 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3417 (add_traceframe_block): Add new argument TPOINT.
3418 Increase TPOINT->traceframe_usage.
3419 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3420 eval_tracepoint_agent_expr.
3421 (condition_true_at_tracepoint): Likewise.
3422 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3423 (agent_mem_read_string, agent_tsv_read): Likewise.
3424
85e00e85
YQ
34252013-01-16 Yao Qi <yao@codesourcery.com>
3426
3427 * linux-low.c (linux_resume_one_lwp): Don't check
3428 'lwp->bp_reinsert != 0'.
3429
4039cf45
JB
34302013-01-07 Joel Brobecker <brobecker@adacore.com>
3431 Pedro Alves <palves@redhat.com>
3432
3433 * lynx-low.c (ptrace_request_to_str): Define a temporary
3434 macro and use it to simplify this function's implementation.
3435
9044dee2
JB
34362013-01-07 Joel Brobecker <brobecker@adacore.com>
3437
3438 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3439 sets errno.
3440
e6352c8f
JB
34412013-01-07 Joel Brobecker <brobecker@adacore.com>
3442
3443 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3444
50681a27
JB
34452013-01-07 Joel Brobecker <brobecker@adacore.com>
3446
3447 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3448
3f6e77ef
JB
34492013-01-07 Joel Brobecker <brobecker@adacore.com>
3450
3451 * lynx-low.c (lynx_resume): Use the resume_info parameter
3452 to determine the ptid for the lynx_ptrace call, unless
3453 it is equal to minus_one_ptid, in which case we use the
3454 ptid of the current_inferior.
3455 (lynx_wait_1): After having received a thread create/exit
3456 event, resume the inferior's execution using the signaling
3457 thread's ptid, rather than the old ptid.
3458
7fda33ae
JB
34592013-01-07 Joel Brobecker <brobecker@adacore.com>
3460
3461 * lynx-low.c (lynx_resume): Delete variable ret.
3462
b9786c74
JB
34632013-01-01 Joel Brobecker <brobecker@adacore.com>
3464
3465 * gdbreplay.c (gdbreplay_version): Update copyright year.
3466 * server.c (gdbserver_version): Likewise.
3467
8b93d60f
JB
34682012-12-17 Joel Brobecker <brobecker@adacore.com>
3469
3470 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3471 new thread.
3472
037335a7
JB
34732012-12-17 Joel Brobecker <brobecker@adacore.com>
3474
3475 * lynx-low.c (ptrace_request_to_str): Add handling for
3476 PTRACE_GETTRACESIG.
3477
52d4cbd8
JB
34782012-12-17 Joel Brobecker <brobecker@adacore.com>
3479
3480 * lynx-low.c (lynx_attach): Delete variable new_process.
3481
ab8f6ca9
JB
34822012-12-17 Joel Brobecker <brobecker@adacore.com>
3483
3484 * lynx-low.c (lynx_create_inferior): Delete variable
3485 new_process.
3486
78cbc024
JB
34872012-12-17 Joel Brobecker <brobecker@adacore.com>
3488
3489 * lynx-low.c (ptrace_request_to_str): Do not handle
3490 PTRACE_GETTHREADLIST if this macro does not exist.
3491
14a00470
YQ
34922012-12-15 Yao Qi <yao@codesourcery.com>
3493
3494 * Makefile.in (OBS): Add notif.o.
3495 * notif.c, notif.h: New.
3496 * server.c: Include "notif.h".
3497 (struct vstop_notif) <next>: Remove.
3498 <base>: New field.
3499 (queue_stop_reply): Update.
3500 (push_event, send_next_stop_reply): Remove.
3501 (discard_queued_stop_replies): Update.
3502 (notif_stop): New variable.
3503 (handle_v_stopped): Remove.
3504 (handle_v_requests): Don't call handle_v_stopped. Call
3505 handle_ack_notif instead.
3506 (queue_stop_reply_callback): Call notif_event_enque instead
3507 of queue_stop_reply.
3508 (handle_status): Don't call send_next_stop_reply, call
3509 notif_write_event instead.
3510 (kill_inferior_callback): Likewise.
3511 (detach_or_kill_inferior_callback): Likewise.
3512 (main): Call initialize_notif.
3513 (process_serial_event): Call QUEUE_is_empty.
3514 (handle_target_event): Call notif_push instead of push event.
3515 * server.h (push_event): Remove declaration.
3516
61c125b9
TT
35172012-12-10 Tom Tromey <tromey@redhat.com>
3518
3519 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3520 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3521 macros.
3522 (.c.o): Rewrite.
3523 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3524 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3525 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3526 (amd64-linux-ipa.o, ax.o): Rewrite.
3527 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3528 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3529 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3530 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3531 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3532 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3533 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3534 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3535 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3536 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3537 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3538 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3539 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3540 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3541 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3542 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3543 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3544 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3545 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3546 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3547 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3548 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3549 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3550 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3551 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3552 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3553 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3554 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3555 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3556 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3557 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3558 (reg-tilegx.o): Remove.
3559 (all_object_files): New macro.
3560 Include .deps files.
3561 * aclocal.m4, configure: Rebuild.
3562 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3563 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3564 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3565
e90e9ad9
TT
35662012-12-05 Tom Tromey <tromey@redhat.com>
3567
3568 PR gdb/14917:
3569 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3570
02d403bf 35712012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3572
3573 * configure.ac: Check for linux/perf_event.h.
3574 * config.in: Regenerated.
3575 * configure: Regenerated.
3576
0270a750
PA
35772012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3578
3579 * hostio.c (handle_readlink): Decrease buffer size
3580 parameter passed to readlink by one byte.
3581
8c29b58e
YQ
35822012-11-26 Yao Qi <yao@codesourcery.com>
3583
3584 * configure.ac (build_warnings): Append '-Wempty-body'.
3585 * configure: Regenerated.
3586 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3587 body.
3588
8bdce1ff
PM
35892012-11-15 Pierre Muller <muller@sourceware.org>
3590
3591 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3592 * config.in: Regenerate.
3593 * configure: Regenerate.
3594 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3595 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3596 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3597 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3598 header.
3599 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3600 instead of <sys/wait.h> header.
3601 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3602
02d403bf 36032012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3604
3605 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3606 (various make rules): Remove -DGDBSERVER
3607
fbd5db48
YQ
36082012-11-09 Yao Qi <yao@codesourcery.com>
3609
3610 * spu-low.c (current_ptid): Move it to ..
3611 * gdbthread.h: ... here. New.
3612 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3613 * server.c (myresume, process_serial_event): Likewise.
3614 * thread-db.c (thread_db_find_new_threads): Likewise.
3615 * tracepoint.c (run_inferior_command): Likewise.
3616
b3dc46ff
AB
36172012-10-01 Andrew Burgess <aburgess@broadcom.com>
3618
3619 * server.c (handle_search_memory_1): Include access length in
3620 warning message.
3621
07c04788
HPN
36222012-09-05 Michael Brandt <michael.brandt@axis.com>
3623
3624 * linux-crisv32-low.c: Fix compile errors.
3625
918d227b
YQ
36262012-09-04 Yao Qi <yao@codesourcery.com>
3627
3628 * tracepoint.c (cmd_qtsv): Adjust debug message.
3629 Don't check CUR_TPOINT.
3630
18c1b81a
YQ
36312012-08-28 Yao Qi <yao@codesourcery.com>
3632
3633 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3634 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3635 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3636 Remove declarations of xmalloc, xreallloc, xstrdup and
3637 freeargv.
3638 * Makefile.in (libiberty_h): New.
3639 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3640 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3641
dc82f37b
YQ
36422012-08-23 Yao Qi <yao@codesourcery.com>
3643
3644 * server.h: Remove declaration of 'xsnprintf'.
3645
406b1477
KS
36462012-08-22 Keith Seitz <keiths@redhat.com>
3647
3648 * server.h: Include build-gnulib-gbserver/config.h.
3649 * gdbreplay.c: Likewise.
3650
e6712ff1
DE
36512012-08-08 Doug Evans <dje@google.com>
3652
3653 * Makefile.in (SFILES): Add gdb_vecs.c.
3654 (OBS): Add gdb_vecs.o.
3655 (gdb_vecs_h, host_defs_h): New variables.
3656 (thread-db.o): Add $(gdb_vecs_h) dependency.
3657 (gdb_vecs.o): New rule.
3658 * thread-db.c: #include "gdb_vecs.h".
3659 (thread_db_load_search): Use a vector to iterate over path elements.
3660 Handle text appearing after "$pdir".
3661
3662 * configure.ac: Add check for strstr.
3663 * config.in: Regenerate.
3664 * configure: Regenerate.
3665
7c3270ae
UW
36662012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3667
3668 * hostio.c (handle_pread): If pread fails, fall back to attempting
3669 lseek/read.
3670 (handle_pwrite): Likewise for pwrite.
3671
b62e2b27
UW
36722012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3673
3674 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3675 between unsupported TYPE and unimplementable ADDR/LEN combination.
3676 (arm_insert_point): Act on new return value.
3677
78a99e91
PA
36782012-07-31 Pedro Alves <palves@redhat.com>
3679
3680 * server.c (process_point_options): Only skip tokens if we find
3681 one that is unrecognized. Don't treat 'X' specially while
3682 skipping unrecognized tokens.
3683
fcf303ab
UW
36842012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3685
3686 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3687 to 4-byte-align HW breakpoint addresses for Thumb.
3688
7255706c
YQ
36892012-07-27 Yao Qi <yao@codesourcery.com>
3690
3691 PR remote/14161.
3692
3693 * server.h: Declare gdb_agent_about_to_close.
3694 * target.c (kill_inferior): Include "agent.h".
3695 New. Send command 'kill'.
3696 * target.h (kill_inferior): Removed macro.
3697 * tracepoint.c (gdb_agent_about_to_close): New.
3698 (gdb_agent_helper_thread): Handle command 'close'.
3699 Wait endlessly until the inferior stops.
3700 Install gdb_agent_remove_socket to atexit hook.
3701 (agent_socket_name): New static variable.
3702 (gdb_agent_socket_init): Replace local variable 'name' with
3703 'agent_socket_name'.
3704 (gdb_agent_remove_socket): New.
3705
5a3f286f
YQ
37062012-07-27 Yao Qi <yao@codesourcery.com>
3707
3708 * server.c (process_point_options): Stop at 'X' when parsing.
3709
961bd387
ME
37102012-07-19 Michael Eager <eager@eagercon.com>
3711
a261b8f5 3712 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3713 to hw_execute.
3714 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3715 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3716 hardware breakpoint.
3717
aa7c7447
JK
37182012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3719
3720 * gdbserver/linux-low.c (initialize_low): Call
3721 linux_ptrace_init_warnings.
3722
7f216e7c
DE
37232012-07-02 Doug Evans <dje@google.com>
3724
3725 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3726 pointer to int.
3727
d3ce09f5
SS
37282012-07-02 Stan Shebs <stan@codesourcery.com>
3729
3730 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3731 (ax.o): Add it to build rule.
3732 (ax-ipa.o): Ditto.
3733 (OBS): Add format.o.
3734 (IPA_OBS): Add format.o.
3735 * server.c (handle_query): Claim support for breakpoint commands.
3736 (process_point_options): Add command case.
3737 (process_serial_event): Leave running if there are printfs in
3738 effect.
3739 * mem-break.h (any_persistent_commands): Declare.
3740 (add_breakpoint_commands): Declare.
3741 (gdb_no_commands_at_breakpoint): Declare.
3742 (run_breakpoint_commands): Declare.
3743 * mem-break.c (struct point_command_list): New struct.
3744 (struct breakpoint): New field command_list.
3745 (any_persistent_commands): New function.
3746 (add_commands_to_breakpoint): New function.
3747 (add_breakpoint_commands): New function.
3748 (gdb_no_commands_at_breakpoint): New function.
3749 (run_breakpoint_commands): New function.
3750 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3751 locally.
3752 * ax.c: Include format.h.
3753 (ax_printf): New function.
3754 (gdb_eval_agent_expr): Add printf opcode.
3755
2f8f6aed
YQ
37562012-06-13 Yao Qi <yao@codesourcery.com>
3757
3758 * server.c (start_inferior): Remove duplicated writes to fields
3759 'last_resume_kind' and 'last_status' of 'current_inferior'.
3760
0c9070b3
YQ
37612012-06-12 Yao Qi <yao@codesourcery.com>
3762 Pedro Alves <palves@redhat.com>
3763
3764 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3765 comment.
3766 * server.c (handle_v_cont): Extend comment.
3767
c52daf70
YQ
37682012-06-11 Yao Qi <yao@codesourcery.com>
3769
3770 * linux-low.c (linux_attach): Add 'static'.
3771
d38bbb0a
YQ
37722012-06-06 Yao Qi <yao@codesourcery.com>
3773
3774 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3775
89dc0afd
JK
37762012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3777
3778 Fix gcc -flto compilation warning.
3779 * server.c (main): Make variable multi_mode and attach volatile.
3780
75f62ce7
TJB
37812012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3782
3783 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3784 if the platform doesn't know about it.
3785
65f479b6
PA
37862012-05-30 Jeff Kenton <jkenton@tilera.com>
3787
3788 * Makefile.in (SFILES): Add linux-tile-low.c.
3789 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3790 * configure.srv: Handle tilegx-*-linux*.
3791 * linux-tile-low.c: New file.
3792
0c5bf5a9
JK
37932012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3794
3795 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3796
a493e3e2
PA
37972012-05-24 Pedro Alves <palves@redhat.com>
3798
3799 PR gdb/7205
3800
43aaf8b6 3801 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3802
2ea28649
PA
38032012-05-24 Pedro Alves <palves@redhat.com>
3804
3805 PR gdb/7205
3806
3807 Replace target_signal with gdb_signal throughout.
3808
8d409d16
MR
38092012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3810
3811 * linux-low.c (linux_store_registers): Avoid the copying sequence
3812 when no data has been retrieved by ptrace.
3813
23512c01
MGD
38142012-05-22 Will Deacon <will.deacon@arm.com>
3815
3816 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3817 Include asm/ptrace.h.
3818 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3819 already defined.
3820
4934b29e
MR
38212012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3822
3823 * linux-low.c (linux_store_registers): Don't re-retrieve data
3824 with ptrace that has already been obtained from /proc. Always
3825 copy any data retrieved with ptrace to the buffer supplied.
3826
bde24c0a
PA
38272012-05-11 Yao Qi <yao@codesourcery.com>
3828 Pedro Alves <palves@redhat.com>
3829
3830 * linux-low.c (enum stopping_threads_kind): New.
3831 (stopping_threads): Change type to `enum stopping_threads_kind'.
3832 (handle_extended_wait): If stopping and suspending threads, leave
3833 the new_lwp suspended too.
3834 (linux_wait_for_event): Adjust.
3835 (stop_all_lwps): Set `stopping_threads' to
3836 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3837 whether we're suspending threads or just stopping them. Assert no
3838 recursion happens.
3839
623b6bdf
YQ
38402012-04-29 Yao Qi <yao@codesourcery.com>
3841
3842 * server.h: Move some code to ...
3843 * gdbthread.h: ... here. New.
3844 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3845 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3846 (nto-low.o, win32-low.o): Likewise.
3847 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3848 * regcache.c, remote-utils.c, server.c: Likewise.
3849 * target.c, tracepoint.c, win32-low.c: Likewise.
3850
f15f9948
TJB
38512012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3852
3853 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3854 (PTRACE_ARG4_TYPE): Likewise.
3855 (PTRACE_XFER_TYPE): Likewise.
3856 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3857 ptrace to PTRACE_ARG3_TYPE.
3858 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3859 (PTRACE_ARG4_TYPE): Likewise.
3860 (PTRACE_XFER_TYPE): Likewise.
3861 (linux_detach_one_lwp): Cast fourth argument of
3862 ptrace to long then PTRACE_ARG4_TYPE.
3863 (regsets_fetch_inferior_registers): Cast third argument of
3864 ptrace to long then PTRACE_ARG3_TYPE.
3865 (regsets_store_inferior_registers): Likewise.
3866
38ea300a
PA
38672012-04-20 Pedro Alves <palves@redhat.com>
3868
3869 * configure: Regenerate.
3870
c971b7fa
PA
38712012-04-19 Pedro Alves <palves@redhat.com>
3872
43aaf8b6 3873 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3874 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3875 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3876 (all, install-only, uninstall, clean-info, all-lib, clean): No
3877 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3878 (maintainer-clean realclean distclean): Use subdir_do.
3879 (subdir_do): New.
3880 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3881 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3882 * acinclude.m4: Include acx_configure_dir.m4.
3883 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3884 calls. Call AC_PROG_RANLIB. Configure gnulib using
3885 ACX_CONFIGURE_DIR.
3886 (GNULIB): New.
3887 (GNULIB_STDINT_H): Adjust.
3888 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3889 * gdbreplay.c: Include build-gnulib/config.h.
3890 * server.h: Likewise.
3891 * aclocal.m4: Regenerate.
3892 * config.in: Regenerate.
3893 * configure: Regenerate.
c971b7fa 3894
809277f8
PA
38952012-04-19 Pedro Alves <palves@redhat.com>
3896
3897 * Makefile.in (LIBGNU, INCGNU): Adjust.
3898 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3899 (all, install-only, uninstall, clean-info, all-lib, clean)
3900 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3901 * configure.ac: Adjust AC_OUTPUT output.
3902 * aclocal.m4: Regenerate.
3903 * configure: Regenerate.
3904
fd9bb8b8
PA
39052012-04-19 Pedro Alves <palves@redhat.com>
3906
3907 * Makefile.in (generated_files): New.
3908 (server_h): Remove the explicit dependency on config.h, and depend
3909 on $generated_files.
3910
1c298c66
PA
39112012-04-19 Pedro Alves <palves@redhat.com>
3912
3913 * Makefile.in (INCGNU): Add -Ignulib.
3914
57c4b50b
PA
39152012-04-19 Pedro Alves <palves@redhat.com>
3916
3917 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3918 (INCGNU): ... this, and spell out -I here.
3919 (GNULIB_LIB): Rename to ...
3920 (LIBGNU): ... this.
3921 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3922
1030e047
PA
39232012-04-19 Pedro Alves <palves@redhat.com>
3924
3925 * config.in: Regenerate.
3926
447d4319
PA
39272012-04-19 Pedro Alves <palves@redhat.com>
3928
3929 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3930 * server.h (memmem): Remove declaration.
3931 * config.in: Regenerate.
3932 * configure: Regenerate.
3933
aad9eab9
YQ
39342012-04-19 Yao Qi <yao@codesourcery.com>
3935
3936 * Makefile.in (SFILES): Add common/vec.c.
3937 (OBS): Add vec.o.
3938 (vec.o): New rule.
3939
3e10640f
YQ
39402012-04-19 Yao Qi <yao@codesourcery.com>
3941
3942 * remote-utils.c (prepare_resume_reply): Replace with macro
3943 target_core_of_thread.
3944 * server.c (handle_qxfer_threads_proper): Likewise.
3945 * target.h (traget_core_of_thread): New macro.
3946
71622373
PA
39472012-04-18 Pedro Alves <palves@redhat.com>
3948
3949 * aclocal.m4: Regenerate.
3950 * configure: Regenerate.
3951
80d26939
YQ
39522012-04-16 Yao Qi <yao@codesourcery.com>
3953
3954 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3955 duplicated on address.
3956
42476b70
YQ
39572012-04-16 Yao Qi <yao@codesourcery.com>
3958
3959 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3960 (struct tracepoint_action_ops) <send>: New field.
3961 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3962 (agent_expr_send, x_tracepoint_action_send): New.
3963 (l_tracepoint_action_send): New.
3964 (cmd_qtdp): Download and install tracepoint
3965 according to `use_agent'.
3966 (run_inferior_command): Add one more parameter `len'.
3967 Update callers.
3968 (tracepoint_send_agent): New.
3969 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3970
7bc83639
YQ
39712012-04-16 Yao Qi <yao@codesourcery.com>
3972
3973 * tracepoint.c (download_tracepoints): Moved to ...
3974 (cmd_qtstart): ... here.
3975
5f18041e
YQ
39762012-04-14 Yao Qi <yao@codesourcery.com>
3977
3978 * tracepoint.c: Include inttypes.h.
3979 (struct collect_memory_action): Use sized types.
3980 (struct tracepoint): Likewise.
3981 (cmd_qtdp, stop_tracing): Update print specifiers.
3982 (cmd_qtp, response_tracepoint): Likewise.
3983 (collect_data_at_tracepoint): Likewise.
3984 (collect_data_at_step): Likewise.
3985
55a8c076
YQ
39862012-04-14 Yao Qi <yao@codesourcery.com>
3987
3988 Import gnulib module inttypes.
3989 * aclocal.m4, config.in, configure: Regenerated.
3990
dc750257
YQ
39912012-04-14 Yao Qi <yao@codesourcery.com>
3992
3993 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3994 Makefile and config.status at last.
3995
0ab5faf9
YQ
39962012-04-13 Yao Qi <yao@codesourcery.com>
3997
3998 * tracepoint.c: Include stdint.h unconditionally.
3999
18f5fd81
TJB
40002012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4001
4002 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4003 on BFD_HAVE_SYS_PROCFS_TYPE.
4004 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4005 * configure: Regenerate.
4006 * config.in: Likewise.
4007
4d47af5c
L
40082012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4009
4010 * Makefile.in (clean): Also remove x32.c x32-linux.c
4011 x32-avx.c x32-avx-linux.c.
4012 (x32.o): New target.
4013 (x32.c): Likewise.
4014 (x32-linux.o): Likewise.
4015 (x32-linux.c): Likewise.
4016 (x32-avx.o): Likewise.
4017 (x32-avx.c): Likewise.
4018 (x32-avx-linux.o): Likewise.
4019 (x32-avx-linux.c): Likewise.
4020
4021 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4022 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4023 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4024 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4025 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4026 i386/x32-avx-linux.xml.
4027
4028 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4029 (init_registers_x32_avx_linux): Likwise.
4030 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4031 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4032
ecedbe58
PA
40332012-04-13 Pedro Alves <palves@redhat.com>
4034
4035 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4036 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4037 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4038 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4039 the sub-make.
4040
c92b5177
L
40412012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4042
4043 * linux-x86-low.c (compat_x32_clock_t): New.
4044 (compat_x32_siginfo_t): Likewise.
4045 (compat_x32_siginfo_from_siginfo): Likewise.
4046 (siginfo_from_compat_x32_siginfo): Likewise.
4047 (linux_is_elf64): Likewise.
4048 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4049 and siginfo_from_compat_x32_siginfo for x32.
4050 (x86_arch_setup): Set linux_is_elf64.
4051
214d508e
L
40522012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4053
4054 PR gdb/13969
4055 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4056 e_machine field.
4057 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4058 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4059 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4060 compatible with process.
4061
c9a1864a
YQ
40622012-04-12 Yao Qi <yao@codesourcery.com>
4063
4064 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4065 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4066 (install-only, install-info, clean): Handle sub dir gnulib.
4067 (all-lib, am--refresh): New targets.
4068 (memmem.o): Remove target.
4069 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4070 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4071 (AC_REPLACE_FUNCS): Remove memmem.
4072 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4073 (AC_OUTPUT): Generate Makefile in gnulib/.
4074 * aclocal.m4, config.in, configure: Regenerated.
4075
367ba2c2
MR
40762012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4077
4078 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4079
9d236627
PA
40802012-04-05 Pedro Alves <palves@redhat.com>
4081
4082 -Werror=strict-aliasing
4083
4084 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4085 pointer.
4086
111217b3
PA
40872012-04-04 Pedro Alves <palves@redhat.com>
4088
4089 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4090 (sparc_store_gregset_from_stack, sparc_store_gregset)
4091 (sparc_breakpoint_at): Fix formatting.
4092
8365dcf5
TJB
40932012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4094
4095 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4096 are available.
4097 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4098 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4099 * config.in: Regenerate.
4100 * configure: Likewise.
4101
689cc2ae
PA
41022012-03-29 Pedro Alves <palves@redhat.com>
4103
4104 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4105 Correct ptrace arguments.
4106
c14dfd32
PA
41072012-03-28 Pedro Alves <palves@redhat.com>
4108
4109 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4110 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4111 (IA64_FR1_REGNUM): New defines.
4112 (ia64_fetch_register): New.
4113 (the_low_target): Install it.
4114 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4115 field.
4116 * linux-low.c (linux_fetch_registers): Try the
4117 the_low_target.fetch_register hook first.
4118
4119 * linux-arm-low.c (the_low_target): Adjust.
4120 * linux-bfin-low.c (the_low_target): Adjust.
4121 * linux-cris-low.c (the_low_target): Adjust.
4122 * linux-crisv32-low.c (the_low_target): Adjust.
4123 * linux-m32r-low.c (the_low_target): Adjust.
4124 * linux-m68k-low.c (the_low_target): Adjust.
4125 * linux-mips-low.c (the_low_target): Adjust.
4126 * linux-ppc-low.c (the_low_target): Adjust.
4127 * linux-s390-low.c (the_low_target): Adjust.
4128 * linux-sh-low.c (the_low_target): Adjust.
4129 * linux-sparc-low.c (the_low_target): Adjust.
4130 * linux-tic6x-low.c (the_low_target): Adjust.
4131 * linux-x86-low.c (the_low_target): Adjust.
4132 * linux-xtensa-low.c (the_low_target): Adjust.
4133
63c88e13
PA
41342012-03-26 Pedro Alves <palves@redhat.com>
4135
4136 * server.c (handle_qxfer_libraries): Don't bail early if
4137 the_target->qxfer_libraries_svr4 is not NULL.
4138
fb723180
PA
41392012-03-26 Pedro Alves <palves@redhat.com>
4140
4141 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4142
0afae3cf
PA
41432012-03-23 Pedro Alves <palves@redhat.com>
4144
4145 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4146 "library-list-svr4" element's start tag when the the DSO list is
4147 empty.
4148
485f1ee4
PA
41492012-03-23 Pedro Alves <palves@redhat.com>
4150
4151 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4152 a variable whose type size is the same as the inferior's pointer
4153 size.
4154
a5362b9a
TS
41552012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4156
4157 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4158 struct siginfo.
4159 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4160 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4161 * linux-low.h: Include <signal.h>.
4162 (struct siginfo): Remove forward declaration.
4163 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4164 struct siginfo.
4165
d226c142
MF
41662012-03-21 Mike Frysinger <vapier@gentoo.org>
4167
4168 * .gitignore: Ignore more files.
4169
122f36ef
PA
41702012-03-19 Pedro Alves <palves@redhat.com>
4171 Jan Kratochvil <jan.kratochvil@redhat.com>
4172
4173 * server.c (cont_thread, general_thread): Add describing comments.
4174 (start_inferior): Clear `cont_thread'.
4175 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4176 of a process.
4177
fc3e5175
YQ
41782012-03-15 Yao Qi <yao@codesourcery.com>
4179
4180 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4181 handling to ...
4182 (cmd_qtdp): ... here.
4183
8d0d92cd
YQ
41842012-03-15 Yao Qi <yao@codesourcery.com>
4185
4186 * tracepoint.c (struct tracepoint_action_ops): New.
4187 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4188 (m_tracepoint_action_download): New.
4189 (r_tracepoint_action_download): New.
4190 (x_tracepoint_action_download): New.
4191 (l_tracepoint_action_download): New.
4192 (add_tracepoint_action): Install `action->ops' according type.
4193 (download_tracepoint_1): Move code `download' function pointer
4194 of various tracepoint_action_ops.
4195
87b0bb13
JK
41962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4197
4198 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4199 linux_ptrace_attach_warnings.
4200
5f572dec
JK
42012012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4202
4203 * Makefile.in (linux-ptrace.o): New.
4204 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4205 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4206 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4207 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4208 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4209 of these targets.
4210 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4211
f4647387
YQ
42122012-03-08 Yao Qi <yao@codesourcery.com>
4213 Pedro Alves <palves@redhat.com>
4214
4215 Fix PR server/13392.
4216 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4217 offset of JMP insn.
4218 * tracepoint.c (remove_tracepoint): New.
4219 (cmd_qtdp): Call remove_tracepoint when failed to install.
4220
9b224c5e
PA
42212012-03-07 Pedro Alves <palves@redhat.com>
4222
4223 * linux-low.c (get_detach_signal): New.
4224 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4225 Pass on pending signals to PTRACE_DETACH. Check the result of the
4226 ptrace call.
4227 * server.c (program_signals, program_signals_p): New.
4228 (handle_general_set): Handle QProgramSignals.
4229 * server.h (program_signals, program_signals_p): Declare.
4230
e237a7e2
JK
42312012-03-05 Pedro Alves <palves@redhat.com>
4232 Jan Kratochvil <jan.kratochvil@redhat.com>
4233
4234 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4235 New comment why.
4236
5808517f
YQ
42372012-03-03 Yao Qi <yao@codesourcery.com>
4238
4239 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4240 agent_look_up_symbols.
4241
58b4daa5
YQ
42422012-03-03 Yao Qi <yao@codesourcery.com>
4243
4244 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4245 (linux-x86-low.o): Likewise.
4246 * server.h: Remove in_process_agent_loaded.
4247 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4248 common/agent.c.
4249 Update callers.
4250
8ffcbaaf
YQ
42512012-03-03 Yao Qi <yao@codesourcery.com>
4252
4253 * tracepoint.c (gdb_agent_capability): New global.
4254 (in_process_agent_loaded_ust): Renamed to
4255 `in_process_agent_supports_ust'.
4256 Update callers.
4257 (in_process_agent_supports_ust): Call agent_capability_check.
4258 (clear_installed_tracepoints): Assert that agent supports
4259 agent.
4260
d1feda86
YQ
42612012-03-03 Yao Qi <yao@codesourcery.com>
4262
4263 * linux-low.c (linux_supports_agent): New.
4264 (linux_target_ops): Initialize field `supports_agent' with
4265 linux_supports_agent.
4266 * target.h (struct target_ops) <supports_agent>: New.
4267 (target_supports_agent): New macro.
4268 * server.c (handle_general_set): Handle packet 'QAgent'.
4269 (handle_query): Send `QAgent+'.
4270 * Makefile.in (server.o): Depends on agent.h.
4271
2fa291ac
YQ
42722012-03-03 Yao Qi <yao@codesourcery.com>
4273
4274 * Makefile.in (OBS): Add agent.o.
4275 Add new rule for agent.o.
4276 Track dependence of tracepoint.c on agent.h.
4277 * tracepoint.c (run_inferior_command_1):
4278 (run_inferior_command): Call agent_run_command.
4279 (gdb_ust_connect_sync_socket): Deleted. Move it to
4280 common/agent.c.
4281 (resume_thread, stop_thread): Likewise.
4282 (gdb_ust_socket_init): Renamed to ...
4283 (gdb_agent_socket_init): ... New.
4284 (gdb_ust_thread): Renamed to ...
4285 (gdb_agent_helper_thread): ... New.
4286 (gdb_ust_init): Move some code to ...
4287 (gdb_agent_init): ... here. New.
4288 [HAVE_UST]: Call gdb_ust_init.
4289 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4290 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4291 * config.in, configure: Regenerated.
4292
05044653
PA
42932012-03-02 Pedro Alves <palves@redhat.com>
4294
4295 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4296 * linux-low.c (struct simple_pid_list): New.
4297 (stopped_pids): New a struct simple_pid_list pointer.
4298 (add_to_pid_list, pull_pid_from_list): New.
4299 (handle_extended_wait): Don't assume the first signal new children
4300 report is SIGSTOP. Adjust call to pull_pid_from_list.
4301 (linux_wait_for_lwp): Adjust.
4302
8d00225b
YQ
43032012-03-02 Yao Qi <yao@codesourcery.com>
4304
4305 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4306 debug log.
4307
19560ba5
YQ
43082012-03-02 Yao Qi <yao@codesourcery.com>
4309
4310 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4311 `stop_pc' and `tpoint'. Update caller.
4312
1faeff08
MR
43132012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4314
4315 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4316 * linux-low.c (use_linux_regsets): New macro.
4317 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4318 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4319 (linux_register_in_regsets): New function.
4320 (usr_fetch_inferior_registers): Skip registers covered by
4321 regsets.
4322 (usr_store_inferior_registers): Likewise.
4323 (usr_fetch_inferior_registers): New macro.
4324 (usr_store_inferior_registers): Likewise.
4325 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4326 (linux_store_registers): Likewise.
4327 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4328 prototype.
4329 (init_registers_mips64_dsp_linux): Likewise.
4330 (init_registers_mips_linux): New macro.
4331 (init_registers_mips_dsp_linux): Likewise.
4332 (mips_dsp_num_regs): Likewise.
4333 (DSP_BASE, DSP_CONTROL): New fallback macros.
4334 (mips_base_regs): New macro.
4335 (mips_regmap): Use it. Fix the size.
4336 (mips_dsp_regmap): New variable.
4337 (mips_dsp_regset_bitmap): Likewise.
4338 (mips_arch_setup): New function.
4339 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4340 than mips_regmap.
4341 (mips_cannot_store_register): Likewise.
4342 (the_low_target): Update .arch_setup, .num_regs and .regmap
4343 initializers. Add .regset_bitmap initializer.
4344 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4345 initializer.
4346 * linux-bfin-low.c (the_low_target): Likewise.
4347 * linux-cris-low.c (the_low_target): Likewise.
4348 * linux-crisv32-low.c (the_low_target): Likewise.
4349 * linux-ia64-low.c (the_low_target): Likewise.
4350 * linux-m32r-low.c (the_low_target): Likewise.
4351 * linux-m68k-low.c (the_low_target): Likewise.
4352 * linux-ppc-low.c (the_low_target): Likewise.
4353 * linux-s390-low.c (the_low_target): Likewise.
4354 * linux-sh-low.c (the_low_target): Likewise.
4355 * linux-sparc-low.c (the_low_target): Likewise.
4356 * linux-tic6x-low.c (the_low_target): Likewise.
4357 * linux-x86-low.c (the_low_target): Likewise.
4358 * linux-xtensa-low.c (the_low_target): Likewise.
4359 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4360 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4361 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4362 srv_xmlfiles.
4363 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4364 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4365
c03e6ccc
YQ
43662012-02-29 Yao Qi <yao@codesourcery.com>
4367 Pedro Alves <palves@redhat.com>
4368
4369 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4370 `step_over_finished' is true.
4371
644cebc9
PA
43722012-02-27 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4375 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4376
c14d7ab2
PA
43772012-02-27 Pedro Alves <palves@redhat.com>
4378
4379 PR server/9684
4380 * linux-low.c (pid_is_stopped): New.
4381 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4382
412c89dd
LM
43832012-02-25 Luis Machado <lgustavo@codesourcery.com>
4384
4385 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4386 of conditions.
4387
b745defe
MR
43882012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4389
4390 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4391
9f3a5c85
LM
43922012-02-24 Luis Machado <lgustavo@codesourcery>
4393
4394 * server.c (handle_query): Advertise support for target-side
4395 breakpoint condition evaluation.
4396 (process_point_options): New function.
4397 (process_serial_event): When inserting a breakpoint, check for
4398 a target-side condition that should be evaluated.
4399
4400 * mem-break.c: Include regcache.h and ax.h.
4401 (point_cond_list_t): New data structure.
4402 (breakpoint) <cond_list>: New field.
4403 (find_gdb_breakpoint_at): Make non-static.
4404 (delete_gdb_breakpoint_at): Clear any target-side
4405 conditions.
4406 (clear_gdb_breakpoint_conditions): New function.
4407 (add_condition_to_breakpoint): Likewise.
4408 (add_breakpoint_condition): Likewise.
4409 (gdb_condition_true_at_breakpoint): Likewise.
4410 (gdb_breakpoint_here): Return result directly instead
4411 of going through a local variable.
4412
4413 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4414 (clear_gdb_breakpoint_conditions): Likewise.
4415 (add_breakpoint_condition): Likewise.
4416 (gdb_condition_true_at_breakpoint): Likewise.
4417
4418 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4419 (need_step_over_p): Take target-side breakpoint condition into
4420 consideration.
4421
5e1dc496
LM
44222012-02-24 Luis Machado <lgustavo@codesourcery>
4423
4424 * server.h: Include tracepoint.h.
4425 (agent_mem_read, agent_get_trace_state_variable_value,
4426 agent_set_trace_state_variable_value,
4427 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4428 get_set_tsv_func_addr): New prototypes.
4429
4430 * ax.h: New include file.
4431 * ax.c: New source file.
4432
4433 * tracepoint.c: Include ax.h.
4434 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4435 agent_expr, eval_result_type): Move to ax.h.
4436 (parse_agent_expr): Rename to ...
4437 (gdb_parse_agent_expr): ... this, make it non-static and move
4438 to ax.h.
4439 (unparse_agent_expr) Rename to ...
4440 (gdb_unparse_agent_expr): ... this, make it non-static and move
4441 to ax.h.
4442 (eval_agent_expr): Rename to ...
4443 (eval_tracepoint_agent_expr): ... this.
4444 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4445 forward declarations.
4446 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4447 (agent_get_trace_state_variable_value): New function.
4448 (agent_set_trace_state_variable_value): New function.
4449 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4450 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4451 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4452 (condition_true_at_tracepoint): Likewise.
4453 (parse_agent_expr): Rename to ...
4454 (gdb_parse_agent_expr): ... this and move to ax.c.
4455 (unparse_agent_expr): Rename to ...
4456 (gdb_unparse_agent_expr): ... this and move to ax.c.
4457 (gdb_agent_op_name): Move to ax.c.
4458 (eval_agent_expr): Rename to ...
4459 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4460 and move to ax.c.
4461 (eval_tracepoint_agent_expr): New function.
4462 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4463 non-static.
5e1dc496
LM
4464 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4465 ax.c.
4466 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4467 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4468 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4469 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4470 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4471 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4472 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4473 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4474 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4475 (compile_bytecodes): Remove forward declaration.
4476 (is_goto_target): Move to ax.c.
4477 (compile_bytecodes): Move to ax.c and call
4478 agent_get_trace_state_variable_value (...) and
4479 agent_set_trace_state_variable_value (...).
4480
4481 * Makefile.in: Update ax.c and IPA dependencies.
4482
277e4e52
PA
44832012-02-24 Pedro Alves <palves@redhat.com>
4484
4485 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4486 (cmd_bigqtbuffer_circular): ... this. Only handle
4487 'QTBuffer:circular:'.
4488 (handle_tracepoint_general_set): Adjust.
4489
bf4c19f7
YQ
44902012-02-16 Yao Qi <yao@codesourcery.com>
4491
4492 * inferiors.c: Move code to ...
4493 * dll.c: .... here. New.
4494 * server.h: Declare clear_dlls.
4495 * Makefile.in (SFILES): Add dll.c.
4496 (OBS): Add dll.o
4497 (dll.o): New rule.
4498
d73f2619
YQ
44992012-02-11 Yao Qi <yao@codesourcery.com>
4500
4501 * server.c: (handle_monitor_command): Add a new parameter
4502 `own_buf'.
4503 (handle_query): Update caller.
4504
f8255c2a
JB
45052012-02-09 Joel Brobecker <brobecker@adacore.com>
4506
4507 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4508 * configure, config.in: Regenerate.
4509 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4510 is not defined.
4511
da84f473
PA
45122012-02-02 Pedro Alves <palves@redhat.com>
4513
4514 Try SIGKILL first, then PTRACE_KILL.
4515 * linux-low.c (linux_kill_one_lwp): New.
4516 (linux_kill_one_lwp): Rename to ...
4517 (kill_one_lwp_callback): ... this. Use the new
4518 linux_kill_one_lwp.
4519
e886a173
PA
45202012-02-02 Pedro Alves <palves@redhat.com>
4521
4522 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4523 inferior.
4524
be07f1a2
PA
45252012-01-27 Pedro Alves <palves@redhat.com>
4526
4527 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4528 (elf_64_file_p): Make static.
4529 (linux_pid_exe_is_elf_64_file): New.
4530 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4531 Delete declarations.
4532 (linux_pid_exe_is_elf_64_file): Declare.
4533 * linux-x86-low.c (x86_arch_setup): Use
4534 linux_pid_exe_is_elf_64_file.
4535
d8301ad1
JK
45362012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4537
4538 * linux-low.c (linux_wait_for_event_1): Rename to ...
4539 (linux_wait_for_event): ... here and merge it with former
4540 linux_wait_for_event - new variable wait_ptid, use it.
4541 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4542
01b17894
PA
45432012-01-23 Pedro Alves <palves@redhat.com>
4544
4545 * server.c (main): Avoid yet another case of infinite loop while
4546 detaching/killing after a longjmp.
4547
e825046f
JK
45482012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4549
4550 Code cleanup.
4551 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4552
b9e7b9c3
UW
45532012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4554
4555 * hostio.c (handle_readlink): New function.
4556 (handle_vFile): Call it to handle "vFile:readlink" packets.
4557
901f9912
UW
45582012-01-20 Pedro Alves <palves@redhat.com>
4559 Ulrich Weigand <ulrich.weigand@linaro.org>
4560
4561 * server.c (handle_v_requests): Only support vAttach and vRun to
4562 start multiple processes when in extended protocol mode.
4563
fc1ab1a0
PA
45642012-01-17 Pedro Alves <palves@redhat.com>
4565
4566 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4567 memalign plus mprotect to allocate the scratch buffer.
4568
7d5d4e98
PA
45692012-01-13 Pedro Alves <palves@redhat.com>
4570
4571 * server.c (attach_inferior): Clear `cont_thread'.
4572
f128d5e9
PA
45732012-01-13 Pedro Alves <palves@redhat.com>
4574
4575 * server.c (main): Avoid infinite loop while detaching/killing
4576 after a longjmp.
4577
06db92f0
DE
45782012-01-09 Doug Evans <dje@google.com>
4579
4580 * server.c (start_inferior): Set last_ptid in --wrapper case.
4581
32d92999
YQ
45822012-01-06 Yao Qi <yao@codesourcery.com>
4583
4584 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4585 defined.
4586 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4587
5e0a92a9
YQ
45882012-01-04 Yao Qi <yao@codesourcery.com>
4589
4590 * tracepoint.c (cmd_qtdp): Print debug message
4591 for static tracepoint.
4592
ae639e8c
YQ
45932012-01-04 Yao Qi <yao@codesourcery.com>
4594
4595 * tracepoint.c (trace_vdebug): Differentiate debug message
4596 between gdbserver and IPA.
4597
f72429c5
YQ
45982012-01-03 Yao Qi <yao@codesourcery.com>
4599
4600 * tracepoint.c (tracepoint_was_hit): Don't collect for
4601 static tracepoint.
4602
12c3e59c
JB
46032012-01-02 Joel Brobecker <brobecker@adacore.com>
4604
4605 * terminal.h: Reformat copyright header.
4606
67827812
JB
46072012-01-02 Joel Brobecker <brobecker@adacore.com>
4608
4609 * server.c (gdbserver_version): Update copyright year.
4610 * gdbreplay.c (gdbreplay_version): Likewise.
4611
3e52c33d
JK
46122011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4613
4614 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4615
4616 Revert:
4617 2011-12-18 Hui Zhu <teawater@gmail.com>
4618 * linux-low.c (linux_create_inferior): Save return value to ret.
4619
66f1260e
HZ
46202011-12-18 Hui Zhu <teawater@gmail.com>
4621
4622 * linux-low.c (linux_create_inferior): Save return value to ret.
4623
e77616d7
DE
46242011-12-16 Doug Evans <dje@google.com>
4625
e7b06c57
DE
4626 * linux-low.c (linux_create_inferior): If stdio connection,
4627 redirect stdin from /dev/null, stdout to stderr.
4628 * remote-utils.c (remote_is_stdio): New static global.
4629 (remote_connection_is_stdio): New function.
4630 (remote_prepare): Handle stdio connection.
4631 (remote_open): Ditto.
4632 (remote_close): Don't close stdin for stdio connections.
4633 (read_prim,write_prim): New functions. Replace all calls to
4634 read/write to these.
4635 * server.c (main): Watch for "-" argument. Move call to
4636 remote_prepare before start_inferior.
4637 * server.h (STDIO_CONNECTION_NAME): New macro.
4638 (remote_connection_is_stdio): Declare.
4639
e77616d7
DE
4640 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4641 in debugging output.
4642
82067193
YQ
46432011-12-15 Yao Qi <yao@codesourcery.com>
4644
4645 * tracepoint.c: Include sys/syscall.h.
4646 (gdb_ust_thread): Remove preprocessor conditional.
4647
82bfbe7e
PA
46482011-12-14 Pedro Alves <pedro@codesourcery.com>
4649
4650 * linux-low.c (linux_detach_one_lwp): Call
4651 the_low_target.prepare_to_resume before detaching.
4652
712c6575
YQ
46532011-12-14 Yao Qi <yao@codesourcery.com>
4654
4655 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4656 of write.
4657
d54d1edf
YQ
46582011-12-14 Yao Qi <yao@codesourcery.com>
4659
4660 * i386-low.c (i386_low_stopped_data_address): Initialize local
4661 variable `control'.
4662
6210a125
PA
46632011-12-13 Pedro Alves <pedro@codesourcery.com>
4664
4665 PR remote/13492
4666
4667 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4668 DR_CONTROL unless necessary. Extend comments.
4669 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4670 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4671
2ece8244
YQ
46722011-12-13 Yao Qi <yao@codesourcery.com>
4673
4674 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4675 macros.
4676 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4677
784867a5
JK
46782011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4679
4680 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4681 Print new debug message for such case.
4682
6bf36717
JK
46832011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4684
4685 Fix overlapping memcpy.
4686 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4687 the read_inferior_memory transfer.
4688 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4689 write_inferior_memory transfer.
4690 (set_fast_tracepoint_jump): New variable buf. Use it for the
4691 read_inferior_memory and write_inferior_memory transfers.
4692 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4693 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4694 Use it for the write_inferior_memory transfer.
4695 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4696 buffers.
4697
50275556
MR
46982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4699
4700 * linux-low.c (fetch_register, store_register): Make code
4701 consistent, fix formatting.
4702
7325beb4
MR
47032011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4704
4705 * linux-low.c (usr_store_inferior_registers): Factor out code
4706 to handle individual registers into...
4707 (store_register): ... this new function.
4708
c642a434
UW
47092011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4710
4711 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4712 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4713 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4714 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4715 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4716 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4717 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4718 (srv_xmlfiles): Add new XML files.
4719
4720 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4721 and <sys/uio.h>.
4722 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4723 (init_registers_s390_linux32v1): Add prototype.
4724 (init_registers_s390_linux32v2): Likewise.
4725 (init_registers_s390_linux64v1): Likewise.
4726 (init_registers_s390_linux64v2): Likewise.
4727 (init_registers_s390x_linux64v1): Likewise.
4728 (init_registers_s390x_linux64v2): Likewise.
4729 (s390_num_regs): Increment to 52.
4730 (s390_regmap): Add orig_r2 register.
4731 (s390_num_regs_3264): Increment to 68.
4732 (s390_regmap_3264): Add orig_r2 register.
4733 (s390_collect_ptrace_register): Handle orig_r2 register.
4734 (s390_supply_ptrace_register): Likewise.
4735 (s390_fill_last_break): New function.
4736 (s390_store_last_break): Likewise.
4737 (s390_fill_system_call): New function.
4738 (s390_store_system_call): Likewise.
4739 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4740 register sets.
4741 (s390_check_regset): New function.
4742 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4743 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4744 Update target_regsets for available register sets.
4745
2268b414
JK
47462011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4747 Jan Kratochvil <jan.kratochvil@redhat.com>
4748
4749 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4750 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4751 New.
4752 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4753 * linux-low.h (struct process_info_private): New member r_debug.
4754 * server.c (handle_qxfer_libraries): Call
4755 the_target->qxfer_libraries_svr4.
4756 (handle_qxfer_libraries_svr4): New function.
4757 (qxfer_packets): New entry "libraries-svr4".
4758 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4759 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4760 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4761 PACKET_qXfer_libraries_svr4.
4762
d6db1fab
UW
47632011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4764
4765 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4766 PSW address/mask between 8-byte and 16-byte formats.
4767 (s390_supply_ptrace_register): Likewise.
4768 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4769 basic addressing mode bit.
4770
242f5f1c
SS
47712011-11-24 Stan Shebs <stan@codesourcery.com>
4772
4773 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4774
f196051f
SS
47752011-11-17 Stan Shebs <stan@codesourcery.com>
4776
4777 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4778 (tracing_start_time): New global.
4779 (tracing_stop_time): New global.
4780 (tracing_user_name): New global.
4781 (tracing_notes): New global.
4782 (tracing_stop_note): New global.
4783 (cmd_qtstart): Set traceframe_usage, start_time.
4784 (stop_tracing): Set stop_time.
4785 (cmd_qtstatus): Report additional status.
4786 (cmd_qtp): New function.
4787 (handle_tracepoint_query): Call it.
4788 (cmd_qtnotes): New function.
4789 (handle_tracepoint_general_set): Call it.
4790 (get_timestamp): Rename from tsv_get_timestamp.
4791
405f8e94
SS
47922011-11-14 Stan Shebs <stan@codesourcery.com>
4793 Kwok Cheung Yeung <kcy@codesourcery.com>
4794
4795 * linux-x86-low.c (small_jump_insn): New.
4796 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4797 trampoline and error message, build a trampoline and issue a small
4798 jump instruction to it.
4799 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4800 trampoline and error message.
4801 (x86_get_min_fast_tracepoint_insn_len): New.
4802 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4803 * linux-low.h (struct linux_target_ops): Add arguments to
4804 install_fast_tracepoint_jump_pad operation, add new operation.
4805 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4806 arguments.
4807 (linux_get_min_fast_tracepoint_insn_len): New function.
4808 (linux_target_op): Add new operation.
4809 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4810 (gdb_trampoline_buffer_end): Ditto.
4811 (gdb_trampoline_buffer_error): Ditto.
4812 (struct ipa_sym_addresses): Add fields for new IPA variables.
4813 (symbol_list): Add entries for new IPA variables.
4814 (struct tracepoint): Add fields to hold the address range of the
4815 trampoline used by the tracepoint.
4816 (trampoline_buffer_head): New static variable.
4817 (trampoline_buffer_tail): Ditto.
4818 (claim_trampoline_space): New function.
4819 (have_fast_tracepoint_trampoline_buffer): New function.
4820 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4821 structure.
4822 (install_fast_tracepoint): Ditto, also add error buffer argument.
4823 (cmd_qtminftpilen): New function.
4824 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4825 (fast_tracepoint_from_trampoline_address): New function.
4826 (fast_tracepoint_collecting): Handle trampoline as part of jump
4827 pad space.
4828 (set_trampoline_buffer_space): New function.
4829 (initialize_tracepoint): Initialize new IPA variables.
4830 * target.h (struct target_ops): Add arguments to
4831 install_fast_tracepoint_jump_pad operation, add new
4832 get_min_fast_tracepoint_insn_len operation.
4833 (target_get_min_fast_tracepoint_insn_len): New.
4834 (install_fast_tracepoint_jump_pad): Add arguments.
4835 * server.h (IPA_BUFSIZ): Define.
4836 * linux-i386-ipa.c: Include extra header files.
4837 (initialize_fast_tracepoint_trampoline_buffer): New function.
4838 (initialize_low_tracepoint): Call it.
4839 * server.h (set_trampoline_buffer_space): Declare.
4840 (claim_trampoline_space): Ditto.
4841 (have_fast_tracepoint_trampoline_buffer): Ditto.
4842
1e4d1764
YQ
48432011-11-14 Yao Qi <yao@codesourcery.com>
4844
4845 * server.c (handle_query): Handle InstallInTrace for qSupported.
4846 * tracepoint.c (add_tracepoint): Sort list.
4847 (install_tracepoint, download_tracepoint): New.
4848 (cmd_qtdp): Call them to install and download tracepoints.
4849 (sort_tracepoints): Removed.
4850 (cmd_qtstart): Update.
4851
5c73ff4e
YQ
48522011-11-14 Yao Qi <yao@codesourcery.com>
4853
4854 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4855 * mem-break.h: Declare.
4856 * tracepoint.c (cmd_qtstart): Move some code to ...
4857 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4858 New.
4859 (download_tracepoints): Move some code to ...
4860 (download_tracepoint_1): ... here. New.
4861
86a30030
YQ
48622011-11-08 Yao Qi <yao@codesourcery.com>
4863
4864 * remote-utils.c (relocate_instruction): A comment fix.
4865
8d26e50c
JB
48662011-11-07 Joel Brobecker <brobecker@adacore.com>
4867
4868 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4869 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4870 dr_status_mirror and dr_control_mirror from debug_reg_state.
4871 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4872 (i386_initial_stuff): Remove use of deleted globals.
4873 (i386_get_thread_context, i386_set_thread_context,
4874 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4875 from debug_reg_state.
4876
a59306a3
YQ
48772011-11-05 Yao Qi <yao@codesourcery.com>
4878
4879 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4880 address as TPOINT's.
4881
3065dfb6
SS
48822011-11-02 Stan Shebs <stan@codesourcery.com>
4883
4884 * tracepoint.c (agent_mem_read_string): New function.
4885 (eval_agent_expr): Call it for tracenz.
4886 * server.c (handle_query): Report support for tracenz.
4887
fd0d8c7c
YQ
48882011-11-02 Yao Qi <yao@codesourcery.com>
4889
4890 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4891
609086b1
YQ
48922011-11-02 Yao Qi <yao@codesourcery.com>
4893
4894 * target.h: Fix a typo in comment.
4895
b9fd1791
PA
48962011-10-31 Pedro Alves <pedro@codesourcery.com>
4897
4898 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4899 clobber the breakpoints' shadows with fast tracepoint jumps.
4900 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4901 * target.c (write_inferior_memory): Also pass MYADDR down to
4902 check_mem_write.
4903
03583c20
UW
49042011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4905
4906 * configure.ac: Check support for personality routine.
4907 * configure: Regenerate.
4908 * config.in: Likewise.
4909 * linux-low.c: Include <sys/personality.h>.
4910 Define ADDR_NO_RANDOMIZE if necessary.
4911 (linux_create_inferior): Disable address space randomization when
4912 forking inferior, if requested.
4913 (linux_supports_disable_randomization): New function.
4914 (linux_target_ops): Install it.
4915 * server.h (disable_randomization): Declare.
4916 * server.c (disable_randomization): New global variable.
4917 (handle_general_set): Handle QDisableRandomization.
4918 (handle_query): Likewise for qSupported.
4919 (main): Support --disable-randomization and --no-disable-randomization
4920 command line arguments.
4921 * target.h (struct target_ops): Add supports_disable_randomization.
4922 (target_supports_disable_randomization): New macro.
4923
723b724b
MF
49242011-09-29 Mike Frysinger <vapier@gentoo.org>
4925
4926 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4927 ifdef check.
4928 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4929 [!PT_GETDSBT] (target_loadmap): New definition.
4930 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4931 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4932 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4933 and PT_GETDSBT to LINUX_LOADMAP.
4934 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4935 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4936
55329a5c 49372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4938
4939 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4940 (arm_linux_hwbp_cap): New static variable.
4941 (arm_linux_get_hwbp_cap): Replace by ...
4942 (arm_linux_init_hwbp_cap): ... this new function.
4943 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4944 (arm_linux_get_hw_watchpoint_count): Likewise.
4945 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4946 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4947 (arm_prepare_to_resume): Use perror_with_name instead of error.
4948
55329a5c 49492011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4950
4951 * linux-arm-low.c: Include <signal.h>.
4952 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4953 (struct arm_linux_hwbp_cap): New data type.
4954 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4955 (struct arm_linux_hw_breakpoint): New data type.
4956 (MAX_BPTS, MAX_WPTS): Define.
4957 (struct arch_process_info, struct arch_lwp_info): New data types.
4958 (arm_linux_get_hwbp_cap): New function.
4959 (arm_linux_get_hw_breakpoint_count): Likewise.
4960 (arm_linux_get_hw_watchpoint_count): Likewise.
4961 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4962 (arm_hwbp_control_initialize): Likewise.
4963 (arm_hwbp_control_is_enabled): Likewise.
4964 (arm_hwbp_control_is_initialized): Likewise.
4965 (arm_hwbp_control_disable): Likewise.
4966 (arm_linux_hw_breakpoint_equal): Likewise.
4967 (arm_linux_hw_point_initialize): Likewise.
4968 (struct update_registers_data): New data structure.
4969 (update_registers_callback: New function.
4970 (arm_insert_point): Likewise.
4971 (arm_remove_point): Likewise.
4972 (arm_stopped_by_watchpoint): Likewise.
4973 (arm_stopped_data_address): Likewise.
4974 (arm_new_process): Likewise.
4975 (arm_new_thread): Likewise.
4976 (arm_prepare_to_resume): Likewise.
4977 (the_low_target): Register arm_insert_point, arm_remove_point,
4978 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4979 arm_new_thread, and arm_prepare_to_resume.
4980
6b9801d4
SS
49812011-09-15 Stan Shebs <stan@codesourcery.com>
4982
4983 * server.h (struct emit_ops): Add compare-goto fields.
4984 * tracepoint.c (gdb_agent_op_sizes): New table.
4985 (emit_eq_goto): New function.
4986 (emit_ne_goto): New function.
4987 (emit_lt_goto): New function.
4988 (emit_le_goto): New function.
4989 (emit_gt_goto): New function.
4990 (emit_ge_goto): New function.
4991 (is_goto_target): New function.
4992 (compile_bytecodes): Recognize special cases of compare-goto
4993 combinations and call specialized emitters for them.
4994 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4995 (amd64_emit_ne_goto): New function.
4996 (amd64_emit_lt_goto): New function.
4997 (amd64_emit_le_goto): New function.
4998 (amd64_emit_gt_goto): New function.
4999 (amd64_emit_ge_goto): New function.
5000 (amd64_emit_ops): Add the new functions.
5001 (i386_emit_eq_goto): New function.
5002 (i386_emit_ne_goto): New function.
5003 (i386_emit_lt_goto): New function.
5004 (i386_emit_le_goto): New function.
5005 (i386_emit_gt_goto): New function.
5006 (i386_emit_ge_goto): New function.
5007 (i386_emit_ops): Add the new functions.
5008
bf15cbda
SS
50092011-09-08 Stan Shebs <stan@codesourcery.com>
5010
5011 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5012 (i386_emit_epilogue): Restore %ebx.
5013
943ca1dd
JZ
50142011-08-31 Jie Zhang <jzhang918@gmail.com>
5015
5016 * server.c (step_thread): Remove definition.
5017 (process_serial_event): Don't handle Hs.
5018 * server.h (step_thread): Remove declaration.
5019 * target.c (set_desired_inferior): Remove use of step_thread.
5020
e3deef73
LM
50212011-08-24 Luis Machado <lgustavo@codesourcery.com>
5022
5023 * linux-low.c: Include linux-procfs.h.
5024 (linux_attach_lwp_1): Update comments.
5025 (linux_attach): Scan for existing threads when attaching to a
5026 process that is the tgid.
5027 * Makefile.in: Update dependencies.
5028
13da1c97
LM
50292011-08-24 Luis Machado <lgustavo@codesourcery.com>
5030
5031 * configure.srv: Add linux-procfs.o dependencies.
5032
881127c9
YQ
50332011-08-14 Yao Qi <yao@codesourcery.com>
5034
5035 * target.h (struct target_ops): Fix indent.
5036 * win32-low.c (win32_target_ops): Fix comment.
5037
58dbd541
YQ
50382011-08-14 Andrew Jenner <andrew@codesourcery.com>
5039 Yao Qi <yao@codesourcery.com>
5040
5041 * Makefile.in (clean): Remove tic6x-*.c files.
5042 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5043 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5044 (tic6x-c64xp-linux.c): Likewise.
5045 * configure.srv: Add support for tic6x-*-uclinux.
5046 * linux-tic6x-low.c: New.
5047 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5048
78d85199
YQ
50492011-08-14 Andrew Stubbs <ams@codesourcery.com>
5050 Yao Qi <yao@codesourcery.com>
5051
5052 * target.h (struct target_ops): Add read_loadmap.
5053 * linux-low.c (struct target_loadseg): New type.
5054 (struct target_loadmap): New type.
5055 (linux_read_loadmap): New function.
5056 (linux_target_ops): Add linux_read_loadmap.
5057 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5058 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5059 to NULL.
78d85199 5060
a959a88d
EZ
50612011-08-05 Eli Zaretskii <eliz@gnu.org>
5062
5063 * win32-low.c: Include <stdint.h>.
5064
1ced966e
PA
50652011-07-22 Pedro Alves <pedro@codesourcery.com>
5066
5067 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5068 to the inferior here.
5069 (i386_remove_aligned_watchpoint): Ditto.
5070 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5071 fit part of the watchpoint in the debug registers.
5072 (i386_update_inferior_debug_regs): New.
5073 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5074 registers, and only update the inferior on success.
5075 (i386_low_remove_watchpoint): Ditto.
5076
d26e3629
KY
50772011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5078
5079 * linux-low.c (compare_ints, unique, list_threads, show_process,
5080 linux_core_of_thread): Delete.
5081 (linux_target_ops): Change linux_core_of_thread to
5082 linux_common_core_of_thread.
5083 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5084 * utils.c (malloc_failure): Change type of argument.
5085 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5086 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5087 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5088 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5089 (IPA_OBJS): Add common-utils-ipa.o.
5090 (ptid_h, linux_osdata_h): New macros.
5091 (server_h): Add common/common-utils.h, common/xml-utils.h,
5092 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5093 common/ptid.h.
5094 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5095 ptid.o, buffer.o): New rules.
5096 (linux-low.o): Add common/linux-osdata.h as a dependency.
5097 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5098 * configure.ac: Add AC_HEADER_DIRENT check.
5099 * config.in: Regenerate.
5100 * configure: Regenerate.
5101 * remote-utils.c (xml_escape_text): Delete.
5102 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5103 buffer_xml_printf): Move to common/buffer.c.
5104 * server.c (main): Remove call to initialize_inferiors.
5105 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5106 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5107 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5108 internal_error, gdb_assert, gdb_assert_fail): Delete.
5109 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5110 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5111 common/buffer.h.
5112 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5113 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5114 initialize_inferiors): Delete.
5115
2275a1a7
PA
51162011-07-20 Pedro Alves <pedro@codesourcery.com>
5117
5118 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5119 symbol error.
5120
0a5b1e09
PA
51212011-05-31 Pedro Alves <pedro@codesourcery.com>
5122
5123 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5124 assertion.
5125 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5126
6938fd34
YQ
51272011-05-26 Yao Qi <yao@codesourcery.com>
5128
5129 * Makefile.in (thread-db.o): Track dependence to
5130 common/gdb_thread_db.h.
5131 * thread-db.c: include gdb_thread_db.h from right place.
5132
b481f9e0
TT
51332011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5134
5135 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5136 __FILE__ and __LINE__ to internal_error.
5137
98a5dd13
DE
51382011-05-13 Doug Evans <dje@google.com>
5139
5140 * thread-db.c (try_thread_db_load_from_sdir): New function.
5141 (try_thread_db_load_from_dir): New function.
5142 (thread_db_load_search): Handle $sdir, ignore $pdir.
5143 Remove trying of system directories if search of
5144 libthread-db-search-path fails, that is now done via $sdir.
5145
d248b706
KY
51462011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5147
5148 * server.c (handle_query): Add EnableDisableTracepoints to the list
5149 of supported features.
43aaf8b6 5150 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5151 tracepoints.
43aaf8b6
PA
5152 (cmd_qtenable_disable): New.
5153 (cmd_qtstart): Install tracepoints even if disabled.
5154 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5155 receiving a QTEnable or QTDisable packet.
5156 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5157 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5158 tracepoints.
5159 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5160
84e578fb
DE
51612011-05-10 Doug Evans <dje@google.com>
5162
5163 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5164
71f55dd8
DE
51652011-05-04 Doug Evans <dje@google.com>
5166
5167 * linux-low.c (linux_join): Skip process lookup.
5168 * spu-low.c (spu_join): Ditto.
5169 * server.c (join_inferiors_callback): Delete.
5170 (process_serial_event): For 'D' packet (detach) call join_inferior
5171 directly.
5172
4d393d60
JM
51732011-05-04 Joseph Myers <joseph@codesourcery.com>
5174
5175 * README: Don't mention xscale*-*-linux*.
5176 * configure.srv (xscale*-*-linux*): Don't handle target.
5177
b00ad6ff
NF
51782011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5179
5180 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5181 casting pointers.
5182 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5183 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5184 (i386_emit_void_call_2): Likewise.
5185
af96c192
YQ
51862011-04-26 Yao Qi <yao@codesourcery.com>
5187
43aaf8b6
PA
5188 * linux-low.c: Move common macros to linux-ptrace.h.
5189 Include linux-ptrace.h.
af96c192
YQ
5190 * Makefile.in (linux_ptrace_h): New.
5191 (linux-low.o): Depends on linux-ptrace.h.
5192
03f2bd59
JK
51932011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5194
5195 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5196 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5197 (remote_prepare): New function with most of the TCP code from ...
5198 (remote_open): ... here. Detect PORT here unconditionally. Move also
5199 setting transport_is_reliable.
5200 * server.c (run_once): New variable.
5201 (gdbserver_usage): Document it.
5202 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5203 the first run if RUN_ONCE.
5204 * server.h (run_once, remote_prepare): New declarations.
5205
7a9dd1b2
TT
52062011-04-19 Tom Tromey <tromey@redhat.com>
5207
5208 * win32-low.c (handle_load_dll): Remove duplicate "the".
5209
81239425
PM
52102011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5211
5212 Remove support for old Cygwin 1.5 versions.
5213 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5214 function to avoid warning.
5215 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5216 warning.
5217
9e0627f1
PM
52182011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5219
5220 * gdbserver/server.h (Macro _): Define it if not available.
5221
588eebee
MS
52222011-03-14 Michael Snyder <msnyder@vmware.com>
5223
348af9f7 5224 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5225
43f70d4c
JB
52262011-03-10 Joel Brobecker <brobecker@adacore.com>
5227
5228 * Makefile.in (maintainer-clean realclean distclean): Remove
5229 "make ... subdir_do" command.
5230
348af9f7
MS
52312011-03-10 Michael Snyder <msnyder@vmware.com>
5232
5233 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5234
5235 * server.c (handle_v_run): Free alloced buffer on early return.
5236
e637a4f5
YQ
52372011-03-09 Yao Qi <yao@codesourcery.com>
5238
5239 Revert:
5240 2011-03-04 Yao Qi <yao@codesourcery.com>
5241
5242 * Makefile.in: Remove GNU make feature --directory.
5243
5244 2011-03-05 Yao Qi <yao@codesourcery.com>
5245
5246 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5247 (subdir_do): New make target. Copied from gdb/Makefile.
5248 (maintainer-clean, realclean, distclean, clean): Call corresponding
5249 make targets in common/Makefile.
5250
5251 2011-02-11 Yao Qi <yao@codesourcery.com>
5252
5253 * configure.ac: Call AC_PROG_RANLIB.
5254 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5255 * configure: Regenerate.
5256
e6edda56
JK
52572011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5258
5259 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5260
e5141119
JB
52612011-03-06 Yao Qi <yao@codesourcery.com>
5262
5263 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5264
64794aa4
JB
52652011-03-05 Yao Qi <yao@codesourcery.com>
5266
5267 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5268 (subdir_do): New make target. Copied from gdb/Makefile.
5269 (maintainer-clean, realclean, distclean, clean): Call corresponding
5270 make targets in common/Makefile.
5271
7a762829
YQ
52722011-03-04 Yao Qi <yao@codesourcery.com>
5273
5274 * Makefile.in: Remove GNU make feature --directory.
5275
348af9f7
MS
52762011-03-04 Michael Snyder <msnyder@vmware.com>
5277
5278 * server.c (queue_stop_reply): Call xmalloc not malloc.
5279
52802011-03-02 Michael Snyder <msnyder@vmware.com>
5281
5282 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5283
9f72fee2
MS
52842011-02-28 Michael Snyder <msnyder@vmware.com>
5285
588eebee
MS
5286 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5287 (cmd_qtframe): Ditto.
5288 (cmd_qtbuffer): Ditto.
5289 (cmd_bigqtbuffer): Ditto.
5290
9f72fee2
MS
5291 * utils.c (decimal2str): Initialize 'width' to nine, then
5292 don't mess with it.
5293
8040bd49
UW
52942011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5295
5296 * hostio.c (require_data): Free *data, not data.
5297
7e52cbd0
JK
52982011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5299
5300 * hostio.c (require_data): Use free, not xfree.
5301
9130f83e
MS
53022011-02-27 Michael Snyder <msnyder@vmware.com>
5303
4b812f4e
MS
5304 * server.c (handle_query): Discard unused value.
5305
9130f83e
MS
5306 * hostio.c (require_data): Free malloc memory before returning
5307 error.
5308
69d37113
MS
53092011-02-26 Michael Snyder <msnyder@vmware.com>
5310
5311 * linux-low.c (list_threads): Call closedir for dirent.
5312
35f5825a
MS
53132011-02-27 Michael Snyder <msnyder@vmware.com>
5314
2a589cef
MS
5315 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5316 a case statement falls through.
5317
0adea5f7
MS
5318 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5319
35f5825a
MS
5320 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5321 in comparison.
5322
238f1c74
MS
53232011-02-26 Michael Snyder <msnyder@vmware.com>
5324
5325 * utils.c (decimal2str): Eliminate dead code and dead param.
5326 (pulongest): Drop dead param from call to decimal2str.
5327 (plongest): Ditto.
5328
633ff500
JB
53292011-02-24 Joel Brobecker <brobecker@adacore.com>
5330
5331 Revert the following patch (not approved yet):
5332 2011-02-21 Hui Zhu <teawater@gmail.com>
5333 * tracepoint.c (tp_printf): New function.
5334 (eval_agent_expr): Handle gdb_agent_op_printf.
5335
f9c6ff72
HZ
53362011-02-21 Hui Zhu <teawater@gmail.com>
5337
5338 * tracepoint.c (tp_printf): New function.
5339 (eval_agent_expr): Handle gdb_agent_op_printf.
5340
94d5e490
TT
53412011-02-18 Tom Tromey <tromey@redhat.com>
5342
5343 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5344 (tracepoint.o): Likewise.
5345 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5346 (gdb_agent_op_names): Likewise.
5347
c7f96d2b
TT
53482011-02-18 Tom Tromey <tromey@redhat.com>
5349
5350 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5351 gdb_agent_op_rot>: New constants.
5352 (gdb_agent_op_names): Add pick and roll.
5353 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5354 cases.
5355
0feedb2c
JK
53562011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5357
5358 * aclocal.m4: Regenerated with aclocal-1.11.1.
5359
b3b9301e
PA
53602011-02-14 Pedro Alves <pedro@codesourcery.com>
5361
5362 * server.c (handle_qxfer_traceframe_info): New.
5363 (qxfer_packets): Register "traceframe-info".
5364 (handle_query): Report support for qXfer:traceframe-info:read+.
5365 * tracepoint.c (match_blocktype): New.
5366 (traceframe_find_block_type): Rename to ...
5367 (traceframe_walk_blocks): ... this. Add callback filter argument,
5368 and use it.
5369 (traceframe_find_block_type): New, reimplemented on top of
5370 traceframe_walk_blocks.
5371 (build_traceframe_info_xml): New.
5372 (traceframe_read_info): New.
5373 * server.h (traceframe_read_info): Declare.
5374
4f3e6fb7
YQ
53752011-02-11 Yao Qi <yao@codesourcery.com>
5376
5377 * configure.ac: Call AC_PROG_RANLIB.
5378 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5379 * configure: Regenerate.
5380
764880b7
PA
53812011-02-07 Pedro Alves <pedro@codesourcery.com>
5382
5383 * server.c (gdb_read_memory): Change return semantics to allow
5384 partial transfers.
5385 (handle_search_memory_1): Adjust.
5386 (process_serial_event) <'m' packet>: Handle partial transfers.
5387 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5388
1c79eb8a
PA
53892011-01-28 Pedro Alves <pedro@codesourcery.com>
5390
5391 * regcache.c (init_register_cache): Initialize
5392 regcache->register_status.
5393 (free_register_cache): Release regcache->register_status.
5394 (regcache_cpy): Copy register_status.
5395 (registers_to_string): Print 'x's for unavailable registers.
5396 (supply_register): Mark the register's status valid or
5397 unavailable, depending on whether a buffer was passed in or not.
5398 (supply_register_zeroed): New.
5399 (supply_regblock): Mark the registers' status valid or
5400 unavailable, depending on whether a buffer was passed in or not.
5401 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5402 (struct regcache): New `register_status' field.
5403 (supply_register_zeroed): Declare.
5404 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5405 supply_register_zeroed, rather than passing a NULL buffer to
5406 supply_register.
5407 * tracepoint.c (fetch_traceframe_registers): Update comment.
5408
85724a0e
PA
54092011-01-28 Pedro Alves <pedro@codesourcery.com>
5410
5411 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5412 buffer explicit.
5413
d08aafef
PA
54142011-01-25 Pedro Alves <pedro@codesourcery.com>
5415
5416 * server.h (decode_xfer_write): Change prototype.
5417 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5418 and don't extract the annex here.
5419 * server.c (decode_xfer_read): Remove `annex' parameter,
5420 and don't extract the annex here.
5421 (decode_xfer): New.
5422 (struct qxfer): New.
5423 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5424 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5425 (handle_qxfer_statictrace): New functions, abstracted out from
5426 handle_query, and made to use the struct qxfer interface.
5427 (handle_threads_qxfer_proper): Rename to ...
5428 (handle_qxfer_threads_proper): ... this.
5429 (handle_threads_qxfer): Rename to ...
5430 (handle_qxfer_threads): ... this. Adjust.
5431 (qxfer_packets): New array.
5432 (handle_qxfer): New function.
5433 (handle_query): Use handle_qxfer.
5434
493e2a69
MS
54352011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5436
5437 * gdbreplay.c: Shorten lines of >= 80 columns.
5438 * linux-low.c: Ditto.
5439 * linux-ppc-low.c: Ditto.
5440 * linux-s390-low.c: Ditto.
5441 * linux-sparc-low.c: Ditto.
5442 * linux-x86-low.c: Ditto.
5443 * linux-xtensa-low.c: Ditto.
5444 * mem-break.c: Ditto.
5445 * nto-low.c: Ditto.
5446 * regcache.h: Ditto.
5447 * remote-utils.c: Ditto.
5448 * server.c: Ditto.
5449 * server.h: Ditto.
5450 * thread-db.c: Ditto.
5451 * tracepoint.c: Ditto.
5452 * utils.c: Ditto.
5453 * win32-low.h: Ditto.
5454
44944448
JB
54552011-01-05 Joel Brobecker <brobecker@adacore.com>
5456
5457 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5458 update.
5459
71ce852c
JB
54602011-01-01 Joel Brobecker <brobecker@adacore.com>
5461
5462 * server.c (gdbserver_version): Update copyright year in version
5463 output.
5464 * gdbreplay.c (gdbreplay_version): Ditto.
5465
eb826dc6
MF
54662010-12-29 Jie Zhang <jie.zhang@analog.com>
5467
5468 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5469 * linux-bfin-low.c: New file.
5470 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5471 PT_DATA_ADDR for BFIN targets.
5472 * Makefile.in (SFILES): Add linux-bfin-low.c.
5473 (clean): Remove reg-bfin.c.
5474 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5475 * README: Mention supported Blackfin targets.
5476
39ab222a
MF
54772010-12-23 Mike Frysinger <vapier@gentoo.org>
5478
5479 * .gitignore: New file.
5480
a1f2ce7d
MF
54812010-11-16 Mike Frysinger <vapier@gentoo.org>
5482
5483 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5484
f474844c
JZ
54852010-10-22 Jie Zhang <jie@codesourcery.com>
5486
5487 * Makefile.in: Add FLAGS_TO_PASS variable.
5488 (install): Remove dependency of install-only and recursively
5489 invoke make for install-only.
5490
f1048712
DE
54912010-10-04 Doug Evans <dje@google.com>
5492
5493 * Makefile.in (uninstall): Use $(DESTDIR).
5494
b53a1623
PA
54952010-09-24 Pedro Alves <pedro@codesourcery.com>
5496
e6ee044d
PA
5497 PR gdb/11842
5498
b53a1623
PA
5499 * linux-x86-low.c (compat_siginfo_from_siginfo)
5500 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5501 si_code is < 0. Check for si_code == SI_TIMER before checking for
5502 si_code < 0.
5503
fa1bd1e4
JB
55042010-09-13 Joel Brobecker <brobecker@adacore.com>
5505
5506 * lynx-i386-low.c: New file.
5507 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5508
47fac8f8
JB
55092010-09-13 Joel Brobecker <brobecker@adacore.com>
5510
5511 * lynx-low.c (ptrace_request_to_str): Remove handling for
5512 request values that have been removed in LynxOS 5.x.
5513
1adfc54d
JB
55142010-09-13 Joel Brobecker <brobecker@adacore.com>
5515
5516 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5517 <ptrace.h>
5518
c2a66c29
NS
55192010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5520
5521 * configure.ac: Add --enable-inprocess-agent option.
5522 * configure: Rebuilt.
5523
32fcada3
YQ
55242010-09-06 Yao Qi <yao@codesourcery.com>
5525
5526 * linux-low.c (linux_kill): Remove unused variable.
5527 (linux_stabilize_threads): Likewise.
5528 * server.c (start_inferior): Likewise.
5529 (queue_stop_reply_callback): Likewise.
5530 * tracepoint.c (do_action_at_tracepoint): Likewise.
5531
0cccb683
YQ
55322010-09-06 Yao Qi <yao@codesourcery.com>
5533
5534 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5535 on return.
5536
423ec54c
JK
55372010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5538
5539 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5540
12ac6819
PA
55412010-09-06 Pedro Alves <pedro@codesourcery.com>
5542
5543 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5544 "$(IPA_DEPFILES)".
5545
8ed54b31
JB
55462010-09-01 Joel Brobecker <brobecker@adacore.com>
5547
5548 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5549 gdbserver/lynx-ppc-low.c: New files.
5550 * Makefile.in (lynx_low_h): New variable.
5551 (lynx-low.o, lynx-ppc-low.o): New rules.
5552 * configure.ac: On LynxOS, link with -lnetinet.
5553 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5554 * configure: regenerate.
5555
bb0116a4
JB
55562010-09-01 Joel Brobecker <brobecker@adacore.com>
5557
5558 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5559 * configure.ac: Add check for vasprintf and vsnprintf.
5560 * configure, config.in: Regenerate.
5561 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5562
a778ab81 55632010-09-01 Joel Brobecker <brobecker@adacore.com>
5564
5565 * gdbreplay.c: Move include of alloca.h up, next to include of
5566 malloc.h.
5567 * server.h: Add include of malloc.h.
5568 * mem-break.c: Remove include of malloc.h.
5569 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5570
8b034a19 55712010-09-01 Joel Brobecker <brobecker@adacore.com>
5572
5573 * Makefile.in (memmem.o): Build with -Wno-error.
5574
55752010-09-01 Joel Brobecker <brobecker@adacore.com>
5576
5577 * utils.c (xsnprintf): Make non-static.
5578 * server.h: Add xsnprintf declaration.
5579 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5580 replace calls to snprintf by calls to xsnprintf throughout.
5581
55822010-09-01 Joel Brobecker <brobecker@adacore.com>
5583
5584 * configure.ac: Add configure check for alloca.
5585 * configure, config.in: Regenerate.
5586 * server.h: Include alloca.h if it exists.
5587 * gdbreplay.c: Include alloca.h if it exists.
5588
1a981360
PA
55892010-08-28 Pedro Alves <pedro@codesourcery.com>
5590
5591 * linux-low.c (__SIGRTMIN): Define if not already defined.
5592 (linux_create_inferior): Check for __ANDROID__ rather than
5593 __SIGRTMIN.
5594 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5595 are already deferred.
5596 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5597 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5598 stopped and already has a pending signal to report.
5599 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5600 a pending signal to report or is moving out of a jump pad.
5601 (linux_init_signals): Check for __ANDROID__ rather than
5602 __SIGRTMIN.
5603
b4d51a55
PA
56042010-08-28 Pedro Alves <pedro@codesourcery.com>
5605
5606 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5607 debug_threads check. Avoid a linear search when not doing debug
5608 output.
5609
ec48365d
PA
56102010-08-27 Pedro Alves <pedro@codesourcery.com>
5611
5612 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5613 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5614 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5615 (process_event): Change local fd's type to gdb_fildes_t.
5616 (create_file_handler): Adjust prototype.
5617 (delete_file_handler): Adjust prototype.
5618 (handle_file_event): Adjust prototype. Use pfildes.
5619 (create_file_event): Adjsut prototype.
5620 * remote-utils.c (remote_desc, listen_desc): Change type to
5621 gdb_fildes_t.
5622 * server.h: New gdb_fildes_t typedef.
5623 [USE_WIN32API]: Include winsock2.h.
5624 (delete_file_handler, add_file_handler): Adjust prototypes.
5625 (pfildes): Declare.
5626 * utils.c (pfildes): New.
5627
854d88f0
PA
56282010-08-27 Pedro Alves <pedro@codesourcery.com>
5629
5630 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5631 * configure: Regenerate.
5632
0146f85b
PA
56332010-08-27 Pedro Alves <pedro@codesourcery.com>
5634
5635 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5636 (linux_done_accessing_memory): ... this.
5637 (linux_target_ops): Adjust.
5638 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5639 * nto-low.c (nto_target_ops): Adjust comment.
5640 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5641 * spu-low.c (spu_target_ops): Adjust comment.
5642 * target.h (target_ops): Rename unprepare_to_access_memory field
5643 to done_accessing_memory.
5644 (unprepare_to_access_memory): Rename to ...
5645 (done_accessing_memory): ... this.
5646
90d74c30
PA
56472010-08-26 Pedro Alves <pedro@codesourcery.com>
5648
5649 * linux-low.c (linux_prepare_to_access_memory): New.
5650 (linux_unprepare_to_access_memory): New.
5651 (linux_target_ops): Install them.
5652 * server.c (read_memory): Rename to ...
5653 (gdb_read_memory): ... this. Use
5654 prepare_to_access_memory/prepare_to_access_memory.
5655 (write_memory): Rename to ...
5656 (gdb_write_memory): ... this. Use
5657 prepare_to_access_memory/prepare_to_access_memory.
5658 (handle_search_memory_1): Adjust.
5659 (process_serial_event): Adjust.
5660 * target.h (struct target_ops): New fields
5661 prepare_to_access_memory and unprepare_to_access_memory.
5662 (prepare_to_access_memory, unprepare_to_access_memory): New.
5663 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5664 prepare_to_access_memory/prepare_to_access_memory.
5665 * nto-low.c (nto_target_ops): Adjust.
5666 * spu-low.c (spu_target_ops): Adjust.
5667 * win32-low.c (win32_target_ops): Adjust.
5668
fd467969
PA
56692010-08-26 Pedro Alves <pedro@codesourcery.com>
5670
5671 * Makefile.in (WARN_CFLAGS): Get it from configure.
5672 (WERROR_CFLAGS): New.
5673 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5674 * configure.ac: Introduce --enable-werror, which adds -Werror to
5675 the compiler command line. Enabled by default. Disable with
5676 --disable-werror. Add -Wdeclaration-after-statement
5677 Wpointer-arith and -Wformat-nonliteral to warning flags.
5678 * configure: Regenerate.
5679
331e2f5f
PA
56802010-08-26 Pedro Alves <pedro@codesourcery.com>
5681
5682 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5683
e581f2b4
PA
56842010-08-26 Pedro Alves <pedro@codesourcery.com>
5685
5686 * gdbreplay.c (remote_error): New.
5687 (gdbchar): New.
5688 (expect): Use gdbchar. Check for error reading from GDB.
5689 Clarify sync error output.
5690 (play): Check for errors writing to GDB.
5691 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5692 * remote-utils.c (getpkt): Check for errors writing to the remote
5693 descriptor.
5694
3c11dd79
PA
56952010-08-25 Pedro Alves <pedro@codesourcery.com>
5696
5697 * linux-low.c (linux_wait_1): Move non-debugging code out of
5698 `debug_threads' control.
5699
d20a8ad9
PA
57002010-08-25 Pedro Alves <pedro@codesourcery.com>
5701
5702 * linux-low.c (linux_wait_1): Don't set last_status here.
5703 * server.c (push_event, queue_stop_reply_callback): Assert we're
5704 not pushing a TARGET_WAITKIND_IGNORE event.
5705 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5706 (myresume, handle_target_event): Set the thread's last_resume_kind
5707 and last_status from the target returned status.
5708
964e4306
PA
57092010-08-25 Pedro Alves <pedro@codesourcery.com>
5710
5711 PR threads/10729
5712
5713 * linux-x86-low.c (update_debug_registers_callback): New.
5714 (i386_dr_low_set_addr): Use it.
5715 (i386_dr_low_get_addr): New.
5716 (i386_dr_low_set_control): Use update_debug_registers_callback.
5717 (i386_dr_low_get_control): New.
5718 (i386_dr_low_get_status): Adjust.
5719 * linux-low.c (linux_stop_lwp): New.
5720 * linux-low.h (linux_stop_lwp): Declare.
5721
5722 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5723 argument instead of a i386_debug_reg_state.
5724 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5725 a i386_debug_reg_state.
5726 (i386_insert_aligned_watchpoint): Adjust.
5727 (i386_remove_aligned_watchpoint): Adjust.
5728 (i386_low_stopped_data_address): Read the debug registers from the
5729 inferior instead of from the mirrors.
5730 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5731 (i386_dr_low_get_addr): Declare.
5732 (i386_dr_low_get_control): Declare.
5733 (i386_dr_low_get_status): Change prototype.
5734
5735 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5736 (i386_dr_low_get_addr): New.
5737 (i386_dr_low_get_control): New.
5738 (i386_dr_low_get_status): Adjust prototype. Return
5739 dr_status_mirror.
5740 (i386_initial_stuff): Clear dr_status_mirror and
5741 dr_control_mirror.
5742 (i386_get_thread_context): Adjust.
5743 (i386_set_thread_context): Adjust.
5744 (i386_thread_added): Adjust.
5745
5f21a75b
PA
57462010-08-24 Pedro Alves <pedro@codesourcery.com>
5747
5748 * linux-low.h (linux_thread_area): Delete declaration.
5749
3e4c1235
TS
57502010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5751
5752 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5753 after its termination.
5754
1971b033
PA
57552010-08-09 Pedro Alves <pedro@codesourcery.com>
5756
5757 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5758 (gdb_wants_all_stopped): Delete.
5759 (linux_wait_1): Don't call them.
5760 * server.c (handle_v_cont): Tag all threads as want-stopped.
5761 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5762 stopped as "client-wants-stopped".
5763
310444ac
PA
57642010-07-31 Pedro Alves <pedro@codesourcery.com>
5765
5766 * Makefile.in (signals_h): New.
5767 (server_h): Depend on it.
5768 (server.o): Don't depend on $(signals_def).
5769 (signals.o): Depend on $(signals_def).
5770
a19cae16
JK
57712010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5772
5773 * Makefile.in (signals_def): New.
5774 (server_h): Append include/gdb/signals.h and signals_def.
5775 (server.o): Append signals_def.
5776
30d50328
JK
57772010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5778
5779 * server.c (handle_target_event): Use target_signal_to_host for
5780 resume_info.sig initialization.
5781 * target.h (struct thread_resume) <sig>: New comment.
5782
5c3216e2
OS
57832010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5784
c6f46ca0
OS
5785 * server.c (handle_query): strcpy() the returned string from paddress()
5786 instead of sprintf().
5c3216e2
OS
5787 * utils.c (paddress): Return phex_nz().
5788
6bd31874
JB
57892010-07-07 Joel Brobecker <brobecker@adacore.com>
5790
5791 * server.c (handle_v_cont): Call mourn_inferior if process
5792 just exited.
5793 (myresume): Likewise.
5794
0fb4aa4b
PA
57952010-07-01 Pedro Alves <pedro@codesourcery.com>
5796
5797 Static tracepoints, and integration with UST.
5798
5799 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5800 * mem-break.c (uninsert_all_breakpoints)
5801 (reinsert_all_breakpoints): New.
5802 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5803 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5804 (gdb_agent_ust_loaded, helper_thread_id)
5805 (gdb_agent_helper_thread_id): New macros.
5806 (struct ipa_sym_addresses): Add addr_ust_loaded,
5807 addr_helper_thread_id, addr_cmd_buf.
5808 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5809 (in_process_agent_loaded_ust): New.
5810 (write_e_ust_not_loaded): New.
5811 (maybe_write_ipa_ust_not_loaded): New.
5812 (struct collect_static_trace_data_action): New.
5813 (enum tracepoint_type) <static_tracepoint>: New.
5814 (struct tracepoint) <handle>: Mention static tracepoints.
5815 (struct static_tracepoint_ctx): New.
5816 (CMD_BUF_SIZE): New.
5817 (add_tracepoint_action): Handle static tracepoint actions.
5818 (unprobe_marker_at): New.
5819 (clear_installed_tracepoints): Handle static tracepoints.
5820 (cmd_qtdp): Handle static tracepoints.
5821 (probe_marker_at): New.
5822 (cmd_qtstart): Handle static tracepoints.
5823 (response_tracepoint): Handle static tracepoints.
5824 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5825 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5826 (get_context_regcache): Handle static tracepoints.
5827 (do_action_at_tracepoint): Handle static tracepoint actions.
5828 (traceframe_find_block_type): Handle static trace data blocks.
5829 (traceframe_read_sdata): New.
5830 (download_tracepoints): Download static tracepoint actions.
5831 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5832 (GDB_PROBE_NAME): New.
5833 (ust_ops): New.
5834 (GET_UST_SYM): New.
5835 (USTF): New.
5836 (dlsym_ust): New.
5837 (ust_marker_to_static_tracepoint): New.
5838 (gdb_probe): New.
5839 (collect_ust_data_at_tracepoint): New.
5840 (gdb_ust_probe): New.
5841 (UNIX_PATH_MAX, SOCK_DIR): New.
5842 (gdb_ust_connect_sync_socket): New.
5843 (resume_thread, stop_thread): New.
5844 (run_inferior_command): New.
5845 (init_named_socket): New.
5846 (gdb_ust_socket_init): New.
5847 (cstr_to_hexstr): New.
5848 (next_st): New.
5849 (first_marker, next_marker): New.
5850 (response_ust_marker): New.
5851 (cmd_qtfstm, cmd_qtsstm): New.
5852 (unprobe_marker_at, probe_marker_at): New.
5853 (cmd_qtstmat, gdb_ust_thread): New.
5854 (gdb_ust_init): New.
5855 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5856 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5857 (ST_REGENTRY): New.
5858 (x86_64_st_collect_regmap): New.
5859 (X86_64_NUM_ST_COLLECT_GREGS): New.
5860 (AMD64_RIP_REGNUM): New.
5861 (supply_static_tracepoint_registers): New.
5862 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5863 (ST_REGENTRY): New.
5864 (i386_st_collect_regmap): New.
5865 (i386_NUM_ST_COLLECT_GREGS): New.
5866 (supply_static_tracepoint_registers): New.
5867 * server.c (handle_query): Handle qXfer:statictrace:read.
5868 <qSupported>: Report support for StaticTracepoints, and
5869 qXfer:statictrace:read features.
5870 * server.h (traceframe_read_sdata)
5871 (supply_static_tracepoint_registers): Declare.
5872 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5873 (unpack_varlen_hex): Include in IPA build.
5874 * Makefile.in (ustlibs, ustinc): New.
5875 (IPA_OBJS): Add remote-utils-ipa.o.
5876 ($(IPA_LIB)): Link -ldl and -lpthread.
5877 (UST_CFLAGS): New.
5878 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5879 * config.in, configure: Regenerate.
5880
9e4344e5
PA
58812010-06-20 Ian Lance Taylor <iant@google.com>
5882 Pedro Alves <pedro@codesourcery.com>
5883
5884 * linux-x86-low.c (always_true): Delete.
5885 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5886 trying to fool the compiler with always_true.
5887
c6beb2cb
PA
58882010-06-20 Pedro Alves <pedro@codesourcery.com>
5889
5890 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5891 conditions in gdbserver.
5892
d2ed6730
UW
58932010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5894
5895 * spu-low.c (spu_read_memory): Wrap around local store limit.
5896 (spu_write_memory): Likewise.
5897
4e29fb54
PA
58982010-06-15 Pedro Alves <pedro@codesourcery.com>
5899
5900 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5901 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5902 LONGEST uses.
5903 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5904 uses.
5905 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5906 uses with LONGEST uses.
5907
6a271cae
PA
59082010-06-14 Stan Shebs <stan@codesourcery.com>
5909 Pedro Alves <pedro@codesourcery.com>
5910
5911 Bytecode compiler.
5912
5913 * linux-x86-low.c: Include limits.h.
5914 (add_insns): New.
5915 (always_true): New.
5916 (EMIT_ASM): New.
5917 (EMIT_ASM32): New.
5918 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5919 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5920 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5921 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5922 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5923 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5924 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5925 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5926 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5927 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5928 (amd64_emit_void_call_2): New.
5929 (amd64_emit_ops): New.
5930 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5931 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5932 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5933 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5934 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5935 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5936 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5937 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5938 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5939 (i386_emit_stack_adjust, i386_emit_int_call_1)
5940 (i386_emit_void_call_2): New.
5941 (i386_emit_ops): New.
5942 (x86_emit_ops): New.
5943 (the_low_target): Install x86_emit_ops.
5944 * server.h (struct emit_ops): New.
5945 (get_raw_reg_func_addr): Declare.
5946 (current_insn_ptr, emit_error): Declare.
5947 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5948 (set_trace_state_variable_value): New defines.
5949 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5950 addr_get_trace_state_variable_value and
5951 addr_set_trace_state_variable_value.
5952 (symbol_list): New fields for get_raw_reg,
5953 get_trace_state_variable_value and set_trace_state_variable_value.
5954 (condfn): New typedef.
5955 (struct tracepoint): New field `compiled_cond'.
5956 (do_action_at_tracepoint): Clear compiled_cond.
5957 (get_trace_state_variable_value, set_trace_state_variable_value):
5958 Export in the IPA.
5959 (condition_true_at_tracepoint): If there's a compiled condition,
5960 run that.
5961 (current_insn_ptr, emit_error): New globals.
5962 (struct bytecode_address): New.
5963 (get_raw_reg_func_addr): New.
5964 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5965 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5966 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5967 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5968 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5969 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5970 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5971 (compile_tracepoint_condition, compile_bytecodes): New.
5972 * target.h (emit_ops): Forward declare.
5973 (struct target_ops): New field emit_ops.
5974 (target_emit_ops): New.
5975 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5976 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5977 * linux-low.c (linux_emit_ops): New.
5978 (linux_target_ops): Install it.
5979 * linux-low.h (struct linux_target_ops): New field emit_ops.
5980
92b72907
UW
59812010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5982
5983 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5984 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5985
fa593d66
PA
59862010-06-01 Pedro Alves <pedro@codesourcery.com>
5987 Stan Shebs <stan@codesourcery.com>
5988
5989 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5990 (all): Depend on $(extra_libraries).
5991 (install-only): Install the IPA.
5992 (IPA_OBJS, IPA_LIB): New.
5993 (clean): Remove the IPA lib.
5994 (IPAGENT_CFLAGS): New.
5995 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5996 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5997 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5998 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5999 * configure.ac: Check for atomic builtins support in the compiler.
6000 (IPA_DEPFILES, extra_libraries): Define.
6001 * configure.srv (ipa_obj): Add description.
6002 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6003 (i[34567]86-*-linux*): Set ipa_obj.
6004 (x86_64-*-linux*): Set ipa_obj.
6005 * linux-low.c (stabilizing_threads): New.
6006 (supports_fast_tracepoints): New.
6007 (linux_detach): Stabilize threads before detaching.
6008 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6009 the lwp is either not stabilizing, or is moving out of a jump pad.
6010 (linux_fast_tracepoint_collecting): New.
6011 (maybe_move_out_of_jump_pad): New.
6012 (enqueue_one_deferred_signal): New.
6013 (dequeue_one_deferred_signal): New.
6014 (linux_wait_for_event_1): If moving out of a jump pad, defer
6015 pending signals to later.
6016 (linux_stabilize_threads): New.
6017 (linux_wait_1): Check if threads need moving out of jump pads, and
6018 do it if so.
6019 (stuck_in_jump_pad_callback): New.
6020 (move_out_of_jump_pad_callback): New.
6021 (lwp_running): New.
6022 (linux_resume_one_lwp): Handle moving out of jump pads.
6023 (linux_set_resume_request): Dequeue deferred signals.
6024 (need_step_over_p): Also step over fast tracepoint jumps.
6025 (start_step_over): Also uninsert fast tracepoint jumps.
6026 (finish_step_over): Also reinsert fast tracepoint jumps.
6027 (linux_install_fast_tracepoint_jump): New.
6028 (linux_target_ops): Install linux_stabilize_threads and
6029 linux_install_fast_tracepoint_jump_pad.
6030 * linux-low.h (linux_target_ops) <get_thread_area,
6031 install_fast_tracepoint_jump_pad>: New fields.
6032 (struct lwp_info) <collecting_fast_tracepoint,
6033 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6034 (linux_get_thread_area): Declare.
6035 * linux-x86-low.c (jump_insn): New.
6036 (x86_get_thread_area): New.
6037 (append_insns): New.
6038 (push_opcode): New.
6039 (amd64_install_fast_tracepoint_jump_pad): New.
6040 (i386_install_fast_tracepoint_jump_pad): New.
6041 (x86_install_fast_tracepoint_jump_pad): New.
6042 (the_low_target): Install x86_get_thread_area and
6043 x86_install_fast_tracepoint_jump_pad.
6044 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6045 (struct fast_tracepoint_jump): New.
6046 (fast_tracepoint_jump_insn): New.
6047 (fast_tracepoint_jump_shadow): New.
6048 (find_fast_tracepoint_jump_at): New.
6049 (fast_tracepoint_jump_here): New.
6050 (delete_fast_tracepoint_jump): New.
6051 (set_fast_tracepoint_jump): New.
6052 (uninsert_fast_tracepoint_jumps_at): New.
6053 (reinsert_fast_tracepoint_jumps_at): New.
6054 (set_breakpoint_at): Use write_inferior_memory.
6055 (uninsert_raw_breakpoint): Use write_inferior_memory.
6056 (check_mem_read): Mask out fast tracepoint jumps.
6057 (check_mem_write): Mask out fast tracepoint jumps.
6058 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6059 (set_fast_tracepoint_jump): Declare.
6060 (delete_fast_tracepoint_jump)
6061 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6062 (reinsert_fast_tracepoint_jumps_at): Declare.
6063 * regcache.c: Don't compile many functions when building the
6064 in-process agent library.
6065 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6066 the register buffer in the heap.
6067 (free_register_cache): If the register buffer isn't owned by the
6068 regcache, don't free it.
6069 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6070 pre-existing register caches.
6071 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6072 type.
6073 (convert_ascii_to_int): : Constify `from' parameter type.
6074 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6075 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6076 the needed buffer in-place.
6077 (relocate_instruction): New.
6078 * server.c (handle_query) <qSymbols>: If the target supports
6079 tracepoints, give it a chance of looking up symbols. Report
6080 support for fast tracepoints.
6081 (handle_status): Stabilize threads.
6082 (process_serial_event): Adjust.
6083 * server.h (struct fast_tracepoint_jump): Forward declare.
6084 (struct process_info) <fast_tracepoint_jumps>: New field.
6085 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6086 (decode_X_packet, decode_M_packet): Adjust.
6087 (relocate_instruction): Declare.
6088 (in_process_agent_loaded): Declare.
6089 (tracepoint_look_up_symbols): Declare.
6090 (struct fast_tpoint_collect_status): Declare.
6091 (fast_tracepoint_collecting): Declare.
6092 (force_unlock_trace_buffer): Declare.
6093 (handle_tracepoint_bkpts): Declare.
6094 (initialize_low_tracepoint)
6095 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6096 * target.h (struct target_ops) <stabilize_threads,
6097 install_fast_tracepoint_jump_pad>: New fields.
6098 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6099 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6100 [HAVE_STDINT_H]: Include stdint.h.
6101 (trace_debug_1): Rename to ...
6102 (trace_vdebug): ... this.
6103 (trace_debug): Rename to ...
6104 (trace_debug_1): ... this. Add `level' parameter.
6105 (trace_debug): New.
6106 (ATTR_USED, ATTR_NOINLINE): New.
6107 (IP_AGENT_EXPORT): New.
6108 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6109 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6110 (about_to_request_buffer_space, trace_buffer_is_full)
6111 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6112 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6113 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6114 (traceframe_write_count, traceframes_created)
6115 (trace_state_variables)
6116 New renaming defines.
6117 (struct ipa_sym_addresses): New.
6118 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6119 (symbol_list): New.
6120 (ipa_sym_addrs): New.
6121 (all_tracepoint_symbols_looked_up): New.
6122 (in_process_agent_loaded): New.
6123 (write_e_ipa_not_loaded): New.
6124 (maybe_write_ipa_not_loaded): New.
6125 (tracepoint_look_up_symbols): New.
6126 (debug_threads) [IN_PROCESS_AGENT]: New.
6127 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6128 (UNKNOWN_SIDE_EFFECTS): New.
6129 (stop_tracing): New.
6130 (flush_trace_buffer): New.
6131 (stop_tracing_bkpt): New.
6132 (flush_trace_buffer_bkpt): New.
6133 (read_inferior_integer): New.
6134 (read_inferior_uinteger): New.
6135 (read_inferior_data_pointer): New.
6136 (write_inferior_data_pointer): New.
6137 (write_inferior_integer): New.
6138 (write_inferior_uinteger): New.
6139 (struct collect_static_trace_data_action): Delete.
6140 (enum tracepoint_type): New.
6141 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6142 <actions_str, step_actions, step_actions_str>: Only include in
6143 GDBserver.
fa593d66
PA
6144 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6145 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6146 (tracepoints): Use IP_AGENT_EXPORT.
6147 (last_tracepoint): Don't include in the IPA.
6148 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6149 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6150 (alloced_trace_state_variables): New.
6151 (trace_state_variables): Use IP_AGENT_EXPORT.
6152 (traceframe_t): Delete unused variable.
6153 (circular_trace_buffer): Don't include in the IPA.
6154 (trace_buffer_start): Delete.
6155 (struct trace_buffer_control): New.
6156 (trace_buffer_free): Delete.
6157 (struct ipa_trace_buffer_control): New.
6158 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6159 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6160 New.
6161 (trace_buffer_ctrl): New.
6162 (TRACE_BUFFER_CTRL_CURR): New.
6163 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6164 Reimplement as macros.
6165 (trace_buffer_wrap): Delete.
6166 (traceframe_write_count, traceframe_read_count)
6167 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6168 (struct tracepoint_hit_ctx) <type>: New field.
6169 (struct fast_tracepoint_ctx): New.
6170 (memory_barrier): New.
6171 (cmpxchg): New.
6172 (record_tracepoint_error): Update atomically in the IPA.
6173 (clear_inferior_trace_buffer): New.
6174 (about_to_request_buffer_space): New.
6175 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6176 updating the same buffer.
6177 (add_tracepoint): Default the tracepoint's type to trap
6178 tracepoint, and orig_size to -1.
6179 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6180 internal variables.
6181 (create_trace_state_variable): New parameter `gdb'. Handle it.
6182 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6183 (cmd_qtdp): Handle fast tracepoints.
6184 (cmd_qtdv): Adjust.
6185 (max_jump_pad_size): New.
6186 (gdb_jump_pad_head): New.
6187 (get_jump_space_head): New.
6188 (claim_jump_space): New.
6189 (sort_tracepoints): New.
6190 (MAX_JUMP_SIZE): New.
6191 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6192 IPA.
6193 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6194 support. Upload fast traceframes, and delete internal IPA
6195 breakpoints.
6196 (stop_tracing_handler): New.
6197 (flush_trace_buffer_handler): New.
6198 (cmd_qtstop): Upload fast tracepoints.
6199 (response_tracepoint): Handle fast tracepoints.
6200 (tracepoint_finished_step): Upload fast traceframes. Set the
6201 tracepoint hit context's tracepoint type.
6202 (handle_tracepoint_bkpts): New.
6203 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6204 type. Add comment about fast tracepoints.
6205 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6206 non-existing action_str field.
6207 (get_context_regcache): Handle fast tracepoints.
6208 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6209 to the regcache.
6210 (fast_tracepoint_from_jump_pad_address): New.
6211 (fast_tracepoint_from_ipa_tpoint_address): New.
6212 (collecting_t): New.
6213 (force_unlock_trace_buffer): New.
6214 (fast_tracepoint_collecting): New.
6215 (collecting): New.
6216 (gdb_collect): New.
6217 (write_inferior_data_ptr): New.
6218 (target_tp_heap): New.
6219 (target_malloc): New.
6220 (download_agent_expr): New.
6221 (UALIGN): New.
6222 (download_tracepoints): New.
6223 (download_trace_state_variables): New.
6224 (upload_fast_traceframes): New.
6225 (IPA_FIRST_TRACEFRAME): New.
6226 (IPA_NEXT_TRACEFRAME_1): New.
6227 (IPA_NEXT_TRACEFRAME): New.
6228 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6229 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6230 (gdb_jump_pad_buffer_end): New.
6231 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6232 (initialize_tracepoint): Adjust.
6233 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6234 buffer. Initialize the low module.
6235 * utils.c (PREFIX, TOOLNAME): New.
6236 (malloc_failure): Use PREFIX.
6237 (error): In the IPA, an error causes an exit.
6238 (fatal, warning): Use PREFIX.
6239 (internal_error): Use TOOLNAME.
6240 (NUMCELLS): Increase to 10.
6241 * configure, config.in: Regenerate.
6242
d149dd1d
PA
62432010-06-01 Pedro Alves <pedro@codesourcery.com>
6244
6245 * server.c (handle_query) <qSupported>: Do two passes over the
6246 qSupported string to avoid nesting strtok.
6247
f6528abd
JK
62482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6249
6250 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6251 (CDEPS): New.
6252 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6253 -Wl,--dynamic-list.
6254 * configure: Regenerate.
6255 * proc-service.list: New.
6256
ca2a87a0
JK
62572010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6258
6259 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6260 New comment.
6261
363a6e9f
OS
62622010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6263
6264 * gdbreplay.c (remote_open): Check error return from socket() call by
6265 its equality to -1 not by it being negative.
6266 * remote-utils.c (remote_open): Likewise.
6267
d23b6cb1
PA
62682010-05-23 Pedro Alves <pedro@codesourcery.com>
6269
6270 * config.h: Regenerate.
6271
28d3cf85
MK
62722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6273
6274 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6275 doesn't provide PTRACE_GET_THREAD_AREA.
6276
fea36a59
MK
62772010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6278
6279 * linux-m68k-low.c: Include <asm/ptrace.h>
6280 (ps_get_thread_area): Implement.
6281
24b066ba
DE
62822010-05-03 Doug Evans <dje@google.com>
6283
6284 * event-loop.c (struct callback_event): New struct.
6285 (callback_list): New global.
6286 (append_callback_event, delete_callback_event): New functions.
6287 (process_callback): New function.
6288 (start_event_loop): Call it.
6289 * remote-utils.c (NOT_SCHEDULED): Define.
6290 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6291 moved out of readchar.
6292 (readchar): Rewrite. Call reschedule before returning.
6293 (reset_readchar): New function.
6294 (remote_close): Call it.
6295 (process_remaining, reschedule): New functions.
6296 * server.h (callback_handler_func): New typedef.
6297 (append_callback_event, delete_callback_event): Declare.
6298
9836d6ea
PA
62992010-05-03 Pedro Alves <pedro@codesourcery.com>
6300
6301 * proc-service.c (ps_pglobal_lookup): Use
6302 thread_db_look_up_one_symbol.
6303 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6304 parameter. Use it instead of all_symbols_looked_up.
6305 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6306 field.
6307 (all_symbols_looked_up): Don't declare.
6308 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6309 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6310 field.
6311 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6312 Set all_symbols_looked_up here.
6313 (thread_db_look_up_one_symbol): New.
6314 (thread_db_get_tls_address): Adjust.
6315 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6316 thread_db object on the heap, and tentatively set it in the
6317 process structure.
6318 (thread_db_init): Don't set all_symbols_looked_up here.
6319 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6320
7984d532
PA
63212010-05-03 Pedro Alves <pedro@codesourcery.com>
6322
6323 * linux-low.c (linux_kill, linux_detach): Adjust.
6324 (status_pending_p_callback): Remove redundant statement. Check
6325 for !TARGET_WAITIKIND_IGNORE, instead of
6326 TARGET_WAITKIND_STOPPED.
6327 (handle_tracepoints): Make sure LWP is locked. Adjust.
6328 (linux_wait_for_event_1): Adjust.
6329 (linux_cancel_breakpoints): New.
6330 (unsuspend_one_lwp): New.
6331 (unsuspend_all_lwps): New.
6332 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6333 (send_sigstop_callback): Change return type to int, add new
6334 `except' parameter and handle it.
6335 (suspend_and_send_sigstop_callback): New.
6336 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6337 pass them down. If SUSPEND, also increment the lwp's suspend
6338 count.
6339 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6340 (need_step_over_p): Don't consider suspended LWPs.
6341 (start_step_over): Adjust.
6342 (proceed_one_lwp): Change return type to int, add new `except'
6343 parameter and handle it.
6344 (unsuspend_and_proceed_one_lwp): New.
6345 (proceed_all_lwps): Use find_inferior instead of
6346 for_each_inferior.
6347 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6348 also decrement the suspend count of LWPs. Pass `except' down,
6349 instead of hacking its suspend count.
6350 (linux_pause_all): Add `freeze' parameter. Adjust.
6351 (linux_unpause_all): New.
6352 (linux_target_ops): Install linux_unpause_all.
6353 * server.c (handle_status): Adjust.
6354 * target.h (struct target_ops): New fields `unpause_all' and
6355 `cancel_breakpoints'. Add new parameter to `pause_all'.
6356 (pause_all): Add new `freeze' parameter.
6357 (unpause_all): New.
6358 (cancel_breakpoints): New.
6359 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6360 cancel breakpoints.
6361 (cmd_qtstart): Pause threads.
6362 (stop_tracing): Pause threads, and cancel breakpoints.
6363 * win32-low.c (win32_target_ops): Adjust.
6364
e471f25b
PA
63652010-05-03 Pedro Alves <pedro@codesourcery.com>
6366
6367 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6368 the inferior right away from here...
6369 (linux_wait_1): ... to here, and adjust to check the thread's
6370 last_resume_kind instead of the lwp's step or stop_expected flags.
6371
1915ef4f
PA
63722010-05-02 Pedro Alves <pedro@codesourcery.com>
6373
6374 * README: Use consistent `GDB' and `GDBserver' spellings.
6375
f9e39928
PA
63762010-05-02 Pedro Alves <pedro@codesourcery.com>
6377
6378 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6379 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6380 (linux_detach_one_lwp): Assume the lwp is stopped.
6381 (any_thread_of): Delete.
6382 (linux_detach): Stop all lwps here. Don't blindly delete all
6383 breakpoints.
6384 (delete_lwp_callback): New.
6385 (linux_mourn): Delete all lwps of the process that is gone.
6386 (linux_wait_1): Don't delete the last lwp of the process here.
6387 * mem-break.h (mark_breakpoints_out): Declare.
6388 * mem-break.c (mark_breakpoints_out): New.
6389 (free_all_breakpoints): Use it.
6390 * server.c (handle_target_event): If the process is gone, mark
6391 breakpoints out.
6392 * thread-db.c (struct thread_db) <create_bp>: New field.
6393 (thread_db_enable_reporting): Fix prototype. Store a thread event
6394 breakpoint reference in the thread_db struct.
6395 (thread_db_load_search): Clear the thread_db object.
6396 (try_thread_db_load_1): Ditto.
6397 (switch_to_process): New.
6398 (disable_thread_event_reporting): Use it.
6399 (remove_thread_event_breakpoints): New.
6400 (thread_db_detach, thread_db_mourn): Use it.
6401
1e7fc18c
PA
64022010-05-01 Pedro Alves <pedro@codesourcery.com>
6403
6404 * linux-low.c (linux_enable_event_reporting): New.
6405 (linux_wait_for_event_1, handle_extended_wait): Use it.
6406
02fc4de7
PA
64072010-04-30 Pedro Alves <pedro@codesourcery.com>
6408
6409 * linux-low.c (linux_kill_one_lwp, linux_kill)
6410 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6411 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6412 SIGSTOP even if the LWP is stopped.
6413 (send_sigstop_callback): New.
6414 (stop_all_lwps): Use send_sigstop_callback instead.
6415 (linux_resume_one_thread): Adjust.
6416 (proceed_one_lwp): Still proceed an LWP that the client has
6417 requested to stop, if we haven't reported it as stopped yet. Make
6418 sure that LWPs the client want stopped, have a pending SIGSTOP.
6419
bc3b5632
DE
64202010-04-26 Doug Evans <dje@google.com>
6421
ae1ada35
DE
6422 * server.c (handle_general_set): Make static.
6423
bc3b5632
DE
6424 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6425 Print received char after testing for error/eof instead of before.
6426 (input_interrupt): Tweak comment.
6427
65730243
DE
64282010-04-23 Doug Evans <dje@google.com>
6429
6430 * server.c (start_inferior): Print inferior argv if --debug.
6431
a8ae7dc0
AR
64322010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6433
6434 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6435 * nto-x86-low.c: Include server.h
6436
1c07cc19
PM
64372010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6438
6439 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6440 be consistent with other sources of this directory.
6441 (init_registers_amd64): Correct name of source file of this function
6442 in the comment.
6443
e0a61e09
PM
64442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6445
6446 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6447 64-bit executables.
6448
54709339
PM
64492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6450
6451 * win32-i386-low.c: Add 64-bit support.
6452 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6453 (init_registers_amd64): Declare.
6454 (mappings): Add 64-bit version of array.
6455 (init_windows_x86): New function.
6456 (the_low_target): Change init_arch field to init_windows_x86.
6457
e8f0053d
PM
64582010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6459
6460 * win32-low.c: Adapt to support also 64-bit architecture.
6461 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6462 (get_image_name): Use SIZE_T type for local variable `done'.
6463 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6464 (toolhelp_get_dll_name): Idem.
6465 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6466 Use uintptr_t typecast to avoid warning.
6467 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6468 (handle_exception): Use phex_nz to avoid warning.
6469 (win32_wait): Remove unused local variable `process'.
6470
c481e77e
PM
64712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6472
6473 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6474 `amd64-avx.o'.
6475
12ea4b69
PM
64762010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6477
6478 * configure.ac: Use `ws2_32' library for srv_mingw.
6479 * configure: Regenerate.
6480 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6481 * remote-utils.c: Likewise.
6482
f6d1620c
L
64832010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6484
6485 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6486 if __x86_64__ is defined.
6487
8e642873
PM
64882010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6489
6490 * configure: Regenerate.
6491
711e434b
PM
64922010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6493
6494 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6495 * target.h (target_ops): New get_tib_address field.
6496 * win32-low.h (win32_thread_info): Add thread_local_base field.
6497 * win32-low.c (child_add_thread): Add tlb argument.
6498 Set thread_local_base field to TLB.
6499 (get_child_debug_event): Adapt to child_add_thread change.
6500 (win32_get_tib_address): New function.
6501 (win32_target_ops): Set get_tib_address field to
6502 win32_get_tib_address.
6503 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6504
505106cd
PA
65052010-04-12 Pedro Alves <pedro@codesourcery.com>
6506
505106cd
PA
6507 * linux-low.c (linux_mourn): Also remove the process.
6508 * server.c (handle_target_event): Don't remove the process here.
6509 * nto-low.c (nto_mourn): New.
6510 (nto_target_ops): Install it.
6511 * spu-low.c (spu_mourn): New.
6512 (spu_target_ops): Install it.
6513 * win32-low.c (win32_mourn): New.
6514 (win32_target_ops): Install it.
6515
e8470a06
PA
65162010-04-12 Pedro Alves <pedro@codesourcery.com>
6517
6518 * server.h (buffer_xml_printf): Remove redundant `;'.
6519
45ba0d02
PA
65202010-04-12 Pedro Alves <pedro@codesourcery.com>
6521
6522 * regcache.c (set_register_cache): Invalidate regcaches before
6523 changing the register cache layout.
6524 (regcache_invalidate_one): Allow a NULL regcache.
6525 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6526 regcaches before changing the register cache layout or the target
6527 regsets.
6528
59e04013
L
65292010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6530
6531 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6532 variable warning on Linux/x86-64.
6533
8336d594
PA
65342010-04-11 Pedro Alves <pedro@codesourcery.com>
6535
6536 GDBserver disconnected tracing support.
6537
6538 * linux-low.c (linux_remove_process): Delete.
6539 (add_lwp): Don't set last_resume_kind here.
6540 (linux_kill): Use `mourn'.
6541 (linux_detach): Use `thread_db_detach', and `mourn'.
6542 (linux_mourn): New.
6543 (linux_attach_lwp_1): Adjust comment.
6544 (linux_attach): last_resume_kind moved the thread_info; adjust.
6545 (status_pending_p_callback): Adjust.
6546 (linux_wait_for_event_1): Adjust.
6547 (count_events_callback, select_singlestep_lwp_callback)
6548 (select_event_lwp_callback, cancel_breakpoints_callback)
6549 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6550 (proceed_one_lwp): Adjust.
6551 (linux_async): Add debug output.
6552 (linux_thread_stopped): New.
6553 (linux_pause_all): New.
6554 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6555 linux_pause_all.
6556 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6557 (thread_db_free): Delete declaration.
6558 (thread_db_detach, thread_db_mourn): Declare.
6559 * thread-db.c (thread_db_init): Use thread_db_mourn.
6560 (thread_db_free): Delete, split in two.
6561 (disable_thread_event_reporting): New.
6562 (thread_db_detach): New.
6563 (thread_db_mourn): New.
6564
6565 * server.h (struct thread_info) <last_resume_kind>: New field.
6566 <attached>: Add comment.
6567 <gdb_detached>: New field.
6568 (handler_func): Change return type to int.
6569 (handle_serial_event, handle_target_event): Ditto.
6570 (gdb_connected): Declare.
6571 (tracing): Delete.
6572 (disconnected_tracing): Declare.
6573 (stop_tracing): Declare.
6574
6575 * server.c (handle_query) <qSupported>: Report support for
6576 disconnected tracing.
6577 (queue_stop_reply_callback): Account for running threads.
6578 (gdb_wants_thread_stopped): New.
6579 (gdb_wants_all_threads_stopped): New.
6580 (gdb_reattached_process): New.
6581 (handle_status): Clear the `gdb_detached' flag of all processes.
6582 In all-stop, stop all threads.
6583 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6584 (process_serial_event): If the remote connection breaks, or if an
6585 exit was forced with "monitor exit", force an event loop exit.
6586 Handle disconnected tracing on detach.
6587 (handle_serial_event): Adjust.
6588 (handle_target_event): If GDB isn't connected, forward events back
6589 to the inferior, unless the last process exited, in which case,
6590 exit gdbserver. Adjust interface.
6591
6592 * remote-utils.c (remote_open): Don't block in accept. Instead
6593 register an event loop source on the listen socket file
6594 descriptor. Refactor bits into ...
6595 (listen_desc): ... this new global.
6596 (gdb_connected): ... this new function.
6597 (enable_async_notification): ... this new function.
6598 (handle_accept_event): ... this new function.
6599 (remote_close): Clear remote_desc.
6600
6601 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6602
6603 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6604 New fields.
6605 (mourn_inferior): Define.
6606 (target_process_qsupported): Avoid the dangling else problem.
6607 (thread_stopped): Define.
6608 (pause_all): Define.
6609 (target_waitstatus_to_string): Declare.
6610 * target.c (target_waitstatus_to_string): New.
6611
6612 * tracepoint.c (tracing): Make extern.
6613 (disconnected_tracing): New.
6614 (stop_tracing): Make extern. Handle tracing stops due to GDB
6615 disconnecting.
6616 (cmd_qtdisconnected): New.
6617 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6618 (handle_tracepoint_general_set): Handle QTDisconnected.
6619
6620 * event-loop.c (event_handler_func): Change return type to int.
6621 (process_event): Bail out if the event handler wants the event
6622 loop to stop.
6623 (handle_file_event): Ditto.
6624 (start_event_loop): Bail out if the event handler wants the event
6625 loop to stop.
6626
6627 * nto-low.c (nto_target_ops): Adjust.
6628 * spu-low.c (spu_wait): Don't remove the process here.
6629 (spu_target_ops): Adjust.
6630 * win32-low.c (win32_wait): Don't remove the process here.
6631 (win32_target_ops): Adjust.
6632
5d267c4c
PA
66332010-04-11 Pedro Alves <pedro@codesourcery.com>
6634
6635 * regcache.c (realloc_register_cache): Invalidate inferior's
6636 regcache before recreating it.
6637
623ccd72
PA
66382010-04-09 Pedro Alves <pedro@codesourcery.com>
6639
6640 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6641
219f2f23
PA
66422010-04-09 Stan Shebs <stan@codesourcery.com>
6643 Pedro Alves <pedro@codesourcery.com>
6644
6645 * server.h (LONGEST): New.
6646 (struct thread_info) <while_stepping>: New field.
6647 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6648 Declare.
6649 (initialize_tracepoint, handle_tracepoint_general_set)
6650 (handle_tracepoint_query, tracepoint_finished_step)
6651 (tracepoint_was_hit, release_while_stepping_state_list):
6652 (current_traceframe): Declare.
6653 * server.c (handle_general_set): Handle tracepoint packets.
6654 (read_memory): New.
6655 (write_memory): New.
6656 (handle_search_memory_1): Use read_memory.
6657 (handle_query): Report support for conditional tracepoints, trace
6658 state variables, and tracepoint sources. Handle tracepoint
6659 queries.
6660 (main): Initialize the tracepoints module.
6661 (process_serial_event): Handle traceframe reads/writes.
6662
6663 * linux-low.c (handle_tracepoints): New.
6664 (linux_wait_1): Call it.
6665 (linux_resume_one_lwp): Handle while-stepping.
6666 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6667 (linux_target_ops): Install them.
6668 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6669 New field.
6670 * linux-x86-low.c (x86_supports_tracepoints): New.
6671 (the_low_target). Install it.
6672
6673 * mem-break.h (delete_breakpoint): Declare.
6674 * mem-break.c (delete_breakpoint): Make external.
6675
6676 * target.h (struct target_ops): Add `supports_tracepoints',
6677 `read_pc', and `write_pc' fields.
6678 (target_supports_tracepoints): Define.
6679 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6680 (phex_nz): New.
6681
6682 * regcache.h (struct regcache) <registers_owned>: New field.
6683 (init_register_cache, regcache_cpy): Declare.
6684 (regcache_read_pc, regcache_write_pc): Declare.
6685 (register_cache_size): Declare.
6686 (supply_regblock): Declare.
6687 * regcache.c (init_register_cache): New.
6688 (new_register_cache): Use it.
6689 (regcache_cpy): New.
6690 (register_cache_size): New.
6691 (supply_regblock): New.
6692 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6693
219f2f23
PA
6694 * tracepoint.c: New.
6695
6696 * Makefile.in (OBS): Add tracepoint.o.
6697 (tracepoint.o): New rule.
6698
3a13a53b
L
66992010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6700
6701 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6702 (i386-mmx.o): New.
6703 (i386-mmx.c): Likewise.
6704 (i386-mmx-linux.o): Likewise.
6705 (i386-mmx-linux.c): Likewise.
6706
6707 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6708 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6709 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6710 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6711
6712 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6713 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6714 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6715
1570b33e
L
67162010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6717
6718 * Makefile.in (clean): Updated.
6719 (i386-avx.o): New.
6720 (i386-avx.c): Likewise.
6721 (i386-avx-linux.o): Likewise.
6722 (i386-avx-linux.c): Likewise.
6723 (amd64-avx.o): Likewise.
6724 (amd64-avx.c): Likewise.
6725 (amd64-avx-linux.o): Likewise.
6726 (amd64-avx-linux.c): Likewise.
6727
6728 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6729 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6730 (srv_amd64_regobj): Add amd64-avx.o.
6731 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6732 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6733 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6734 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6735 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6736 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6737 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6738
6739 * i387-fp.c: Include "i386-xstate.h".
6740 (i387_xsave): New.
6741 (i387_cache_to_xsave): Likewise.
6742 (i387_xsave_to_cache): Likewise.
6743 (x86_xcr0): Likewise.
6744
6745 * i387-fp.h (i387_cache_to_xsave): Likewise.
6746 (i387_xsave_to_cache): Likewise.
6747 (x86_xcr0): Likewise.
6748
6749 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6750 * linux-crisv32-low.c (target_regsets): Likewise.
6751 * linux-m68k-low.c (target_regsets): Likewise.
6752 * linux-mips-low.c (target_regsets): Likewise.
6753 * linux-ppc-low.c (target_regsets): Likewise.
6754 * linux-s390-low.c (target_regsets): Likewise.
6755 * linux-sh-low.c (target_regsets): Likewise.
6756 * linux-sparc-low.c (target_regsets): Likewise.
6757 * linux-xtensa-low.c (target_regsets): Likewise.
6758
6759 * linux-low.c: Include <sys/uio.h>.
6760 (regsets_fetch_inferior_registers): Support nt_type.
6761 (regsets_store_inferior_registers): Likewise.
6762 (linux_process_qsupported): New.
6763 (linux_target_ops): Add linux_process_qsupported.
6764
6765 * linux-low.h (regset_info): Add nt_type.
6766 (linux_target_ops): Add process_qsupported.
6767
6768 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6769 and <sys/uio.h>.
6770 (init_registers_i386_avx_linux): New.
6771 (init_registers_amd64_avx_linux): Likewise.
6772 (xmltarget_i386_linux_no_xml): Likewise.
6773 (xmltarget_amd64_linux_no_xml): Likewise.
6774 (PTRACE_GETREGSET): Likewise.
6775 (PTRACE_SETREGSET): Likewise.
6776 (x86_fill_xstateregset): Likewise.
6777 (x86_store_xstateregset): Likewise.
6778 (use_xml): Likewise.
6779 (x86_linux_update_xmltarget): Likewise.
6780 (x86_linux_process_qsupported): Likewise.
6781 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6782 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6783 init_registers_i386_linux here. Call
6784 x86_linux_update_xmltarget.
6785 (the_low_target): Add x86_linux_process_qsupported.
6786
6787 * server.c (handle_query): Call target_process_qsupported.
6788
6789 * target.h (target_ops): Add process_qsupported.
6790 (target_process_qsupported): New.
6791
fc7238bb
PA
67922010-04-03 Pedro Alves <pedro@codesourcery.com>
6793
6794 * inferiors.c (add_thread): Set last_status kind to
6795 TARGET_WAITKIND_IGNORE.
6796 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6797 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6798 (linux_wait_1): Move `thread' local definition to block that uses
6799 it. Don't NULL initialize `event_child'.
6800 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6801 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6802 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6803
bdabb078
PA
68042010-04-01 Pedro Alves <pedro@codesourcery.com>
6805
6806 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6807 an extended waitstatus, or by a watchpoint.
6808 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6809 thread was stepping or has been stopped by a watchpoint.
6810
d3bbe7a0
PA
68112010-04-01 Pedro Alves <pedro@codesourcery.com>
6812
6813 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6814 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6815 of another, then delete the previous, and validate all
6816 breakpoints.
6817 (validate_inserted_breakpoint): New.
6818 (delete_disabled_breakpoints): New.
6819 (validate_breakpoints): New.
6820 (check_mem_read): Validate breakpoints before trusting their
6821 shadow. Delete disabled breakpoints.
6822 (check_mem_write): Validate breakpoints before trusting they
6823 should be inserted. Delete disabled breakpoints.
6824 * mem-break.h (validate_breakpoints):
6825 * server.c (handle_query): Validate breakpoints when we see a
6826 qSymbol query.
6827
8b07ae33
PA
68282010-04-01 Pedro Alves <pedro@codesourcery.com>
6829
6830 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6831 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6832 if we could tell there's a GDB breakpoint at stop_pc.
6833 (need_step_over_p): Don't do a step over if we find a GDB
6834 breakpoint at the resume PC.
6835
6836 * mem-break.c (struct raw_breakpoint): New.
6837 (enum bkpt_type): New type `gdb_breakpoint'.
6838 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6839 fields. New field `raw'.
6840 (find_raw_breakpoint_at): New.
6841 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6842 breakpoint instead.
6843 (set_breakpoint_at): Adjust.
6844 (delete_raw_breakpoint): New.
6845 (release_breakpoint): New.
6846 (delete_breakpoint): Rename to...
6847 (delete_breakpoint_1): ... this. Add proc parameter. Use
6848 release_breakpoint. Return ENOENT.
6849 (delete_breakpoint): Reimplement.
6850 (find_breakpoint_at): Delete.
6851 (find_gdb_breakpoint_at): New.
6852 (delete_breakpoint_at): Delete.
6853 (set_gdb_breakpoint_at): New.
6854 (delete_gdb_breakpoint_at): New.
6855 (gdb_breakpoint_here): New.
6856 (set_reinsert_breakpoint): Use release_breakpoint.
6857 (uninsert_breakpoint): Rename to ...
6858 (uninsert_raw_breakpoint): ... this.
6859 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6860 (reinsert_raw_breakpoint): Change parameter type to
6861 raw_breakpoint.
6862 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6863 instead.
6864 (check_breakpoints): Adjust. Use release_breakpoint.
6865 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6866 (breakpoint_inserted_here): Ditto.
6867 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6868 Don't trust the breakpoint's shadow if it is not inserted.
6869 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6870 (delete_all_breakpoints): Adjust.
6871 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6872 use delete_breakpoint_1.
6873
6874 * mem-break.h (breakpoints_supported): Delete declaration.
6875 (set_gdb_breakpoint_at): Declare.
6876 (gdb_breakpoint_here): Declare.
6877 (delete_breakpoint_at): Delete.
6878 (delete_gdb_breakpoint_at): Declare.
6879
6880 * server.h (struct raw_breakpoint): Forward declare.
6881 (struct process_info): New field `raw_breakpoints'.
6882
6883 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6884 breakpoints.
6885
6bf5e0ba
PA
68862010-03-24 Pedro Alves <pedro@codesourcery.com>
6887
6888 * linux-low.c (status_pending_p_callback): Fix comment.
6889 (linux_wait_for_event_1): Move most of the internal breakpoint
6890 handling from here...
6891 (linux_wait_1): ... to here.
6892 (count_events_callback): New.
6893 (select_singlestep_lwp_callback): New.
6894 (select_event_lwp_callback): New.
6895 (cancel_breakpoints_callback): New.
6896 (select_event_lwp): New.
6897 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6898 priority to all LWPs that have had events that should be reported
6899 to the client. Cancel breakpoints when about to reporting the
6900 event to the client, not while stopping lwps. No longer cancel
6901 finished single-steps here.
6902 (cancel_finished_single_step): Delete.
6903 (cancel_finished_single_steps): Delete.
6904
414a389f
PA
69052010-03-24 Pedro Alves <pedro@codesourcery.com>
6906
6907 * mem-break.c (enum bkpt_type): New.
6908 (struct breakpoint): New field `type'.
6909 (set_breakpoint_at): Change return type to struct breakpoint
6910 pointer. Set type to `other_breakpoint' by default.
6911 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6912 in the breakpoint list.
6913 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6914 (reinsert_breakpoint): Rename to ...
6915 (reinsert_raw_breakpoint): ... this.
6916 (reinsert_breakpoints_at): Adjust.
6917 * mem-break.h (struct breakpoint): Declare.
6918 (set_breakpoint_at): Change return type to struct breakpoint
6919 pointer.
6920
2280c721
PA
69212010-03-24 Pedro Alves <pedro@codesourcery.com>
6922
6923 * server.c (handle_query): Assign, not compare.
6924
d50171e4
PA
69252010-03-24 Pedro Alves <pedro@codesourcery.com>
6926
6927 Teach linux gdbserver to step-over-breakpoints.
6928
6929 * linux-low.c (can_hardware_single_step): New.
6930 (supports_breakpoints): New.
6931 (handle_extended_wait): If stopping threads, read the stop pc of
6932 the new cloned LWP.
6933 (get_pc): New.
6934 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6935 low target doesn't support retrieving the PC.
6936 (add_lwp): Set last_resume_kind to resume_continue.
6937 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6938 (linux_attach): Don't clear stop_expected. Set the lwp's
6939 last_resume_kind to resume_stop.
6940 (linux_detach_one_lwp): Don't check for removed breakpoints.
6941 (check_removed_breakpoint): Delete.
6942 (status_pending_p): Rename to ...
6943 (status_pending_p_callback): ... this. Don't check for removed
6944 breakpoints. Don't consider threads that are stopped from GDB's
6945 perspective.
6946 (linux_wait_for_lwp): Always read the stop_pc here.
6947 (cancel_breakpoint): New.
6948 (step_over_bkpt): New global.
6949 (linux_wait_for_event_1): Implement stepping over breakpoints.
6950 (gdb_wants_lwp_stopped): New.
6951 (gdb_wants_all_stopped): New.
6952 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6953 single-step traps here. Store the thread's last reported target
6954 wait status.
6955 (send_sigstop): Don't clear stop_expected. Always set it,
6956 instead.
6957 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6958 (cancel_finished_single_step): New.
6959 (cancel_finished_single_steps): New.
6960 (wait_for_sigstop): Don't cancel finished single-step traps here.
6961 (linux_resume_one_lwp): Don't check for removed breakpoints.
6962 Don't set `step' on non-hardware step archs.
6963 (linux_set_resume_request): Ignore resume_stop requests if already
6964 stopping or stopped. Set the lwp's last_resume_kind.
6965 (resume_status_pending_p): Don't check for removed breakpoints.
6966 (need_step_over_p): New.
6967 (start_step_over): New.
6968 (finish_step_over): New.
6969 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6970 requests. Clear the thread's last reported target waitstatus.
6971 Don't use the `suspended' flag. Don't consider pending breakpoints.
6972 (linux_resume): Start a step-over if necessary.
6973 (proceed_one_lwp): New.
6974 (proceed_all_lwps): New.
6975 (unstop_all_lwps): New.
6976 * linux-low.h (struct lwp_info): Rewrite comment for the
6977 `suspended' flag. Add the `stop_pc' field. Delete the
6978 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6979 Add `'last_resume_kind' and `need_step_over' fields.
6980 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6981 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6982 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6983 (set_raw_breakpoint_at): New.
6984 (set_breakpoint_at): Rewrite to use it.
6985 (reinsert_breakpoint_handler): Delete.
6986 (set_reinsert_breakpoint): New.
6987 (reinsert_breakpoint_by_bp): Delete.
6988 (delete_reinsert_breakpoints): New.
6989 (uninsert_breakpoint): Rewrite.
6990 (uninsert_breakpoints_at): New.
6991 (reinsert_breakpoint): Rewrite.
6992 (reinsert_breakpoints_at): New.
6993 (check_breakpoints): Rewrite.
6994 (breakpoint_here): New.
6995 (breakpoint_inserted_here): New.
6996 (check_mem_read): Adjust.
6997 * mem-break.h (breakpoints_supported, breakpoint_here)
6998 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6999 (reinsert_breakpoint_by_bp): Delete declaration.
7000 (delete_reinsert_breakpoints): Declare.
7001 (reinsert_breakpoint): Delete declaration.
7002 (reinsert_breakpoints_at): Declare.
7003 (uninsert_breakpoint): Delete declaration.
7004 (uninsert_breakpoints_at): Declare.
7005 (check_breakpoints): Adjust prototype.
7006 * server.h: Adjust include order.
7007 (struct thread_info): Declare here. Add a `last_status' field.
7008
30ba68cb
MS
70092010-03-23 Michael Snyder <msnyder@vmware.com>
7010
7011 * server.c (crc32): New function.
7012 (handle_query): Add handling for 'qCRC:' request.
7013
b9a881c2
PA
70142010-03-23 Pedro Alves <pedro@codesourcery.com>
7015
7016 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7017 lwp had been stopped by a watchpoint.
7018
e92d13d5
PA
70192010-03-16 Pedro Alves <pedro@codesourcery.com>
7020
7021 * server.h (internal_error): Declare.
7022 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7023 * utils.c (internal_error): New function.
7024
64daa791
AS
70252010-03-15 Andreas Schwab <schwab@redhat.com>
7026
7027 * configure.srv: Fix typo setting srv_regobj.
7028
f52cd8cd
PA
70292010-03-15 Pedro Alves <pedro@codesourcery.com>
7030
7031 * linux-low.c (fetch_register): Avoid passing a non string literal
7032 format to `error'.
7033 (usr_store_inferior_registers): Ditto.
7034
93ae6fdc
PA
70352010-03-14 Pedro Alves <pedro@codesourcery.com>
7036
7037 * linux-low.c (linux_write_memory): Bail out early if peeking
7038 memory failed.
7039
c3adc08c
PA
70402010-03-14 Pedro Alves <pedro@codesourcery.com>
7041
7042 * linux-low.h (struct lwp_info): New fields
7043 `stopped_by_watchpoint' and `stopped_data_address'.
7044 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7045 here, and cache them in the lwp object.
7046 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7047 directly.
7048 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7049 field.
7050 (linux_stopped_by_watchpoint): Rewrite.
7051 (linux_stopped_data_address): Rewrite.
7052
bce522a2
PA
70532010-03-06 Simo Melenius <simo.melenius@iki.fi>
7054
7055 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7056 switching the current inferior, not before.
7057
90884b2b
L
70582010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7059
7060 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7061 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7062 i386-linux.c and amd64-linux.c.
7063 (reg-i386.o): Removed.
7064 (reg-i386.c): Likewise.
7065 (reg-i386-linux.o): Likewise.
7066 (reg-i386-linux.c): Likewise.
7067 (reg-x86-64.o): Likewise.
7068 (reg-x86-64.c): Likewise.
7069 (reg-x86-64-linux.o): Likewise.
7070 (reg-x86-64-linux.c): Likewise.
7071 (i386.o): New.
7072 (i386.c): Likewise.
7073 (i386-linux.o): Likewise.
7074 (i386-linux.c): Likewise.
7075 (amd64.o): Likewise.
7076 (amd64.c): Likewise.
7077 (amd64-linux.o): Likewise.
7078 (amd64-linux.c): Likewise.
7079
7080 * configure.srv (srv_i386_regobj): New.
7081 (srv_i386_linux_regobj): Likewise.
7082 (srv_amd64_regobj): Likewise.
7083 (srv_amd64_linux_regobj): Likewise.
7084 (srv_i386_32bit_xmlfiles): Likewise.
7085 (srv_i386_64bit_xmlfiles): Likewise.
7086 (srv_i386_xmlfiles): Likewise.
7087 (srv_amd64_xmlfiles): Likewise.
7088 (srv_i386_linux_xmlfiles): Likewise.
7089 (srv_amd64_linux_xmlfiles): Likewise.
7090 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7091 srv_xmlfiles to $srv_i386_xmlfiles.
7092 (i[34567]86-*-mingw32ce*): Likewise.
7093 (i[34567]86-*-mingw*): Likewise.
7094 (i[34567]86-*-nto*): Likewise.
7095 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7096 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7097 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7098 (x86_64-*-linux*): Likewise.
7099
7100 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7101 (init_registers_amd64_linux): New.
7102 (x86_arch_setup): Replace init_registers_x86_64_linux with
7103 init_registers_amd64_linux.
7104
193f13e6
MK
71052010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7106
7107 * configure.ac: Check for libdl. If it is not available link against
7108 static libthread_db.
7109 * configure: Regenerate.
7110
85d721b8
PA
71112010-02-22 Pedro Alves <pedro@codesourcery.com>
7112
7113 PR9605
7114
7115 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7116 handing a read watchpoint.
7117 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7118
6076632b
DE
71192010-02-12 Doug Evans <dje@google.com>
7120
7121 * linux-low.c (linux_supports_tracefork_flag): Document.
7122 (linux_look_up_symbols): Add comment.
7123
3327ccf7
L
71242010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7125
7126 * regcache.c (supply_register): Clear regcache if buf is NULL.
7127
0718675c 71282010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7129 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7130
7131 * inferiors.c (find_inferior): Add function documentation.
7132 (unloaded_dll): Handle the case where the unloaded dll has not
7133 been previously registered in the dll list.
7134
177321bd
DJ
71352010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7136
7137 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7138 (thumb2_breakpoint): New.
7139 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7140
2b009048
DJ
71412010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7142
7143 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7144 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7145 breakpoints.
7146
3be029c7
PA
71472010-01-21 Pedro Alves <pedro@codesourcery.com>
7148
7149 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7150
18f5de3b
JK
71512010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7152
7153 * linux-s390-low.c (s390_collect_ptrace_register)
7154 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7155
3743bb4f
DE
71562010-01-21 Doug Evans <dje@google.com>
7157
14ce3065
DE
7158 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7159 (PTRACE_ARG4_TYPE): New macro.
7160 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7161 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7162 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7163 (usr_store_inferior_registers): Ditto.
7164 (linux_read_memory, linux_write_memory): Ditto.
7165 (linux_test_for_tracefork): Ditto.
7166
3743bb4f
DE
7167 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7168 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7169
8b315be5
PA
71702010-01-21 Pedro Alves <pedro@codesourcery.com>
7171
7172 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7173 target.
7174
85492558
PA
71752010-01-21 Pedro Alves <pedro@codesourcery.com>
7176
7177 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7178 prototype to take a regcache. Adjust.
7179
442ea881
PA
71802010-01-20 Pedro Alves <pedro@codesourcery.com>
7181
7182 * regcache.h (struct thread_info): Forward declare.
7183 (struct regcache): New.
7184 (new_register_cache): Adjust prototype.
7185 (get_thread_regcache): Declare.
7186 (free_register_cache): Adjust prototype.
7187 (registers_to_string, registers_from_string): Ditto.
7188 (supply_register, supply_register_by_name, collect_register)
7189 (collect_register_as_string, collect_register_by_name): Ditto.
7190 * regcache.c (struct inferior_regcache_data): Delete.
7191 (get_regcache): Rename to ...
7192 (get_thread_regcache): ... this. Adjust. Switch inferior before
7193 fetching registers.
7194 (regcache_invalidate_one): Adjust.
7195 (regcache_invalidate): Fix prototype.
7196 (new_register_cache): Return the new register cache.
7197 (free_register_cache): Change prototype.
7198 (realloc_register_cache): Adjust.
7199 (registers_to_string): Change prototype to take a regcache. Adjust.
7200 (registers_from_string): Ditto.
7201 (register_data): Ditto.
7202 (supply_register): Ditto.
7203 (supply_register_by_name): Ditto.
7204 (collect_register): Ditto.
7205 (collect_register_as_string): Ditto.
7206 (collect_register_by_name): Ditto.
7207 * server.c (process_serial_event): Adjust.
7208 * linux-low.h (regset_fill_func, regset_store_func): Change
7209 prototype.
7210 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7211 Change prototype.
7212 * linux-low.c (get_stop_pc): Adjust.
7213 (check_removed_breakpoint): Adjust.
7214 (linux_wait_for_event): Adjust.
7215 (linux_resume_one_lwp): Adjust.
7216 (fetch_register): Add regcache parameter. Adjust.
7217 (usr_store_inferior_registers): Ditto.
7218 (regsets_fetch_inferior_registers): Ditto.
7219 (regsets_store_inferior_registers): Ditto.
7220 (linux_fetch_registers, linux_store_registers): Ditto.
7221 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7222 regcache. Adjust.
43aaf8b6
PA
7223 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7224 Ditto.
442ea881
PA
7225 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7226 prototype to take a regcache.
7227 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7228 * remote-utils.c (convert_ascii_to_int, outreg)
7229 (prepare_resume_reply): Change prototype to take a regcache.
7230 Adjust.
7231 * target.h (struct target_ops) <fetch_registers, store_registers>:
7232 Change prototype to take a regcache.
7233 (fetch_inferior_registers, store_inferior_registers): Change
7234 prototype to take a regcache. Adjust.
7235 * proc-service.c (ps_lgetregs): Adjust.
7236 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7237 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7238 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7239 take a regcache. Adjust.
7240 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7241 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7242 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7243 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7244 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7245 (cris_cannot_fetch_register):
7246 (cris_breakpoint_at): Change prototype to take a regcache.
7247 Adjust.
7248 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7249 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7250 to take a regcache. Adjust.
7251 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7252 Adjust.
7253 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7254 take a regcache. Adjust.
7255 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7256 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7257 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7258 * linux-mips-low.c (mips_get_pc):
7259 (mips_set_pc): Change prototype to take a regcache. Adjust.
7260 (mips_reinsert_addr): Adjust.
7261 (mips_collect_register): Change prototype to take a regcache.
7262 Adjust.
7263 (mips_supply_register):
7264 (mips_collect_register_32bit, mips_supply_register_32bit)
7265 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7266 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7267 * linux-ppc-low.c (ppc_supply_ptrace_register)
7268 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7269 (parse_spufs_run): Adjust.
7270 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7271 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7272 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7273 take a regcache. Adjust.
7274 * linux-s390-low.c (s390_collect_ptrace_register)
7275 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7276 (s390_set_pc): Change prototype to take a regcache. Adjust.
7277 (s390_arch_setup): Adjust.
7278 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7279 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7280 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7281 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7282 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7283 regcache. Adjust.
7284 (sparc_breakpoint_at): Adjust.
7285 * linux-xtensa-low.c (xtensa_fill_gregset):
7286 (xtensa_store_gregset):
7287 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7288 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7289 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7290 prototype to take a regcache. Adjust.
7291 * win32-arm-low.c (arm_fetch_inferior_register)
7292 (arm_store_inferior_register): Change prototype to take a
7293 regcache. Adjust.
7294 * win32-i386-low.c (i386_fetch_inferior_register)
7295 (i386_store_inferior_register): Change prototype to take a
7296 regcache. Adjust.
7297 * win32-low.c (child_fetch_inferior_registers)
7298 (child_store_inferior_registers): Change prototype to take a
7299 regcache. Adjust.
7300 (win32_wait): Adjust.
7301 (win32_fetch_inferior_registers): Change prototype to take a
7302 regcache. Adjust.
7303 (win32_store_inferior_registers): Adjust.
7304 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7305 store_inferior_register>: Change prototype to take a regcache.
7306
60c3d7b0
DE
73072010-01-20 Doug Evans <dje@google.com>
7308
7309 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7310 #ifdef.
7311 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7312 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7313
dc146f7c
VP
73142010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7315
7316 * linux-low.c (linux_core_of_thread): New.
7317 (compare_ints, show_process, list_threads): New.
7318 (linux_qxfer_osdata): Report threads and cores.
7319 (linux_target_op): Register linux_core_of_thread.
7320 * remote-utils.c (prepare_resume_reply): Report the core.
7321 (buffer_xml_printf): Support %d specifier.
7322 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7323 New.
7324 (handle_query): Handle qXfer:threads. Announce availability
7325 thereof.
7326 * target.h (struct target_ops): New field core_of_thread.
7327
7803799a
UW
73282010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7329
7330 * Makefile.in (clean): Remove new generated files.
7331 (reg-s390.o, reg-s390.c): Remove rules.
7332 (reg-s390x.o, reg-s390x.c): Likewise.
7333 (s390-linux32.o, s390-linux32.c): Add rules.
7334 (s390-linux64.o, s390-linux64.c): Likewise.
7335 (s390x-linux64.o, s390x-linux64.c): Likewise.
7336 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7337 * linux-s390-low.c: Include <elf.h>.
7338 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7339 (init_registers_s390): Remove prototype.
7340 (init_registers_s390x): Likewise.
7341 (init_registers_s390_linux32): Add prototype.
7342 (init_registers_s390_linux64): Likewise.
7343 (init_registers_s390x_linux64): Likewise.
7344 (s390_num_regs_3264): New define.
7345 (s390_regmap_3264): New global variable.
7346 (s390_cannot_fetch_register): Remove obsolete check.
7347 (s390_cannot_store_register): Likewise.
7348 (s390_collect_ptrace_register): Handle upper/lower register halves.
7349 (s390_supply_ptrace_register): Likewise.
7350 (s390_fill_gregset): Update to register number changes.
7351 (s390_get_hwcap): New routine.
7352 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7353 Install appropriate regmap and register set.
7354
6e7ffa39
JB
73552010-01-01 Joel Brobecker <brobecker@adacore.com>
7356
7357 * server.c (gdbserver_version): Update copyright year to 2010.
7358 * gdbreplay.c (gdbreplay_version): Likewise.
7359
957f3f49
DE
73602009-12-28 Doug Evans <dje@google.com>
7361
7362 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7363 elf/external.h. Include <elf.h> instead but only if necessary.
7364
ca5c370d
PA
73652009-12-28 Pedro Alves <pedro@codesourcery.com>
7366
7367 * linux-low.c (linux_remove_process): Remove `detaching'
7368 parameter. Don't release/detach from thread_db here.
7369 (linux_kill): Release/detach from thread_db here, ...
7370 (linux_detach): ... and here, before actually detaching.
7371 (linux_wait_1): ... and here, when a process exits.
7372 * thread-db.c (any_thread_of): New.
7373 (thread_db_free): Switch the current inferior to a thread of the
7374 passed in process.
7375
4ee62156
DE
73762009-12-21 Doug Evans <dje@google.com>
7377
d90e6a88
DE
7378 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7379
c5f62d5f
DE
7380 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7381 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7382 warning ifndef __NR_tkill. Move setting of errno there too.
7383 Delete unnecessary resetting of errno after syscall.
7384 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7385
10e86dd7
DE
7386 * configure.ac: Check for dladdr.
7387 * config.in: Regenerate.
7388 * configure: Regenerate.
7389 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7390 (try_thread_db_load): Update.
7391
4ee62156
DE
7392 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7393
00f515da
DE
73942009-12-18 Doug Evans <dje@google.com>
7395
e9464885
DE
7396 * event-loop.c: Include unistd.h if it exists.
7397
07d4f67e
DE
7398 * linux-low.c (my_waitpid): Move definition away from being in
7399 between linux_tracefork_child/linux_test_for_tracefork.
7400
00f515da
DE
7401 * gdb_proc_service.h (psaddr_t): Fix type.
7402 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7403 signature to match glibc.
7404
1de1badb
DE
74052009-12-16 Doug Evans <dje@google.com>
7406
7407 * linux-low.c (linux_read_memory): Fix argument to read.
7408
aeeb81d1
PA
74092009-11-26 Pedro Alves <pedro@codesourcery.com>
7410
7411 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7412 events, don't leave current_inferior pointing at null.
7413
10357975
PA
74142009-11-26 Pedro Alves <pedro@codesourcery.com>
7415
7416 * win32-low.c (LOG): Delete.
7417 (OUTMSG): Output to stderr.
7418 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7419 on compile time LOG macro.
7420 (win32_wait): Fix debug output.
7421
cf6e3471
PA
74222009-11-26 Pedro Alves <pedro@codesourcery.com>
7423
7424 * win32-low.c (win32_add_one_solib): If the dll name is
7425 "ntdll.dll", prepend the system directory to the dll path.
7426
0c85e18e
MK
74272009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7428
7429 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7430
9ac544ce 74312009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7432 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7433
7434 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7435 * configure.ac: Check for __mcoldfire__ and set
7436 gdb_cv_m68k_is_coldfire.
7437 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7438 reg-cf.o and reg-m68k.o.
7439 * configure: Regenerated.
7440
fd7dd3e6
PA
74412009-11-16 Pedro Alves <pedro@codesourcery.com>
7442
7443 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7444 Pass it to thread_db_free.
7445 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7446 proper `detaching' argument to linux_remove_process.
7447 * linux-low.h (thread_db_free): Add `detaching' parameter.
7448 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7449 to thread_db_free.
7450 (thread_db_free): Add `detaching' parameter. Only
7451 call td_ta_clear_event if detaching from process.
7452
75aa492e
MK
74532009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7454
7455 * thread-db.c (thread_db_free): Fix typo.
7456
21e1bee4
PP
74572009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7458
7459 PR gdb/10838
7460 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7461
8838b45e
NS
74622009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7463
7464 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7465 with an i686 compiler.
7466 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7467 needed.
7468 * configure: Rebuilt.
7469
8a35fb51
SL
74702009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7471
7472 PR gdb/10783
7473
7474 * server.c (handle_search_memory_1): Correct read_addr initialization
7475 in loop for searching subsequent chunks.
7476
96f15937
PP
74772009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7478
7479 * configure.ac: New --with-libthread-db option.
7480 * thread-db.c: Allow direct dependence on libthread_db.
7481 (thread_db_free): Adjust.
7482 * config.in: Regenerate.
7483 * configure: Likewise.
889bf7c5 7484
5f7d1694
PP
74852009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7486
7487 PR gdb/10757
7488 * thread-db.c (attach_thread): New function.
7489 (maybe_attach_thread): Return success/failure.
7490 (find_new_threads_callback): Adjust.
889bf7c5
PA
7491 (thread_db_find_new_threads): Loop until no new threads.
7492
88e3b899
PA
74932009-10-13 Pedro Alves <pedro@codesourcery.com>
7494
7495 * proc-service.c (ps_lgetregs): Formatting.
7496
cdbfd419
PP
74972009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7498
7499 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7500 * configure.ac: Adjust.
7501 * linux-low.h (struct process_info_private): Move members to struct
7502 thread_db.
7503 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7504 * linux-low.c (linux_remove_process): Adjust.
7505 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7506 * server.c (handle_query): Move code ...
7507 (handle_monitor_command): ... here. New function.
7508 * target.h (struct target_ops): New member.
7509 * thread-db.c (struct thread_db): New.
7510 (libthread_db_search_path): New variable.
7511 (thread_db_create_event, thread_db_enable_reporting)
7512 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7513 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7514 (try_thread_db_load_1, dladdr_to_soname): New functions.
7515 (try_thread_db_load, thread_db_load_search): New functions.
7516 (thread_db_init): Search for libthread_db.
7517 (thread_db_free): New function.
7518 (thread_db_handle_monitor_command): Likewise.
7519 * config.in: Regenerate.
7520 * configure: Regenerate.
889bf7c5 7521
4168d2d6
UW
75222009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7523
7524 * spu-low.c (spu_kill): Wait for inferior to terminate.
7525 Call clear_inferiors.
7526 (spu_detach): Call clear_inferiors.
7527
81ecdfbb
RW
75282009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7529
7530 * aclocal.m4: Regenerate.
7531 * config.in: Likewise.
7532 * configure: Likewise.
7533
0b9ff2c0
UW
75342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7535
7536 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7537 (parse_spufs_run): New function.
7538 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7539 (ppc_breakpoint_at): Handle SPU breakpoints.
7540
efcbbd14
UW
75412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7542
7543 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7544 (SPUFS_MAGIC): Define.
7545 (spu_enumerate_spu_ids): New function.
7546 (linux_qxfer_spu): New function.
7547 (linux_target_ops): Install linux_qxfer_spu.
7548
f4d9bade
UW
75492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7550
7551 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7552 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7553 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7554 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7555 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7556 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7557 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7558 (init_registers_powerpc_cell32l): Add prototype.
7559 (init_registers_powerpc_cell64l): Likewise.
7560 (ppc_arch_setup): Detect Cell/B.E. architecture.
7561
96e946ca
RW
75622009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7563
7564 * Makefile.in (datarootdir): New variable.
7565
58d6951d
DJ
75662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7567
7568 * linux-low.c (linux_write_memory): Update debugging output.
7569 * Makefile.in (clean): Add new descriptions.
7570 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7571 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7572 * configure.srv: Add new files for arm*-*-linux*.
7573 * linux-arm-low.c: Add new declarations.
7574 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7575 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7576 (HWCAP_VFPv3D16): New.
7577 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7578 instead of __IWMMXT__.
7579 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7580 (arm_arch_setup): New.
7581 (target_regsets): Remove #ifdef. Add VFP regset.
7582 (the_low_target): Use arm_arch_setup.
7583
12b42a12
DJ
75842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7585
7586 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7587 the main thread again.
7588
ac8c974e
AR
75892009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7590
7591 Adding Neutrino gdbserver.
7592 * configure: Regenerated.
7593 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7594 * configure.srv (i[34567]86-*-nto*): New target.
7595 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7596 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7597 (nto_comctrl) [__QNX__]: New function.
7598 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7599
4424e0c3 76002009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7601
7602 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7603 srv_tgtobj.
7604
912cf4ba
PA
76052009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7606 Pedro Alves <pedro@codesourcery.com>
7607
7608 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7609 don't support CONTEXT_EXTENDED_REGISTERS.
7610 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7611 (the_low_target): Install them.
7612 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7613 failing with ERROR_PIPE_NOT_CONNECTED.
7614
aa5ca48f
DE
76152009-06-30 Doug Evans <dje@google.com>
7616 Pierre Muller <muller@ics.u-strasbg.fr>
7617
7618 Add h/w watchpoint support to x86-linux, win32-i386.
7619 * Makefile.in (SFILES): Add i386-low.c
7620 (i386_low_h): Define.
7621 (i386-low.o): Add dependencies.
7622 (linux-x86-low.o): Add i386-low.h dependency.
7623 (win32-i386-low.o): Ditto.
7624 * i386-low.c: New file.
7625 * i386-low.h: New file.
7626 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7627 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7628 * linux-low.c (linux_add_process): Initialize arch_private.
7629 (linux_remove_process): Free arch_private.
7630 (add_lwp): Initialize arch_private.
7631 (delete_lwp): Free arch_private.
7632 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7633 provided.
7634 * linux-low.h (process_info_private): New member arch_private.
7635 (lwp_info): New member arch_private.
7636 (linux_target_ops): New members new_process, new_thread,
7637 prepare_to_resume.
7638 (ptid_of): New macro.
7639 * linux-x86-low.c: Include stddef.h, i386-low.h.
7640 (arch_process_info): New struct.
7641 (arch_lwp_info): New struct.
7642 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7643 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7644 (i386_dr_low_get_status): New function.
7645 (x86_insert_point, x86_remove_point): New functions.
7646 (x86_stopped_by_watchpoint): New function.
7647 (x86_stopped_data_address): New function.
7648 (x86_linux_new_process, x86_linux_new_thread): New functions.
7649 (x86_linux_prepare_to_resume): New function.
7650 (the_low_target): Add entries for insert_point, remove_point,
7651 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7652 prepare_to_resume.
7653 * server.c (debug_hw_points): New global.
7654 (monitor_show_help): Document set debug-hw-points.
7655 (handle_query): Process "set debug-hw-points".
7656 * server.h (debug_hw_points): Declare.
7657 (paddress): Declare.
7658 * utils.c (NUMCELLS, CELLSIZE): New macros.
7659 (get_sell, xsnprintf, paddress): New functions.
7660 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7661 remove_point, stopped_by_watchpoint, stopped_data_address.
7662 * win32-i386-low.c: Include i386-low.h.
7663 (debug_reg_state): Replaces dr.
7664 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7665 (i386_dr_low_get_status): New function.
7666 (i386_insert_point, i386_remove_point): New functions.
7667 (i386_stopped_by_watchpoint): New function.
7668 (i386_stopped_data_address): New function.
7669 (i386_initial_stuff): Update.
7670 (get_thread_context,set_thread_context,i386_thread_added): Update.
7671 (the_low_target): Add entries for insert_point,
7672 remove_point, stopped_by_watchpoint, stopped_data_address.
7673 * win32-low.c (win32_insert_watchpoint): New function.
7674 (win32_remove_watchpoint): New function.
7675 (win32_stopped_by_watchpoint): New function.
7676 (win32_stopped_data_address): New function.
7677 (win32_target_ops): Add entries for insert_watchpoint,
7678 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7679 * win32-low.h (win32_target_ops): New members insert_point,
7680 remove_point, stopped_by_watchpoint, stopped_data_address.
7681
d993e290
PA
76822009-06-25 Pedro Alves <pedro@codesourcery.com>
7683
7684 * server.c (process_serial_event): Re-return unsupported, not
7685 error, if the type isn't recognized. Re-allow supporting only
7686 insert or remove packets. Also call require_running for
7687 breakpoints. Add missing break statement to default case. Tidy.
7688 * target.h (struct target_ops): Rename insert_watchpoint to
7689 insert_point, and remove_watchpoint to remove_point.
7690
7691 * linux-low.h (struct linux_target_ops): Likewise.
7692 * linux-low.c (linux_insert_watchpoint): Rename to ...
7693 (linux_insert_point): ... this. Adjust.
7694 (linux_remove_watchpoint): Rename to ...
7695 (linux_remove_point): ... this. Adjust.
7696 (linux_target_ops): Adjust.
7697 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7698 (cris_insert_point): ... this.
7699 (cris_remove_watchpoint): Rename to ...
7700 (cris_remove_point): ... this.
7701 (the_low_target): Adjust.
7702
0f54c268
PM
77032009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7704
7705 * server.c (handle_v_kill): Pass signal_pid to
7706 kill_inferior if multi_process is zero.
7707
c6314022
AR
77082009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7709
7710 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7711 * target.h (target_ops): Comment for *_watchpoint to make it clear
7712 the functions can get types '0' and '1'.
7713
4463ce24
AR
77142009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7715
7716 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7717 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7718 * regcache.c (get_regcache): Likewise.
7719 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7720 * win32-low.c (child_fetch_inferior_registers): Remove check for
7721 regno 0.
7722
cf8fd78b
PA
77232009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7724 Pedro Alves <pedro@codesourcery.com>
7725
7726 * target.h (struct target_ops) <supports_multi_process>: New
7727 callback.
7728 (target_supports_multi_process): New.
7729 * server.c (handle_query): Even if GDB reports support, only
7730 enable multi-process if the target also supports it. Report
7731 multi-process support only if the target backend supports it.
7732 * linux-low.c (linux_supports_multi_process): New function.
7733 (linux_target_ops): Install it as target_supports_multi_process
7734 callback.
7735
47c0c975
DE
77362009-05-24 Doug Evans <dje@google.com>
7737
e09875d4
DE
7738 Global renaming of find_thread_pid to find_thread_ptid.
7739 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7740 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7741 All callers updated.
7742
e27d73f6
DE
7743 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7744 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7745 directly.
7746
47c0c975
DE
7747 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7748 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7749 (linux_resume_one_lwp): Ditto.
7750
2acc282a
DE
77512009-05-23 Doug Evans <dje@google.com>
7752
7753 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7754 from struct inferior_list_entry * to struct lwp_info *.
7755 All callers updated.
7756
9f1036c1
DE
77572009-05-13 Doug Evans <dje@google.com>
7758
7759 * linux-x86-low.c: Don't include assert.h.
7760 (x86_siginfo_fixup): Use fatal, not assert.
7761 (x86_arch_setup): Fix comment.
7762
d0722149
DE
77632009-05-12 Doug Evans <dje@google.com>
7764
7765 Biarch support for i386/amd64 gdbserver.
7766 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7767 Add linux-x86-low.c.
7768 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7769 (linux-x86-low.o): Add.
7770 * linux-x86-64-low.c: Delete.
7771 * linux-i386-low.c: Delete.
7772 * linux-x86-low.c: New file.
7773 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7774 linux-x86-low.o.
7775 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7776 linux-x86-low.o.
7777 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7778 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7779 (linux_child_pid_to_exec_file): New function.
7780 (elf_64_header_p, elf_64_file_p): New functions.
7781 (siginfo_fixup): New function.
7782 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7783 give target a chance to convert layout.
7784 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7785 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7786
fdeb2a12
DE
77872009-05-07 Doug Evans <dje@google.com>
7788
7789 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7790 (regsets_store_inferior_registers): Ditto.
7791
a6dbe5df
PA
77922009-05-06 Pedro Alves <pedro@codesourcery.com>
7793
7794 PR server/10048
7795
7796 * linux-low.c (must_set_ptrace_flags): Delete.
7797 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7798 of the global.
7799 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7800 `lwp->must_set_ptrace_flags' instead.
ba42693b 7801 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7802 (linux_wait_1): ... not here.
7803
5091eb23
DE
78042009-04-30 Doug Evans <dje@google.com>
7805
9f767825
DE
7806 * inferiors.c (started_inferior_callback): New function.
7807 (attached_inferior_callback): New function.
7808 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7809 * server.c (print_started_pid, print_attached_pid): New functions.
7810 (detach_or_kill_for_exit): New function.
7811 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7812 * server.h (have_started_inferiors_p): Declare.
7813 (have_attached_inferiors_p): Declare.
7814
5091eb23
DE
7815 * inferiors.c (remove_process): Fix memory leak, free process.
7816 * linux-low.c (linux_remove_process): New function.
7817 (linux_kill): Call it instead of remove_process.
7818 (linux_detach, linux_wait_1): Ditto.
7819
155c8968
PA
78202009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7821
7822 * configure.srv: Add x86 Windows CE target.
7823
7fe519cb
UW
78242009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7825
7826 * inferiors.c (get_thread_process): Make global.
7827 * server.h (get_thread_process): Add prototype.
7828 * thread-db.c (find_one_thread): Use get_thread_process
7829 instead of current_process.
7830 (thread_db_get_tls_address): Do not crash if called when
7831 thread layer is not yet initialized.
7832
5472f405
UW
78332009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7834
7835 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7836 * spu-low.c (current_tid): Rename to ...
7837 (current_ptid): ... this.
7838 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7839 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7840 ptid_get_lwp (current_ptid) instead of current_tid.
7841 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7842 instead of current_tid. Use find_process_pid to verify pid
7843 argument is valid. Pass proper argument to remove_process.
7844 (spu_thread_alive): Compare current_ptid instead of current_tid.
7845 (spu_resume): Likewise.
7846
55ac2b99
PA
78472009-04-02 Pedro Alves <pedro@codesourcery.com>
7848
7849 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7850 variable.
7851
95954743
PA
78522009-04-01 Pedro Alves <pedro@codesourcery.com>
7853
7854 Implement the multiprocess extensions, and add linux multiprocess
7855 support.
7856
7857 * server.h (ULONGEST): Declare.
7858 (struct ptid, ptid_t): New.
7859 (minus_one_ptid, null_ptid): Declare.
7860 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7861 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7862 (struct inferior_list_entry): Change `id' type from unsigned from
7863 to ptid_t.
7864 (struct sym_cache, struct breakpoint, struct
7865 process_info_private): Forward declare.
7866 (struct process_info): Declare.
7867 (current_process): Declare.
7868 (all_processes): Declare.
7869 (initialize_inferiors): Declare.
7870 (add_thread): Adjust to use ptid_t.
7871 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7872 (add_process, remove_process, find_thread_pid): Declare.
7873 (find_inferior_id): Adjust to use ptid_t.
7874 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7875 (multi_process): Declare.
7876 (push_event): Adjust to use ptid_t.
7877 (read_ptid, write_ptid): Declare.
7878 (prepare_resume_reply): Adjust to use ptid_t.
7879 (clear_symbol_cache): Declare.
7880 * inferiors.c (all_processes): New.
7881 (null_ptid, minus_one_ptid): New.
7882 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7883 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7884 (add_thread): Change unsigned long to ptid. Remove gdb_id
7885 parameter. Adjust.
7886 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7887 (gdb_id_to_thread): Rename to ...
7888 (find_thread_pid): ... this. Change unsigned long to ptid.
7889 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7890 (loaded_dll, pull_pid_from_list): Adjust.
7891 (add_process, remove_process, find_process_pid)
7892 (get_thread_process, current_process, initialize_inferiors): New.
7893 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7894 (struct target_waitstatus) <related_pid>: Ditto.
7895 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7896 return type to int.
7897 (struct target_ops) <join>: Add `pid' argument.
7898 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7899 (struct target_ops) <wait>: Add `ptid' field. Change return type
7900 to ptid.
7901 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7902 (mywait): Add `ptid' argument. Change return type to ptid_t.
7903 (target_pid_to_str): Declare.
7904 * target.c (set_desired_inferior): Adjust to use ptids.
7905 (mywait): Add new `ptid' argument. Adjust.
7906 (target_pid_to_str): New.
7907 * mem-break.h (free_all_breakpoints): Declare.
7908 * mem-break.c (breakpoints): Delelete.
7909 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7910 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7911 to use per-process breakpoint list.
7912 (free_all_breakpoints): New.
7913 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7914 (symbol_cache, all_symbols_looked_up): Delete.
7915 (hexchars): New.
7916 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7917 read_ptid): New.
7918 (prepare_resume_reply): Change ptid argument's type from unsigned
7919 long to ptid_t. Adjust. Implement W;process and X;process.
7920 (free_sym_cache, clear_symbol_cache): New.
7921 (look_up_one_symbol): Adjust to per-process symbol cache. *
7922 * server.c (cont_thread, general_thread, step_thread): Change type
7923 to ptid_t.
7924 (attached): Delete.
7925 (multi_process): New.
7926 (last_ptid): Change type to ptid_t.
7927 (struct vstop_notif) <ptid>: Change type to ptid_t.
7928 (queue_stop_reply, push_event): Change `ptid' argument's type to
7929 ptid_t.
7930 (discard_queued_stop_replies): Add `pid' argument.
7931 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7932 changes. Don't reference the `attached' global.
7933 (attach_inferior): Adjust to mywait interface changes.
7934 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7935 features. Handle and report "multiprocess+". Handle
7936 "qAttached:PID".
7937 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7938 changes.
7939 (handle_v_kill): New.
7940 (handle_v_stopped): Adjust to use target_pid_to_str.
7941 (handle_v_requests): Allow multiple attaches and runs when
7942 multiprocess extensions are in effect. Handle "vKill".
7943 (myresume): Adjust to use ptids.
7944 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7945 (handle_status): Adjust to discard_queued_stop_replies interface
7946 change.
7947 (first_thread_of, kill_inferior_callback)
7948 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7949 (main): Call initialize_inferiors. Adjust to use ptids, killing
7950 and detaching from all inferiors. Handle multiprocess packet
7951 variants.
7952 * linux-low.h: Include gdb_proc_service.h.
7953 (struct process_info_private): New.
7954 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7955 <lwpid_of>: Use ptid_get_lwp.
7956 (get_lwp_thread): Adjust.
7957 (struct lwp_info): Add `dead' member.
7958 (find_lwp_pid): Declare.
7959 * linux-low.c (thread_db_active): Delete.
7960 (new_inferior): Adjust comment.
7961 (inferior_pid): Delete.
7962 (linux_add_process): New.
7963 (handle_extended_wait): Adjust.
7964 (add_lwp): Change unsigned long to ptid.
7965 (linux_create_inferior): Add process to processes table. Adjust
7966 to use ptids. Don't set new_inferior here.
7967 (linux_attach_lwp): Rename to ...
7968 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7969 it. Adjust to use ptids.
7970 (linux_attach_lwp): New.
7971 (linux_attach): Add process to processes table. Don't set
7972 new_inferior here.
7973 (struct counter): New.
7974 (second_thread_of_pid_p, last_thread_of_process_p): New.
7975 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7976 multiple processes.
7977 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7978 processes. Remove process from process table.
7979 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7980 to multiple processes.
7981 (any_thread_of): New.
7982 (linux_detach): Add `pid' argument, and handle it. Remove process
7983 from processes table.
7984 (linux_join): Add `pid' argument. Handle it.
7985 (linux_thread_alive): Change unsighed long argument to ptid_t.
7986 Consider dead lwps as not being alive.
7987 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7988 threads we're not interested in.
7989 (same_lwp, find_lwp_pid): New.
7990 (linux_wait_for_lwp): Change `pid' argument's type from int to
7991 ptid_t. Adjust.
7992 (linux_wait_for_event): Rename to ...
7993 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7994 from int to ptid_t. Adjust.
7995 (linux_wait_for_event): New.
7996 (linux_wait_1): Add `ptid' argument. Change return type to
7997 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7998 that exit from the process table.
7999 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8000 Adjust.
8001 (mark_lwp_dead): New.
8002 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8003 stopping all threads, mark its main lwp as dead.
8004 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8005 ptids.
8006 (fetch_register, usr_store_inferior_registers)
8007 (regsets_fetch_inferior_registers)
8008 (regsets_store_inferior_registers, linux_read_memory)
8009 (linux_write_memory): Inline `inferior_pid'.
8010 (linux_look_up_symbols): Adjust to use per-process
8011 `thread_db_active'.
8012 (linux_request_interrupt): Adjust to use ptids.
8013 (linux_read_auxv): Inline `inferior_pid'.
8014 (initialize_low): Don't reference thread_db_active.
8015 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8016 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8017 (ps_getpid): Return the pid of the current inferior.
8018 * thread-db.c (proc_handle, thread_agent): Delete.
8019 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8020 per-process data.
8021 (find_one_thread): Change argument type to ptid_t. Adjust to
8022 per-process data.
8023 (maybe_attach_thread): Adjust to per-process data and ptids.
8024 (thread_db_find_new_threads): Ditto.
8025 (thread_db_init): Ditto.
8026 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8027 processes table. Adjust to use ptids.
8028 (spu_kill, spu_detach): Adjust interface. Remove process from
8029 processes table.
8030 (spu_join, spu_thread_alive): Adjust interface.
8031 (spu_wait): Adjust interface. Remove process from processes
8032 table. Adjust to use ptids.
8033 * win32-low.c (current_inferior_tid): Delete.
8034 (current_inferior_ptid): New.
8035 (debug_event_ptid): New.
8036 (thread_rec): Take a ptid. Adjust.
8037 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8038 (child_delete_thread): Ditto.
8039 (do_initial_child_stuff): Add `attached' argument. Add process to
8040 processes table.
8041 (child_fetch_inferior_registers, child_store_inferior_registers):
8042 Adjust.
8043 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8044 (win32_attach): Pass 1 to do_initial_child_stuff.
8045 (win32_kill): Adjust interface. Remove process from processes
8046 table.
8047 (win32_detach): Ditto.
8048 (win32_join): Adjust interface.
8049 (win32_thread_alive): Take a ptid.
8050 (win32_resume): Adjust to use ptids.
8051 (get_child_debug_event): Ditto.
8052 (win32_wait): Adjust interface. Remove exiting process from
8053 processes table.
8054
bd99dc85
PA
80552009-04-01 Pedro Alves <pedro@codesourcery.com>
8056
8057 Non-stop mode support.
8058
8059 * server.h (non_stop): Declare.
8060 (gdb_client_data, handler_func): Declare.
8061 (delete_file_handler, add_file_handler, start_event_loop):
8062 Declare.
8063 (handle_serial_event, handle_target_event, push_event)
8064 (putpkt_notif): Declare.
8065 * target.h (enum resume_kind): New.
8066 (struct thread_resume): Replace `step' field by `kind' field.
8067 (TARGET_WNOHANG): Define.
8068 (struct target_ops) <wait>: Add `options' argument.
8069 <supports_non_stop, async, start_non_stop>: New fields.
8070 (target_supports_non_stop, target_async): New.
8071 (start_non_stop): Declare.
8072 (mywait): Add `options' argument.
8073 * target.c (mywait): Add `options' argument. Print child exit
8074 notifications here.
8075 (start_non_stop): New.
8076 * server.c (non_stop, own_buf, mem_buf): New globals.
8077 (struct vstop_notif): New.
8078 (notif_queue): New global.
8079 (queue_stop_reply, push_event, discard_queued_stop_replies)
8080 (send_next_stop_reply): New.
8081 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8082 interface changes.
8083 (attach_inferior): In non-stop mode, don't wait for the target
8084 here.
8085 (handle_general_set): Handle QNonStop.
8086 (handle_query): When handling qC, return the current general
8087 thread, instead of the first thread of the list.
8088 (handle_query): If the backend supports non-stop mode, include
8089 QNonStop+ in the qSupported query response.
8090 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8091 and non-stop mode.
8092 (handle_v_attach, handle_v_run): Handle non-stop mode.
8093 (handle_v_stopped): New.
8094 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8095 (myresume): Adjust to use resume_kind. Handle non-stop.
8096 (queue_stop_reply_callback): New.
8097 (handle_status): Handle non-stop mode.
8098 (main): Clear non_stop flag on reconnection. Use the event-loop.
8099 Refactor serial protocol handling from here ...
8100 (process_serial_event): ... to this new function. When GDB
8101 selects any thread, select one here. In non-stop mode, wait until
8102 GDB acks all pending events before exiting.
8103 (handle_serial_event, handle_target_event): New.
8104 * remote-utils.c (remote_open): Install remote_desc in the event
8105 loop.
8106 (remote_close): Remove remote_desc from the event loop.
8107 (putpkt_binary): Rename to...
8108 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8109 (putpkt_binary): New as wrapper around putpkt_binary_1.
8110 (putpkt_notif): New.
8111 (prepare_resume_reply): In non-stop mode, don't change the
8112 general_thread.
8113 * event-loop.c: New.
8114 * Makefile.in (OBJ): Add event-loop.o.
8115 (event-loop.o): New rule.
8116
8117 * linux-low.h (pid_of): Moved here.
8118 (lwpid_of): New.
8119 (get_lwp_thread): Use lwpid_of.
8120 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8121 * linux-low.c (pid_of): Delete.
8122 (inferior_pid): Use lwpid_of.
8123 (linux_event_pipe): New.
8124 (target_is_async_p): New.
8125 (delete_lwp): New.
8126 (handle_extended_wait): Use lwpid_of.
8127 (add_lwp): Don't set lwpid field.
8128 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8129 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8130 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8131 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8132 first. Adjust to linux_wait_for_event interface changes. Use
8133 lwpid_of.
8134 (linux_detach): Don't delete the main lwp here.
8135 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8136 (status_pending_p): Don't consider explicitly suspended lwps.
8137 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8138 pointer. Add OPTIONS argument. Change return type to int. Use
8139 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8140 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8141 pointer. Add status pointer argument. Return a pid instead of a
8142 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8143 changes. In non-stop mode, don't switch to a random thread.
8144 (linux_wait): Rename to...
8145 (linux_wait_1): ... this. Add target_options argument, and handle
8146 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8147 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8148 clean exit and signal exit code. Don't stop all threads in
8149 non-stop mode. In all-stop mode, only stop all threads when
8150 reporting a stop to GDB. Handle explicit thread stop requests.
8151 (async_file_flush, async_file_mark): New.
8152 (linux_wait): New.
8153 (send_sigstop): Use lwpid_of.
8154 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8155 interface changes. In non-stop mode, don't switch to a random
8156 thread.
8157 (linux_resume_one_lwp): Use lwpid_of.
8158 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8159 (linux_resume_one_thread): ... this. Handle resume_stop. In
8160 non-stop mode, don't look for pending flag in all threads.
8161 (resume_status_pending_p): Don't consider explicitly suspended
8162 threads.
8163 (my_waitpid): Reimplement. Emulate __WALL.
8164 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8165 Use lwpid_of.
8166 (sigchld_handler, linux_supports_non_stop, linux_async)
8167 (linux_start_non_stop): New.
8168 (linux_target_ops): Register linux_supports_non_stop, linux_async
8169 and linux_start_non_stop.
8170 (initialize_low): Install SIGCHLD handler.
8171 * thread-db.c (thread_db_create_event, find_one_thread)
8172 (thread_db_get_tls_address): Use lwpid_of.
8173 * win32-low.c (win32_detach): Adjust to use resume_kind.
8174 (win32_wait): Add `options' argument.
8175 * spu-low.c (spu_resume): Adjust to use resume_kind.
8176 (spu_wait): Add `options' argument.
8177
5b1c542e
PA
81782009-04-01 Pedro Alves <pedro@codesourcery.com>
8179
8180 Decouple target code from remote protocol.
8181
8182 * target.h (enum target_waitkind): New.
8183 (struct target_waitstatus): New.
8184 (struct target_ops) <wait>: Return an unsigned long. Take a
8185 target_waitstatus pointer instead of a char pointer.
8186 (mywait): Likewise.
8187 * target.c (mywait): Change prototype to return an unsigned long.
8188 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8189 * server.h (thread_from_wait, old_thread_from_wait): Delete
8190 declarations.
8191 (prepare_resume_reply): Change prototype to take a
8192 target_waitstatus.
8193 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8194 (last_status, last_ptid): New.
8195 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8196 pid instead of a signal.
8197 (attach_inferior): Remove "status" and "signal" parameters.
8198 Adjust.
8199 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8200 not as an address.
8201 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8202 (handle_v_requests, myresume): Remove "status" and "signal"
8203 parameters. Adjust.
8204 (handle_status): New.
8205 (main): Delete local `status'. Adjust.
8206 * remote-utils.c: Include target.h.
8207 (prepare_resume_reply): Change prototype to take a
8208 target_waitstatus. Adjust.
8209
8210 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8211 interface.
8212 * spu-low.c (spu_wait): Adjust.
8213 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8214 Delete.
8215 (win32_wait): Adjust.
8216
2bd7c093
PA
82172009-04-01 Pedro Alves <pedro@codesourcery.com>
8218
8219 * target.h (struct thread_resume): Delete leave_stopped member.
8220 (struct target_ops): Add a `n' argument to the `resume' callback.
8221 * server.c (start_inferior): Adjust.
8222 (handle_v_cont, myresume): Adjust.
8223 * linux-low.c (check_removed_breakpoint): Adjust to resume
8224 interface change, and to removed leave_stopped field.
8225 (resume_ptr): Delete.
8226 (struct thread_resume_array): New.
8227 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8228 resume interface change.
8229 (linux_continue_one_thread, linux_queue_one_thread)
8230 (resume_status_pending_p): Check if the resume field is NULL
8231 instead of checking the leave_stopped member.
8232 (linux_resume): Adjust to the target resume interface change.
8233 * spu-low.c (spu_resume): Adjust to the target resume interface
8234 change.
8235 * win32-low.c (win32_detach, win32_resume): Ditto.
8236
c35fafde
PA
82372009-04-01 Pedro Alves <pedro@codesourcery.com>
8238
8239 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8240 flag.
8241 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8242 pending.
8243 (linux_continue_one_thread): Only preserve the stepping flag if
8244 there's a pending breakpoint.
8245
0a59d50b
PA
82462009-03-31 Pedro Alves <pedro@codesourcery.com>
8247
8248 * server.c (main): After the inferior having exited, call
8249 remote_close before exiting gdbserver.
8250
f04c6d38
TJB
82512009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8252
8253 Fix size of FPSCR in Power 7 processors.
8254 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8255 (PPC_FEATURE_HAS_DFP): New #define.
8256 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8257 size of the FPSCR.
8258
78e5cee6
PA
82592009-03-23 Pedro Alves <pedro@codesourcery.com>
8260
8261 * server.c (handle_query) Whitespace and formatting.
8262
1b3f6016
PA
82632009-03-22 Pedro Alves <pedro@codesourcery.com>
8264
8265 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8266 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8267 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8268 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8269 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8270 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8271 Makefile.in, configure.ac: Fix whitespace throughout.
8272 * configure: Regenerate.
8273
a07b2135
PA
82742009-03-22 Pedro Alves <pedro@codesourcery.com>
8275
8276 * inferiors.c (find_inferior): Make it safe for the callback
8277 function to delete the currently iterated inferior.
8278
67cc2626
PA
82792009-03-22 Pedro Alves <pedro@codesourcery.com>
8280
8281 * Makefile.in (linuw_low_h): Move higher.
8282 (thread-db.o): Depend on $(linux_low_h).
8283
54a0b537
PA
82842009-03-17 Pedro Alves <pedro@codesourcery.com>
8285
8286 Rename "process" to "lwp" throughout.
8287
8288 * linux-low.c (all_processes): Rename to...
8289 (all_lwps): ... this.
8290 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8291 (add_process): Rename to ...
8292 (add_lwp): ... this. Adjust.
8293 (linux_create_inferior): Adjust.
8294 (linux_attach_lwp): Adjust.
8295 (linux_attach): Adjust.
8296 (linux_kill_one_process): Rename to ...
8297 (linux_kill_one_lwp): ... this. Adjust.
8298 (linux_kill): Adjust.
8299 (linux_detach_one_process): Rename to ...
8300 (linux_detach_one_lwp): ... this. Adjust.
8301 (linux_detach): Adjust.
8302 (check_removed_breakpoint): Adjust.
8303 (status_pending_p): Adjust.
8304 (linux_wait_for_process): Rename to ...
8305 (linux_wait_for_lwp): ... this. Adjust.
8306 (linux_wait_for_event): Adjust.
8307 (send_sigstop): Adjust.
8308 (wait_for_sigstop): Adjust.
8309 (stop_all_processes): Rename to ...
8310 (stop_all_lwps): ... this.
8311 (linux_resume_one_process): Rename to ...
8312 (linux_resume_one_lwp): ... this. Adjust.
8313 (linux_set_resume_request, linux_continue_one_thread)
8314 (linux_queue_one_thread, resume_status_pending_p)
8315 (usr_store_inferior_registers, regsets_store_inferior_registers)
8316 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8317 Adjust.
8318 * linux-low.h (get_process): Rename to ...
8319 (get_lwp): ... this. Adjust.
8320 (get_thread_process): Rename to ...
8321 (get_thread_lwp): ... this. Adjust.
8322 (get_process_thread): Rename to ...
8323 (get_lwp_thread): ... this. Adjust.
8324 (struct process_info): Rename to ...
8325 (struct lwp_info): ... this.
8326 (all_processes): Rename to ...
8327 (all_lwps): ... this.
8328 * proc-service.c (ps_lgetregs): Adjust.
8329 * thread-db.c (thread_db_create_event, find_one_thread)
8330 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8331
0b16c5cf
PA
83322009-03-14 Pedro Alves <pedro@codesourcery.com>
8333
8334 * server.c (handle_query): Handle "qAttached".
8335
32de4b9d
NS
83362009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8337
8338 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8339 GPLv3, update license URL.
8340
2aecd87f
DE
83412009-03-01 Doug Evans <dje@google.com>
8342
93efd302 8343 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8344 (server_h): Add gdb_signals.h.
8345 (signals.o): Update.
8346 * server.h (target_signal_from_host,target_signal_to_host_p)
8347 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8348
86b1f9c5
PM
83492009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8350
8351 * remote-utils.c (getpkt): Also generate remote-debug
8352 information if noack_mode is set.
8353
4aa995e1
PA
83542009-02-06 Pedro Alves <pedro@codesourcery.com>
8355
8356 * server.c (handle_query): Report qXfer:siginfo:read and
8357 qXfer:siginfo:write as supported and handle them.
8358 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8359 * linux-low.c (linux_xfer_siginfo): New.
8360 (linux_target_ops): Set it.
8361
62709adf
PA
83622009-01-26 Pedro Alves <pedro@codesourcery.com>
8363
8364 * server.c (gdbserver_usage): Mention --remote-debug.
8365 (main): Accept '--remote-debug' switch.
8366
aef93bd7
DE
83672009-01-18 Doug Evans <dje@google.com>
8368
8369 * regcache.c (new_register_cache): No need to check result of xcalloc.
8370 * server.c (handle_search_memory): Back out calls to xmalloc,
8371 result is checked and error is returned to user upon failure.
8372 (handle_query): Ditto. Add more checks for result of malloc.
8373 (handle_v_cont): Check result of malloc, report error back to
8374 user upon failure.
8375 (handle_v_run): Ditto. Call freeargv.
8376 * server.h (freeargv): Declare.
8377 * utils.c (freeargv): New fn.
8378
54363045
DE
83792009-01-15 Doug Evans <dje@google.com>
8380
f626972c
DE
8381 * gdbreplay.c (perror_with_name): Make arg const char *.
8382 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8383 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8384 * utils.c (perror_with_name): Make arg const char *.
54363045 8385
18aae699
PA
83862009-01-14 Pedro Alves <pedro@codesourcery.com>
8387
8388 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8389 when handling a EXIT_PROCESS_DEBUG_EVENT.
8390
ff703abe
JB
83912009-01-06 Joel Brobecker <brobecker@adacore.com>
8392
8393 * gdbreplay.c (gdbreplay_version): Update copyright year.
8394 * server.c (gdbserver_version): Likewise.
8395
f21cc1a2 83962009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8397
8398 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8399 (handle_extended_wait): Improve comment.
0e21c1ec 8400
bca929d3
DE
84012008-12-13 Doug Evans <dje@google.com>
8402
8403 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8404 * server.h (ATTR_MALLOC): New macro.
8405 (xmalloc,xcalloc,xstrdup): Declare.
8406 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8407 * inferiors.c: Ditto.
8408 * linux-low.c: Ditto.
8409 * mem-break.c: Ditto.
8410 * regcache.c: Ditto.
8411 * remote-utils.c: Ditto.
8412 * server.c: Ditto.
8413 * target.c: Ditto.
8414 * win32-low.c: Ditto.
8415
97438e3f
DE
84162008-12-12 Doug Evans <dje@google.com>
8417
896c7fbb
DE
8418 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8419 in debugging printf.
8420
97438e3f
DE
8421 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8422
e3b886f8
DE
84232008-12-09 Doug Evans <dje@google.com>
8424
8425 * linux-low.h (struct process_info): Delete member tid, unused.
8426 * thread-db.c (find_one_thread): Update.
8427 (maybe_attach_thread): Update.
8428
07e059b5
VP
84292008-12-02 Pedro Alves <pedro@codesourcery.com>
8430
889bf7c5
PA
8431 * target.h (struct target_ops): Add qxfer_osdata member.
8432 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8433 and dirent.h.
8434 (linux_qxfer_osdata): New functions.
8435 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8436 callback.
8437 * server.c (handle_query): Handle "qXfer:osdata:read:".
8438 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8439 (buffer_xml_printf): New functions.
8440 * server.h (struct buffer): New.
8441 (buffer_grow_str, buffer_grow_str0): New macros.
8442 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8443 (buffer_xml_printf): Declare.
07e059b5 8444
4cab47ab
DE
84452008-11-24 Doug Evans <dje@google.com>
8446
8447 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8448
f142445f
DJ
84492008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8450
8451 * server.c (handle_v_run): Always use the supplied argument list.
8452
d0107bb6 84532008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8454
d0107bb6
BW
8455 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8456 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8457
2c4ad781
TJB
84582008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8459
8460 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8461 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8462 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8463 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8464 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8465 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8466 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8467 XML target descriptions.
8468 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8469 when inferior is running on an ISA 2.05 or later processor. Add
8470 special case to return offset for full 64-bit slot of FPSCR when
8471 in 32-bits.
8472
dfb64f85
DJ
84732008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8474
8475 * Makefile.in (SFILES, clean): Added sparc64 files.
8476 (reg-sparc64.o, reg-sparc64.c): New.
8477 * configure.srv (sparc*-*-linux*): New configuration.
8478 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8479 syscall arguments for SPARC.
8480 (regsets_store_inferior_registers): Likewise.
8481 * linux-sparc-low.c: New file.
8482
66b6e1dd
DE
84832008-10-21 Doug Evans <dje@google.com>
8484
8485 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8486 (READLINE_DIR,READLINE_DEP): Delete.
8487 (INTERNAL_CFLAGS): Update.
8488 (LINTFLAGS): Update.
8489
9b710a42
PA
84902008-10-10 Pedro Alves <pedro@codesourcery.com>
8491
8492 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8493 whole argv from the last run, not just argv[0].
8494
5822d809
PA
84952008-09-08 Pedro Alves <pedro@codesourcery.com>
8496
8497 * regcache.c (new_register_cache): Return NULL if the register
8498 cache size isn't known yet.
8499 (free_register_cache): Avoid dereferencing a NULL regcache.
8500
74aac56f
DJ
85012008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8502
8503 * configure.srv: Merge MIPS and MIPS64.
8504
400b20f5
MR
85052008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8506
8507 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8508
677c5bb1
LM
85092008-08-18 Luis Machado <luisgpm@br.ibm.com>
8510
8511 * Makefile.in: Add required vsx dependencies.
8512
8513 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8514 Declare init_registers_powerpc_vsx32l.
8515 Declare init_registers_powerpc_vsx64l.
8516 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8517 (ppc_arch_setup): Check for VSX in hwcap.
8518 (ppc_fill_vsxregset): New function.
8519 (ppc_store_vsxregset): New function.
8520 Add new VSX entry in regset_info target_regsets.
8521
8522 * configure.srv: Add new VSX dependencies.
8523
a6f3e723
SL
85242008-08-12 Pedro Alves <pedro@codesourcery.com>
8525
8526 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8527 (remote_open): Set or clear transport_is_reliable.
8528 (putpkt_binary): Don't expect acks in noack mode.
8529 (getpkt): Don't send ack/nac in noack mode.
8530 * server.c (handle_general_set): Handle QStartNoAckMode.
8531 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8532 qSupported.
8533 (main): Reset noack_mode on every connection.
8534 * server.h (noack_mode): Declare.
8535
a417dc56
RW
85362008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8537
8538 * Makefile.in (GDBREPLAY_OBS): New variable.
8539 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8540
3221518c
UW
85412008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8542 Daniel Jacobowitz <dan@codesourcery.com>
8543
8544 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8545 (usr_store_inferior_registers): Likewise.
8546 (regsets_store_inferior_registers): Likewise.
8547
ec56be1b
PA
85482008-07-31 Rolf Jansen <rj@surtec.com>
8549 Pedro Alves <pedro@codesourcery.com>
8550
8551 * configure.ac: Check for memmem declaration.
8552 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8553 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8554 (disable_packet_qfThreadInfo): Unconditionally compile.
8555 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8556 * configure, config.in: Regenerate.
8557
2fe5e3ff
DE
85582008-07-28 Doug Kwan <dougkwan@google.com>
8559
8560 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8561 (linux_write_memory): Remove declaration of errno.
8562
836acd6d
UW
85632008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8564
8565 * linux-low.c (handle_extended_wait): Do not use "status"
8566 variable uninitialized.
8567
aeba519e
PA
85682008-07-07 Pedro Alves <pedro@codesourcery.com>
8569
8570 * server.c (handle_v_attach): Inhibit reporting dll changes.
8571
db42f210
PA
85722008-06-27 Pedro Alves <pedro@codesourcery.com>
8573
8574 * remote-utils.c (prepare_resume_reply): If requested, don't
8575 output "thread:TID" in the T stop reply.
8576
8577 * server.c (disable_packet_vCont, disable_packet_Tthread)
8578 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8579 (handle_query): If requested, disable support for qC, qfThreadInfo
8580 and qsThreadInfo.
8581 (handle_v_requests): If requested, disable support for vCont.
8582 (gdbserver_show_disableable): New.
8583 (main): Handle --disable-packet and --disable-packet=LIST.
8584
8585 * server.h (disable_packet_vCont, disable_packet_Tthread)
8586 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8587
8e4c5421
CD
85882008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8589
8590 * server.c (gdbserver_usage): Mention --version.
8591
6e23a804
DJ
85922008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8593
8594 * Makefile.in (gdbreplay.o): New rule.
8595
90aa6a40
JM
85962008-06-06 Joseph Myers <joseph@codesourcery.com>
8597
8598 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8599 message, not gdbserver.
8600
c16158bc 86012008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8602 Nathan Sidwell <nathan@codesourcery.com>
8603 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8604
8605 * acinclude.m4: Include ../../config/acx.m4.
8606 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8607 * configure, config.in: Regenerate.
8608 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8609 * server.c (gdbserver_version): Print PKGVERSION.
8610 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8611 (main): Adjust gdbserver_usage calls.
8612 * gdbreplay.c (version, host_name): Add declarations.
8613 (gdbreplay_version, gdbreplay_usage): New.
8614 (main): Accept --version and --help options.
8615
aeb75bf5
DJ
86162008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8617
8618 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8619 (arm_breakpoint_at): Handle Thumb.
8620 (the_low_target): Add comment.
8621
76b233dd
UW
86222008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8623
8624 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8625
08388c79
DE
86262008-05-09 Doug Evans <dje@google.com>
8627
a3c83fae
DE
8628 * server.h (decode_search_memory_packet): Declare.
8629 * remote-utils.c (decode_search_memory_packet): New fn.
8630 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8631 (handle_search_memory): New fn.
8632 (handle_query): Process qSearch:memory packets.
8633
bb9c3d36
UW
86342008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8635
8636 * regcache.c (registers_length): Remove.
8637 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8638 full register packet.
8639 * regcache.h (registers_length): Remove prototype.
8640 * server.h (PBUFSIZ): Define to 16384.
8641
7284e1be
UW
86422008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8643
8644 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8645 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8646 powerpc-64l.o, and powerpc-altivec64l.o.
8647 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8648 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8649 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8650 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8651 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8652 to srv_xmlfiles.
8653
8654 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8655 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8656 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8657 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8658 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8659 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8660 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8661 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8662 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8663 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8664 (clean): Update.
8665
8666 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8667 (init_registers_powerpc_32l): ... this new prototype.
8668 (init_registers_powerpc_32): Remove, replace by ...
8669 (init_registers_powerpc_altivec32l): ... this new prototype.
8670 (init_registers_powerpc_e500): Remove, replace by ...
8671 (init_registers_powerpc_e500l): ... this new prototype.
8672 (init_registers_ppc64): Remove, replace by ...
8673 (init_registers_powerpc_64l): ... this new prototype.
8674 (init_registers_powerpc_64): Remove, replace by ...
8675 (init_registers_powerpc_altivec64l): ... this new prototype.
8676 (ppc_num_regs): Set to 73.
8677 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8678 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8679 (ppc_cannot_store_register): Handle orig_r3 and trap.
8680 (ppc_arch_setup): Update init_registers_... calls.
8681 (ppc_fill_gregset): Handle orig_r3 and trap.
8682
8683 * inferiors.c (clear_inferiors): Reset current_inferior.
8684
fdc59709
PB
86852008-04-23 Paolo Bonzini <bonzini@gnu.org>
8686
889bf7c5
PA
8687 * acinclude.m4: Add override.m4.
8688 * configure: Regenerate.
fdc59709 8689
c9b2f845
UW
86902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8691
8692 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8693 initial call to init_register_ppc64.
8694
550512b8
UW
86952008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8696
43aaf8b6
PA
8697 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8698 single powerpc*-*-linux* case.
550512b8
UW
8699 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8700
b6430ec3
UW
87012008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8702
8703 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8704 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8705 from reg_xmlfiles.
8706 * linux-ppc-low.c: Include <elf.h>.
8707 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8708 (ppc_hwcap): New global variable.
8709 (ppc_regmap): Remove __SPE__ #ifdef sections.
8710 (ppc_regmap_e500): New global variable.
8711 (ppc_cannot_store_register): Update __SPE__ special case.
8712 (ppc_get_hwcap): New function.
8713 (ppc_arch_setup): Use it to determine whether inferior supports
8714 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8715 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8716 Do not access registers if target does not support AltiVec.
8717 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8718 Do not access registers if target does not support SPE.
8719 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8720
52fa2412
UW
87212008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8722
8723 * linux-low.c (disabled_regsets, num_regsets): New.
8724 (use_regsets_p): Delete.
8725 (linux_wait_for_process): Clear disabled_regsets.
8726 (regsets_fetch_inferior_registers): Check and set it.
8727 (regsets_store_inferior_registers): Likewise.
8728 (linux_fetch_registers, linux_store_registers): Do not use
8729 use_regsets_p.
8730 (initialize_low): Allocate disabled_regsets.
8731
e28b3332
DJ
87322008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8733
8734 * Makefile.in (LIBOBJS): New.
8735 (OBS): Use LIBOBJS.
8736 (memmem.o): New rule.
8737 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8738 * configure: Regenerated.
8739
4536995d
UW
87402008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8741
8742 * server.c (handle_query): Never return "unsupported" for
8743 qXfer:features:read queries.
8744
221c031f
UW
87452008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8746
8747 * server.c (get_features_xml): Fix inverted condition.
8748 (handle_query): Always support qXfer:feature:read.
8749
ccd213ac
DJ
87502008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8751
8752 * server.c (wrapper_argv): New.
8753 (start_inferior): Handle wrapper_argv. If set, expect an extra
8754 trap.
8755 (gdbserver_usage): Document --wrapper.
8756 (main): Parse --wrapper.
8757
6fe305f7
UW
87582008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8759
8760 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8761 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8762 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8763 (ppc_set_pc): Likewise.
8764 (ppc_arch_setup): New function.
8765 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8766 of collect_register.
889bf7c5 8767 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8768
5b0a002e
UW
87692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8770
8771 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8772 instead of linux-ppc64-low.o.
8773 * linux-ppc64-low.c: Remove file.
8774 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8775 (linux-ppc64-low.o): Remove rule.
8776
8777 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8778 (init_registers_powerpc_64): Likewise.
8779 (ppc_regmap): Conditionally define depending on __powerpc64__.
8780 (ppc_cannot_store_register): Do not special-case "fpscr" when
8781 compiled on __powerpc64__.
8782 (ppc_collect_ptrace_register): New function.
8783 (ppc_supply_ptrace_register): New function.
8784 (ppc_breakpoint): Change type to "unsigned int".
8785 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8786 (the_low_target): Conditionally provide initializers for the
889bf7c5 8787 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8788 collect_ptrace_register and supply_ptrace_register members.
8789
9b4b61c8
UW
87902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8791
8792 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8793 * server.c (gdbserver_xmltarget): Define.
8794 (get_features_xml): Use it to replace "target.xml" and arch_string.
8795
8796 * configure.srv: Remove srv_xmltarget. Add XML files that were
8797 mentioned there to srv_xmlfiles instead. Remove conditional tests
8798 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8799 srv_xmlfiles and srv_regobj to include all possible choices.
8800 * configure.ac (srv_xmltarget): Remove.
8801 (srv_xmlfiles): Do not add "target.xml".
8802 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8803 checks for supplementary target information.
8804 * configure: Regenerate.
8805 * Makefile.in (XML_TARGET): Remove.
8806 (target.xml): Remove rule.
8807 (clean): Do not clean up target.xml.
8808 (.PRECIOUS): Do not mention target.xml.
8809
8810 * target.h (struct target_ops): Remove arch_string member.
8811 * linux-low.c (linux_arch_string): Remove.
8812 (linux_target_ops): Remove arch_string initializer.
8813 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8814 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8815 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8816 * spu-low.c (spu_arch_string): Remove.
8817 (spu_target_ops): Remove arch_string initializer.
8818 * win32-low.c (win32_arch_string): Remove.
8819 (win32_target_ops): Remove arch_string initializer.
8820 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8821 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8822 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8823
ee1a7ae4
UW
88242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8825
8826 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8827 by collect_ptrace_register and supply_ptrace_register hooks.
8828 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8829 instead of checking for the_low_target.left_pad_xfer.
8830 (usr_store_inferior_registers): Use collect_ptrace_register callback
8831 instead of checking for the_low_target.left_pad_xfer.
8832
8833 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8834 (s390_supply_ptrace_register): Likewise.
8835 (s390_fill_gregset): Call s390_collect_ptrace_register.
8836 (the_low_target): Update.
8837
8838 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8839 (ppc_supply_ptrace_register): Likewise.
8840 (the_low_target): Update.
8841
8842 * linux-i386-low.c (the_low_target): Update.
8843 * linux-x86-64-low.c (the_low_target): Update.
8844
d61ddec4
UW
88452008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8846
8847 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8848 reg-s390.o and reg-s390x.o.
8849
8850 * linux-low.c (new_inferior): New global variable.
8851 (linux_create_inferior, linux_attach): Set it.
8852 (linux_wait_for_process): Call the_low_target.arch_setup after the
8853 target has stopped for the first time.
8854 (initialize_low): Do not call the_low_target.arch_setup.
8855
8856 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8857 (s390_set_pc): Likewise.
8858 (s390_arch_setup): New function.
8859 (the_low_target): Use s390_arch_setup as arch_setup routine.
8860
8861 * regcache.c (realloc_register_cache): New function.
8862 (set_register_cache): Call it for each existing regcache.
8863
d05b4ac3
UW
88642008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8865
8866 * server.h (init_registers): Remove prototype.
8867
8868 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8869 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8870 instead of init_registers ().
8871 * linux-arm-low.c (init_registers_arm): Add prototype.
8872 (init_registers_arm_with_iwmmxt): Likewise.
8873 (the_low_target): Add initializer for arch_setup field.
8874 * linux-cris-low.c (init_registers_cris): Add prototype.
8875 (the_low_target): Add initializer for arch_setup field.
8876 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8877 (the_low_target): Add initializer for arch_setup field.
8878 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8879 (the_low_target): Add initializer for arch_setup field.
8880 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8881 (the_low_target): Add initializer for arch_setup field.
8882 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8883 (the_low_target): Add initializer for arch_setup field.
8884 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8885 (the_low_target): Add initializer for arch_setup field.
8886 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8887 (init_registers_mips64_linux): Likewise.
8888 (the_low_target): Add initializer for arch_setup field.
8889 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8890 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8891 (the_low_target): Add initializer for arch_setup field.
8892 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8893 (init_registers_powerpc_64): Likewise.
8894 (the_low_target): Add initializer for arch_setup field.
8895 * linux-s390-low.c (init_registers_s390): Add prototype.
8896 (init_registers_s390x): Likewise.
8897 (the_low_target): Add initializer for arch_setup field.
8898 * linux-sh-low.c (init_registers_sh): Add prototype.
8899 (the_low_target): Add initializer for arch_setup field.
8900 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8901 (the_low_target): Add initializer for arch_setup field.
8902 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8903 (the_low_target): Add initializer for arch_setup field.
8904
8905 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8906 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8907 instead of init_registers ().
8908 * win32-arm-low.c (init_registers_arm): Add prototype.
8909 (the_low_target): Add initializer for arch_setup field.
8910 * win32-i386-low.c (init_registers_i386): Add prototype.
8911 (the_low_target): Add initializer for arch_setup field.
8912
8913 * spu-low.c (init_registers_spu): Add prototype.
8914 (initialize_low): Call initialie_registers_spu () instead of
8915 initialize_registers ().
8916
fd96d250
PA
89172008-02-19 Pedro Alves <pedro@codesourcery.com>
8918
8919 * server.c (handle_v_requests): When handling the vRun and vAttach
8920 packets, if already debugging a process, don't kill it. Return an
8921 error instead.
8922
d41b6bb4
DJ
89232008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8924
8925 * server.c (handle_query): Correct length check.
8926
5ac588cf
PA
89272008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8928
8929 * win32-low.c (do_initial_child_stuff): Add process handle
8930 parameter. Set current_process_handle and current_process_id from the
8931 parameters. Clear globals.
8932 (win32_create_inferior): Don't set current_process_handle and
8933 current_process_id here. Instead pass them on the call to
8934 do_initial_child_stuff.
8935 (win32_attach): Likewise.
8936 (win32_clear_inferiors): New.
8937 (win32_kill): Don't close the current process handle or the
8938 current thread handle here. Instead call win32_clear_inferiors.
8939 (win32_detach): Don't open a new handle to the process. Call
8940 win32_clear_inferiors.
8941 (win32_join): Don't rely on current_process_handle; open a new
8942 handle using the process id.
8943 (win32_wait): Call win32_clear_inferiors when the inferior process
8944 has exited.
8945
ecd7ecbc
DJ
89462008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8947
8948 * server.c (monitor_show_help): Add "exit".
8949
1525d545
MG
89502008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8951
ecd7ecbc 8952 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8953 (clean): Add reg-xtensa.c.
8954 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8955 * configure.srv (xtensa*-*-linux*) New target.
8956 * linux-xtensa-low.c: New.
8957 * xtensa-xtregs.c: New.
1525d545 8958
59a016f0
PA
89592008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8960
8961 * hostio.c: Don't include errno.h.
8962 (errno_to_fileio_errno): Move to hostio-errno.
8963 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8964 error number outputting to the target->hostio_last_error callback.
8965 (hostio_packet_error): Use FILEIO_EINVAL directly.
8966 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8967 calls to hostio_error.
8968 * hostio-errno.c: New.
8969 * server.h (hostio_last_error_from_errno): Declare.
8970 * target.h (target_ops): Add hostio_last_error member.
8971 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8972 as hostio_last_error handler.
889bf7c5 8973 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8974 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8975 (wince_hostio_last_error): New functions.
8976 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8977 as hostio_last_error handler.
8978 (win32_target_ops) [!_WIN32_WCE]: Register
8979 hostio_last_error_from_errno as hostio_last_error handler.
8980 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8981 (hostio-errno.o): New rule.
8982 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8983 * configure.srv (srv_hostio_err_objs): New variable. Default to
8984 hostio-errno.o.
8985 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8986 * configure: Regenerate.
8987
2d717e4f
DJ
89882008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8989
8990 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8991 (linux_kill, linux_detach): Clean up the process list.
8992 * remote-utils.c (remote_open): Improve port number parsing.
8993 (putpkt_binary, input_interrupt): Only send interrupts if the target
8994 is running.
8995 * server.c (extended_protocol): Make static.
8996 (attached): Define earlier.
8997 (exit_requested, response_needed, program_argv): New variables.
8998 (target_running): New.
8999 (start_inferior): Clear attached here.
9000 (attach_inferior): Set attached here.
9001 (require_running): Define.
9002 (handle_query): Use require_running and target_running. Implement
9003 "monitor exit".
9004 (handle_v_attach, handle_v_run): New.
9005 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9006 (gdbserver_usage): Update.
9007 (main): Redo argument parsing. Handle --debug and --multi. Handle
9008 --attach along with other options or after the port. Save
9009 program_argv. Support no initial program. Resynchronize
9010 communication with GDB after an error. Handle "monitor exit".
9011 Use require_running and target_running. Always allow the extended
9012 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9013 restart in extended mode.
9014 * README: Refer to the GDB manual. Update --attach usage.
9015
7407e2de
AS
90162007-12-20 Andreas Schwab <schwab@suse.de>
9017
9018 * linux-low.c (STACK_SIZE): Define.
9019 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9020 (linux_test_for_tracefork): Likewise.
9021
b65d95c5
DJ
90222007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9023
9024 * linux-low.c (linux_wait_for_event): Update messages. Do not
9025 reinsert auto-delete breakpoints.
9026 * mem-break.c (struct breakpoint): Change return type of handler to
9027 int.
9028 (set_breakpoint_at): Update handler type.
9029 (reinsert_breakpoint_handler): Return 1 instead of calling
9030 delete_breakpoint.
9031 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9032 setting a new one.
9033 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9034 * mem-break.h (set_breakpoint_at): Update handler type.
9035 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9036 * win32-low.c (auto_delete_breakpoint): New.
9037 (get_child_debug_event): Use it.
9038
4e799345
DJ
90392007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9040
9041 * configure.ac: Check for pread and pwrite.
9042 * hostio.c (handle_pread): Fall back to lseek and read.
9043 (handle_pwrite): Fall back to lseek and write.
9044 * config.in, configure: Regenerated.
9045
27524b67
DJ
90462007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9047
9048 * server.c (myresume): Add own_buf argument.
9049 (main): Update calls.
9050
a20d5e98
DJ
90512007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9052
9053 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9054 * remote-utils.c (remote_open): Do not call disable_async_io.
9055 (block_async_io): Delete.
9056 (unblock_async_io): Make static.
9057 (initialize_async_io): New.
9058 * server.c (handle_v_cont): Handle async I/O here.
9059 (myresume): Likewise. Move other common resume tasks here...
9060 (main): ... from here. Call initialize_async_io. Disable async
9061 I/O before the main loop.
9062 * server.h (initialize_async_io): Declare.
9063 (block_async_io, unblock_async_io): Delete prototypes.
9064 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9065
b79d787e
DJ
90662007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9067
9068 * remote-utils.c (readchar): Allow binary data in received messages.
9069
d97903b2
PA
90702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9071
9072 * win32-low.c (attaching): New global.
9073 (win32_create_inferior): Clear the `attaching' global.
9074 (win32_attach): Set the `attaching' global.
9075 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9076 attaching. Only set a breakpoint at the entry point if not
9077 attaching.
9078
311de423
PA
90792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9080
9081 * server.c (main): Don't report dll events on the initial
9082 connection on attaches.
9083
6c2d16d2
PA
90842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9085
9086 * server.c (main): Relax numerical bases supported for the pid of
9087 the --attach command line argument.
9088
5ca906e6
PA
90892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9090
9091 * win32-low.c (win32_attach): Call OpenProcess before
9092 DebugActiveProcess, not after. Add last error output to error
9093 call.
9094
9c6c8194
PA
90952007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9096
9097 * win32-low.c (win32_get_thread_context)
9098 (win32_set_thread_context): New functions.
9099 (thread_rec): Use win32_get_thread_context.
9100 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9101 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9102 field.
9103
4d5d1aaa
PA
91042007-12-03 Leo Zayas
9105 Pedro Alves <pedro_alves@portugalmail.pt>
9106
9107 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9108 global variables.
9109 (child_add_thread): Minor cleanup.
9110 (child_continue): Resume artificially suspended threads before
9111 calling ContinueDebugEvent.
9112 (suspend_one_thread): New.
9113 (fake_breakpoint_event): New.
9114 (get_child_debug_event): Change return type to int. Check here if
9115 gdb sent an interrupt request. If a soft interrupt was requested,
9116 fake a breakpoint event. Return 0 if there is no event to handle,
9117 and 1 otherwise.
9118 (win32_wait): Don't check here if gdb sent an interrupt request.
9119 Ensure there is a valid event to handle.
9120 (win32_request_interrupt): Add soft interruption method as last
9121 resort.
9122
c436e841
PA
91232007-12-03 Leo Zayas
9124 Pedro Alves <pedro_alves@portugalmail.pt>
9125
9126 * win32-low.h (win32_thread_info): Add descriptions to the
9127 structure members. Replace `suspend_count' counter by a
9128 `suspended' flag.
9129 * win32-low.c (thread_rec): Update condition of when to get the
9130 context from the inferior. Rely on ContextFlags being set if it
9131 has already been retrieved. Only suspend the inferior thread if
9132 we haven't already. Warn if that fails.
9133 (continue_one_thread): s/suspend_count/suspended/. Only call
9134 ResumeThread once. Warn if that fails.
9135
e7b5fa67
PA
91362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9137
9138 * win32-low.c (win32_wait): Don't read from the inferior when it
9139 has already exited.
9140
a385171d
PA
91412007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9142
9143 * Makefile.in (win32_low_h): New variable.
9144 (win32-low.o): Add dependency on $(win32_low_h).
9145 (win32-arm-low.o, win32-i386-low.o): New rules.
9146
f80c84b3
DJ
91472007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9148
9149 * hostio.c: Correct copyright year.
9150
a6b151f1
DJ
91512007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9152
9153 * Makefile.in (OBS): Add hostio.o.
9154 (hostio.o): New rule.
9155 * server.h (handle_vFile): Declare.
9156 * hostio.c: New file.
9157 * server.c (handle_v_requests): Take packet_len and new_packet_len
9158 for binary packets. Call handle_vFile.
9159 (main): Update call to handle_v_requests.
9160
f9387fc3
DJ
91612007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9162
9163 * linux-low.c: Include <sched.h>.
9164
51c2684e
DJ
91652007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9166
9167 * linux-low.c (linux_tracefork_grandchild): New.
9168 (linux_tracefork_child): Use clone.
9169 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9170
75f83163
JB
91712007-10-31 Joel Brobecker <brobecker@adacore.com>
9172
9173 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9174
da5898ce
DJ
91752007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9176
9177 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9178
24a09b5f
DJ
91792007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9180
9181 * inferiors.c (change_inferior_id): Delete.
9182 (add_pid_to_list, pull_pid_from_list): New.
9183 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9184 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9185 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9186 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9187 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9188 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9189 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9190 (using_threads): Always set to 1.
9191 (handle_extended_wait): New.
9192 (add_process): Do not set TID.
9193 (linux_create_inferior): Set must_set_ptrace_flags.
9194 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9195 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9196 (linux_thread_alive): Rename TID argument to LWPID.
9197 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9198 (linux_wait_for_event): Do not use TID or check using_threads. Update
9199 call to dead_thread_notify. Call handle_extended_wait.
9200 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9201 (send_sigstop): Delete sigstop_sent.
9202 (wait_for_sigstop): Avoid TID.
9203 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9204 (linux_test_for_tracefork): New.
9205 (linux_lookup_signals): Use thread_db_active and
9206 linux_supports_tracefork_flag.
9207 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9208 * linux-low.h (get_process_thread): Avoid TID.
9209 (struct process_ifo): Move thread_known and tid to the end. Remove
9210 sigstop_sent.
9211 (linux_attach_lwp, thread_db_init): Update prototypes.
9212 * server.h (change_inferior_id): Delete prototype.
9213 (add_pid_to_list, pull_pid_from_list): New prototypes.
9214 * thread-db.c (thread_db_use_events): New.
9215 (find_first_thread): Rename to...
9216 (find_one_thread): ...this. Update callers and messages. Do not
9217 call fatal. Check thread_db_use_events. Do not call
9218 change_inferior_id or new_thread_notify.
9219 (maybe_attach_thread): Update. Do not call new_thread_notify.
9220 (thread_db_init): Set thread_db_use_events. Check use_events.
9221 * utils.c (fatal, warning): Correct message prefix.
9222
30ed0a8f
DJ
92232007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9224
9225 * Makefile.in (clean): Remove new files.
9226 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9227 (powerpc-64.o, powerpc-64.c): New rules.
9228 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9229 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9230 with SPE.
9231 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9232 SPE targets.
9233 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9234 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9235 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9236 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9237 (target_regsets): Add AltiVec and SPE register sets.
9238 * configure.ac: Check for AltiVec and SPE.
9239 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9240 (ppc_fill_vrregset, ppc_store_vrregset): New.
9241 (target_regsets): Add AltiVec register set.
9242 * configure: Regenerated.
9243
fd462a61
DJ
92442007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9245
9246 * linux-low.c (O_LARGEFILE): Define.
9247 (linux_read_memory): Use /proc/PID/mem.
9248 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9249 * configure, config.in: Regenerated.
9250
69f223ed
DJ
92512007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9252
9253 * linux-low.c (linux_wait_for_event): Do not pass signals while
9254 single-stepping.
9255
aec18585
PA
92562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9257
9258 * win32-low.c (create_process): New.
9259 (win32_create_inferior): Use create_process instead of
9260 CreateProcess. If create_process failed retry appending an ".exe"
9261 suffix. Store the GetLastError result immediatelly after
9262 create_process calls and use it on the call to error.
9263
34d86ddd
PA
92642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9265
9266 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9267
5a0e3bd0
JB
92682007-08-23 Joel Brobecker <brobecker@adacore.com>
9269
9270 * configure.ac: Switch license to GPLv3.
9271
f88c79e6
MS
92722007-08-01 Michael Snyder <msnyder@access-company.com>
9273
9274 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9275
6b3d9b83
PA
92762007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9277
9278 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9279 typedef.
9280 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9281 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9282 CloseToolhelp32Snapshot.
9283 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9284 CloseToolhelp32Snapshot.
9285
c588c53c
MS
92862007-07-27 Michael Snyder <michael.snyder@access-company.com>
9287
9288 * server.c (main): Check for inferior exit before main loop.
9289
aa0403d9
PA
92902007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9291
9292 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9293 instead of on tmp_desc.
9294
255e7678
DJ
92952007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9296 Daniel Jacobowitz <dan@codesourcery.com>
9297
9298 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9299 (add_thread): Minor cleanups.
9300 (clear_inferiors): Move lower in the file. Clear the DLL
9301 list.
9302 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9303 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9304 (xml_escape_text): New.
9305 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9306 for qSupported.
9307 (handle_v_cont): Report errors.
9308 (gdbserver_version): Update.
9309 (main): Correct size of own_buf. Do not report initial DLL events.
9310 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9311 (unloaded_dll, xml_escape_text): New.
9312 * win32-low.c (enum target_waitkind): Update comments.
9313 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9314 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9315 (win32_EnumProcessModules, win32_GetModuleInformation)
9316 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9317 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9318 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9319 (win32_Module32First, win32_Module32Next, load_toolhelp)
9320 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9321 (get_child_debug_event): Handle DLL events.
9322 (win32_wait): Likewise.
9323
0d37add9
DJ
93242007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9325
9326 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9327 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9328
45e2715e
PA
93292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9330
9331 * win32-low.c (handle_output_debug_string): Ignore event if not
9332 waiting.
9333
c5674cf1
PA
93342007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9335
9336 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9337
2bbe3cc1
DJ
93382007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9339
9340 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9341
ae13219e
DJ
93422007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9343
9344 * inferiors.c (change_inferior_id): Add comment.
9345 * linux-low.c (check_removed_breakpoint): Add an early
9346 prototype. Improve debug output.
9347 (linux_attach): Doc update.
9348 (linux_detach_one_process, linux_detach): Clean up before releasing
9349 each process.
9350 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9351 * linux-low.h (struct process_info): Doc improvement.
9352 * mem-break.c (delete_all_breakpoints): New.
9353 * mem-break.h (delete_all_breakpoints): New prototype.
9354 * thread-db.c (find_first_thread): New.
9355 (thread_db_create_event): Call it instead of
9356 thread_db_find_new_threads. Clean up unused variables.
9357 (maybe_attach_thread): Remove first thread handling.
9358 (thread_db_find_new_threads): Use find_first_thread.
9359 (thread_db_get_tls_address): Likewise.
9360
4105de34
DJ
93612007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9362
9363 * thread-db.c (thread_db_find_new_threads): Add prototype.
9364 (thread_db_create_event): Check for the main thread before adding
9365 a new thread.
9366 (maybe_attach_thread): Only enable event reporting if TID == 0.
9367 (thread_db_get_tls_address): Check for new threads.
9368
2b876972
DJ
93692007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9370
9371 * linux-low.c (linux_create_inferior): Try execv before execvp.
9372 * spu-low.c (spu_create_inferior): Likewise.
9373
7a245884
DJ
93742007-06-13 Mike Frysinger <vapier@gentoo.org>
9375
9376 * linux-low.c (linux_create_inferior): Change execv to execvp.
9377 * spu-low.c (spu_create_inferior): Likewies.
9378
117ce543
DJ
93792007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9380
9381 * Makefile.in (clean): Clean new files instead of deleted ones.
9382 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9383 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9384 rules.
9385 * configure.srv: Specify XML files and new regformats for MIPS and
9386 MIPS64 GNU/Linux.
9387 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9388 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9389 an entry for the restart register.
9390 (mips_cannot_fetch_register, mips_cannot_store_register)
9391 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9392 register names to match the XML descriptions.
9393 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9394 restart register instead of $0.
9395
0e7f50da
UW
93962007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9397 Markus Deuling <deuling@de.ibm.com>
9398
9399 * remote-utils.c (decode_xfer_write): New function.
9400 * server.h (decode_xfer_write): Add prototype.
9401 * server.c (handle_query): Add PACKET_LEN argument. Support
9402 qXfer:spu:read and qXfer:spu:write packets.
9403 (main): Pass packet_len to handle_query.
9404 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9405 * target.h (target_ops): Add qxfer_spu.
9406
374c1d38
UW
94072007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9408
9409 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9410 accessing non-seekable spufs files.
9411
bb63802a
UW
94122007-05-16 Markus Deuling <deuling@de.ibm.com>
9413
889bf7c5 9414 * server.c (handle_query): Add reply for qC packet.
bb63802a 9415
7390519e
PA
94162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9417 Leo Zayas <lerele@champenstudios@com>
9418
9419 * server.h (check_remote_input_interrupt_request): New function.
9420 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9421 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9422 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9423 (check_remote_input_interrupt_request): New function.
9424 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9425 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9426 winapi_GenerateConsoleCtrlEvent): New typedefs.
9427 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9428 to 250 ms.
9429 (win32_wait): Check for remote interrupt request
9430 with check_remote_input_interrupt_request.
9431 (win32_request_interrupt): New function.
9432 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9433
34b34921
PA
94342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9435
9436 * win32-low.c (debug_registers_changed,
9437 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9438 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9439 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9440 (thread_rec): Get context using the low target.
9441 (child_add_thread): Call thread_added on the low target,
9442 which does the same thing.
9443 (regptr): Delete.
9444 (do_initial_child_stuff): Remove debug registers references.
9445 Set context using the low target. Resume threads after
9446 setting the contexts.
9447 (child_continue): Remove dead variable. Remove debug
9448 registers references.
9449 (child_fetch_inferior_registers): Go through the low target.
9450 (do_child_store_inferior_registers): Remove.
9451 (child_store_inferior_registers): Go through the low target.
9452 (win32_resume): Remove debug registers references.
9453 Set context using the low target.
9454 (handle_exception): Change return type to void. Don't record
9455 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9456 first chance exception.
889bf7c5 9457 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9458 goto loop. Always return after waiting for debug event.
9459 (win32_wait): Convert to switch statement. Handle spurious
9460 events.
9461
9462 * win32-i386-low.c (debug_registers_changed,
9463 debug_registers_used): New.
9464 (initial_stuff): Rename to ...
9465 (i386_initial_stuff): ... this. Clear debug registers
9466 state variables.
9467 (store_debug_registers): Delete.
9468 (i386_get_thread_context): New.
9469 (load_debug_registers): Delete.
9470 (i386_set_thread_context): New.
9471 (i386_thread_added): New.
9472 (single_step): Rename to ...
9473 (i386_single_step): ... this.
9474 (do_fetch_inferior_registers): Rename to ...
9475 (i386_fetch_inferior_register): ... this.
9476 (i386_store_inferior_register): New.
9477 (the_low_target): Adapt to new interface.
9478
9479 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9480 (arm_get_thread_context): New.
9481 (arm_set_thread_context): New.
9482 (regptr): New.
9483 (do_fetch_inferior_registers): Rename to ...
9484 (arm_fetch_inferior_register): ... this.
9485 (arm_store_inferior_register): New.
9486 (arm_wince_breakpoint): Reimplement as unsigned long.
9487 (arm_wince_breakpoint_len): Define.
9488 (the_low_target): Adapt to new interface.
9489
9490 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9491 load_debug_registers. Add get_thread_context, set_thread_context,
9492 thread_added and store_inferior_register. Rename
9493 fetch_inferior_registers to fetch_inferior_register.
9494 (regptr): Remove declaration.
9495
dd6953e1
PA
94962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9497
9498 * linux-low.c (linux_detach): Change return type to int. Return 0.
9499 * spu-low.c (spu_detach): Likewise.
9500
444d6139
PA
95012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9502
9503 * target.h (target_ops): Change return type of detach to int.
9504 Add join.
9505 (join_inferior): New.
9506 * server.c (main): Don't skip detach support on mingw32.
9507 If the inferior doesn't support detaching return error.
9508 Call join_inferior instead of using waitpid.
9509 * linux-low.c (linux_join): New.
9510 (linux_target_op): Add linux_join.
9511 * spu-low.c (spu_join): New.
9512 (spu_target_ops): Add spu_join.
9513 * win32-low.c (win32_detach): Adapt to new interface.
9514 Reopen current_process_handle before detaching. Issue a child
9515 resume before detaching.
9516 (win32_join): New.
9517 (win32_target_op): Add win32_join.
9518
1d5315fe
PA
95192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9520
9521 * win32-low.c (win32-attach): Fix return value.
9522 * target.h (target_ops): Describe ATTACH return values.
9523
bf914831
PA
95242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9525
9526 * win32-low.c (GETPROCADDRESS): Define.
9527 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9528 (winapi_DebugSetProcessKillOnExit): Likewise.
9529 (win32_create_inferior): Force usage of ansi CreateProcessA.
9530 (win32_attach): Use GETPROCADDRESS.
9531 (win32_detach): Likewise.
9532
f72f3e60
PA
95332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9534
9535 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9536
ed50f18f
PA
95372007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9538
9539 * win32-low.c: Commit leftover changes from 2007-03-29.
9540
0c2ead7e
DJ
95412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9542
9543 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9544 fields short instead of int. Add explicit padding.
9545 (i387_cache_to_fsave): Remove unnecessary casts.
9546 (i387_fsave_to_cache): Doc fix.
9547 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9548
73725ff3
DJ
95492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9550
9551 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9552 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9553
d99f33d8
PA
95542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9555
9556 * configure.srv (arm*-*-mingw32ce*): Move near the other
9557 arm targets.
9558
68070c10
PA
95592007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9560
2482afc6 9561 * configure.ac: Add errno checking.
68070c10
PA
9562 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9563 sys/file.h and malloc.h.
9564 (AC_CHECK_DECLS): Add perror.
9565 (srv_mingwce): Handle.
2482afc6 9566 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9567 win32-i386-low.o to srv_tgtobj.
9568 (i[34567]86-*-mingw*): Likewise.
9569 (arm*-*-mingw32ce*): Add case.
9570 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9571 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9572 [__MINGW32CE__] (strerror): New function.
9573 [__MINGW32CE__] (errno): Define to GetLastError.
9574 [__MINGW32CE__] (COUNTOF): New macro.
9575 (remote_open): Remove extra close call.
9576 * mem-break.c (delete_breakpoint_at): New function.
9577 * mem-break.h (delete_breakpoint_at): Declare.
9578 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9579 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9580 [USE_WIN32API] (read, write): Add char* casts.
9581 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9582 * server.h: Include wincecompat.h on Windows CE.
9583 [HAVE_ERRNO_H]: Check.
9584 (perror): Declare if not declared.
9585 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9586 (perror_with_name): Remove errno declaration.
9587 * wincecompat.h: New.
9588 * wincecompat.c: New.
9589 * win32-low.h: New.
9590 * win32-arm-low.c: New.
9591 * win32-i386-low.c: New.
9592 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9593 (OUTMSG2): Make it safe.
9594 (_T): New macro.
9595 (COUNTOF): New macro.
9596 (NUM_REGS): Get it from the low target.
9597 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9598 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9599 (thread_rec): Let low target handle debug registers.
9600 (child_add_thread): Likewise.
9601 (child_init_thread_list): Likewise.
9602 (continue_one_thread): Likewise.
9603 (regptr): New.
9604 (do_child_fetch_inferior_registers): Move to ...
9605 * win32-i386-low.c: ... here, and rename to ...
9606 (do_fetch_inferior_registers): ... this.
889bf7c5 9607 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9608 Go through the low target.
9609 (do_child_store_inferior_registers): Use regptr.
9610 (strwinerror): New function.
9611 (win32_create_inferior): Handle Windows CE.
9612 Use strwinerror instead of strerror on Windows error
9613 codes. Add program to the error output.
9614 Don't close the main thread handle on Windows CE.
9615 (win32_attach): Use coredll.dll on Windows CE.
9616 (win32_kill): Close current process and current
9617 thread handles.
9618 (win32_detach): Use coredll.dll on Windows CE.
9619 (win32_resume): Let low target handle debug registers, and
9620 step request.
9621 (handle_exception): Add/Remove initial breakpoint. Avoid
9622 non-existant WSTOPSIG on Windows CE.
9623 (win32_read_inferior_memory): Cast to remove warning.
9624 (win32_arch_string): Go through the low target.
9625 (initialize_low): Call set_breakpoint_data with the low
9626 target's breakpoint.
9627 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9628 FOP_REGNUM, mappings): Move to ...
9629 * win32-i386-low.c: ... here.
9630 * win32-low.c (win32_thread_info): Move to ...
9631 * win32-low.h: ... here.
9632 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9633 win32-arm-low.c and wincecompat.c.
9634 (all:): Add $EXEEXT.
9635 (install-only:): Likewise.
9636 (gdbserver:): Likewise.
9637 (gdbreplay:): Likewise.
9638 * config.in: Regenerate.
9639 * configure: Regenerate.
9640
41093d81
PA
96412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9642
9643 * win32-low.c: Rename typedef thread_info to
9644 win32_thread_info throughout.
9645
544afa54
PA
96462007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9647
9648 * win32-i386-low.c: Rename to ...
9649 * win32-low.c: ... this.
9650 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9651 * Makefile.in: Likewise.
9652
bce7165d
PA
96532007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9654
9655 * remote-utils.c (monitor_output): Constify msg parameter.
9656 * server.h (monitor_output): Likewise.
9657 * win32-i386-low.c (handle_output_debug_string): New.
9658 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9659 handle_output_debug_string.
9660 (get_child_debug_event): Likewise.
9661
506c7aa0
DJ
96622007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9663
9664 * server.c (main): Correct strtoul check.
9665
42c81e2a
DJ
96662007-03-27 Jon Ringle <jon@ringle.org>
9667
9668 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9669
9453113a
DJ
96702007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9671
9672 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9673
64a69107
DJ
96742007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * terminal.h: Check HAVE_SGTTY_H.
9677
96782007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9679
9680 * remote-utils.c (remote_open): Print out the assigned port number.
9681
c74d0ad8
DJ
96822007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9683
9684 * remote-utils.c (monitor_output): New function.
9685 * server.c (debug_threads): Define here.
9686 (monitor_show_help): New function.
9687 (handle_query): Handle qRcmd.
9688 (main): Do not handle 'd' packet.
9689 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9690 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9691 of debug_threads.
9692
de7c3b4a
PA
96932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9694
9695 * Makefile.in (EXEEXT): New.
9696 (clean): Use $(EXEEXT).
9697
ef57601b
PA
96982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9699
9700 * target.h (target_ops): Rename send_signal to request_interrupt,
9701 and remove enum target_signal parameter.
9702 * linux-low.c (linux_request_interrupt): Rename from
9703 linux_send_signal, and always send SIGINT.
9704 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9705 and always send SIGINT.
9706 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9707 of send_signal.
9708 (input_interrupt): Likewise.
9709
820f2bda
PA
97102007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9711
9712 * server.c (get_features_xml): Check if target implemented
9713 arch_string.
9714 * win32-i386-low.c (win32_arch_string): New.
9715 (win32_target_ops): Add win32_arch_string as arch_string member.
9716
ab39bf24
UW
97172007-02-22 Markus Deuling <deuling@de.ibm.com>
9718
9719 * spu-low.c (spu_arch_string): New.
9720 (spu_target_ops): Add spu_arch_string.
9721
61ff6e04
DJ
97222007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9723
9724 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9725 * configure.ac: Do not check for terminal.h.
9726 * configure, config.in: Regenerated.
9727
fb1e4ffc
DJ
97282007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9729
9730 * Makefile.in (OBS): Add $(XML_BUILTIN).
9731 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9732 (clean): Update.
9733 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9734 (arm-with-iwmmxt.c): New.
9735 * config.in, configure: Regenerate.
9736 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9737 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9738 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9739 (arm*-*-linux*): Add iWMMXt and regset support.
9740 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9741 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9742 (arm_store_wmmxregset, target_regsets): New.
9743 * server.c (get_features_xml): Take annex argument. Check builtin
9744 XML documents.
9745 (handle_query): Handle multiple annexes.
9746
0f48aa01
DJ
97472007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * remote-utils.c [USE_WIN32API] (read, write): Define.
9750 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9751 write.
9752
23181151
DJ
97532007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9754
9755 * linux-i386-low.c (the_low_target): Set arch_string.
9756 * linux-x86-64-low.c (the_low_target): Likewise.
9757 * linux-low.c (linux_arch_string): New.
9758 (linux_target_ops): Add it.
9759 * linux-low.h (struct linux_target_ops): Add arch_string.
9760 * server.c (write_qxfer_response): Use const void * for DATA.
9761 (get_features_xml): New.
9762 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9763 * target.h (struct target_ops): Add arch_string method.
9764
9d606399
DJ
97652007-01-03 Denis Pilat <denis.pilat@st.com>
9766 Daniel Jacobowitz <dan@codesourcery.com>
9767
9768 * linux-low.c (linux_kill): Handle being called with no threads.
9769 * win32-i386-low.c (win32_kill): Likewise.
9770 (get_child_debug_event): Clear current_process_handle.
9771
97722006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9773 Daniel Jacobowitz <dan@codesourcery.com>
9774
9775 * remote-utils.c (remote_open): Check the type of specified
9776 serial port devices before opening them.
9777 * server.c (main): Kill the inferior if an error occurs during
9778 the first remote_open.
9779
a5e13d24
DJ
97802006-12-05 Markus Deuling <deuling@de.ibm.com>
9781
9782 * README: Update supported targets.
9783
186947f7
DJ
97842006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * Makefile.in (clean): Remove reg-mips64.c.
9787 (reg-mips64.c, reg-mips64.o): New rules.
9788 * configure.srv: Handle mips64. Include regset support for mips.
9789 * linux-mips-low.c (union mips_register): New.
9790 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9791 (mips_breakpoint, mips_breakpoint_at): Use int.
9792 (mips_collect_register, mips_supply_register)
9793 (mips_collect_register_32bit, mips_supply_register_32bit)
9794 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9795 (mips_store_fpregset, target_regsets): New.
9796 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9797
a13e2c95
UW
97982006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9799
9800 * configure.srv: Add target "spu*-*-*".
9801 * Makefile.in (clean): Remove reg-spu.c.
9802 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9803 * spu-low.c: New file.
9804
cb7283db
DJ
98052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9806
9807 * configure.ac: Correct td_thr_tls_get_addr test.
9808 * configure: Regenerated.
9809
89be2091
DJ
98102006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9811
9812 * linux-low.c (linux_wait_for_event): Reformat. Use the
9813 pass_signals array.
9814 * remote-utils.c (decode_address_to_semicolon): New.
9815 * server.c (pass_signals, handle_general_set): New.
9816 (handle_query): Mention QPassSignals for qSupported.
9817 (main): Call handle_general_set.
9818 * server.h (pass_signals, decode_address_to_semicolon): New.
9819
000ef4f0
DJ
98202006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9821
9822 * server.c (handle_query): Correct error handling for read_auxv.
9823
b7149293
UW
98242005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9825
9826 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9827 and srv_linux_thread_db to yes.
9828 * linux-s390-low.c (s390_fill_gregset): New function.
9829 (target_regsets): Define data structure.
9830
dae5f5cf
DJ
98312006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9832
9833 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9834 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9835 * config.in, configure: Regenerated.
9836 * inferiors.c (gdb_id_to_thread): New function.
9837 (gdb_id_to_thread_id): Use it.
9838 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9839 * linux-low.h (struct process_info): Add th member.
9840 (thread_db_get_tls_address): New prototype.
9841 * remote-utils.c (decode_address): Make non-static.
9842 * server.c (handle_query): Handle qGetTLSAddr.
9843 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9844 * target.h (struct target_ops): Add get_tls_address.
9845 * thread-db.c (maybe_attach_thread): Save the thread handle.
9846 (thread_db_get_tls_address): New.
9847
32ca6d61
DJ
98482006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9849
9850 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9851 (linux_resume_one_process): Take a siginfo_t *. Update all
9852 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9853 (struct pending_signals): Add a siginfo_t.
9854 (linux_wait_for_process): Always set last_status.
9855 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9856 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9857 * linux-low.h (struct process_info): Add last_status.
9858
5ffff7c1
DJ
98592006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9860
9861 * remote-utils.c (try_rle): New function.
9862 (putpkt_binary): Use it.
9863
8695c747
DJ
98642006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9865
9866 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9867 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9868 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9869 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9870 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9871 point registers.
9872
290fadea
RS
98732006-08-08 Richard Sandiford <richard@codesourcery.com>
9874
9875 * server.c (terminal_fd): New variable.
9876 (old_foreground_pgrp): Likewise.
9877 (restore_old_foreground_pgrp): New function.
9878 (start_inferior): Record the terminal file descriptor in terminal_fd
9879 and its original foreground group in old_foreground_pgrp. Register
9880 restore_old_foreground_pgrp with atexit().
9881
9f2e1e63
DJ
98822006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9883
9884 * server.c (handle_query): Correct qPart to qXfer.
9885
b80864fb
DJ
98862006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9887
9888 * configure.ac: Check for more headers which are missing on
9889 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9890 * configure.srv: Add Cygwin and mingw32.
9891 * remote-utils.c: Don't include headers unconditionally which
9892 are missing on mingw32. Include <winsock.h> for mingw32.
9893 (remote_open): Adjust for mingw32 support. Flush
9894 standard error after writing to it.
9895 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9896 (unblock_async_io, enable_async_io, disable_async_io)
9897 (readchar, getpkt): Update for Winsock support.
9898 (prepare_resume_reply): Expect a protocol signal number.
9899 * server.c: Disable <sys/wait.h> on mingw32.
9900 (start_inferior): Adjust for mingw32 support. Flush
9901 standard error after writing to it.
9902 (attach_inferior): Likewise. Use protocol signal
9903 numbers.
9904 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9905 and names.
9906 * win32-i386-low.c: New file.
9907 * Makefile.in (XM_CLIBS): Set.
9908 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9909 (win32-i386-low.o): New dependency rule.
9910 * linux-low.c (linux_wait): Use target signal numbers.
9911 * target.h (struct target_ops): Doc fix.
9912 * server.h (target_signal_to_name): New prototype.
9913 * gdbreplay.c: Don't include headers unconditionally which
9914 are missing on mingw32. Include <winsock.h> for mingw32.
9915 (remote_close, remote_open): Adjust for Winsock support.
9916 * configure, config.in: Regenerated.
9917
0876f84a
DJ
99182006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9919
9920 * server.c (decode_xfer_read, write_qxfer_response): New.
9921 (handle_query): Take a packet length argument. Handle
9922 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9923 the qSupported response.
9924 (main): Update call to handle_query.
9925
01f9e8fa
DJ
99262006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9927
9928 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9929 (putpkt_binary): Renamed from putpkt and adjusted for binary
9930 data.
9931 (putpkt): New wrapper for putpkt_binary.
9932 (readchar): Don't mask off the high bit.
9933 (decode_X_packet): New function.
9934 * server.c (main): Call putpkt_binary if a handler sets the packet
9935 length. Save the length of the incoming packet. Handle 'X'.
9936 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9937
be2a5f71
DJ
99382006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9939
9940 * server.c (handle_query): Handle qSupported.
9941
ea025f5f
DJ
99422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9943
9944 * remote-utils.c (all_symbols_looked_up): New variable.
9945 (look_up_one_symbol): Check it.
9946 * server.h (look_up_one_symbol): New declaration.
9947 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9948
9308fc88
DJ
99492006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9950
9951 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9952 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9953 (PTRACE_GET_THREAD_AREA): Define.
9954 (ps_get_thread_area): New function.
9955
52fb6437
NS
99562006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9957
9958 * configure.srv (m68k*-*-uclinux*): New target.
9959 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9960 (linux_resume_one_process): Remove extraneous cast.
9961 (linux_read_offsets): New.
9962 (linux_target_op): Add linux_read_offsets on mmuless systems.
9963 * server.c (handle_query): Add qOffsets logic.
9964 * target.h (struct target_ops): Add read_offsets.
9965
21b0f40c
DJ
99662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9967
9968 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9969 (PTRACE_GET_THREAD_AREA): Define.
9970 (ps_get_thread_area): New function.
9971 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9972 (linux-x86-64-low.o): Update.
9973
0050a760
DJ
99742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9975
9976 * configure.ac: Remove checks for prfpregset_t.
9977 * gdb_proc_service.h: New file.
9978 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9979 new "gdb_proc_service.h".
9980 * proc-service.c: Likewise.
9981 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9982 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9983 * Makefile.in (gdb_proc_service_h): Updated.
9984 * configure, config.in: Regenerated.
9985
b92a518e
DJ
99862006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9987
9988 * remote-utils.c (prepare_resume_reply): Move declaration
9989 of gdb_id_from_wait to the top of the block.
9990
545587ee
DJ
99912006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9992
9993 * linux-low.c (regsets_store_inferior_registers): Read the regset
9994 from the target before filling it.
9995
9db87ebd
DJ
99962006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9997
9998 * server.c (attach_inferior): Return SIGTRAP for a successful
9999 attach.
10000
dd24457d
DJ
100012006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10002
10003 * Makefile.in (OBS): Add version.o.
10004 (STAGESTUFF): Delete.
10005 (version.o): Add dependencies.
10006 (version.c): Replace rule.
10007 (clean): Remove version.c.
10008 * server.c (gdbserver_version): New.
10009 (gdbserver_usage): Use printf.
10010 (main): Handle --version and --help.
10011 * server.h (version, host_name): Add declarations.
10012
6f0f660e
EZ
100132005-12-23 Eli Zaretskii <eliz@gnu.org>
10014
889bf7c5
PA
10015 * linux-arm-low.c:
10016 * linux-arm-low.c:
10017 * inferiors.c:
10018 * i387-fp.h:
10019 * i387-fp.c:
10020 * gdbreplay.c:
10021 * regcache.c:
10022 * proc-service.c:
10023 * mem-break.h:
10024 * mem-break.c:
10025 * linux-x86-64-low.c:
10026 * linux-sh-low.c:
10027 * linux-s390-low.c:
10028 * linux-ppc64-low.c:
10029 * linux-ppc-low.c:
10030 * linux-mips-low.c:
10031 * linux-m68k-low.c:
10032 * linux-m32r-low.c:
10033 * linux-low.h:
10034 * linux-low.c:
10035 * linux-ia64-low.c:
10036 * linux-i386-low.c:
10037 * linux-crisv32-low.c:
10038 * thread-db.c:
10039 * terminal.h:
10040 * target.h:
10041 * target.c:
10042 * server.h:
10043 * server.c:
10044 * remote-utils.c:
10045 * regcache.h:
10046 * utils.c:
10047 * Makefile.in:
10048 * configure.ac:
6f0f660e
EZ
10049 * gdbserver.1: Add (C) after Copyright. Update the FSF
10050 address.
10051
9d1fb177
DJ
100522005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10053
10054 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10055 (arm_breakpoint_at): Recognize both breakpoints.
10056 (the_low_target): Use the correct breakpoint instruction.
10057
011a70c2
DJ
100582005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10059
10060 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10061 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10062 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10063 (the_low_target): Update.
10064
7fb85e41
AS
100652005-10-25 Andreas Schwab <schwab@suse.de>
10066
10067 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10068
10069 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10070 (ia64_num_regs): Reduce to 462.
10071
3db0444b
DJ
100722005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10073
10074 * acinclude.m4: Correct quoting.
10075 * aclocal.m4: Regenerated.
10076
10077 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10078 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10079 (thread_db_init): Call thread_db_err_str.
10080 * configure.ac: Check for TD_VERSION.
10081 * config.in, configure: Regenerated.
10082
bee0189a
DJ
100832005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10084
10085 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10086
e9d25b98
DJ
100872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10088
10089 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10090 is not available. Define HAVE_PTRACE_GETREGS if it is.
10091 * config.in, configure: Regenerated.
10092 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10093 * linux-i386-low.c, linux-m68k-low.c: Update to use
10094 HAVE_PTRACE_GETREGS.
10095 * linux-low.c (regsets_fetch_inferior_registers)
10096 (regsets_store_inferior_registers): Only return 0 if we processed
10097 GENERAL_REGS.
10098 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10099 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10100
a06660f7
DJ
101012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10102
10103 * inferiors.c (struct thread_info): Add gdb_id.
10104 (add_thread): Add gdb_id argument.
10105 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10106 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10107 calls to add_thread.
10108 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10109 * server.c (handle_query): Use thread_to_gdb_id.
10110 (handle_v_cont, main): Use gdb_id_to_thread_id.
10111 * server.h (add_thread): Update prototype.
10112 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10113 prototypes.
10114
5a1f5858
DJ
101152005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10118 left-padded registers.
10119 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10120 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10121
e122f1f5
SE
101222005-07-01 Steve Ellcey <sje@cup.hp.com>
10123
10124 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10125 * configure: Regenerate.
10126 * config.in: Regenerate.
10127 * server.h (NEED_DECLARATION_STRERROR):
10128 Replace with !HAVE_DECL_STRERROR.
10129
d592fa2f
DJ
101302005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10131
10132 * linux-low.c (linux_wait, linux_send_signal): Don't test
10133 an unsigned long variable for > 0 if it could be MAX_ULONG.
10134 * server.c (myresume): Likewise.
10135 * target.c (set_desired_inferior): Likewise.
10136
ccbd4912
MK
101372005-06-13 Mark Kettenis <kettenis@gnu.org>
10138
10139 * configure.ac: Simplify and improve check for socklen_t.
10140 * configure, config.in: Regenerate.
10141
f450004a
DJ
101422005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10143
10144 * acconfig.h: Remove.
10145 * configure.ac: Add a test for socklen_t. Use three-argument
10146 AC_DEFINE throughout.
10147 * config.in: Regenerated using autoheader 2.59.
10148 * configure: Regenerated.
10149
10150 * gdbreplay.c (socklen_t): Provide a default.
10151 (remote_open): Use socklen_t.
10152 * remote-utils.c (socklen_t): Provide a default.
10153 (remote_open): Use socklen_t.
10154 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10155 unsigned char.
10156
10157 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10158 char for buffers.
10159 * linux-low.c (linux_read_memory, linux_write_memory)
10160 (linux_read_auxv): Likewise.
10161 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10162 (check_mem_write): Likewise.
10163 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10164 Likewise.
10165 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10166 (registers_from_string, register_data): Likewise.
10167 * server.c (handle_query, main): Likewise.
10168 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10169 (decode_M_packet): Likewise.
10170 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10171 * target.h (struct target_ops): Update read_memory, write_memory,
10172 and read_auxv.
10173 (read_inferior_memory, write_inferior_memory): Update.
10174 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10175 to unsigned char *.
10176 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10177 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10178 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10179 linux-s390-low.c, linux-sh-low.c: Update for changes in
10180 read_inferior_memory and the_low_target->breakpoint.
10181
eee84df1
DJ
101822005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10183
10184 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10185 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10186 * configure.srv: Add powerpc64-*-linux*.
10187 * linux-ppc64-low.c: New file.
10188
45b134e5
OF
101892005-05-23 Orjan Friberg <orjanf@axis.com>
10190
10191 * linux-cris-low.c: New file with support for CRIS.
10192 * linux-crisv32-low.c: Ditto for CRISv32.
10193 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10194 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10195 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10196 reg-crisv32.o, and reg-crisv32.c to make rules.
10197 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10198 recognized targets.
10199
48d93c75
UW
102002005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10201
10202 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10203 of sizeof (PTRACE_XFER_TYPE).
10204 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10205
e013ee27
OF
102062005-05-12 Orjan Friberg <orjanf@axis.com>
10207
889bf7c5 10208 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10209 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10210 pointers for hardware watchpoint support.
10211 * linux-low.h (struct linux_target_ops): Ditto.
10212 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10213 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10214 to linux_target_ops.
10215 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10216 reply packet.
10217 * server.c (main): Recognize 'Z' and 'z' packets.
10218
b0ded00b
UW
102192005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10220
10221 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10222 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10223 (the_low_target): Add new members.
10224
8643e2ad
DJ
102252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10226
10227 * proc-service.c (ps_lgetregs): Search all_processes instead of
10228 all_threads.
10229
fc620387
DJ
102302005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10231
10232 * server.c (start_inferior): Change return type to int.
10233 (attach_inferior): Change sigptr to int *.
10234 (handle_v_cont, handle_v_requests): Change signal to int *.
10235 (main): Change signal to int.
10236
102372005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10238
10239 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10240 * configure.srv: Add m32r*-*-linux*.
10241 * linux-m32r-low.c: New file.
10242
e0e76420
DJ
102432005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10244
10245 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10246
a1928bad
DJ
102472005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10250 Take unsigned long arguments for PIDs.
10251 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10252 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10253 (wait_for_sigstop, linux_resume_one_process)
10254 (regsets_fetch_inferior_registers, linux_send_signal)
10255 (linux_read_auxv): Likewise. Update the types of variables holding
10256 PIDs. Update format string specifiers.
10257 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10258 * remote-utils.c (prepare_resume_reply): Likewise.
10259 * server.c (cont_thread, general_thread, step_thread)
10260 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10261 unsigned long.
10262 (handle_query): Update format specifiers.
10263 (handle_v_cont, main): Use strtoul for thread IDs.
10264 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10265 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10266 (general_thread, step_thread, thread_from_wait)
10267 (old_thread_from_wait): Update.
10268 * target.h (struct thread_resume): Use unsigned long for THREAD.
10269 (struct target_ops): Use unsigned long for arguments to attach and
10270 thread_alive.
10271
dcdb98d2
DJ
102722005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10273
10274 * acinclude.m4: Include bfd/bfd.m4 directly.
10275 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10276 <agriffis@toolchain.org>.
10277 * aclocal.m4, configure: Regenerated.
10278
bec39cab
AC
102792005-01-07 Andrew Cagney <cagney@gnu.org>
10280
10281 * configure.ac: Rename configure.in, require autoconf 2.59.
10282 * configure: Re-generate.
10283
434c4c77
DJ
102842004-12-08 Daniel Jacobowitz <dan@debian.org>
10285
10286 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10287 LIBS when finished.
10288 * aclocal.m4: Regenerated.
10289 * configure: Regenerated.
10290
db1d3e1b
AS
102912004-11-21 Andreas Schwab <schwab@suse.de>
10292
10293 * linux-m68k-low.c (m68k_num_gregs): Define.
10294 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10295 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10296 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10297 (m68k_breakpoint_at): New. Add to the_low_target.
10298
10299 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10300 srv_linux_thread_db to yes.
10301
43360365
JB
103022004-10-20 Joel Brobecker <brobecker@gnat.com>
10303
10304 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10305 (ARCH_SET_FS): Likewise.
10306 (ARCH_GET_FS): Likewise.
10307 (ARCH_GET_GS): Likewise.
10308
fd500816
DJ
103092004-10-16 Daniel Jacobowitz <dan@debian.org>
10310
10311 * linux-i386-low.c (ps_get_thread_area): New.
10312 * linux-x86-64-low.c (ps_get_thread_area): New.
10313 * linux-low.c: Include <sys/syscall.h>.
10314 (linux_kill_one_process): Don't kill the first thread here.
10315 (linux_kill): Kill the first thread here.
10316 (kill_lwp): New function.
10317 (send_sigstop, linux_send_signal): Use it.
10318 * proc-service.c: Clean up #ifdefs.
10319 (fpregset_info): Delete.
10320 (ps_lgetregs): Update and enable implementation.
10321 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10322 implementations.
10323 * remote-utils.c (struct sym_cache, symbol_cache): New.
10324 (input_interrupt): Print a clearer message.
10325 (async_io_enabled): New variable.
10326 (enable_async_io, disable_async_io): Use it. Update comments.
10327 (look_up_one_symbol): Use the symbol cache.
10328 * thread-db.c (thread_db_look_up_symbols): New function.
10329 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10330
f6de3c42
DJ
103312004-10-16 Daniel Jacobowitz <dan@debian.org>
10332
10333 * configure.in: Test for -rdynamic.
10334 * configure: Regenerated.
10335 * Makefile (INTERNAL_LDFLAGS): New.
10336 (gdbserver, gdbreplay): Use it.
10337
2c0fc042
AC
103382004-09-02 Andrew Cagney <cagney@gnu.org>
10339
10340 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10341
075b3282
DJ
103422004-03-23 Daniel Jacobowitz <drow@mvista.com>
10343
10344 * linux-low.c (linux_wait): Clear all_processes list also.
10345
fa6a77dc
DJ
103462004-03-12 Daniel Jacobowitz <drow@mvista.com>
10347
10348 * linux-low.c: Include <errno.h>. Remove extern declaration of
10349 errno.
10350
6d782a97
DJ
103512004-03-12 Daniel Jacobowitz <drow@mvista.com>
10352
10353 * gdbreplay.c, server.h, utils.c: Update copyright years.
10354
3a7fb99b
DJ
103552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10356
10357 * server.c (main): Print child status or termination signal from
10358 variable 'signal', not 'sig'.
10359
c3e735a6
DJ
103602004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10361
10362 * linux-low.c (linux_read_memory): Change return type to
10363 int. Check for and return error from ptrace().
10364 * target.c (read_inferior_memory): Change return type to int. Pass
10365 back return status from the_target->read_memory().
10366 * target.h (struct target_ops): Adapt *read_memory() prototype.
10367 Update comment.
10368 (read_inferior_memory): Adapt prototype.
10369 * server.c (main): Return an error packet if
10370 read_inferior_memory() returns an error.
10371
a59d1c82
DJ
103722004-03-04 Daniel Jacobowitz <drow@mvista.com>
10373
10374 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10375 Unify with other clean targets.
10376
dc3f8883
DJ
103772004-02-29 Daniel Jacobowitz <drow@mvista.com>
10378
10379 * server.c (handle_v_cont): Call set_desired_inferior.
10380
89a208da
DJ
103812004-02-29 Daniel Jacobowitz <drow@mvista.com>
10382
10383 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10384
62ea82f5
DJ
103852004-02-29 Daniel Jacobowitz <drow@mvista.com>
10386
10387 * linux-low.c (linux_wait): Unblock async I/O.
10388 (linux_resume): Block and enable async I/O.
10389 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10390 * server.h (block_async_io, unblock_async_io): Add prototypes.
10391
6910d122
DJ
103922004-02-29 Daniel Jacobowitz <drow@mvista.com>
10393
10394 * remote-utils.c (remote_open): Print a status notice after
10395 opening a TCP port.
10396 * server.c (attach_inferior): Print a status notice after
10397 attaching.
10398
103992004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10400
10401 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10402
c89dc5d4
DJ
104032004-02-26 Daniel Jacobowitz <drow@mvista.com>
10404
10405 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10406 error packet.
10407 * server.c, target.h: Update copyright years.
10408
4b8dad4a
RM
104092004-02-25 Roland McGrath <roland@redhat.com>
10410
10411 * target.h (struct target_ops): New member `read_auxv'.
10412 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10413 * linux-low.c (linux_read_auxv): New function.
10414 (linux_target_ops): Initialize `read_auxv' member to that.
10415
d7446758
JB
104162004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10417
10418 Committed by Jim Blandy <jimb@redhat.com>.
10419
10420 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10421 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10422 instead of GPR_SIZE to distiguish s390 and s390x targets.
10423
5544ad89
DJ
104242004-01-31 Daniel Jacobowitz <drow@mvista.com>
10425
10426 * linux-low.c: Update copyright year.
10427 (check_removed_breakpoint): Clear pending_is_breakpoint.
10428 (linux_set_resume_request, linux_queue_one_thread)
10429 (resume_status_pending_p): New functions.
10430 (linux_continue_one_thread): Use process->resume.
10431 (linux_resume): Only resume threads if there are no pending events.
10432 * linux-low.h (struct process_info): Add resume request
10433 pointer.
10434
2a68b70e
DJ
104352004-01-30 Daniel Jacobowitz <drow@mvista.com>
10436
10437 * regcache.c (new_register_cache): Clear the allocated register
10438 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10439
64386c31
DJ
104402003-10-13 Daniel Jacobowitz <drow@mvista.com>
10441
10442 * linux-low.c (linux_resume): Take a struct thread_resume *
10443 argument.
10444 (linux_wait): Update call.
10445 (resume_ptr): New static variable.
10446 (linux_continue_one_thread): Renamed from
10447 linux_continue_one_process. Use resume_ptr.
10448 (linux_resume): Use linux_continue_one_thread.
10449 * server.c (handle_v_cont, handle_v_requests): New functions.
10450 (myresume): New function.
10451 (main): Handle 'v' case.
10452 * target.h (struct thread_resume): New type.
10453 (struct target_ops): Change argument of "resume" to struct
10454 thread_resume *.
10455 (myresume): Delete macro.
10456
c938e9b0
L
104572003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10458
10459 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10460 (uninstall): Support DESTDIR.
10461
7f313d07
BC
10462Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10463
10464 * configure.srv: Add xscale*linux copy of arm*linux entry.
10465
3b2fc2ea
DJ
104662003-07-24 Daniel Jacobowitz <drow@mvista.com>
10467
10468 * linux-arm-low.c (arm_reinsert_addr): New function.
10469 (the_low_target): Add arm_reinsert_addr.
10470
1c0a559e
MK
104712003-07-08 Mark Kettenis <kettenis@gnu.org>
10472
10473 * mem-break.c: Remove whitespace at end of file.
10474
43d5792c
DJ
104752003-06-28 Daniel Jacobowitz <drow@mvista.com>
10476
10477 * configure.in: Check whether we need to prototype strerror.
10478 * server.h: Optionally prototype strerror.
10479 * gdbreplay.c (perror_with_name): Use strerror.
10480 * linux-low.c (linux_attach_lwp): Use strerror.
10481 * utils.c (perror_with_name): Use strerror.
10482 * config.in, configure: Regenerated.
10483
c8a86edf
DJ
104842003-06-28 Daniel Jacobowitz <drow@mvista.com>
10485
10486 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10487 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10488
73d37363
DJ
104892003-06-20 Daniel Jacobowitz <drow@mvista.com>
10490
10491 * Makefile.in (SFILES): Update.
10492 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10493 low-sun3.c: Remove files.
10494
6ad8ae5c
DJ
104952003-06-17 Daniel Jacobowitz <drow@mvista.com>
10496
10497 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10498 (linux_detach_one_process, linux_detach): New functions.
10499 (linux_target_ops): Add linux_detach.
10500 * server.c (main): Handle 'D' packet.
10501 * target.h (struct target_ops): Add "detach" member.
10502 (detach_inferior): Define.
10503
1581182a
MK
105042003-06-13 Mark Kettenis <kettenis@gnu.org>
10505
10506 From Kelley Cook <kelleycook@wideopenwest.com>:
10507 * configure.srv: Accept i[34567]86 variants.
10508
e5379b03
DJ
105092003-06-05 Daniel Jacobowitz <drow@mvista.com>
10510
10511 * linux-low.c (linux_wait_for_event): Correct comment typos.
10512 (linux_resume_one_process): Call check_removed_breakpoint.
10513 (linux_send_signal): New function.
10514 (linux_target_ops): Add linux_send_signal.
10515 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10516 of kill.
10517 * target.h (struct target_ops): Add send_signal.
10518
2ff29de4
JB
105192003-05-29 Jim Blandy <jimb@redhat.com>
10520
10521 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10522 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10523 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10524 away part of the register's value.
10525
254787d4
DJ
105262003-03-26 Daniel Jacobowitz <drow@mvista.com>
10527
10528 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10529 (linux_wait_for_event, linux_init_signals): Likewise.
10530
94e10508
DJ
105312003-03-17 Daniel Jacobowitz <drow@mvista.com>
10532
10533 * configure.in: Check for stdlib.h.
10534 * configure: Regenerated.
10535 * config.in: Regenerated.
10536
4c0711e0
DJ
105372003-01-04 Andreas Schwab <schwab@suse.de>
10538
10539 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10540
ef66e766
AC
105412003-01-02 Andrew Cagney <ac131313@redhat.com>
10542
10543 * Makefile.in: Remove obsolete code.
10544
a1358604
DJ
105452002-11-20 Daniel Jacobowitz <drow@mvista.com>
10546
10547 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10548 defined(PT_FPR0_HI).
10549
23ce3b1c
DJ
105502002-11-17 Stuart Hughes <seh@zee2.com>
10551
10552 * linux-arm-low.c (arm_num_regs): Increase.
10553 (arm_regmap): Include status register.
10554
105552002-11-17 Daniel Jacobowitz <drow@mvista.com>
10556
10557 * linux-low.c (register_addr): Remove incorrect -1 check.
10558
a9fa9f7d
DJ
105592002-08-29 Daniel Jacobowitz <drow@mvista.com>
10560
10561 * linux-low.c (linux_create_inferior): Call setpgid. Return
10562 the new PID.
10563 (unstopped_p, linux_signal_pid): Remove.
10564 (linux_target_ops): Remove linux_signal_pid.
10565 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10566 global instead of target method.
10567 * target.h (struct target_ops): Remove signal_pid. Update comment
10568 for create_inferior.
10569 * server.c (signal_pid): New variable.
10570 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10571 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10572 (attach_inferior): Set signal_pid.
10573
17574093
DJ
105742002-08-23 Daniel Jacobowitz <drow@mvista.com>
10575
10576 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10577
105782002-08-20 Jim Blandy <jimb@redhat.com>
10579
10580 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10581 default for this.
10582
105832002-08-01 Andrew Cagney <cagney@redhat.com>
10584
10585 * Makefile.in: Make chill references obsolete.
10586
105872002-07-24 Kevin Buettner <kevinb@redhat.com>
10588
10589 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10590 * configure: Regenerate.
10591 * config.in: Regenerate.
10592
105932002-07-09 David O'Brien <obrien@FreeBSD.org>
10594
10595 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10596 (perror_with_name, remote_close, remote_open, expect, play): Static.
10597
105982002-07-04 Michal Ludvig <mludvig@suse.cz>
10599
4b8dad4a 10600 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10601 byte offsets instead of an array of indexes.
10602 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10603
106042002-06-13 Daniel Jacobowitz <drow@mvista.com>
10605
10606 * regcache.c: Add comment.
10607
106082002-06-11 Daniel Jacobowitz <drow@mvista.com>
10609
10610 * thread-db.c: New file.
10611 * proc-service.c: New file.
10612 * acinclude.m4: New file.
10613 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10614 proc-service.o, and thread-db.o.
10615 (linux-low.o): Add USE_THREAD_DB.
10616 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10617 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10618 * aclocal.m4: Regenerated.
10619 * config.in: Regenerated.
10620 * configure: Regenerated.
10621 * configure.in: Check for proc_service.h, sys/procfs.h,
10622 thread_db.h, and linux/elf.h headrs.
10623 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10624 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10625 Check for -lthread_db and thread support.
10626 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10627 PowerPC, and SuperH.
10628 * i387-fp.c: Constify arguments.
10629 * i387-fp.h: Likewise.
10630 * inferiors.c: (struct thread_info): Renamed from
10631 `struct inferior_info'. Remove PID member. Use generic inferior
10632 list header. All uses updated.
10633 (inferiors, signal_pid): Removed.
10634 (all_threads): New variable.
10635 (get_thread): Define.
10636 (add_inferior_to_list): New function.
10637 (for_each_inferior): New function.
10638 (change_inferior_id): New function.
10639 (add_inferior): Removed.
10640 (remove_inferior): New function.
10641 (add_thread): New function.
10642 (free_one_thread): New function.
10643 (remove_thread): New function.
10644 (clear_inferiors): Use for_each_inferior and free_one_thread.
10645 (find_inferior): New function.
10646 (find_inferior_id): New function.
10647 (inferior_target_data): Update argument type.
10648 (set_inferior_target_data): Likewise.
10649 (inferior_regcache_data): Likewise.
10650 (set_inferior_regcache_data): Likewise.
10651 * linux-low.c (linux_bp_reinsert): Remove.
10652 (all_processes, stopping_threads, using_thrads)
10653 (struct pending_signals, debug_threads, pid_of): New.
10654 (inferior_pid): Replace with macro.
10655 (struct inferior_linux_data): Remove.
10656 (get_stop_pc, add_process): New functions.
10657 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10658 Use add_process and add_thread.
10659 (linux_attach_lwp): New function, based on old linux_attach. Use
10660 add_process and add_thread. Set stop_expected for new threads.
10661 (linux_attach): New function.
10662 (linux_kill_one_process): New function.
10663 (linux_kill): Kill all LWPs.
10664 (linux_thread_alive): Use find_inferior_id.
10665 (check_removed_breakpoints, status_pending_p): New functions.
10666 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10667 Update. Use WNOHANG. Wait for cloned processes also. Update process
10668 struct for the found process.
10669 (linux_wait_for_event): New function.
10670 (linux_wait): Use it. Support LWPs.
10671 (send_sigstop, wait_for_sigstop, stop_all_processes)
10672 (linux_resume_one_process, linux_continue_one_process): New functions.
10673 (linux_resume): Support LWPs.
10674 (REGISTER_RAW_SIZE): Remove.
10675 (fetch_register): Use register_size instead. Call supply_register.
10676 (usr_store_inferior_registers): Likewise. Call collect_register.
10677 Fix recursive case.
10678 (regsets_fetch_inferior_registers): Improve error message.
10679 (regsets_store_inferior_registers): Add debugging.
10680 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10681 (unstopped_p, linux_signal_pid): New functions.
10682 (linux_target_ops): Add linux_signal_pid.
10683 (linux_init_signals): New function.
10684 (initialize_low): Call it. Initialize using_threads.
10685 * regcache.c (inferior_regcache_data): Add valid
10686 flag.
10687 (get_regcache): Fetch registers lazily. Add fetch argument
10688 and update all callers.
10689 (regcache_invalidate_one, regcache_invalidate): New
10690 functions.
10691 (new_register_cache): Renamed from create_register_cache.
10692 Return the new regcache.
10693 (free_register_cache): Change argument to a void *.
10694 (registers_to_string, registers_from_string): Call get_regcache
10695 with fetch flag set.
10696 (register_data): Make static. Pass fetch flag to get_regcache.
10697 (supply_register): Call get_regcache with fetch flag clear.
10698 (collect_register): Call get_regcache with fetch flag set.
10699 (collect_register_as_string): New function.
10700 * regcache.h: Update.
10701 * remote-utils.c (putpkt): Flush after debug output and use
10702 stderr.
10703 Handle input interrupts while waiting for an ACK.
10704 (input_interrupt): Use signal_pid method.
10705 (getpkt): Flush after debug output and use stderr.
10706 (outreg): Use collect_register_as_string.
10707 (new_thread_notify, dead_thread_notify): New functions.
10708 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10709 and general_thread.
10710 (look_up_one_symbol): Flush after debug output.
10711 * server.c (step_thread, server_waiting): New variables.
10712 (start_inferior): Don't use signal_pid. Update call to mywait.
10713 (attach_inferior): Update call to mywait.
10714 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10715 (main): Don't fetch/store registers explicitly. Use
10716 set_desired_inferior. Support proposed ``Hs'' packet. Update
10717 calls to mywait.
10718 * server.h: Update.
10719 (struct inferior_list, struct_inferior_list_entry): New.
10720 * target.c (set_desired_inferior): New.
10721 (write_inferior_memory): Constify.
10722 (mywait): New function.
10723 * target.h: Update.
10724 (struct target_ops): New signal_pid method.
10725 (mywait): Removed macro, added prototype.
10726
10727 * linux-low.h (regset_func): Removed.
10728 (regset_fill_func, regset_store_func): New.
10729 (enum regset_type): New.
10730 (struct regset_info): Add type field. Use new operation types.
10731 (struct linux_target_ops): stop_pc renamed to get_pc.
10732 Add decr_pc_after_break and breakpoint_at.
10733 (get_process, get_thread_proess, get_process_thread)
10734 (strut process_info, all_processes, linux_attach_lwp)
10735 (thread_db_init): New.
10736
10737 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10738 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10739 (the_low_target): Add new members.
10740 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10741 (i386_store_fpxregset): Constify.
10742 (target_regsets): Add new kind identifier.
10743 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10744 (i386_set_pc): Add debugging.
10745 (i386_breakpoint_at): New function.
10746 (the_low_target): Add new members.
10747 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10748 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10749 (mips_breakpoint_at): New.
10750 (the_low_target): Add new members.
10751 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10752 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10753 (the_low_target): Add new members.
10754 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10755 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10756 (the_low_target): Add new members.
10757 * linux-x86-64-low.c (target_regsets): Add new kind
10758 identifier.
10759
107602002-05-15 Daniel Jacobowitz <drow@mvista.com>
10761
10762 From Martin Pool <mbp@samba.org>:
10763 * server.c (gdbserver_usage): New function.
10764 (main): Call it.
10765
107662002-05-14 Daniel Jacobowitz <drow@mvista.com>
10767
10768 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10769 stop_at -> stop_pc.
10770
107712002-05-04 Andrew Cagney <ac131313@redhat.com>
10772
10773 * Makefile.in: Remove obsolete code.
10774
107752002-04-24 Michal Ludvig <mludvig@suse.cz>
10776
10777 * linux-low.c (regsets_fetch_inferior_registers),
10778 (regsets_store_inferior_registers): Removed cast to int from
10779 ptrace() calls.
10780 * regcache.h: Added declaration of struct inferior_info.
10781
107822002-04-20 Daniel Jacobowitz <drow@mvista.com>
10783
10784 * inferiors.c (struct inferior_info): Add regcache_data.
10785 (add_inferior): Call create_register_cache.
10786 (clear_inferiors): Call free_register_cache.
10787 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10788 * regcache.c (struct inferior_regcache_data): New.
10789 (registers): Remove.
10790 (get_regcache): New function.
10791 (create_register_cache, free_register_cache): New functions.
10792 (set_register_cache): Don't initialize the register cache here.
10793 (registers_to_string, registers_from_string, register_data): Call
10794 get_regcache.
10795 * regcache.h: Add prototypes.
10796 * server.h: Likewise.
10797
107982002-04-20 Daniel Jacobowitz <drow@mvista.com>
10799
10800 * mem-break.c: New file.
10801 * mem-break.h: New file.
10802 * Makefile.in: Add mem-break.o rule; update server.h
10803 dependencies.
10804 * inferiors.c (struct inferior_info): Add target_data
10805 member.
10806 (clear_inferiors): Free target_data member if set.
10807 (inferior_target_data, set_inferior_target_data): New functions.
10808 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10809 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10810 * linux-low.c (linux_bp_reinsert): New variable.
10811 (struct inferior_linux_data): New.
10812 (linux_create_inferior): Use set_inferior_target_data.
10813 (linux_attach): Likewise. Call add_inferior.
10814 (linux_wait_for_one_inferior): New function.
10815 (linux_wait): Call it.
10816 (linux_write_memory): Add const.
10817 (initialize_low): Call set_breakpoint_data.
10818 * linux-low.h (struct linux_target_ops): Add breakpoint
10819 handling members.
10820 * server.c (attach_inferior): Remove extra add_inferior
10821 call.
10822 * server.h: Include mem-break.h. Update inferior.c
10823 prototypes.
10824 * target.c (read_inferior_memory)
10825 (write_inferior_memory): New functions.
10826 * target.h (read_inferior_memory)
10827 (write_inferior_memory): Change macros to prototypes.
10828 (struct target_ops): Update comments. Add const to write_memory
10829 definition.
10830
108312002-04-11 Daniel Jacobowitz <drow@mvista.com>
10832
10833 * linux-low.c (usr_store_inferior_registers): Support
10834 registers which are allowed to fail to store.
10835 * linux-low.h (linux_target_ops): Likewise.
10836 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10837 (ppc_cannot_store_register): FPSCR may not be storable.
10838
108392002-04-09 Daniel Jacobowitz <drow@mvista.com>
10840
10841 * server.h: Include <string.h> if HAVE_STRING_H.
10842 * ChangeLog: Correct paths in last ChangeLog entry.
10843
108442002-04-09 Daniel Jacobowitz <drow@mvista.com>
10845
10846 * linux-low.h: Remove obsolete prototypes.
10847 (struct linux_target_ops): New.
10848 (extern the_low_target): New.
10849 * linux-low.c (num_regs, regmap): Remove declarations.
10850 (register_addr): Use the_low_target explicitly.
10851 (fetch_register): Likewise.
10852 (usr_fetch_inferior_registers): Likewise.
10853 (usr_store_inferior_registers): Likewise.
10854 * linux-arm-low.c (num_regs): Remove.
10855 (arm_num_regs): Define.
10856 (arm_regmap): Renamed from regmap, made static.
10857 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10858 made static.
10859 (arm_cannot_store_register): Renamed from cannot_store_register,
10860 made static.
10861 (the_low_target): New.
10862 * linux-i386-low.c (num_regs): Remove.
10863 (i386_num_regs): Define.
10864 (i386_regmap): Renamed from regmap, made static.
10865 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10866 made static.
10867 (i386_cannot_store_register): Renamed from cannot_store_register,
10868 made static.
10869 (the_low_target): New.
10870 * linux-ia64-low.c (num_regs): Remove.
10871 (ia64_num_regs): Define.
10872 (ia64_regmap): Renamed from regmap, made static.
10873 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10874 made static.
10875 (ia64_cannot_store_register): Renamed from cannot_store_register,
10876 made static.
10877 (the_low_target): New.
10878 * linux-m68k-low.c (num_regs): Remove.
10879 (m68k_num_regs): Define.
10880 (m68k_regmap): Renamed from regmap, made static.
10881 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10882 made static.
10883 (m68k_cannot_store_register): Renamed from cannot_store_register,
10884 made static.
10885 (the_low_target): New.
10886 * linux-mips-low.c (num_regs): Remove.
10887 (mips_num_regs): Define.
10888 (mips_regmap): Renamed from regmap, made static.
10889 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10890 made static.
10891 (mips_cannot_store_register): Renamed from cannot_store_register,
10892 made static.
10893 (the_low_target): New.
10894 * linux-ppc-low.c (num_regs): Remove.
10895 (ppc_num_regs): Define.
10896 (ppc_regmap): Renamed from regmap, made static.
10897 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10898 made static.
10899 (ppc_cannot_store_register): Renamed from cannot_store_register,
10900 made static.
10901 (the_low_target): New.
10902 * linux-s390-low.c (num_regs): Remove.
10903 (s390_num_regs): Define.
10904 (s390_regmap): Renamed from regmap, made static.
10905 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10906 made static.
10907 (s390_cannot_store_register): Renamed from cannot_store_register,
10908 made static.
10909 (the_low_target): New.
10910 * linux-sh-low.c (num_regs): Remove.
10911 (sh_num_regs): Define.
10912 (sh_regmap): Renamed from regmap, made static.
10913 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10914 made static.
10915 (sh_cannot_store_register): Renamed from cannot_store_register,
10916 made static.
10917 (the_low_target): New.
10918 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10919 (the_low_target): New.
10920
109212002-04-09 Daniel Jacobowitz <drow@mvista.com>
10922
10923 * Makefile.in: Add stamp-h target.
10924 * configure.in: Create stamp-h.
10925 * configure: Regenerated.
10926
109272002-04-09 Daniel Jacobowitz <drow@mvista.com>
10928
10929 * inferiors.c: New file.
10930 * target.c: New file.
10931 * target.h: New file.
10932 * Makefile.in: Add target.o and inferiors.o. Update
10933 dependencies.
10934 * linux-low.c (inferior_pid): New static variable,
10935 moved from server.c.
10936 (linux_create_inferior): Renamed from create_inferior.
10937 Call add_inferior. Return 0 on success instead of a PID.
10938 (linux_attach): Renamed from myattach.
10939 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10940 (linux_thread_alive): Renamed from mythread_alive.
10941 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10942 child dies.
10943 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10944 (regsets_store_inferior_registers): Correct error message.
10945 Add missing ``return 0''.
10946 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10947 (linux_store_registers): Renamed from store_inferior_registers.
10948 (linux_read_memory): Renamed from read_inferior_memory.
10949 (linux_write_memory): Renamed from write_inferior_memory.
10950 (linux_target_ops): New structure.
10951 (initialize_low): Call set_target_ops ().
10952 * remote-utils.c (unhexify): New function.
10953 (hexify): New function.
10954 (input_interrupt): Send signals to ``signal_pid''.
10955 * server.c (inferior_pid): Remove.
10956 (start_inferior): Update create_inferior call.
10957 (attach_inferior): Call add_inferior.
10958 (handle_query): New function.
10959 (main): Call handle_query for `q' packets.
10960 * server.h: Include "target.h". Remove obsolete prototypes.
10961 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10962
109632002-04-09 Daniel Jacobowitz <drow@mvista.com>
10964
10965 * Makefile.in: Add WARN_CFLAGS. Update configury
10966 dependencies.
10967 * configure.in: Check for <string.h>
10968 * configure: Regenerate.
10969 * config.in: Regenerate.
10970 * gdbreplay.c: Include needed system headers.
10971 (remote_open): Remove strchr prototype.
10972 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10973 * regcache.c (supply_register): Change buf argument to const void *.
10974 (supply_register_by_name): Likewise.
10975 (collect_register): Change buf argument to void *.
10976 (collect_register_by_name): Likewise.
10977 * regcache.h: Add missing prototypes.
10978 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10979 * server.c (handle_query): New function.
10980 (attached): New static variable, moved out of main.
10981 (main): Quiet longjmp clobber warnings.
10982 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10983 * utils.c (error): Remove NORETURN.
10984 (fatal): Likewise.
This page took 1.46319 seconds and 4 git commands to generate.