Remove spurious gdb/ChangeLog entry
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
91baf43f
PA
12015-03-19 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (count_events_callback, select_event_lwp_callback):
4 No longer check whether the thread has resume_stop as last resume
5 kind.
6
8bf3b159
PA
72015-03-19 Pedro Alves <palves@redhat.com>
8
9 * linux-low.c (count_events_callback, select_event_lwp_callback):
10 Use the lwp's status_pending_p field, not the thread's.
11
b90fc188
PA
122015-03-19 Pedro Alves <palves@redhat.com>
13
14 * linux-low.c (select_event_lwp_callback): Update comments to
15 no longer mention SIGTRAP.
16
464b0089
GB
172015-03-18 Gary Benson <gbenson@redhat.com>
18
19 * server.c (handle_query): Do not report vFile:fstat as supported.
20
aa9e327f
GB
212015-03-11 Gary Benson <gbenson@redhat.com>
22
23 * hostio.c (sys/types.h): New include.
24 (sys/stat.h): Likewise.
25 (common-remote-fileio.h): Likewise.
26 (handle_fstat): New function.
27 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 28
791c0056
GB
292015-03-11 Gary Benson <gbenson@redhat.com>
30
31 * configure.ac (AC_CHECK_MEMBERS): Add checks for
32 struct stat.st_blocks and struct stat.st_blksize.
33 * configure: Regenerate.
34 * config.in: Likewise.
35 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
36 (OBS): Add common-remote-fileio.o.
37 (common-remote-fileio.o): New rule.
38
9a9df970
PA
392015-03-09 Pedro Alves <palves@redhat.com>
40
41 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
42 'struct sockaddr' pointer in 'accept' call.
43
9eb1356e
PA
442015-03-09 Pedro Alves <palves@redhat.com>
45
46 Revert:
47 2015-03-07 Pedro Alves <palves@redhat.com>
48 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
49 or <winsock2.h> here. Instead include "gdb_socket.h".
50 (remote_open): Use union gdb_sockaddr_u.
51 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
52 or <winsock2.h> here. Instead include "gdb_socket.h".
53 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
54 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
55 or <sys/un.h>.
56 (init_named_socket, gdb_agent_helper_thread): Use union
57 gdb_sockaddr_u.
58
aac331e4
PA
592015-03-07 Pedro Alves <palves@redhat.com>
60
61 * configure.ac (build_warnings): Move
62 -Wdeclaration-after-statement to the C-specific set.
63 * configure: Regenerate.
64
366c75fc
PA
652015-03-07 Pedro Alves <palves@redhat.com>
66
67 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
68 or <winsock2.h> here. Instead include "gdb_socket.h".
69 (remote_open): Use union gdb_sockaddr_u.
70 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
71 or <winsock2.h> here. Instead include "gdb_socket.h".
72 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
73 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
74 or <sys/un.h>.
75 (init_named_socket, gdb_agent_helper_thread): Use union
76 gdb_sockaddr_u.
77
492d29ea
PA
782015-03-07 Pedro Alves <palves@redhat.com>
79
80 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
81 instead.
82
60a191ed
YQ
832015-03-06 Yao Qi <yao.qi@linaro.org>
84
85 * linux-aarch64-low.c (aarch64_insert_point): Use
86 show_debug_regs as a boolean.
87 (aarch64_remove_point): Likewise.
88
f5771b1d
PA
892015-03-05 Pedro Alves <palves@redhat.com>
90
91 * lynx-low.c (lynx_target_ops): Install NULL hooks for
92 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
93 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
94 * nto-low.c (nto_target_ops): Likewise.
95 * spu-low.c (spu_target_ops): Likewise.
96 * win32-low.c (win32_target_ops): Likewise.
97
3e572f71
PA
982015-03-04 Pedro Alves <palves@redhat.com>
99
100 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
101 Decide whether a breakpoint triggered based on the SIGTRAP's
102 siginfo.si_code.
103 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
104 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
105 (linux_low_filter_event): Check for breakpoints before checking
106 watchpoints.
107 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
108 siginfo.si_code.
109 (linux_stopped_by_sw_breakpoint)
110 (linux_supports_stopped_by_sw_breakpoint)
111 (linux_stopped_by_hw_breakpoint)
112 (linux_supports_stopped_by_hw_breakpoint): New functions.
113 (linux_target_ops): Install new target methods.
114
1ec68e26
PA
1152015-03-04 Pedro Alves <palves@redhat.com>
116
117 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
118 * server.c (swbreak_feature, hwbreak_feature): New globals.
119 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
120 (captured_main): Clear swbreak_feature and hwbreak_feature.
121 * server.h (swbreak_feature, hwbreak_feature): Declare.
122 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
123 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
124 supports_stopped_by_hw_breakpoint>: New fields.
125 (target_supports_stopped_by_sw_breakpoint)
126 (target_stopped_by_sw_breakpoint)
127 (target_supports_stopped_by_hw_breakpoint)
128 (target_stopped_by_hw_breakpoint): Declare.
129
15c66dd6
PA
1302015-03-04 Pedro Alves <palves@redhat.com>
131
132 enum lwp_stop_reason -> enum target_stop_reason
133 * linux-low.c (check_stopped_by_breakpoint): Adjust.
134 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
135 (linux_wait_1, stuck_in_jump_pad_callback)
136 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
137 (linux_stopped_by_watchpoint):
138 * linux-low.h (enum lwp_stop_reason): Delete.
139 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
140 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
141
98fc70d6
YQ
1422015-03-04 Yao Qi <yao.qi@linaro.org>
143
144 * Makefile.in (SFILES): Add linux-aarch64-low.c.
145
dd2ac174
GB
1462015-03-03 Gary Benson <gbenson@redhat.com>
147
148 * hostio.c (handle_vFile): Fix prefix lengths.
149
d68e53f4
MM
1502015-03-03 Markus Metzger <markus.t.metzger@intel.com>
151
152 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
153 ptr_bits.
154
bf2d68ab
AA
1552015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
156
157 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
158 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
159 (clean): Add "rm -f" for above C files.
160 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
161 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
162 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
163 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
164 * linux-s390-low.c (HWCAP_S390_VX): New macro.
165 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
166 (init_registers_s390x_vx_linux64)
167 (init_registers_s390x_tevx_linux64)
168 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
169 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
170 declarations.
171 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
172 (s390_store_vxrs_high): New functions.
173 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
174 NT_S390_VXRS_HIGH.
175 (s390_arch_setup): Add logic for selecting one of the new target
176 descriptions. Activate the new vector regsets if applicable.
177 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
178 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
179 and init_registers_s390x_tevx_linux64.
180
c966a859
PA
1812015-03-01 Pedro Alves <palves@redhat.com>
182
183 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
184 parameter.
185
4180215b
PA
1862015-02-27 Pedro Alves <palves@redhat.com>
187
188 * linux-x86-low.c (u_debugreg_offset): New function.
189 (x86_linux_dr_get, x86_linux_dr_set): Use it.
190
749bab01
PA
1912015-02-27 Pedro Alves <palves@redhat.com>
192
193 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
194 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
195 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
196 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
197 (ps_lsetfpregs, ps_getpid)
198 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
199 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
200 (ps_lsetxregs, ps_plog): Declare.
201
3c14e5a3
PA
2022015-02-27 Pedro Alves <palves@redhat.com>
203
204 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
205 IP_AGENT_EXPORT_FUNC.
206 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
207 IP_AGENT_EXPORT_FUNC.
208 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
209 (IP_AGENT_EXPORT): Delete.
210 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
211 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
212 (gdb_trampoline_buffer_error, collecting, gdb_collect)
213 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
214 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
215 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
216 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
217 (traceframe_read_count, traceframe_write_count)
218 (traceframes_created, trace_state_variables, get_raw_reg)
219 (get_trace_state_variable_value, set_trace_state_variable_value)
220 (ust_loaded, helper_thread_id, cmd_buf): Use
221 IPA_SYM_EXPORTED_NAME.
222 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
223 (tracepoints) Use IP_AGENT_EXPORT_VAR.
224 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
225 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
226 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
227 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
228 EXTERN_C_PUSH/EXTERN_C_POP.
229 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
230 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
231 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
232 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
233 (traceframe_write_count, traceframe_read_count)
234 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
235 (about_to_request_buffer_space, get_trace_state_variable_value)
236 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
237 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
238 EXTERN_C_PUSH/EXTERN_C_POP.
239 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
240 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
241 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
242 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
243 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
244 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
245 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
246 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
247 Define.
248 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
249 (IP_AGENT_EXPORT_VAR_DECL): Define.
250 (tracing): Declare.
251 (gdb_agent_get_raw_reg): Declare.
252
fe978cb0
PA
2532015-02-27 Tom Tromey <tromey@redhat.com>
254 Pedro Alves <palves@redhat.com>
255
256 Rename symbols whose names are reserved C++ keywords throughout.
257
3bc3d82a
PA
2582015-02-27 Pedro Alves <palves@redhat.com>
259
260 * Makefile.in (COMPILER): New, get it from autoconf.
261 (CXX): Get from autoconf instead.
262 (COMPILE.pre): Use COMPILER.
263 (CC-LD): Rename to ...
264 (CC_LD): ... this. Use COMPILER.
265 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
266 (CXX_FOR_TARGET): Default to g++ instead of gcc.
267 * acinclude.m4: Include build-with-cxx.m4.
268 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
269 Disable -Werror by default if building in C++ mode.
270 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
271 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
272 the C++ compiler. Save/restore CXXFLAGS too.
273 * configure: Regenerate.
274
07697489
PA
2752015-02-27 Pedro Alves <palves@redhat.com>
276
277 * acinclude.m4: Include libiberty.m4.
278 * configure.ac: Call libiberty_INIT.
279 * config.in, configure: Regenerate.
280
9beb7c4e
PA
2812015-02-26 Pedro Alves <palves@redhat.com>
282
283 * linux-low.c (linux_wait_1): When incrementing the PC past a
284 program breakpoint always use the_low_target.breakpoint_len as
285 increment, rather than the maximum between that and
286 the_low_target.decr_pc_after_break.
287
8090aef2
PA
2882015-02-23 Pedro Alves <palves@redhat.com>
289
290 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
291 thread was doing a step-over; always adjust the PC if
292 we stepped over a permanent breakpoint.
293 (linux_wait_1): If we stepped over breakpoint that was on top of a
294 permanent breakpoint, manually advance the PC past it.
295
bc9540e8
PA
2962015-02-23 Pedro Alves <palves@redhat.com>
297
298 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
299 modes.
300 (x86_fill_gregset, x86_store_gregset): Use it when handling
301 $orig_eax.
302
2db9a427
PA
3032015-02-20 Pedro Alves <palves@redhat.com>
304
305 * thread-db.c: Include "nat/linux-procfs.h".
306 (thread_db_init): Skip listing new threads if the kernel supports
307 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
308
afa8d396
PA
3092015-02-20 Pedro Alves <palves@redhat.com>
310
311 * linux-low.c (status_pending_p_callback): Use ptid_match.
312
c9587f88
AT
3132015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
314
315 PR breakpoints/16812
316 * linux-low.c (wstatus_maybe_breakpoint): Remove.
317 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
318 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
319
b05ec7a5
AT
3202015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
321
322 PR breakpoints/15956
323 * tracepoint.c (cmd_qtinit): Add check for current_thread.
324
d33501a5
MM
3252015-02-09 Markus Metzger <markus.t.metzger@intel.com>
326
327 * linux-low.c (linux_low_btrace_conf): Print size.
328 * server.c (handle_btrace_conf_general_set): New.
329 (hanle_general_set): Call handle_btrace_conf_general_set.
330 (handle_query): Report Qbtrace-conf:bts:size as supported.
331
f4abbc16
MM
3322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
333
334 * linux-low.c (linux_low_enable_btrace): Update parameters.
335 (linux_low_btrace_conf): New.
336 (linux_target_ops)<to_btrace_conf>: Initialize.
337 * server.c (current_btrace_conf): New.
338 (handle_btrace_enable): Rename to ...
339 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
340 to target_enable_btrace. Update comment. Update users.
341 (handle_qxfer_btrace_conf): New.
342 (qxfer_packets): Add btrace-conf entry.
343 (handle_query): Report qXfer:btrace-conf:read as supported packet.
344 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
345 (target_ops)<read_btrace_conf>: New.
346 (target_enable_btrace): Update parameters.
347 (target_read_btrace_conf): New.
348
043c3577
MM
3492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
350
351 * server.c (handle_btrace_general_set): Remove call to
352 target_supports_btrace.
353 (supported_btrace_packets): New.
354 (handle_query): Call supported_btrace_packets.
355 * target.h: include btrace-common.h.
356 (btrace_target_info): Removed.
357 (supports_btrace, target_supports_btrace): Update parameters.
358
734b0e4b
MM
3592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
360
361 * Makefile.in (SFILES): Add common/btrace-common.c.
362 (OBS): Add common/btrace-common.o.
363 (btrace-common.o): Add build rules.
364 * linux-low: Include btrace-common.h.
365 (linux_low_read_btrace): Use struct btrace_data. Call
366 btrace_data_init and btrace_data_fini.
367
d6c146e9
PA
3682015-02-06 Pedro Alves <palves@redhat.com>
369
370 * thread-db.c (find_new_threads_callback): Add debug output.
371
20ba1ce6
PA
3722015-02-04 Pedro Alves <palves@redhat.com>
373
374 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
375 (resume_stopped_resumed_lwps): New function.
376 (linux_wait_for_event_filtered): Use it.
377
8cc73a39
SDJ
3782015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
379
380 * Makefile.in (SFILES): Add linux-personality.c.
381 (linux-personality.o): New rule.
382 * configure.srv (srv_linux_obj): Add linux-personality.o to the
383 list of objects to be built.
384 * linux-low.c: Include nat/linux-personality.h.
385 (linux_create_inferior): Remove code to disable address space
386 randomization (moved to ../nat/linux-personality.c). Create
387 cleanup to disable address space randomization.
388
fb23d554
SDJ
3892015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
390
391 * Makefile.in (posix-strerror.o): New rule.
392 (mingw-strerror.o): Likewise.
393 * configure: Regenerated.
394 * configure.ac: Source file ../common/common.host. Initialize new
395 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
396
cdf43629
YQ
3972015-01-14 Yao Qi <yao@codesourcery.com>
398
399 * Makefile.in (SFILES): Add nat/ppc-linux.c.
400 (ppc-linux.o): New rule.
401 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
402 * configure.ac: AC_CHECK_FUNCS(getauxval).
403 * config.in: Re-generated.
404 * configure: Re-generated.
405 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
406 ppc64_64bit_inferior_p
407
514c5338
YQ
4082015-01-14 Yao Qi <yao@codesourcery.com>
409
410 * linux-ppc-low.c: Include "nat/ppc-linux.h".
411 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
412 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
413 (PT_ORIG_R3, PT_TRAP): Likewise.
414 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
415 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
416 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
417
3368c1e5
JB
4182015-01-10 Joel Brobecker <brobecker@adacore.com>
419
420 * i387-fp.c (i387_cache_to_xsave): In look over
421 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
422 zmmh_low_space field by use of zmmh_high_space.
423
582511be
PA
4242015-01-09 Pedro Alves <palves@redhat.com>
425
426 * linux-low.c (step_over_bkpt): Move higher up in the file.
427 (handle_extended_wait): Don't store the stop_pc here.
428 (get_stop_pc): Adjust comments and rename to ...
429 (check_stopped_by_breakpoint): ... this. Record whether the LWP
430 stopped for a software breakpoint or hardware breakpoint.
431 (thread_still_has_status_pending_p): New function.
432 (status_pending_p_callback): Use
433 thread_still_has_status_pending_p. If the event is no longer
434 interesting, resume the LWP.
435 (handle_tracepoints): Add assert.
436 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
437 (wstatus_maybe_breakpoint): New function.
438 (cancel_breakpoint): Delete function.
439 (check_stopped_by_watchpoint): New function, factored out from
440 linux_low_filter_event.
441 (lp_status_maybe_breakpoint): Delete function.
442 (linux_low_filter_event): Remove filter_ptid argument.
443 Leave thread group exits pending here. Store the LWP's stop PC.
444 Always leave events pending.
445 (linux_wait_for_event_filtered): Pull all events out of the
446 kernel, and leave them all pending.
447 (count_events_callback, select_event_lwp_callback): Consider all
448 events.
449 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
450 (select_event_lwp): Only give preference to the stepping LWP in
451 all-stop mode. Adjust comments.
452 (ignore_event): New function.
453 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
454 references to cancel_breakpoints. Adjust to renames. Also give
455 equal priority to all LWPs that have had events in non-stop mode.
456 If reporting a software breakpoint event, unadjust the LWP's PC.
457 (linux_wait): If linux_wait_1 returned an ignored event, retry.
458 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
459 Adjust.
460 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
461 (resume_status_pending_p): Use thread_still_has_status_pending_p.
462 (linux_stopped_by_watchpoint): Adjust.
463 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
464 * linux-low.h (enum lwp_stop_reason): New.
465 (struct lwp_info) <stop_pc>: Adjust comment.
466 <stopped_by_watchpoint>: Delete field.
467 <stop_reason>: New field.
468 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
469 * mem-break.c (software_breakpoint_inserted_here)
470 (hardware_breakpoint_inserted_here): New function.
471 * mem-break.h (software_breakpoint_inserted_here)
472 (hardware_breakpoint_inserted_here): Declare.
473 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
474 (cancel_breakpoints): Delete.
475 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
476 (upload_fast_traceframes): Remove references to
477 cancel_breakpoints.
478
a33e3959
PA
4792015-01-09 Pedro Alves <palves@redhat.com>
480
481 * thread-db.c (find_new_threads_callback): Ignore thread if the
482 kernel thread ID is -1.
483
8784d563
PA
4842015-01-09 Pedro Alves <palves@redhat.com>
485
486 * linux-low.c (linux_attach_fail_reason_string): Move to
487 nat/linux-ptrace.c, and rename.
488 (linux_attach_lwp): Update comment.
489 (attach_proc_task_lwp_callback): New function.
490 (linux_attach): Adjust to rename and use
491 linux_proc_attach_tgid_threads.
492 (linux_attach_fail_reason_string): Delete declaration.
493
76f2b779
JB
4942015-01-01 Joel Brobecker <brobecker@adacore.com>
495
496 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
497 * server.c (gdbserver_version): Likewise.
498
fafcc06a
SDJ
4992014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
500
501 * remote-utils.c: Include ctype.h.
502 (input_interrupt): Explicitly handle the case when the char
503 received is the NUL byte. Improve the printing of non-ASCII
504 characters.
505
beed38b8
JB
5062014-12-16 Joel Brobecker <brobecker@adacore.com>
507
508 * linux-low.c (linux_low_filter_event): Update call to
509 linux_enable_event_reporting following the addition of
510 a new parameter to that function.
511
bf330350
CU
5122014-12-16 Catalin Udma <catalin.udma@freescale.com>
513
514 PR server/17457
515 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
516 (AARCH64_FPCR_REGNO): Likewise.
517 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
518 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
519 (aarch64_store_fpregset): Likewise.
520
5227d625
JB
5212014-12-15 Joel Brobecker <brobecker@adacore.com>
522
523 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
524 Remove FIXME comment about assumption about N.
525
f93b65a0
JB
5262014-12-13 Joel Brobecker <brobecker@adacore.com>
527
528 * configure.ac: If large-file support is disabled in GDBserver,
529 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
530 * configure: Regenerate.
531
e5a9158d
AA
5322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
533
534 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
535 warning upon ENODATA from ptrace.
536 * linux-s390-low.c (s390_store_tdb): New.
537 (s390_regsets): Add regset for NT_S390_TDB.
538
feea5f36
AA
5392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
540
541 * linux-low.c (regsets_store_inferior_registers): Skip regsets
542 without a fill_function.
543 * linux-s390-low.c (s390_fill_last_break): Remove.
544 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
545 (s390_arch_setup): Use regset's size instead of fill_function for
546 loop end condition.
547
098dbe61
AA
5482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
549
550 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
551 the regset's store function when ptrace returned an error.
552 * regcache.c (get_thread_regcache): Invalidate register cache
553 before fetching inferior's registers.
554
28eef672
AA
5552014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
556
557 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
558 while-loop as for-loop.
559 (regsets_store_inferior_registers): Likewise.
560
bdca27a2
YQ
5612014-11-28 Yao Qi <yao@codesourcery.com>
562
563 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
564 * config.in, configure: Re-generate.
565 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
566 is defined.
567
9c232dda
YQ
5682014-11-21 Yao Qi <yao@codesourcery.com>
569
570 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
571 (AC_CHECK_HEADERS): Remove malloc.h.
572 * configure: Re-generated.
573 * config.in: Re-generated.
574 * server.h: Don't include alloca.h and malloc.h.
575 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
576 Don't include malloc.h.
577
43968415
JB
5782014-11-17 Joel Brobecker <brobecker@adacore.com>
579
580 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
581 corresponding ERRNO check in same block.
582
40e91bc7
PA
5832014-11-12 Pedro Alves <palves@redhat.com>
584
585 * server.c (cont_thread): Update comment.
586 (start_inferior, attach_inferior): No longer clear cont_thread.
587 (handle_v_cont): No longer set cont_thread.
588 (captured_main): Clear cont_thread each time a GDB connects.
589
c2c118cf
PA
5902014-11-12 Pedro Alves <palves@redhat.com>
591
592 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
593 thread, and don't resume all threads if the Hc thread has exited.
594
78708b7c
PA
5952014-11-12 Pedro Alves <palves@redhat.com>
596
597 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
598 the process group instead of to a specific LWP.
599
a2abc7de
PA
6002014-10-15 Pedro Alves <palves@redhat.com>
601
602 PR server/17487
603 * win32-arm-low.c (arm_set_thread_context): Remove current_event
604 parameter.
605 (arm_set_thread_context): Delete.
606 (the_low_target): Adjust.
607 * win32-i386-low.c (debug_registers_changed)
608 (debug_registers_used): Delete.
609 (update_debug_registers_callback): New function.
610 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
611 needing to update their debug registers.
612 (win32_get_current_dr): New function.
613 (x86_dr_low_get_addr, x86_dr_low_get_control)
614 (x86_dr_low_get_status): Fetch the debug register from the thread
615 record's context.
616 (i386_initial_stuff): Adjust.
617 (i386_get_thread_context): Remove current_event parameter. Don't
618 clear debug_registers_changed nor copy DR values to
619 debug_reg_state.
620 (i386_set_thread_context): Delete.
621 (i386_prepare_to_resume): New function.
622 (i386_thread_added): Mark the thread as needing to update irs
623 debug registers.
624 (the_low_target): Remove i386_set_thread_context and install
625 i386_prepare_to_resume.
626 * win32-low.c (win32_get_thread_context): Adjust.
627 (win32_set_thread_context): Use SetThreadContext
628 directly.
629 (win32_prepare_to_resume): New function.
630 (win32_require_context): New function, factored out from ...
631 (thread_rec): ... this.
632 (continue_one_thread): Call win32_prepare_to_resume on each thread
633 we're about to continue.
634 (win32_resume): Call win32_prepare_to_resume on the event thread.
635 * win32-low.h (struct win32_thread_info)
636 <debug_registers_changed>: New field.
637 (struct win32_target_ops): Change prototype of set_thread_context,
638 delete set_thread_context and add prepare_to_resume.
639 (win32_require_context): New declaration.
640
a442d071
GB
6412014-10-08 Gary Benson <gbenson@redhat.com>
642
643 * server.h: Do not include common-exceptions.h.
644
6f1947e8
GB
6452014-10-08 Gary Benson <gbenson@redhat.com>
646
647 * server.h: Do not include cleanups.h.
648
63b434a4
JH
6492014-09-30 James Hogan <james.hogan@imgtec.com>
650
651 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
652 mips64-dsp-linux.c.
653
c4d9ceb6
YQ
6542014-09-23 Yao Qi <yao@codesourcery.com>
655
656 * linux-low.c (lp_status_maybe_breakpoint): New function.
657 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
658 (count_events_callback): Likewise.
659 (select_event_lwp_callback): Likewise.
660 (cancel_breakpoints_callback): Likewise.
661
89a5711c
DB
6622014-09-19 Don Breazeal <donb@codesourcery.com>
663
664 * linux-low.c (handle_extended_wait): Call
665 linux_ptrace_get_extended_event.
666 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
667 linux_is_extended_waitstatus.
668
bffc0964
JB
6692014-09-16 Joel Brobecker <brobecker@adacore.com>
670
671 * Makefile.in (CPPFLAGS): Define.
672 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
673 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
674
0bfdf32f
GB
6752014-09-16 Gary Benson <gbenson@redhat.com>
676
677 * inferiors.h (current_inferior): Renamed as...
678 (current_thread): New variable. All uses updated.
679 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
680 (maybe_move_out_of_jump_pad): Likewise.
681 (cancel_breakpoint): Likewise.
682 (linux_low_filter_event): Likewise.
683 (wait_for_sigstop): Likewise.
684 (linux_resume_one_lwp): Likewise.
685 (need_step_over_p): Likewise.
686 (start_step_over): Likewise.
687 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
688 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
689 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
690 and save_inferior as saved_thread.
691 * regcache.c (get_thread_regcache): Renamed saved_inferior as
692 saved_thread.
693 (regcache_invalidate_thread): Likewise.
694 * remote-utils.c (prepare_resume_reply): Likewise.
695 * thread-db.c (thread_db_get_tls_address): Likewise.
696 (disable_thread_event_reporting): Likewise.
697 (remove_thread_event_breakpoints): Likewise.
698 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
699 as saved_thread.
700 * target.h (set_desired_inferior): Renamed as...
701 (set_desired_thread): New declaration. All uses updated.
702 * server.c (myresume): Updated comment to reference thread instead
703 of inferior.
704 (handle_serial_event): Likewise.
705 (handle_target_event): Likewise.
706
361c8ade
GB
7072014-09-12 Tom Tromey <tromey@redhat.com>
708 Gary Benson <gbenson@redhat.com>
709
710 * regcache.h: Include common-regcache.h.
711 (regcache_read_pc): Don't declare.
712 * regcache.c (get_thread_regcache_for_ptid): New function.
713
bd9269f7
GB
7142014-09-11 Tom Tromey <tromey@redhat.com>
715 Gary Benson <gbenson@redhat.com>
716
717 * symbol.c: New file.
718 * Makefile.in (SFILES): Add symbol.c.
719 (OBS): Add symbol.o.
720
f8c1d06b
GB
7212014-09-11 Gary Benson <gbenson@redhat.com>
722
723 * target.c (target_stop_ptid, target_continue_ptid): New
724 functions.
725
721ec300
GB
7262014-09-11 Tom Tromey <tromey@redhat.com>
727 Gary Benson <gbenson@redhat.com>
728
729 * target.h: Include target/target.h.
730 * target.c (target_read_memory, target_read_uint32)
731 (target_write_memory): New functions.
732
c5e92cca
GB
7332014-09-11 Gary Benson <gbenson@redhat.com>
734
735 * server.h (debug_hw_points): Don't declare.
736 * server.c (debug_hw_points): Don't define. Replace all uses
737 with show_debug_regs.
738 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
739 all uses with show_debug_regs.
740
2e4bb98a
EBM
7412014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
742
743 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
744 endianness into account.
745 (ppc_supply_ptrace_register): Likewise.
746
ac740bc7
JH
7472014-09-03 James Hogan <james.hogan@imgtec.com>
748
749 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
750 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
751
97ea6506
GB
7522014-09-03 Gary Benson <gbenson@redhat.com>
753
754 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
755 ALL_DEBUG_ADDRESS_REGISTERS.
756
df7e5265
GB
7572014-09-02 Gary Benson <gbenson@redhat.com>
758
759 * i386-low.h: Renamed as...
760 * x86-low.h: New file. All type, function and variable name
761 prefixes changed from "i386_" to "x86_". All references updated.
762 * i386-low.c: Renamed as...
763 * x86-low.c: New file. All type, function and variable name
764 prefixes changed from "i386_" to "x86_". All references updated.
765
ed859da7
GB
7662014-09-02 Gary Benson <gbenson@redhat.com>
767
768 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
769 (x86_linux_new_thread): Likewise.
770
860789c7
GB
7712014-08-29 Gary Benson <gbenson@redhat.com>
772
773 * server.h (setjmp.h): Do not include.
774 (toplevel): Do not declare.
775 (common-exceptions.h): Include.
776 (cleanups.h): Likewise.
777 * server.c (toplevel): Do not define.
778 (exit_code): New static global.
779 (detach_or_kill_for_exit_cleanup): New function.
780 (main): New function. Original main renamed to...
781 (captured_main): New function.
782 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
783
ff55e1b5
GB
7842014-08-29 Gary Benson <gbenson@redhat.com>
785
786 * Makefile.in (SFILES): Add common/common-exceptions.c.
787 (OBS): Add common-exceptions.o.
788 (common-exceptions.o): New rule.
789 * utils.c (prepare_to_throw_exception): New function.
790
e9bcb658
GB
7912014-08-29 Gary Benson <gbenson@redhat.com>
792
793 * config.in: Regenerate.
794 * configure: Likewise.
795
e3180625
GB
7962014-08-29 Gary Benson <gbenson@redhat.com>
797
798 * Makefile.in (SFILES): Add common/cleanups.c.
799 (OBS): cleanups.o.
800 (cleanups.o): New rule.
801
e3d6ba5d
GB
8022014-08-29 Gary Benson <gbenson@redhat.com>
803
804 * utils.c (internal_vwarning): New function.
805
7096e886
GB
8062014-08-28 Gary Benson <gbenson@redhat.com>
807
808 * utils.h (fatal): Remove declaration.
809 * utils.c (fatal): Remove function.
810
14ce3192
GB
8112014-08-28 Gary Benson <gbenson@redhat.com>
812
813 * tracepoint.c (gdb_agent_init): Replace fatal with
814 perror_with_name.
815 (initialize_tracepoint): Likewise.
816
50278d59
GB
8172014-08-28 Gary Benson <gbenson@redhat.com>
818
819 * remote-utils.c (remote_prepare): Replace fatal with error.
820
aa96c426
GB
8212014-08-28 Gary Benson <gbenson@redhat.com>
822
823 * linux-low.c (linux_async): Replace fatal with warning.
824 Tidy up and return.
825 (linux_start_non_stop): Return -1 if linux_async failed.
826
f7160e97
GB
8272014-08-28 Gary Benson <gbenson@redhat.com>
828
829 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
830 gdb_assert.
831 (i386_dr_low_get_addr): Remove vague comment.
832 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
833 gdb_assert.
834
38e08fca
GB
8352014-08-28 Gary Benson <gbenson@redhat.com>
836
837 * inferiors.c (get_thread_process): Replace check with gdb_assert.
838 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
839 internal_error.
840 (linux_resume_one_lwp): Likewise.
841 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
842 gdb_assert.
843 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
844 with internal_error.
845 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
846 (init_register_cache): Replace fatal with gdb_assert_not_reached.
847 (find_register_by_name): Replace fatal with internal_error.
848 (find_regno): Likewise.
849 * tdesc.c (init_target_desc): Replace check with gdb_assert.
850 * thread-db.c (thread_db_create_event): Likewise.
851 (thread_db_load_search): Likewise.
852 (try_thread_db_load_1): Likewise.
853 * tracepoint.c (get_jump_space_head): Replace fatal with
854 internal_error.
855 (claim_trampoline_space): Likewise.
856 (have_fast_tracepoint_trampoline_buffer): Likewise.
857 (cmd_qtstart): Likewise.
858 (stop_tracing): Likewise.
859 (fast_tracepoint_collecting): Likewise.
860 (target_malloc): Likewise.
861 (download_tracepoint): Likewise.
862 (download_trace_state_variables): Replace check with gdb_assert.
863 (upload_fast_traceframes): Replace fatal with internal_error.
864
34abf635
GB
8652014-08-19 Tom Tromey <tromey@redhat.com>
866 Gary Benson <gbenson@redhat.com>
867
868 * Makefile.in (SFILES): Add common/common-debug.c.
869 (OBS): Add common-debug.o.
870 (common-debug.o): New rule.
871 * debug.h (debug_printf): Don't declare.
872 * debug.c (debug_printf): Renamed and rewritten as...
873 (debug_vprintf): New function.
874
f6e94d78
GB
8752014-08-19 Gary Benson <gbenson@redhat.com>
876
877 * utils.h: Do not include print-utils.h.
878
9239eeab
GB
8792014-08-19 Tom Tromey <tromey@redhat.com>
880 Gary Benson <gbenson@redhat.com>
881
882 * server.h: Add static assertion.
883 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
884
ef87c8bb
GB
8852014-08-19 Tom Tromey <tromey@redhat.com>
886 Gary Benson <gbenson@redhat.com>
887
888 * Makefile.in (SFILES): Add common/errors.c.
889 (OBS): Add errors.o.
890 (IPA_OBS): Add errors-ipa.o.
891 (errors.o): New rule.
892 (errors-ipa.o): Likewise.
893 * utils.h (perror_with_name, error, warning): Don't declare.
894 * utils.c (warning): Renamed and rewritten as...
895 (vwarning): New function.
896 (error): Renamed and rewritten as...
897 (verror): New function.
898 (internal_error): Renamed and rewritten as...
899 (internal_verror): New function.
900
bb974a24
GB
9012014-08-07 Gary Benson <gbenson@redhat.com>
902
903 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
904 * configure: Regenerate.
905 * config.in: Likewise.
906 * server.h: Do not include errno.h.
907 * event-loop.c: Likewise.
908 * hostio-errno.c: Likewise.
909 * linux-low.c: Likewise.
910 * remote-utils.c: Likewise.
911 * spu-low.c: Likewise.
912 * utils.c: Likewise.
913 * gdbreplay.c: Unconditionally include errno.h.
914
6d3d12eb
GB
9152014-08-07 Gary Benson <gbenson@redhat.com>
916
917 * server.h: Do not include string.h.
918 * event-loop.c: Likewise.
919 * linux-low.c: Likewise.
920 * regcache.c: Likewise.
921 * remote-utils.c: Likewise.
922 * spu-low.c: Likewise.
923 * utils.c: Likewise.
924
dccbb609
GB
9252014-08-07 Gary Benson <gbenson@redhat.com>
926
927 * server.h: Do not include gdb_assert.h.
928
e76df0d0
GB
9292014-08-07 Gary Benson <gbenson@redhat.com>
930
931 * server.h: Do not include common-utils.h.
932
4cb9c816
GB
9332014-08-07 Gary Benson <gbenson@redhat.com>
934
935 * server.h: Do not include ptid.h.
936 * notif.h: Likewise.
937
3995eeee
GB
9382014-08-07 Gary Benson <gbenson@redhat.com>
939
940 * server.h: Do not include gdb_locale.h.
941
cb9f1a9b
GB
9422014-08-07 Gary Benson <gbenson@redhat.com>
943
944 * server.h: Do not include gdb/signals.h.
945 * win32-low.c: Likewise.
946
a5fceff8
GB
9472014-08-07 Gary Benson <gbenson@redhat.com>
948
949 * server.h: Do not include pathmax.h.
950
b9391142
GB
9512014-08-07 Gary Benson <gbenson@redhat.com>
952
953 * server.h: Do not include libiberty.h.
954 * linux-bfin-low.c: Likewise.
955
0e443c87
GB
9562014-08-07 Gary Benson <gbenson@redhat.com>
957
958 * server.h: Do not include ansidecl.h.
959
8ebb3f56
GB
9602014-08-07 Gary Benson <gbenson@redhat.com>
961
962 * linux-x86-low.c: Do not include stddef.h.
963 * lynx-ppc-low.c: Likewise.
964 * tracepoint.c: Likewise.
965
8980bdf6
GB
9662014-08-07 Gary Benson <gbenson@redhat.com>
967
968 * server.h: Do not include stdarg.h.
969 * nto-low.c: Likewise.
970
d7096f71
GB
9712014-08-07 Gary Benson <gbenson@redhat.com>
972
973 * server.h: Do not include stdlib.h.
974 * inferiors.c: Likewise.
975 * linux-low.c: Likewise.
976 * regcache.c: Likewise.
977 * spu-low.c: Likewise.
978 * tracepoint.c: Likewise.
979 * utils.c: Likewise.
980
d02f550d
GB
9812014-08-07 Gary Benson <gbenson@redhat.com>
982
983 * server.h: Do not include stdio.h.
984 * linux-low.c: Likewise.
985 * remote-utils.c: Likewise.
986 * spu-low.c: Likewise.
987 * utils.c: Likewise.
988 * wincecompat.c: Likewise.
989
87f6c4e3
GB
9902014-08-06 Gary Benson <gbenson@redhat.com>
991
992 * regcache.c (init_register_cache): Move conditionals inside if.
993
7089dca4
GB
9942014-08-06 Gary Benson <gbenson@redhat.com>
995
996 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
997
462f517e
GB
9982014-07-31 Gary Benson <gbenson@redhat.com>
999
1000 * ax.h: Do not include server.h.
1001 * gdbthread.h: Likewise.
1002 * lynx-low.h: Likewise.
1003 * notif.h: Likewise.
1004
976411d6
GB
10052014-07-30 Gary Benson <gbenson@redhat.com>
1006
1007 * server.h: Include common-defs.h.
1008 Do not include config.h or build-gnulib-gdbserver/config.h.
1009
d41f6d8e
GB
10102014-07-30 Gary Benson <gbenson@redhat.com>
1011
1012 * hostio-errno.c: Move server.h to top of includes list.
1013 * inferiors.c: Likewise.
1014 * linux-x86-low.c: Likewise.
1015 * notif.c: Include server.h.
1016
314c6a35
TT
10172014-07-24 Tom Tromey <tromey@redhat.com>
1018 Gary Benson <gbenson@redhat.com>
1019
1020 * server.h (CORE_ADDR): Now unsigned.
1021
69ff6be5
PA
10222014-07-16 Pedro Alves <palves@redhat.com>
1023
1024 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1025
ce9e3fe7
PA
10262014-07-15 Pedro Alves <palves@redhat.com>
1027
1028 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1029 copy.
1030
e76126e8
PA
10312014-07-11 Pedro Alves <palves@redhat.com>
1032
1033 * linux-low.c (kill_wait_lwp): New function, based on
1034 kill_one_lwp_callback, but use my_waitpid directly.
1035 (kill_one_lwp_callback, linux_kill): Use it.
1036
8e9db26e
PA
10372014-06-23 Pedro Alves <palves@redhat.com>
1038
1039 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1040 before setting DR0..DR3.
1041
698b3e08
GB
10422014-06-20 Gary Benson <gbenson@redhat.com>
1043
1044 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1045 * configure: Regenerated.
1046 * config.in: Likewise.
1047
125f8a3d
GB
10482014-06-20 Gary Benson <gbenson@redhat.com>
1049
1050 * Makefile.in (SFILES): Update locations for files moved
1051 from common to nat.
1052 (object file files): Reordered.
1053
42995dbd
GB
10542014-06-20 Gary Benson <gbenson@redhat.com>
1055
1056 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1057 (i386_dr_low_set_addr): Likewise.
1058 (i386_dr_low_get_addr): Likewise.
1059 (i386_dr_low_can_set_control): Likewise.
1060 (i386_dr_low_set_control): Likewise.
1061 (i386_dr_low_get_control): Likewise.
1062 (i386_dr_low_get_status): Likewise.
1063 (i386_get_debug_register_length): Likewise.
1064 * linux-x86-low.c (i386_dr_low_set_addr):
1065 Changed signature. Made static.
1066 (i386_dr_low_get_addr): Likewise.
1067 (i386_dr_low_set_control): Likewise.
1068 (i386_dr_low_get_control): Likewise.
1069 (i386_dr_low_get_status): Likewise.
1070 (i386_dr_low): New global variable.
1071 * win32-i386-low.c (i386_dr_low_set_addr):
1072 Changed signature. Made static.
1073 (i386_dr_low_get_addr): Likewise.
1074 (i386_dr_low_set_control): Likewise.
1075 (i386_dr_low_get_control): Likewise.
1076 (i386_dr_low_get_status): Likewise.
1077 (i386_dr_low): New global variable.
1078
e1d2394b
MS
10792014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1080
1081 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1082 * Makefile.in (AR, AR_FLAGS): Define.
1083 * configure: Regenerate.
1084
3a8ee006
GB
10852014-06-19 Gary Benson <gbenson@redhat.com>
1086
1087 * Makefile.in (i386-dregs.o): New rule.
1088 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1089 * i386-low.c (target.h): Remove include.
1090 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1091 (DR_CONTROL_SHIFT): Likewise.
1092 (DR_CONTROL_SIZE): Likewise.
1093 (DR_RW_EXECUTE): Likewise.
1094 (DR_RW_WRITE): Likewise.
1095 (DR_RW_READ): Likewise.
1096 (DR_RW_IORW): Likewise.
1097 (DR_LEN_1): Likewise.
1098 (DR_LEN_2): Likewise.
1099 (DR_LEN_4): Likewise.
1100 (DR_LEN_8): Likewise.
1101 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1102 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1103 (DR_ENABLE_SIZE): Likewise.
1104 (DR_LOCAL_SLOWDOWN): Likewise.
1105 (DR_GLOBAL_SLOWDOWN): Likewise.
1106 (DR_CONTROL_RESERVED): Likewise.
1107 (I386_DR_CONTROL_MASK): Likewise.
1108 (I386_DR_VACANT): Likewise.
1109 (I386_DR_LOCAL_ENABLE): Likewise.
1110 (I386_DR_GLOBAL_ENABLE): Likewise.
1111 (I386_DR_DISABLE): Likewise.
1112 (I386_DR_SET_RW_LEN): Likewise.
1113 (I386_DR_GET_RW_LEN): Likewise.
1114 (I386_DR_WATCH_HIT): Likewise.
1115 (i386_wp_op_t): Likewise.
1116 (i386_show_dr): Likewise.
1117 (i386_length_and_rw_bits): Likewise.
1118 (i386_insert_aligned_watchpoint): Likewise.
1119 (i386_remove_aligned_watchpoint): Likewise.
1120 (i386_handle_nonaligned_watchpoint): Likewise.
1121 i386_update_inferior_debug_regs(): Likewise.
1122 (i386_dr_insert_watchpoint): Likewise.
1123 (i386_dr_remove_watchpoint): Likewise.
1124 (i386_dr_region_ok_for_watchpoint): Likewise.
1125 (i386_dr_stopped_data_address): Likewise.
1126 (i386_dr_stopped_by_watchpoint): Likewise.
1127
8f26655c
GB
11282014-06-19 Gary Benson <gbenson@redhat.com>
1129
1130 * i386-low.c (i386_dr_show): Renamed to
1131 i386_show_dr and made static. All uses updated.
1132 (i386_dr_length_and_rw_bits): Renamed to
1133 i386_length_and_rw_bits and made static.
1134 All uses updated.
1135 (i386_dr_insert_aligned_watchpoint): Renamed to
1136 i386_insert_aligned_watchpoint and made static.
1137 All uses updated.
1138 (i386_dr_remove_aligned_watchpoint): Renamed to
1139 i386_remove_aligned_watchpoint and made static.
1140 All uses updated.
1141 (i386_dr_update_inferior_debug_regs): Renamed to
1142 i386_update_inferior_debug_regs and made static.
1143 All uses updated.
1144
b9228891
GB
11452014-06-18 Gary Benson <gbenson@redhat.com>
1146
5171def3
GB
1147 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1148 (i386_dr_low_can_set_control): Likewise.
1149 (i386_get_debug_register_length): Likewise.
1150 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1151 (i386_dr_low_can_set_control): Likewise.
1152 (i386_get_debug_register_length): Likewise.
1153
11542014-06-17 Gary Benson <gbenson@redhat.com>
1155
b9228891
GB
1156 * i386-low.h (i386-dregs.h): New include.
1157 (DR_FIRSTADDR): Now in i386-dregs.h.
1158 (DR_LASTADDR): Likewise.
1159 (DR_NADDR): Likewise.
1160 (DR_STATUS): Likewise.
1161 (DR_CONTROL): Likewise.
1162 (i386_debug_reg_state): Likewise.
1163 (i386_dr_insert_watchpoint): Likewise.
1164 (i386_dr_remove_watchpoint): Likewise.
1165 (i386_dr_region_ok_for_watchpoint): Likewise.
1166 (i386_dr_stopped_data_address): Likewise.
1167 (i386_dr_stopped_by_watchpoint): Likewise.
1168 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1169
4be83cc2
GB
11702014-06-18 Gary Benson <gbenson@redhat.com>
1171
1172 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1173 i386_dr_insert_watchpoint.
1174 (i386_low_remove_watchpoint): Renamed to
1175 i386_dr_remove_watchpoint.
1176 (i386_low_region_ok_for_watchpoint): Renamed to
1177 i386_dr_region_ok_for_watchpoint.
1178 (i386_low_stopped_data_address): Renamed to
1179 i386_dr_stopped_data_address.
1180 (i386_low_stopped_by_watchpoint): Renamed to
1181 i386_dr_stopped_by_watchpoint.
1182 * i386-low.c (i386_show_dr): Renamed to
1183 i386_dr_show and made nonstatic. All uses updated.
1184 (i386_length_and_rw_bits): Renamed to
1185 i386_dr_length_and_rw_bits and made nonstatic.
1186 All uses updated.
1187 (i386_insert_aligned_watchpoint): Renamed to
1188 i386_dr_insert_aligned_watchpoint and made nonstatic.
1189 All uses updated.
1190 (i386_remove_aligned_watchpoint): Renamed to
1191 i386_dr_remove_aligned_watchpoint and made nonstatic.
1192 All uses updated.
1193 (i386_update_inferior_debug_regs): Renamed to
1194 i386_dr_update_inferior_debug_regs and made nonstatic.
1195 All uses updated.
1196 (i386_low_insert_watchpoint): Renamed to
1197 i386_dr_insert_watchpoint. All uses updated.
1198 (i386_low_remove_watchpoint): Renamed to
1199 i386_dr_remove_watchpoint. All uses updated.
1200 (i386_low_region_ok_for_watchpoint): Renamed to
1201 i386_dr_region_ok_for_watchpoint. All uses updated.
1202 (i386_low_stopped_data_address): Renamed to
1203 i386_dr_stopped_data_address. All uses updated.
1204 (i386_low_stopped_by_watchpoint): Renamed to
1205 i386_dr_stopped_by_watchpoint. All uses updated.
1206
131aa0d4
GB
12072014-06-18 Gary Benson <gbenson@redhat.com>
1208
1209 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1210 (i386_dr_low_can_set_control): Likewise.
1211 (i386_insert_aligned_watchpoint): New check.
1212
d9305f7f
GB
12132014-06-18 Gary Benson <gbenson@redhat.com>
1214
1215 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1216 Renamed to state.
1217
e927c9fc
GB
12182014-06-18 Gary Benson <gbenson@redhat.com>
1219
1220 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1221 instead of fatal and error.
1222 (i386_handle_nonaligned_watchpoint): Likewise.
1223
1b6d4134
GB
12242014-06-18 Gary Benson <gbenson@redhat.com>
1225
1226 * i386-low.c (i386_get_debug_register_length): New macro.
1227 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1228 (i386_show_dr): Use debug_printf instead of fprintf. Use
1229 phex to format values.
1230
6e62758f
GB
12312014-06-18 Gary Benson <gbenson@redhat.com>
1232
1233 * i386-low.h: Comment changes.
1234 * i386-low.c: Likewise.
1235
fc6e2f03
GB
12362014-06-18 Gary Benson <gbenson@redhat.com>
1237
1238 * i386-low.c: Whitespace changes.
1239
f9d1eeed
TT
12402014-06-12 Tom Tromey <tromey@redhat.com>
1241
1242 * utils.c (freeargv): Remove.
1243
0b04e523
TT
12442014-06-12 Tom Tromey <tromey@redhat.com>
1245
1246 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1247 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1248 (parse_debug_format_options): Likewise.
1249 (gdbserver_usage): Likewise.
1250 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1251 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1252 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1253 against libiberty.
1254 ($(LIBGNU)): Depend on libiberty.
1255 (all-lib): Recurse into all subdirs.
1256 (install-only): Invoke "install" target in subdirs.
1257 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1258 targets.
1259 * configure: Rebuild.
1260 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1261 for vasprintf, vsnprintf, or gettimeofday.
1262 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1263 srv_tgtobj.
1264
270c9937
JB
12652014-06-05 Joel Brobecker <brobecker@adacore.com>
1266
1267 * development.sh: Delete.
1268 * Makefile.in (config.status): Adjust dependency on development.sh.
1269 * configure.ac: Adjust development.sh source call.
1270 * configure: Regenerate.
1271
0a261ed8
PA
12722014-06-02 Pedro Alves <palves@redhat.com>
1273
1274 * ax.c (gdb_free_agent_expr): New function.
1275 * ax.h (gdb_free_agent_expr): New declaration.
1276 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1277 list.
1278 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1279 static.
1280 (clear_breakpoint_conditions_and_commands): New function.
1281 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1282 (clear_breakpoint_conditions_and_commands): New declaration.
1283
e9dae05e
RR
12842014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1285
1286 * linux-aarch64-low.c (asm/ptrace.h): Include.
1287
5876f503
JK
12882014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1289
1290 Fix TLS access for -static -pthread.
1291 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1292 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1293 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1294
802e8e6d
PA
12952014-05-20 Pedro Alves <palves@redhat.com>
1296
1297 * linux-aarch64-low.c (aarch64_insert_point)
1298 (aarch64_remove_point): No longer check whether the type is
1299 supported here. Adjust to new interface.
1300 (the_low_target): Install aarch64_supports_z_point_type as
1301 supports_z_point_type method.
1302 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1303 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1304 instead of a Z packet char. Adjust.
1305 (arm_supports_z_point_type): New function.
1306 (arm_insert_point, arm_remove_point): Adjust to new interface.
1307 (the_low_target): Install arm_supports_z_point_type.
1308 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1309 (cris_insert_point, cris_remove_point): Adjust to new interface.
1310 Don't check whether the type is supported here.
1311 (the_low_target): Install cris_supports_z_point_type.
1312 * linux-low.c (linux_supports_z_point_type): New function.
1313 (linux_insert_point, linux_remove_point): Adjust to new interface.
1314 * linux-low.h (struct linux_target_ops) <insert_point,
1315 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1316 raw_breakpoint pointer parameter.
1317 <supports_z_point_type>: New method.
1318 * linux-mips-low.c (mips_supports_z_point_type): New function.
1319 (mips_insert_point, mips_remove_point): Adjust to new interface.
1320 Use mips_supports_z_point_type.
1321 (the_low_target): Install mips_supports_z_point_type.
1322 * linux-ppc-low.c (the_low_target): Install NULL as
1323 supports_z_point_type method.
1324 * linux-s390-low.c (the_low_target): Install NULL as
1325 supports_z_point_type method.
1326 * linux-sparc-low.c (the_low_target): Install NULL as
1327 supports_z_point_type method.
1328 * linux-x86-low.c (x86_supports_z_point_type): New function.
1329 (x86_insert_point): Adjust to new insert_point interface. Use
1330 insert_memory_breakpoint. Adjust to new
1331 i386_low_insert_watchpoint interface.
1332 (x86_remove_point): Adjust to remove_point interface. Use
1333 remove_memory_breakpoint. Adjust to new
1334 i386_low_remove_watchpoint interface.
1335 (the_low_target): Install x86_supports_z_point_type.
1336 * lynx-low.c (lynx_target_ops): Install NULL as
1337 supports_z_point_type callback.
1338 * nto-low.c (nto_supports_z_point_type): New.
1339 (nto_insert_point, nto_remove_point): Adjust to new interface.
1340 (nto_target_ops): Install nto_supports_z_point_type.
1341 * mem-break.c: Adjust intro comment.
1342 (struct raw_breakpoint) <raw_type, size>: New fields.
1343 <inserted>: Update comment.
1344 <shlib_disabled>: Delete field.
1345 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1346 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1347 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1348 (raw_bkpt_type_to_target_hw_bp_type): New function.
1349 (find_enabled_raw_code_breakpoint_at): New function.
1350 (find_raw_breakpoint_at): New type and size parameters. Use them.
1351 (insert_memory_breakpoint): New function, based off
1352 set_raw_breakpoint_at.
1353 (remove_memory_breakpoint): New function.
1354 (set_raw_breakpoint_at): Reimplement.
1355 (set_breakpoint): New, based on set_breakpoint_at.
1356 (set_breakpoint_at): Reimplement.
1357 (delete_raw_breakpoint): Go through the_target->remove_point
1358 instead of assuming memory breakpoints.
1359 (find_gdb_breakpoint_at): Delete.
1360 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1361 (find_gdb_breakpoint): New function.
1362 (set_gdb_breakpoint_at): Delete.
1363 (z_type_supported): New function.
1364 (set_gdb_breakpoint_1): New function, loosely based off
1365 set_gdb_breakpoint_at.
1366 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1367 (delete_gdb_breakpoint_at): Delete.
1368 (delete_gdb_breakpoint_1): New function, loosely based off
1369 delete_gdb_breakpoint_at.
1370 (delete_gdb_breakpoint): New function.
1371 (clear_gdb_breakpoint_conditions): Rename to ...
1372 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1373 breakpoint.
1374 (add_condition_to_breakpoint): Make static.
1375 (add_breakpoint_condition): Take a struct breakpoint pointer
1376 instead of an address. Adjust.
1377 (gdb_condition_true_at_breakpoint): Rename to ...
1378 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1379 z_type parameter.
1380 (gdb_condition_true_at_breakpoint): Reimplement.
1381 (add_breakpoint_commands): Take a struct breakpoint pointer
1382 instead of an address. Adjust.
1383 (gdb_no_commands_at_breakpoint): Rename to ...
1384 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1385 parameter. Return true if no breakpoint was found. Change debug
1386 output.
1387 (gdb_no_commands_at_breakpoint): Reimplement.
1388 (run_breakpoint_commands): Rename to ...
1389 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1390 and change return type to boolean.
1391 (run_breakpoint_commands): New function.
1392 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1393 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1394 breakpoint. Go through the_target->remove_point instead of
1395 assuming memory breakpoint.
1396 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1397 software and hardware breakpoints.
1398 (reinsert_raw_breakpoint): Go through the_target->insert_point
1399 instead of assuming memory breakpoint.
1400 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1401 software and hardware breakpoints.
1402 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1403 Check both software and hardware breakpoints.
1404 (validate_inserted_breakpoint): Assert the breakpoint is a
1405 software breakpoint. Set the inserted flag to -1 instead of
1406 setting shlib_disabled.
1407 (delete_disabled_breakpoints): Adjust.
1408 (validate_breakpoints): Only validate software breakpoints.
1409 Adjust to inserted flag change.
1410 (check_mem_read, check_mem_write): Skip breakpoint types other
1411 than software breakpoints. Adjust to inserted flag change.
1412 * mem-break.h (enum raw_bkpt_type): New enum.
1413 (raw_breakpoint, struct process_info): Forward declare.
1414 (Z_packet_to_target_hw_bp_type): Delete declaration.
1415 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1416 (set_gdb_breakpoint, delete_gdb_breakpoint)
1417 (clear_breakpoint_conditions): New declarations.
1418 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1419 (breakpoint_inserted_here): Update comment.
1420 (add_breakpoint_condition, add_breakpoint_commands): Replace
1421 address parameter with a breakpoint pointer parameter.
1422 (gdb_breakpoint_here): Update comment.
1423 (delete_gdb_breakpoint_at): Delete.
1424 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1425 * server.c (process_point_options): Take a struct breakpoint
1426 pointer instead of an address. Adjust.
1427 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1428 delete_gdb_breakpoint.
1429 * spu-low.c (spu_target_ops): Install NULL as
1430 supports_z_point_type method.
1431 * target.h: Include mem-break.h.
1432 (struct target_ops) <prepare_to_access_memory>: Update comment.
1433 <supports_z_point_type>: New field.
1434 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1435 instead of a char. Also take a raw breakpoint pointer.
1436 * win32-arm-low.c (the_low_target): Install NULL as
1437 supports_z_point_type.
1438 * win32-i386-low.c (i386_supports_z_point_type): New function.
1439 (i386_insert_point, i386_remove_point): Adjust to new interface.
1440 (the_low_target): Install i386_supports_z_point_type.
1441 * win32-low.c (win32_supports_z_point_type): New function.
1442 (win32_insert_point, win32_remove_point): Adjust to new interface.
1443 (win32_target_ops): Install win32_supports_z_point_type.
1444 * win32-low.h (struct win32_target_ops):
1445 <supports_z_point_type>: New method.
1446 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1447 instead of a char. Also take a raw breakpoint pointer.
1448
932539e3
PA
14492014-05-20 Pedro Alves <palves@redhat.com>
1450
1451 * mem-break.h: Include break-common.h.
1452 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1453 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1454 (Z_packet_to_target_hw_bp_type): New declaration.
1455 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1456 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1457 (Z_PACKET_ACCESS_WP): Delete macros.
1458 (Z_packet_to_hw_type): Delete function.
1459 * i386-low.h: Don't include break-common.h here.
1460 (Z_packet_to_hw_type): Delete declaration.
1461 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1462 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1463 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1464 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1465 * linux-aarch64-low.c: Don't include break-common.h here.
1466 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1467 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1468 (Z_packet_to_target_hw_bp_type): Delete function.
1469 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1470 function.
1471 (mips_insert_point, mips_remove_point): Use
1472 Z_packet_to_target_hw_bp_type.
1473
4ff0d3d8
PA
14742014-05-20 Pedro Alves <palves@redhat.com>
1475
1476 * linux-aarch64-low.c: Include break-common.h.
1477 (enum target_point_type): Delete.
1478 (Z_packet_to_point_type): Rename to ...
1479 (Z_packet_to_target_hw_bp_type): ... this, and return a
1480 target_hw_bp_type instead.
1481 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1482 instead of an enum target_point_type.
1483 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1484 breakpoint type.
1485 (aarch64_dr_state_insert_one_point)
1486 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1487 (aarch64_handle_aligned_watchpoint)
1488 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1489 Take an enum target_hw_bp_type instead of an enum
1490 target_point_type.
1491 (aarch64_supports_z_point_type): New function.
1492 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1493 use Z_packet_to_target_hw_bp_type.
1494
786dc519
JB
14952014-05-20 Joel Brobecker <brobecker@adacore.com>
1496
1497 * configure.ac: Only use -Werror by default when DEVELOPMENT
1498 is true.
1499 * configure: Regenerate.
1500
9e0aa64f
JK
15012014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1502
1503 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1504 * linux-x86-low.c (X86_64_USER_REGS): New.
1505 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1506
2b577b92
YQ
15072014-04-28 Yao Qi <yao@codesourcery.com>
1508
1509 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1510 name.
1511
94611da2
PA
15122014-04-25 Pedro Alves <palves@redhat.com>
1513
1514 PR server/16255
1515 * linux-low.c (linux_attach_fail_reason_string): New function.
1516 (linux_attach_lwp): Delete.
1517 (linux_attach_lwp_1): Rename to ...
1518 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1519 argument. Remove "initial" parameter. Return int instead of
1520 void. Don't error or warn here.
1521 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1522 failure to attach to the tgid. Call warning when failing to
1523 attach to an lwp.
1524 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1525 argument. Remove "initial" parameter. Return int instead of
1526 void. Don't error or warn here.
1527 (linux_attach_fail_reason_string): New declaration.
1528 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1529 interface change. Use linux_attach_fail_reason_string.
1530
01f9f808
MS
15312014-04-24 Michael Sturm <michael.sturm@mintel.com>
1532 Walfred Tedeschi <walfred.tedeschi@intel.com>
1533
1534 * Makefile.in: Added rules to handle new files
1535 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1536 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1537 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1538 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1539 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1540 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1541 x32-avx512-linux.o.
1542 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1543 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1544 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1545 i386/x32-avx512.xml.
1546 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1547 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1548 i386/x32-avx512-linux.xml.
1549 * i387-fp.c (num_avx512_k_registers): New constant for number
1550 of K registers.
1551 (num_avx512_zmmh_low_registers): New constant for number of
1552 lower ZMM registers (0-15).
1553 (num_avx512_zmmh_high_registers): New constant for number of
1554 higher ZMM registers (16-31).
1555 (num_avx512_ymmh_registers): New contant for number of higher
1556 YMM registers (ymm16-31 added by avx521 on x86_64).
1557 (num_avx512_xmm_registers): New constant for number of higher
1558 XMM registers (xmm16-31 added by AVX512 on x86_64).
1559 (struct i387_xsave): Add space for AVX512 registers.
1560 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1561 Add code to handle AVX512 registers.
1562 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1563 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1564 prototypei from generated file.
1565 (tdesc_amd64_avx512_linux): Likewise.
1566 (init_registers_x32_avx512_linux): Likewise.
1567 (tdesc_x32_avx512_linux): Likewise.
1568 (init_registers_i386_avx512_linux): Likewise.
1569 (tdesc_i386_avx512_linux): Likewise.
1570 (x86_64_regmap): Add AVX512 registers.
1571 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1572 mask.
1573 (initialize_low_arch): Add code to initialize AVX512 registers.
1574
51aa91f9
PA
15752014-04-23 Pedro Alves <palves@redhat.com>
1576
1577 * mem-break.c (find_gdb_breakpoint_at): Make static.
1578 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1579
a4165e94
PA
15802014-04-23 Pedro Alves <palves@redhat.com>
1581
1582 * i386-low.c: Don't include break-common.h here.
1583 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1584 prototype to take target_hw_bp_type as argument instead of a Z
1585 packet char.
1586 * i386-low.h: Include break-common.h here.
1587 (Z_packet_to_hw_type): Declare.
1588 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1589 prototypes.
1590 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1591 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1592 (x86_remove_point): Convert the packet number to a
1593 target_hw_bp_type before calling i386_low_remove_watchpoint.
1594 * win32-i386-low.c (i386_insert_point): Convert the packet number
1595 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1596 (i386_remove_point): Convert the packet number to a
1597 target_hw_bp_type before calling i386_low_remove_watchpoint.
1598
b8acf843
PA
15992014-04-23 Pedro Alves <palves@redhat.com>
1600
1601 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1602
d708bcd1
PA
16032014-04-10 Pedro Alves <palves@redhat.com>
1604
1605 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1606 Check if the condition or command is NULL before checking if the
1607 breakpoint is known. On success, return true.
1608 * mem-break.h (add_breakpoint_condition): Document return.
1609 (add_breakpoint_commands): Add describing comment.
1610 * server.c (skip_to_semicolon): New function.
1611 (process_point_options): Use it.
1612
2eec7d5b
PA
16132014-04-09 Pedro Alves <palves@redhat.com>
1614
1615 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1616 to lwpid_of.
1617
fa96cb38
PA
16182014-02-27 Pedro Alves <palves@redhat.com>
1619
1620 PR 12702
1621 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1622 macros.
1623 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1624 output.
1625 (last_thread_of_process_p): Take a PID argument instead of a
1626 thread pointer.
1627 (linux_wait_for_lwp): Delete.
1628 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1629 functions.
1630 (linux_low_filter_event): New function, party factored out from
1631 linux_wait_for_event.
1632 (linux_wait_for_event): Rename to ...
1633 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1634 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1635 sigsuspend. Check for zombie leaders.
1636 (linux_wait_for_event): Reimplement as wrapper around
1637 linux_wait_for_event_filtered.
1638 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1639 a normal or signal exit is seen, it's the whole process exiting.
1640 (wait_for_sigstop): No longer a for_each_inferior callback.
1641 Rewrite on top of linux_wait_for_event_filtered.
1642 (stop_all_lwps): Call wait_for_sigstop directly.
1643 * server.c (resume, handle_target_event): Handle
1644 TARGET_WAITKIND_NO_RESUMED.
1645
d763de10
JB
16462014-02-26 Joel Brobecker <brobecker@adacore.com>
1647
1648 * win32-low.c (psapi_get_dll_name,
1649 * win32_CreateToolhelp32Snapshot): Delete.
1650 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1651 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1652 Delete.
1653 (handle_load_dll): Add function description.
1654 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1655
850a0f76
JB
16562014-02-26 Joel Brobecker <brobecker@adacore.com>
1657
1658 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1659 Add comment.
1660 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1661 base address when calling win32_add_one_solib.
1662 (handle_load_dll): Delete local variable load_addr.
1663 Remove 0x1000 offset applied to DLL base address when calling
1664 win32_add_one_solib.
1665 (handle_unload_dll): Add comment.
1666
f25b3fc3
JB
16672014-02-26 Joel Brobecker <brobecker@adacore.com>
1668
1669 * win32-low.c (win32_add_all_dlls): Renames
1670 win32_ensure_ntdll_loaded. Rewrite function documentation.
1671 Adjust implementation to always load all DLLs.
1672 Add 0x1000 offset to DLL base address when calling
1673 win32_add_one_solib.
1674 (child_initialization_done): New static global.
1675 (do_initial_child_stuff): Set child_initialization_done to
1676 zero during child initialization, and 1 after. Replace call
1677 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1678 Add comment.
1679 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1680 (handle_unload_dll): Add function documentation.
1681 (get_child_debug_event): Ignore load and unload DLL events
1682 during child initialization.
1683
d86d4aaf
DE
16842014-02-20 Doug Evans <dje@google.com>
1685
3bc32da3 1686 Remove global all_lwps.
d86d4aaf
DE
1687 * inferiors.h (ptid_of): Move here from linux-low.h.
1688 (pid_of, lwpid_of): Ditto.
1689 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1690 parameter is a struct thread_info * now.
1691 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1692 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1693 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1694 directly.
1695 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1696 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1697 * linux-arm-low.c (update_registers_callback): Update, "entry"
1698 parameter is a struct thread_info * now.
1699 Fetch lwpid from current_inferior directly.
1700 (arm_insert_point): Pass &all_threads to find_inferior instead of
1701 &all_lwps.
1702 (arm_remove_point): Ditto.
1703 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1704 (arm_prepare_to_resume): Fetch pid from thread.
1705 (arm_read_description): Fetch lwpid from current_inferior directly.
1706 * linux-low.c (all_lwps): Delete.
1707 (delete_lwp): Delete call to remove_inferior.
1708 (handle_extended_wait): Fetch lwpid from thread.
1709 (add_lwp): Don't set lwp->entry.id. Remove call to
1710 add_inferior_to_list.
1711 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1712 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1713 (kill_one_lwp_callback): Ditto.
1714 (linux_kill): Don't dereference NULL pointer.
1715 Fetch ptid,lwpid from thread.
1716 (get_detach_signal): Fetch ptid from thread.
1717 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1718 Simplify call to regcache_invalidate_thread.
1719 (delete_lwp_callback): Update, "entry" parameter is a
1720 struct thread_info * now. Fetch pid from thread.
1721 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1722 (status_pending_p_callback): Update, "entry" parameter is a
1723 struct thread_info * now. Fetch ptid from thread.
1724 (find_lwp_pid): Update, "entry" parameter is a
1725 struct thread_info * now.
1726 (linux_wait_for_lwp): Fetch pid from thread.
1727 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1728 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1729 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1730 (dequeue_one_deferred_signal): Ditto.
1731 (cancel_breakpoint): Fetch ptid from current_inferior.
1732 (linux_wait_for_event): Pass &all_threads to find_inferior,
1733 not &all_lwps. Fetch ptid, lwpid from thread.
1734 (count_events_callback): Update, "entry" parameter is a
1735 struct thread_info * now.
1736 (select_singlestep_lwp_callback): Ditto.
1737 (select_event_lwp_callback): Ditto.
1738 (cancel_breakpoints_callback): Ditto.
1739 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1740 not &all_lwps.
1741 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1742 (unsuspend_one_lwp): Update, "entry" parameter is a
1743 struct thread_info * now.
1744 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1745 not &all_lwps.
1746 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1747 Fetch lwpid from thread, not lwp.
1748 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1749 Pass &all_threads to find_inferior, not &all_lwps.
1750 (send_sigstop): Fetch lwpid from thread, not lwp.
1751 (send_sigstop_callback): Update, "entry" parameter is a
1752 struct thread_info * now.
1753 (suspend_and_send_sigstop_callback): Ditto.
1754 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1755 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1756 struct thread_info * now.
1757 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1758 from thread, lwp.
1759 (lwp_running): Update, "entry" parameter is a
1760 struct thread_info * now.
1761 (stop_all_lwps): Fetch ptid from thread.
1762 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1763 (linux_resume_one_lwp): Fetch lwpid from thread.
1764 (linux_set_resume_request): Update, "entry" parameter is a
1765 struct thread_info * now. Fetch pid, lwpid from thread.
1766 (resume_status_pending_p): Update, "entry" parameter is a
1767 struct thread_info * now.
1768 (need_step_over_p): Ditto. Fetch lwpid from thread.
1769 (start_step_over): Fetch lwpid from thread.
1770 (linux_resume_one_thread): Update, "entry" parameter is a
1771 struct thread_info * now. Fetch lwpid from thread.
1772 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1773 (proceed_one_lwp): Update, "entry" parameter is a
1774 struct thread_info * now. Fetch lwpid from thread.
1775 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1776 struct thread_info * now.
1777 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1778 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1779 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1780 directly.
1781 (regsets_store_inferior_registers): Ditto.
1782 (fetch_register, store_register): Ditto.
1783 (linux_read_memory, linux_write_memory): Ditto.
1784 (linux_request_interrupt): Ditto.
1785 (linux_read_auxv): Ditto.
1786 (linux_xfer_siginfo): Ditto.
1787 (linux_qxfer_spu): Ditto.
1788 (linux_qxfer_libraries_svr4): Ditto.
1789 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1790 moved to inferiors.h.
1791 (get_lwp): Delete.
1792 (get_thread_lwp): Update.
1793 (struct lwp_info): Delete member "entry". Simplify comment for
1794 member "thread".
1795 (all_lwps): Delete.
1796 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1797 current_inferior directly.
1798 (update_watch_registers_callback): Update, "entry" parameter is a
1799 struct thread_info * now. Fetch pid from thread.
1800 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1801 (mips_insert_point): Fetch lwpid from current_inferior.
1802 Pass &all_threads to find_inferior, not &all_lwps.
1803 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1804 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1805 directly.
1806 (mips_stopped_data_address): Ditto.
1807 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1808 directly.
1809 * linux-tile-low.c (tile_arch_setup): Ditto.
1810 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1811 (update_debug_registers_callback): Update, "entry" parameter is a
1812 struct thread_info * now. Fetch pid from thread.
1813 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1814 Pass &all_threads to find_inferior, not &all_lwps.
1815 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1816 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1817 Pass &all_threads to find_inferior, not &all_lwps.
1818 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1819 (i386_dr_low_get_status): Ditto.
1820 (x86_linux_prepare_to_resume): Fetch ptid from thread.
1821 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1822 (x86_linux_read_description): Ditto.
1823 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1824
3b8361aa
DE
18252014-02-20 Doug Evans <dje@google.com>
1826
1827 * inferiors.c (get_first_inferior): Fix buglet.
1828
f7667f0d
DE
18292014-02-19 Doug Evans <dje@google.com>
1830
1831 * gdbthread.h (add_thread): Change result type to struct thread_info *.
1832 * inferiors.c (add_thread): Change result type to struct thread_info *.
1833 All callers updated.
1834 (add_lwp): Call add_thread here instead of in callers.
1835 All callers updated.
1836 * linux-low.h (get_lwp_thread): Rewrite.
1837 (struct lwp_info): New member "thread".
1838
b3312d80
DE
18392014-02-19 Doug Evans <dje@google.com>
1840
1841 * linux-low.c (add_lwp): Change result to struct lwp_info *.
1842 All callers updated.
1843
ecc6f45c
DE
18442014-02-19 Doug Evans <dje@google.com>
1845
1846 * inferiors.c (add_thread): Fix whitespace.
1847
649ebbca
DE
18482014-02-19 Doug Evans <dje@google.com>
1849
1850 * dll.c (clear_dlls): Replace accessing list implemention details
1851 with API function.
1852 * gdbthread.h (get_first_thread): Declare.
1853 * inferiors.c (for_each_inferior_with_data): New function.
1854 (get_first_thread): New function.
1855 (find_thread_ptid): Simplify.
1856 (get_first_inferior): New function.
1857 (clear_list): Delete.
1858 (one_inferior_p): New function.
1859 (clear_inferior_list): New function.
1860 (clear_inferiors): Update.
1861 * inferiors.h (for_each_inferior_with_data): Declare.
1862 (clear_inferior_list): Declare.
1863 (one_inferior_p): Declare.
1864 (get_first_inferior): Declare.
1865 * linux-low.c (linux_wait_for_event): Replace accessing list
1866 implemention details with API function.
1867 * server.c (target_running): Ditto.
1868 (accumulate_file_name_length): New function.
1869 (emit_dll_description): New function.
1870 (handle_qxfer_libraries): Replace accessing list implemention
1871 details with API function.
1872 (handle_qxfer_threads_worker): New function.
1873 (handle_qxfer_threads_proper): Replace accessing list implemention
1874 details with API function.
1875 (handle_query): Ditto.
1876 (visit_actioned_threads_callback_ftype): New typedef.
1877 (visit_actioned_threads_data): New struct.
1878 (visit_actioned_threads): Rewrite to be find_inferior callback.
1879 (resume): Call find_inferior.
1880 (handle_status): Replace accessing list implemention
1881 details with API function.
1882 (process_serial_event): Replace accessing list implemention details
1883 with API function.
1884 * target.c (set_desired_inferior): Replace accessing list implemention
1885 details with API function.
1886 * tracepoint.c (same_process_p): New function.
1887 (gdb_agent_about_to_close): Replace accessing list implemention
1888 details with API function.
1889 * win32-low.c (child_delete_thread): Replace accessing list
1890 implemention details with API function.
1891 (match_dll_by_basename): New function.
1892 (dll_is_loaded_by_basename): New function.
1893 (win32_ensure_ntdll_loaded): Replace accessing list implemention
1894 details call to dll_is_loaded_by_basename.
1895
80894984
DE
18962014-02-19 Doug Evans <dje@google.com>
1897
1898 * dll.h (struct dll_info): Add comment.
1899 * gdbthread.h (struct thread_info): Add comment.
1900 (current_ptid): Simplify.
1901 * inferiors.c (add_process): Update.
1902 (remove_process): Update.
1903 * inferiors.h (struct process_info): Rename member "head" to "entry".
1904 * linux-low.c (delete_lwp): Update.
1905 (add_lwp): Update.
1906 (last_thread_of_process_p): Update.
1907 (kill_one_lwp_callback, linux_kill): Update.
1908 (status_pending_p_callback): Update.
1909 (wait_for_sigstop): Update. Simplify read of ptid.
1910 (start_step_over): Update.
1911 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1912 (get_lwp_thread): Update.
1913 (struct lwp_info): Rename member "head" to "entry".
1914 * regcache.h (inferior_list_entry): Delete.
1915 * server.c (kill_inferior_callback): Update.
1916 (detach_or_kill_inferior_callback): Update.
1917 (print_started_pid): Update.
1918 (print_attached_pid): Update.
1919 (process_serial_event): Simplify read of ptid.
1920 * thread-db.c (thread_db_create_event): Update.
1921 (thread_db_get_tls_address): Update.
1922 * win32-low.c (current_inferior_ptid): Simplify.
1923
46917d26
TT
19242014-02-19 Tom Tromey <tromey@redhat.com>
1925
1926 * target.h (struct target_ops) <supports_btrace>: Add target_ops
1927 argument.
1928 (target_supports_btrace): Update.
1929
0759a81e
YQ
19302014-02-14 Yao Qi <yao@codesourcery.com>
1931
1932 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1933 (rsp-low-ipa.o): New target.
1934
a7191e8b
TT
19352014-02-12 Tom Tromey <tromey@redhat.com>
1936
1937 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1938 convert_ascii_to_int.
1939 * regcache.c (registers_to_string): Likewise.
1940 * remote-utils.c (decode_M_packet): Likewise.
1941 * server.c (process_serial_event): Likewise.
1942
ff0e980e
TT
19432014-02-12 Tom Tromey <tromey@redhat.com>
1944
1945 * server.c (handle_query, handle_v_run): Use hex2bin, not
1946 unhexify.
1947 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1948
e9371aff
TT
19492014-02-12 Tom Tromey <tromey@redhat.com>
1950
1951 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1952 convert_int_to_ascii.
1953 * regcache.c (registers_to_string, collect_register_as_string):
1954 Likewise.
1955 * remote-utils.c (look_up_one_symbol, relocate_instruction):
1956 Likewise.
1957 * server.c (process_serial_event): Likewise.
1958 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1959 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1960
971dc0b8
TT
19612014-02-12 Tom Tromey <tromey@redhat.com>
1962
1963 * remote-utils.c (look_up_one_symbol, monitor_output): Use
1964 bin2hex, not hexify.
1965 * tracepoint.c (cmd_qtstatus): Likewise.
1966
0a822afb
TT
19672014-02-12 Tom Tromey <tromey@redhat.com>
1968
1969 * remote-utils.c (monitor_output): Pass explicit length to
1970 hexify.
1971
9c3d6531
TT
19722014-02-12 Tom Tromey <tromey@redhat.com>
1973
1974 * tracepoint.c: Include rsp-low.h.
1975 * server.c: Include rsp-low.h.
1976 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1977 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1978 declare.
1979 * remote-utils.c: Include rsp-low.h.
1980 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1981 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1982 (convert_int_to_ascii, convert_ascii_to_int): Move to
1983 common/rsp-low.c.
1984 * regcache.c: Include rsp-low.h.
1985 * ax.c: Include rsp-low.h.
1986 * Makefile.in (SFILES): Add common/rsp-low.c.
1987 (OBS): Add rsp-low.o.
1988 (rsp-low.o): New target.
1989
01fd3ea5
TT
19902014-02-12 Tom Tromey <tromey@redhat.com>
1991
1992 * utils.h (pulongest, plongest, phex_nz): Don't declare.
1993 Include print-utils.h.
1994 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1995 (plongest, thirty_two, phex_nz): Remove.
1996 * Makefile.in (SFILES): Add common/print-utils.c.
1997 (OBS): Add print-utils.o.
1998 (print-utils-ipa.o): New target.
1999 (print-utils.o): New target.
2000 (IPA_OBJS): Add print-utils-ipa.o.
2001
e99dc820
TT
20022014-02-06 Tom Tromey <tromey@redhat.com>
2003
2004 * Makefile.in (SFILES): Fix indentation.
2005
ee1e2d4f
DE
20062014-02-05 Doug Evans <dje@google.com>
2007
2008 * linux-low.c (linux_wait_for_event): Improve comment.
2009 (linux_wait_1): Keep current_inferior in sync with event_child.
2010
f5a02773
DE
20112014-01-22 Doug Evans <dje@google.com>
2012
2013 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2014
87ce2a04
DE
20152014-01-22 Doug Evans <dje@google.com>
2016
2017 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2018 * configure: Regenerate.
2019 * config.in: Regenerate.
2020 * Makefile.in (SFILES): Add debug.c.
2021 (OBS): Add debug.o.
2022 * debug.c: New file.
2023 * debug.h: New file.
2024 * linux-aarch64-low.c (*): Update all debugging printfs to use
2025 debug_printf instead of fprintf.
2026 * linux-arm-low.c (*): Ditto.
2027 * linux-cris-low.c (*): Ditto.
2028 * linux-crisv32-low.c (*): Ditto.
2029 * linux-m32r-low.c (*): Ditto.
2030 * linux-sparc-low.c (*): Ditto.
2031 * linux-x86.c (*): Ditto.
2032 * linux-low.c (*): Ditto.
2033 (linux_wait_1): Add calls to debug_enter, debug_exit.
2034 (linux_wait): Remove redundant debugging printf.
2035 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2036 (linux_resume, unstop_all_lwps): Ditto.
2037 * mem-break.c (*): Update all debugging printfs to use
2038 debug_printf instead of fprintf.
2039 * remote-utils.c (*): Ditto.
2040 * thread-db.c (*): Ditto.
2041 * server.c #include <ctype.h>, "gdb_vecs.h".
2042 (debug_threads): Moved to debug.c.
2043 (*): Update all debugging printfs to use debug_printf instead of
2044 fprintf.
2045 (start_inferior): Replace call to fflush with call to debug_flush.
2046 (monitor_show_help): Mention set debug-format.
2047 (parse_debug_format_options): New function.
2048 (handle_monitor_command): Handle "monitor set debug-format".
2049 (gdbserver_usage): Mention --debug-format.
2050 (main): Parse --debug-format.
2051 * server.h (debug_threads): Declaration moved to debug.h.
2052 #include "debug.h".
2053 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2054 trace_debug_1 that uses debug_printf.
2055 (tracepoint_look_up_symbols): Update all debugging printfs to use
2056 debug_printf instead of fprintf.
2057
e671835b
BS
20582014-01-20 Baruch Siach <baruch@tkos.co.il>
2059
2060 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2061 sys/ptrace.h.
2062
b5737fa9
PA
20632014-01-17 Pedro Alves <palves@redhat.com>
2064
ea38d2a9 2065 PR build/16445
c7faa97a
PA
2066 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2067 defined after including gdb_proc_service.h.
b5737fa9 2068
40ed484e
DE
20692014-01-16 Doug Evans <dje@google.com>
2070
2071 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2072 (match_dll): Use it.
2073
969c39fb
MM
20742014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2075
2076 * target.h (target_ops) <read_btrace>: Change parameters and
2077 return type to allow error reporting.
2078 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2079 trace reading errors on.
2080 * linux-low.c (linux_low_read_btrace): Pass trace reading
2081 errors on.
2082 (linux_low_disable_btrace): New.
2083
ab7f45ba
DE
20842014-01-15 Doug Evans <dje@google.com>
2085
2086 * inferiors.c (thread_id_to_gdb_id): Delete.
2087 * inferiors.h (thread_id_to_gdb_id): Delete.
2088
66af0f44
EZ
20892014-01-13 Eli Zaretskii <eliz@gnu.org>
2090
2091 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2092 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2093 versions.
2094
9939e131
PA
20952014-01-08 Pedro Alves <palves@redhat.com>
2096
2097 * server.c (handle_status): Don't discard previous queued stop
2098 replies or thread's pending status here.
2099 (main) <disconnection>: Do it here instead.
2100
b7ea362b
PA
21012014-01-08 Pedro Alves <palves@redhat.com>
2102
2103 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2104 * server.c (visit_actioned_threads, handle_pending_status): New
2105 function.
2106 (handle_v_cont): Factor out parts to ...
2107 (resume): ... this new function. If in all-stop, and a thread
2108 being resumed has a pending status, report it without actually
2109 resuming.
2110 (myresume): Adjust to use the new 'resume' function.
2111 (clear_pending_status_callback, set_pending_status_callback)
2112 (find_status_pending_thread_callback): New functions.
2113 (handle_status): Handle the case of multiple threads having
2114 interesting statuses to report. Report threads' real last signal
2115 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2116 with an interesting thread to report the status for, instead of
2117 always reporting the status of the first thread.
2118
28498c42
JB
21192014-01-01 Joel Brobecker <brobecker@adacore.com>
2120
2121 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2122 * gdbreplay.c (gdbreplay_version): Likewise.
2123
f45c82da
YZ
21242013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2125
2126 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2127 iov.iov_len with the real length in use.
2128
379a5e2d
JB
21292013-12-13 Joel Brobecker <brobecker@adacore.com>
2130
2131 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2132 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2133 for all targets that use win32-low.c.
2134 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2135 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2136
4210d83e
PA
21372013-12-13 Pedro Alves <palves@redhat.com>
2138
2139 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2140 if equal to TARGET_WAITKIND_LOADED.
2141 * win32-low.c (cached_status): New static global.
2142 (win32_wait): Add declaration.
2143 (do_initial_child_stuff): Flush all initial pending debug events
2144 up to the initial breakpoint.
2145 (win32_wait): If CACHED_STATUS was set, return that instead
2146 of doing a real wait. Remove the code resuming the execution
2147 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2148 during the initial phase. Also remove the code changing
2149 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2150 TARGET_WAITKIND_STOPPED.
2151
e7f0d979
YQ
21522013-12-11 Yao Qi <yao@codesourcery.com>
2153
2154 * notif.c (handle_notif_ack): Return 0 if no notification
2155 matches.
2156
ebcf782c
DE
21572013-11-20 Doug Evans <dje@google.com>
2158
2159 * linux-low.c (linux_set_resume_request): Fix comment.
2160
20ad9378
DE
21612013-11-20 Doug Evans <dje@google.com>
2162
2163 * linux-low.c (resume_status_pending_p): Tweak comment.
2164
a196ebeb
WT
21652013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2166
2167 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2168 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2169 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2170 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2171 (srv_amd64_regobj): Add amd64-mpx.o.
2172 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2173 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2174 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2175 * i387-fp.c (num_pl_bnd_register) Added constant.
2176 (num_pl_bnd_cfg_registers) Added constant.
2177 (struct i387_xsave) Added reserved area and MPX fields.
2178 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2179 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2180 function.
2181 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2182 (init_registers_amd64_mpx_linux): Declare new function.
2183 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2184 (x86_64_regmap): Add MPX registers.
2185 (x86_linux_read_description): Add MPX case.
2186 (initialize_low_arch): Initialize MPX targets.
2187
0080a2f6
TT
21882013-11-18 Tom Tromey <tromey@redhat.com>
2189
2190 * configure: Rebuild.
2191 * configure.ac: Don't check for stdlib.h.
2192 * gdbreplay.c: Unconditionally include stdlib.h.
2193
2978b111
TT
21942013-11-18 Tom Tromey <tromey@redhat.com>
2195
2196 * config.in: Rebuild.
2197 * configure: Rebuild.
2198 * configure.ac: Don't use AC_HEADER_DIRENT.
2199
a3d08894
TT
22002013-11-18 Tom Tromey <tromey@redhat.com>
2201
2202 * server.h: Don't check HAVE_STRING_H.
2203 * gdbreplay.c: Don't check HAVE_STRING_H.
2204 * configure: Rebuild.
2205
0a5dd17d
TT
22062013-11-18 Tom Tromey <tromey@redhat.com>
2207
2208 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2209 LIBGNU.
2210
1bd2f0ba
TT
22112013-11-08 Tom Tromey <tromey@redhat.com>
2212
2213 * configure, config.in: Rebuild.
2214 * configure.ac: Remove unused configury.
2215
3266f10b
TT
22162013-11-08 Tom Tromey <tromey@redhat.com>
2217
2218 * acinclude.m4: Include common.m4, codeset.m4.
2219 * configure, config.in: Rebuild.
2220 * configure.ac: Use GDB_AC_COMMON.
2221
6682d959
AA
22222013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2223
2224 * linux-s390-low.c (HWCAP_S390_TE): New define.
2225 (s390_arch_setup): Consider the TE field in the HWCAP for
2226 determining 'have_regset_tdb'.
2227
fd0a4d76
SDJ
22282013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2229
2230 PR gdb/16014
2231 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2232 call to sizeof.
2233
1a3d890b
PA
22342013-10-02 Pedro Alves <palves@redhat.com>
2235
2236 * server.c (process_serial_event): Don't output "GDBserver
2237 exiting" if GDB is connected through stdio.
2238 * target.c (mywait): Likewise, be silent if GDB is connected
2239 through stdio.
2240
97ad4581
JB
22412013-10-01 Joel Brobecker <brobecker@adacore.com>
2242
2243 * lynx-low.c (lynx_add_threads_after_attach): New function.
2244 (lynx_attach): Remove call to add_thread. Add call to
2245 lynx_add_threads_after_attach instead.
2246
5b4e221c
MF
22472013-09-28 Mike Frysinger <vapier@gentoo.org>
2248
2249 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2250 * config.in, configure: Regenerated.
2251
ee47b2f8
YQ
22522013-09-18 Yao Qi <yao@codesourcery.com>
2253
2254 PR server/15959
2255 * server.c (start_inferior): Clear 'resume_info'.
2256
d6707650 22572013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2258
d6707650
JW
2259 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2260 for each register.
2261
9243dd0e 22622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2263
9243dd0e
JW
2264 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2265 linux-tile-low.o to srv_tgtobj.
2266
c623a6ef
WN
22672013-09-16 Will Newton <will.newton@linaro.org>
2268
2269 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2270 out regs.
2271
fb71d39e
PA
22722013-09-06 Pedro Alves <palves@redhat.com>
2273
2274 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2275 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2276 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2277 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2278 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2279 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2280
8e7e9910
PA
22812013-09-06 Pedro Alves <palves@redhat.com>
2282
2283 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2284 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2285
7c3a12ca
PA
22862013-09-06 Pedro Alves <palves@redhat.com>
2287
2288 * linux-amd64-ipa.c: Include tracepoint.h.
2289 * linux-i386-ipa.c: Include tracepoint.h.
2290
8eb3d7b6
RW
22912013-09-06 Ricard Wanderlof <ricardw@axis.com>
2292
2293 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2294 (ps_get_thread_area): New function.
2295
eddddb9d
RW
22962013-09-06 Ricard Wanderlof <ricardw@axis.com>
2297
2298 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2299 (initialize_low_arch): Call init_registers_crisv32 rather than
2300 init_register_crisv32.
2301
533b0600
PA
23022013-09-05 Pedro Alves <palves@redhat.com>
2303
2304 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2305 to ...
2306 * hostio.h: ... this new file.
2307 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2308 win32-low.c: Include hostio.h.
2309
0ce3d3b5
PA
23102013-09-05 Pedro Alves <palves@redhat.com>
2311
2312 * server.h (gdb_client_data, handler_func, callback_handler_func)
2313 (delete_file_handler, add_file_handler, append_callback_event)
2314 (delete_callback_event, start_event_loop, initialize_event_loop):
2315 Move to event-loop.h and include it.
2316 * event-loop.h: New file.
2317
799cdc37
PA
23182013-09-05 Pedro Alves <palves@redhat.com>
2319
2320 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2321 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2322 (loaded_dll, unloaded_dll): Move to ...
2323 * dll.h: ... this new file.
2324 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2325
6a6bbd9d
PA
23262013-09-05 Pedro Alves <palves@redhat.com>
2327
2328 * server.h (current_process, get_thread_process, all_processes)
2329 (add_inferior_to_list, for_each_inferior, current_inferior)
2330 (remove_inferior, add_process, remove_process, find_process_pid)
2331 (have_started_inferiors_p, have_attached_inferiors_p)
2332 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2333 (clear_inferiors, find_inferior, find_inferior_id)
2334 (inferior_target_data, set_inferior_target_data)
2335 (inferior_regcache_data, set_inferior_regcache_data): Move to
2336 inferiors.h, and include it.
2337 * inferiors.h: New file.
2338
f699aaba
PA
23392013-09-05 Pedro Alves <palves@redhat.com>
2340
2341 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2342 Move ...
2343 * ax.h: ... here.
2344
c144c7a0
PA
23452013-09-05 Pedro Alves <palves@redhat.com>
2346
2347 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2348 tracepoint.h.
2349 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2350 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2351 (handle_tracepoint_general_set, handle_tracepoint_query)
2352 (tracepoint_finished_step, tracepoint_was_hit)
2353 (release_while_stepping_state_list, current_traceframe)
2354 (in_readonly_region, traceframe_read_mem)
2355 (fetch_traceframe_registers, traceframe_read_sdata)
2356 (traceframe_read_info, struct fast_tpoint_collect_status)
2357 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2358 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2359 (supply_fast_tracepoint_registers)
2360 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2361 (ipa_tdesc, claim_trampoline_space)
2362 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2363 (agent_mem_read, agent_get_trace_state_variable_value)
2364 (agent_set_trace_state_variable_value, agent_tsv_read)
2365 (agent_mem_read_string, get_raw_reg_func_addr)
2366 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2367 * tracepoint.h: ... this new file.
2368
ff42e6ab
PA
23692013-09-05 Pedro Alves <palves@redhat.com>
2370
2371 * server.h (perror_with_name, error, fatal, warning, paddress)
2372 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2373 include it.
2374 * utils.h: New file.
2375
541af0f4
PA
23762013-09-05 Pedro Alves <palves@redhat.com>
2377
2378 * server.h (remote_debug, noack_mode, transport_is_reliable)
2379 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2380 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2381 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2382 (write_enn, initialize_async_io, enable_async_io)
2383 (disable_async_io, check_remote_input_interrupt_request)
2384 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2385 (dead_thread_notify, prepare_resume_reply)
2386 (decode_address_to_semicolon, decode_address, decode_m_packet)
2387 (decode_M_packet, decode_X_packet, decode_xfer_write)
2388 (decode_search_memory_packet, unhexify, hexify)
2389 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2390 (look_up_one_symbol, relocate_instruction)
2391 (monitor_output): Move to remote-utils.h, and include it.
2392 * remote-utils.h: New file.
2393
eebdf26b
PA
23942013-09-05 Pedro Alves <palves@redhat.com>
2395
2396 * server.h (_): Delete.
2397
3aafd2ff
PA
23982013-09-02 Pedro Alves <palves@redhat.com>
2399
2400 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2401 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2402 allocated.
2403 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2404
cee83bcb
PM
24052013-09-02 Pierre Muller <muller@sourceware.org>
2406
2407 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2408 or WriteProcessMemory complete successfully and handle
2409 ERROR_PARTIAL_COPY error.
2410
9a13b2fa
PA
24112013-09-02 Pedro Alves <palves@redhat.com>
2412
2413 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2414 error instead of EIO.
2415
602e3198
JK
24162013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2417
2418 PR server/15604
2419 * linux-low.c: Include filestuff.h.
2420 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2421 * lynx-low.c: Include filestuff.h.
2422 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2423 * server.c: Include filestuff.h.
2424 (main): Call notice_open_fds.
2425 * spu-low.c: Include filestuff.h.
2426 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2427
96d7229d
LM
24282013-08-22 Luis Machado <lgustavo@codesourcery.com>
2429
2430 * Makefile.in: Explain why ../target and ../nat are not
2431 listed as include file search paths.
2432 (linux-waitpid.o): New object file rule.
2433 * configure.srv (srv_native_linux_obj): New variable.
2434 Replace all occurrences of linux native object files with
2435 $srv_native_linux_obj.
2436 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2437 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2438 (linux_enable_event_reporting): Remove declaration.
2439 (my_waitpid): Moved to common/linux-waitpid.c.
2440 (linux_wait_for_event): Pass ptid when calling
2441 linux_enable_event_reporting.
2442 (linux_supports_tracefork_flag): Remove.
2443 (linux_enable_event_reporting): Likewise.
2444 (linux_tracefork_grandchild): Remove.
2445 (STACK_SIZE): Moved to common/linux-ptrace.c.
2446 (linux_tracefork_child): Remove.
2447 (linux_test_for_tracefork): Remove.
2448 (linux_look_up_symbols): Call linux_supports_traceclone.
2449 (initialize_low): Remove call to linux_test_for_tracefork.
2450 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2451 common/linux-ptrace.h.
2452 (PTRACE_TYPE_ARG4): Likewise.
2453 Include linux-ptrace.h.
2454
32940073
PA
24552013-08-21 Pedro Alves <palves@redhat.com>
2456
2457 * config.in: Renegerate.
2458
33b60d58 24592013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2460
33b60d58
LM
2461 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2462 (SFILES): Remove $(srcdir)/common/target-common.c and
2463 add $(srcdir)/target/waitstatus.c.
2464 (OBS): Remove target-common.o and add waitstatus.o.
2465 (server_h): Remove $(srcdir)/../common/target-common.h and
2466 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2467 and $(srcdir)/../target/waitstatus.h.
2468 (target-common.o): Remove.
2469 (waitstatus.o): New target object file.
2470 * target.h: Do not include target-common.h and
2471 include target/resume.h, target/wait.h and
2472 target/waitstatus.h.
2473
b8e1b30e
LM
24742013-08-13 Luis Machado <lgustavo@codesourcery.com>
2475
2476 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2477 to PTRACE_TYPE_ARG3.
2478 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2479 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2480 PTRACE_TYPE_ARG4.
2481 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2482 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2483
7a60ad40
YQ
24842013-07-27 Jie Zhang <jie@codesourcery.com>
2485 Daniel Jacobowitz <dan@codesourcery.com>
2486 Yao Qi <yao@codesourcery.com>
2487
2488 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2489 (mips-linux-watch.o): New rule.
2490 (mips_linux_watch_h): New variable.
2491 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2492 srv_tgtobj.
2493 * linux-mips-low.c: Include mips-linux-watch.h.
2494 (struct arch_process_info, struct arch_lwp_info): New.
2495 (update_watch_registers_callback): New function.
2496 (mips_linux_new_process, mips_linux_new_thread) New functions.
2497 (mips_linux_prepare_to_resume, mips_insert_point): New
2498 functions.
2499 (mips_remove_point, mips_stopped_by_watchpoint): New
2500 functions.
2501 (rsp_bp_type_to_target_hw_bp_type): New function.
2502 (mips_stopped_data_address): New function.
2503 (the_low_target): Add watchpoint support functions.
2504
de6f69ad
YQ
25052013-07-27 Yao Qi <yao@codesourcery.com>
2506
2507 * i386-low.c: Include break-common.h.
2508 (enum target_hw_bp_type): Remove.
2509
3360c0bf
LM
25102013-07-24 Luis Machado <lgustavo@codesourcery.com>
2511
2512 * Makefile.in (SFILES): /common/target-common.c.
2513 (OBS): Add target-common.o.
2514 (server_h): Add $(srcdir)/../common/target-common.h.
2515 (target-common.o): New target.
2516 * server.c (queue_stop_reply_callback): Free
2517 status string after use.
2518 * target.c (target_waitstatus_to_string): Remove.
2519 * target.h: Include target-common.h.
2520 (resume_kind): Likewise.
2521 (target_waitkind): Likewise.
2522 (target_waitstatus): Likewise.
2523 (TARGET_WNOHANG): Likewise.
2524
bd885420
YQ
25252013-07-04 Yao Qi <yao@codesourcery.com>
2526
2527 * Makefile.in (host_alias): Use @host_noncanonical@.
2528 (target_alias): Use @target_noncanonical@.
2529 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2530 ACX_NONCANONICAL_HOST.
2531 * configure: Regenerated.
2532
2533 Revert:
2534 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2535
2536 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2537 * configure: Rebuild.
2538 * Makefile.in (version_host, version_target): Get from configure.
2539 (version.c): Use $(version_host) and $(version_target).
2540
17ef446e
PA
25412013-07-03 Pedro Alves <palves@redhat.com>
2542
2543 * Makefile.in (config.status): Depend on development.sh.
2544 * acinclude.m4: Include libmcheck.m4.
2545 * configure: Regenerate.
2546
7a9a7487
MG
25472013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2548
2549 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2550 attribute inside the parentheses.
2551 (winapi_DebugSetProcessKillOnExit): Ditto.
2552 (winapi_DebugBreakProcess): Ditto.
2553 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2554
49b64de6
MG
25552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2556
2557 * notif.h (notif_event): Add a dummy member to avoid compiler
2558 errors.
2559
d5749ee7
PA
25602013-07-01 Pedro Alves <palves@redhat.com>
2561
2562 * hostio.c (HOSTIO_PATH_MAX): Define.
2563 (require_filename, handle_open, handle_unlink, handle_readlink):
2564 Use it.
2565
d8d2a3ee
PA
25662013-07-01 Pedro Alves <palves@redhat.com>
2567
2568 * server.h: Include "pathmax.h".
2569 * linux-low.c: Don't include sys/param.h.
2570 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2571 MAXPATHLEN.
2572 * win32-low.c: Don't include sys/param.h.
2573 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2574
bc7dea8d
PA
25752013-07-01 Pedro Alves <palves@redhat.com>
2576
2577 * event-loop.c: Don't check HAVE_UNISTD_H before including
2578 <unistd.h>.
2579 * gdbreplay.c: Likewise.
2580 * remote-utils.c: Likewise.
2581 * server.c: Likewise.
2582 * configure.ac: Don't check for unistd.h.
2583 * configure: Regenerate.
2584
d6c2da54
TT
25852013-06-28 Tom Tromey <tromey@redhat.com>
2586
2587 * Makefile.in (version.c): Use version.in, not
2588 common/version.in.
2589
257b6bec
MG
25902013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2591
2592 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2593 * configure: Rebuild.
2594 * Makefile.in (version_host, version_target): Get from configure.
2595 (version.c): Use $(version_host) and $(version_target).
2596
86ebe149
DK
25972013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2598
2599 Fix trace-status to output user name without trailing colon.
2600 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2601
f30aa5af
DK
26022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2603
2604 Fix trace-status to output proper start-time and stop-time.
2605 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2606 output start time and stop time in hex as gdb expects.
2607
28a93511
YQ
26082013-06-26 Pedro Alves <pedro@codesourcery.com>
2609
2610 * tracepoint.c (build_traceframe_info_xml): Output trace state
2611 variables present in the trace buffer.
2612
01208463
TT
26132013-06-24 Tom Tromey <tromey@redhat.com>
2614
2615 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2616 create-version.sh.
2617 (version.o): Remove.
2618 * gdbreplay.c: Include version.h.
2619 (version, host_name): Don't declare.
2620 * server.h: Include version.h.
2621 (version, host_name): Don't declare.
2622
760256f9
PA
26232013-06-12 Pedro Alves <palves@redhat.com>
2624
2625 * linux-x86-low.c (linux_is_elf64): Delete global.
2626 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2627 with local linux_pid_exe_is_elf_64_file use.
2628
030031ee
PA
26292013-06-11 Pedro Alves <palves@redhat.com>
2630
2631 * linux-low.c (regset_disabled, disable_regset): New functions.
2632 (regsets_fetch_inferior_registers)
2633 (regsets_store_inferior_registers): Use them.
2634 (initialize_regsets_info); Don't allocate the disabled_regsets
2635 array here.
2636 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2637 comment.
2638
5da6eb0a
PA
26392013-06-11 Pedro Alves <palves@redhat.com>
2640
2641 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2642 xmalloc.
2643
7e5aaa09
PA
26442013-06-11 Pedro Alves <palves@redhat.com>
2645
2646 * linux-x86-low.c (initialize_low_arch): Call
2647 init_registers_x32_avx_linux.
2648
d878444c
JK
26492013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2650
2651 Fix compatibility with Android Bionic.
2652 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2653 it is not empty.
2654
3aee8918
PA
26552013-06-07 Pedro Alves <palves@redhat.com>
2656
5f2b57b5 2657 PR server/14823
3aee8918
PA
2658 * Makefile.in (OBS): Add tdesc.o.
2659 (IPA_OBJS): Add tdesc-ipa.o.
2660 (tdesc-ipa.o): New rule.
2661 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2662 interface.
2663 * linux-low.c (new_inferior): Delete.
2664 (disabled_regsets, num_regsets): Delete.
2665 (linux_add_process): Adjust to set the new per-process
2666 new_inferior flag.
2667 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2668 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2669 was a stop. When calling arch_setup, switch the current inferior
2670 to the thread that got an event.
2671 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2672 (regsets_fetch_inferior_registers)
2673 (regsets_store_inferior_registers): New regsets_info parameter.
2674 Adjust to use it.
2675 (linux_register_in_regsets): New regs_info parameter. Adjust to
2676 use it.
2677 (register_addr, fetch_register, store_register): New usrregs_info
2678 parameter. Adjust to use it.
2679 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2680 parameter regs_info. Adjust to use it.
2681 (linux_fetch_registers): Get the current inferior's regs_info, and
2682 adjust to use it.
2683 (linux_store_registers): Ditto.
2684 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2685 (initialize_low): Don't initialize the target_regsets here. Call
2686 initialize_low_arch.
2687 * linux-low.h (target_regsets): Delete declaration.
2688 (struct regsets_info): New.
2689 (struct usrregs_info): New.
2690 (struct regs_info): New.
2691 (struct process_info_private) <new_inferior>: New field.
2692 (struct linux_target_ops): Delete the num_regs, regmap, and
2693 regset_bitmap fields. New field regs_info.
2694 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2695 * i387-fp.c (num_xmm_registers): Delete.
2696 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2697 calls to new interface.
2698 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2699 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2700 Infer the number of xmm registers from the regcache's target
2701 description.
2702 * i387-fp.h (num_xmm_registers): Delete.
2703 * inferiors.c (add_thread): Don't install the thread's regcache
2704 here.
2705 * proc-service.c (gregset_info): Fetch the current inferior's
2706 regs_info. Adjust to use it.
2707 * regcache.c: Include tdesc.h.
2708 (register_bytes, reg_defs, num_registers)
2709 (gdbserver_expedite_regs): Delete.
2710 (get_thread_regcache): If the thread doesn't have a regcache yet,
2711 create one, instead of aborting gdbserver.
2712 (regcache_invalidate_one): Rename to ...
2713 (regcache_invalidate_thread): ... this.
2714 (regcache_invalidate_one): New.
2715 (regcache_invalidate): Only invalidate registers of the current
2716 process.
2717 (init_register_cache): Add target_desc parameter, and use it.
2718 (new_register_cache): Ditto. Assert the target description has a
2719 non zero registers_size.
2720 (regcache_cpy): Add assertions. Adjust.
2721 (realloc_register_cache, set_register_cache): Delete.
2722 (registers_to_string, registers_from_string): Adjust.
2723 (find_register_by_name, find_regno, find_register_by_number)
2724 (register_cache_size): Add target_desc parameter, and use it.
2725 (free_register_cache_thread, free_register_cache_thread_one)
2726 (regcache_release, register_cache_size): New.
2727 (register_size): Add target_desc parameter, and use it.
2728 (register_data, supply_register, supply_register_zeroed)
2729 (supply_regblock, supply_register_by_name, collect_register)
2730 (collect_register_as_string, collect_register_by_name): Adjust.
2731 * regcache.h (struct target_desc): Forward declare.
2732 (struct regcache) <tdesc>: New field.
2733 (init_register_cache, new_register_cache): Add target_desc
2734 parameter.
2735 (regcache_invalidate_thread): Declare.
2736 (regcache_invalidate_one): Delete declaration.
2737 (regcache_release): Declare.
2738 (find_register_by_number, register_cache_size, register_size)
2739 (find_regno): Add target_desc parameter.
2740 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2741 declarations.
2742 * remote-utils.c: Include tdesc.h.
2743 (outreg, prepare_resume_reply): Adjust.
2744 * server.c: Include tdesc.h.
2745 (gdbserver_xmltarget): Delete declaration.
2746 (get_features_xml, process_serial_event): Adjust.
2747 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2748 declare.
2749 (struct process_info) <tdesc>: New field.
2750 (ipa_tdesc): Declare.
2751 * tdesc.c: New file.
2752 * tdesc.h: New file.
2753 * tracepoint.c: Include tdesc.h.
2754 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2755 (get_context_regcache): Adjust to pass ipa_tdesc down.
2756 (do_action_at_tracepoint): Adjust to get the register cache size
2757 from the context regcache's description.
2758 (traceframe_walk_blocks): Adjust to get the register cache size
2759 from the current trace frame's description.
2760 (traceframe_get_pc): Adjust to get current trace frame's
2761 description and pass it down.
2762 (gdb_collect): Adjust to get the register cache size from the
2763 IPA's description.
2764 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2765 (gdbserver_xmltarget): Delete.
2766 (initialize_low_tracepoint): Set the ipa's target description.
2767 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2768 (initialize_low_tracepoint): Set the ipa's target description.
2769 * linux-x86-low.c: Include tdesc.h.
2770 [__x86_64__] (is_64bit_tdesc): New.
2771 (ps_get_thread_area, x86_get_thread_area): Use it.
2772 (i386_cannot_store_register): Rename to ...
2773 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2774 (i386_cannot_fetch_register): Rename to ...
2775 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2776 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2777 to new interface.
2778 (target_regsets): Rename to ...
2779 (x86_regsets): ... this.
2780 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2781 interface.
2782 (x86_siginfo_fixup): Use is_64bit_tdesc.
2783 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2784 (tdesc_x32_avx_linux, tdesc_x32_linux)
2785 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2786 Declare.
2787 (x86_linux_update_xmltarget): Delete.
2788 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2789 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2790 (AMD64_LINUX_USER64_CS): New.
2791 (x86_linux_read_description): New, based on
2792 x86_linux_update_xmltarget.
2793 (same_process_callback): New.
2794 (x86_arch_setup_process_callback): New.
2795 (x86_linux_update_xmltarget): New.
2796 (x86_regsets_info): New.
2797 (amd64_linux_regs_info): New.
2798 (i386_linux_usrregs_info): New.
2799 (i386_linux_regs_info): New.
2800 (x86_linux_regs_info): New.
2801 (x86_arch_setup): Reimplement.
2802 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2803 (x86_emit_ops): Ditto.
2804 (the_low_target): Adjust. Install x86_linux_regs_info,
2805 x86_cannot_fetch_register, and x86_cannot_store_register.
2806 (initialize_low_arch): New.
2807 * linux-ia64-low.c (tdesc_ia64): Declare.
2808 (ia64_fetch_register): Adjust.
2809 (ia64_usrregs_info, regs_info): New globals.
2810 (ia64_regs_info): New function.
2811 (the_low_target): Adjust.
2812 (initialize_low_arch): New function.
2813 * linux-sparc-low.c (tdesc_sparc64): Declare.
2814 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2815 Adjust.
2816 (sparc_arch_setup): New function.
2817 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2818 (the_low_target): Adjust.
2819 (initialize_low_arch): New function.
2820 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2821 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2822 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2823 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2824 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2825 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2826 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2827 (tdesc_powerpc_isa205_vsx64l): Declare.
2828 (ppc_cannot_store_register, ppc_collect_ptrace_register)
2829 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2830 (ppc_set_pc, ppc_get_hwcap): Adjust.
2831 (ppc_usrregs_info): Forward declare.
2832 (!__powerpc64__) ppc_regmap_adjusted: New global.
2833 (ppc_arch_setup): Adjust to the current process'es target
2834 description.
2835 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2836 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2837 (ppc_store_evrregset): Adjust.
2838 (target_regsets): Rename to ...
2839 (ppc_regsets): ... this, and make static.
2840 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2841 (ppc_regs_info): New function.
2842 (the_low_target): Adjust.
2843 (initialize_low_arch): New function.
2844 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2845 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2846 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2847 (tdesc_s390x_linux64v2): Declare.
2848 (s390_collect_ptrace_register, s390_supply_ptrace_register)
2849 (s390_fill_gregset, s390_store_last_break): Adjust.
2850 (target_regsets): Rename to ...
2851 (s390_regsets): ... this, and make static.
2852 (s390_get_pc, s390_set_pc): Adjust.
2853 (s390_get_hwcap): New target_desc parameter, and use it.
2854 [__s390x__] (have_hwcap_s390_high_gprs): New global.
2855 (s390_arch_setup): Adjust to set the current process'es target
2856 description. Don't adjust the regmap.
2857 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2858 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2859 (regs_info_3264): New globals.
2860 (s390_regs_info): New function.
2861 (the_low_target): Adjust.
2862 (initialize_low_arch): New function.
2863 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2864 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2865 [__mips64] (init_registers_mips_linux)
2866 (init_registers_mips_dsp_linux): Delete defines.
2867 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2868 (have_dsp): New global.
2869 (mips_read_description): New, based on mips_arch_setup.
2870 (mips_arch_setup): Reimplement.
2871 (get_usrregs_info): New function.
2872 (mips_cannot_fetch_register, mips_cannot_store_register)
2873 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2874 (mips_fill_fpregset, mips_store_fpregset): Adjust.
2875 (target_regsets): Rename to ...
2876 (mips_regsets): ... this, and make static.
2877 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2878 (dsp_regs_info, regs_info): New globals.
2879 (mips_regs_info): New function.
2880 (the_low_target): Adjust.
2881 (initialize_low_arch): New function.
2882 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2883 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2884 Declare.
2885 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2886 (arm_read_description): New, with bits factored from
2887 arm_arch_setup.
2888 (arm_arch_setup): Reimplement.
2889 (target_regsets): Rename to ...
2890 (arm_regsets): ... this, and make static.
2891 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2892 (arm_regs_info): New function.
2893 (the_low_target): Adjust.
2894 (initialize_low_arch): New function.
2895 * linux-m68k-low.c (tdesc_m68k): Declare.
2896 (target_regsets): Rename to ...
2897 (m68k_regsets): ... this, and make static.
2898 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2899 (m68k_regs_info): New function.
2900 (m68k_arch_setup): New function.
2901 (the_low_target): Adjust.
2902 (initialize_low_arch): New function.
2903 * linux-sh-low.c (tdesc_sharch): Declare.
2904 (target_regsets): Rename to ...
2905 (sh_regsets): ... this, and make static.
2906 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2907 (sh_regs_info, sh_arch_setup): New functions.
2908 (the_low_target): Adjust.
2909 (initialize_low_arch): New function.
2910 * linux-bfin-low.c (tdesc_bfin): Declare.
2911 (bfin_arch_setup): New function.
2912 (bfin_usrregs_info, regs_info): New globals.
2913 (bfin_regs_info): New function.
2914 (the_low_target): Adjust.
2915 (initialize_low_arch): New function.
2916 * linux-cris-low.c (tdesc_cris): Declare.
2917 (cris_arch_setup): New function.
2918 (cris_usrregs_info, regs_info): New globals.
2919 (cris_regs_info): New function.
2920 (the_low_target): Adjust.
2921 (initialize_low_arch): New function.
2922 * linux-cris-low.c (tdesc_crisv32): Declare.
2923 (cris_arch_setup): New function.
2924 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2925 (cris_regs_info): New function.
2926 (the_low_target): Adjust.
2927 (initialize_low_arch): New function.
2928 * linux-m32r-low.c (tdesc_m32r): Declare.
2929 (m32r_arch_setup): New function.
2930 (m32r_usrregs_info, regs_info): New globals.
2931 (m32r_regs_info): Adjust.
2932 (initialize_low_arch): New function.
2933 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2934 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2935 (tic6x_usrregs_info): Forward declare.
2936 (tic6x_read_description): New function, based on ...
2937 (tic6x_arch_setup): ... this. Reimplement.
2938 (target_regsets): Rename to ...
2939 (tic6x_regsets): ... this, and make static.
2940 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2941 (tic6x_regs_info): New function.
2942 (the_low_target): Adjust.
2943 (initialize_low_arch): New function.
2944 * linux-xtensa-low.c (tdesc_xtensa): Declare.
2945 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2946 (target_regsets): Rename to ...
2947 (xtensa_regsets): ... this, and make static.
2948 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2949 globals.
2950 (xtensa_arch_setup, xtensa_regs_info): New functions.
2951 (the_low_target): Adjust.
2952 (initialize_low_arch): New function.
2953 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2954 (nios2_arch_setup): Set the current process'es tdesc.
2955 (target_regsets): Rename to ...
2956 (nios2_regsets): ... this.
2957 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2958 (nios2_regs_info): New function.
2959 (the_low_target): Adjust.
2960 (initialize_low_arch): New function.
a261b8f5
PA
2961 * linux-aarch64-low.c (tdesc_aarch64): Declare.
2962 (aarch64_arch_setup): Set the current process'es tdesc.
2963 (target_regsets): Rename to ...
2964 (aarch64_regsets): ... this.
2965 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2966 (aarch64_regs_info): New function.
2967 (the_low_target): Adjust.
2968 (initialize_low_arch): New function.
3aee8918
PA
2969 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2970 globals.
2971 (target_regsets): Rename to ...
2972 (tile_regsets): ... this.
2973 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2974 (tile_regs_info): New function.
2975 (tile_arch_setup): Set the current process'es tdesc.
2976 (the_low_target): Adjust.
2977 (initialize_low_arch): New function.
2978 * spu-low.c (tdesc_spu): Declare.
2979 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2980 * win32-arm-low.c (tdesc_arm): Declare.
2981 (arm_arch_setup): New function.
2982 (the_low_target): Install arm_arch_setup instead of
2983 init_registers_arm.
2984 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2985 (init_windows_x86): Rename to ...
2986 (i386_arch_setup): ... this. Set `win32_tdesc'.
2987 (the_low_target): Adjust.
2988 * win32-low.c (win32_tdesc): New global.
2989 (child_add_thread): Don't create the thread cache here.
2990 (do_initial_child_stuff): Set the new process'es tdesc.
2991 * win32-low.h (struct target_desc): Forward declare.
2992 (win32_tdesc): Declare.
2993 * lynx-i386-low.c (tdesc_i386): Declare global.
2994 (lynx_i386_arch_setup): Set `lynx_tdesc'.
2995 * lynx-low.c (lynx_tdesc): New global.
2996 (lynx_add_process): Set the new process'es tdesc.
2997 * lynx-low.h (struct target_desc): Forward declare.
2998 (lynx_tdesc): Declare global.
2999 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3000 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3001 * nto-low.c (nto_tdesc): New global.
3002 (do_attach): Set the new process'es tdesc.
3003 * nto-low.h (struct target_desc): Forward declare.
3004 (nto_tdesc): Declare.
3005 * nto-x86-low.c (tdesc_i386): Declare.
3006 (nto_x86_arch_setup): Set `nto_tdesc'.
3007
b1fbec62
GB
30082013-06-04 Gary Benson <gbenson@redhat.com>
3009
3010 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3011 to qSupported response when appropriate.
3012 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3013 with nonzero-length annex.
3014 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3015 arguments supplied in annex.
3016
d1ec4ce7
DE
30172013-05-31 Doug Evans <dje@google.com>
3018
ac44adcb 3019 PR server/15594
d1ec4ce7
DE
3020 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3021 64 bits in 64-cross-32 environment.
3022
9b25f2d3
PA
30232013-05-28 Pedro Alves <palves@redhat.com>
3024
3025 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3026 (aarch64-without-fpu.c): Delete rule.
3027 * configure.srv (aarch64*-*-linux*): Remove references to
3028 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3029 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3030 declaration.
3031
6740dc9c
PA
30322013-05-24 Pedro Alves <palves@redhat.com>
3033
3034 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3035 instead of strchr/decode_address. Error if the range isn't split
3036 with a ','. Don't assume there's be a ':' in the action.
3037
c2d6af84
PA
30382013-05-23 Yao Qi <yao@codesourcery.com>
3039 Pedro Alves <palves@redhat.com>
3040
3041 * linux-low.c (lwp_in_step_range): New function.
3042 (linux_wait_1): If the thread was range stepping and stopped
3043 outside the stepping range, report the stop to GDB. Otherwise,
3044 continue stepping. Add range stepping debug output.
3045 (linux_set_resume_request): Copy the step range from the resume
3046 request to the lwp.
3047 (linux_supports_range_stepping): New.
3048 (linux_target_ops) <supports_range_stepping>: Set to
3049 linux_supports_range_stepping.
3050 * linux-low.h (struct linux_target_ops)
3051 <supports_range_stepping>: New field.
3052 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3053 * linux-x86-low.c (x86_supports_range_stepping): New.
3054 (the_low_target) <supports_range_stepping>: Set to
3055 x86_supports_range_stepping.
3056 * server.c (handle_v_cont): Handle 'r' action.
3057 (handle_v_requests): Append ";r" if the target supports range
3058 stepping.
3059 * target.h (struct thread_resume) <step_range_start,
3060 step_range_end>: New fields.
3061 (struct target_ops) <supports_range_stepping>:
3062 New field.
3063 (target_supports_range_stepping): New macro.
3064
58794e1a
JB
30652013-05-17 Joel Brobecker <brobecker@adacore.com>
3066
3067 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3068 confusion in comment.
3069
d631c5a7
JB
30702013-05-17 Joel Brobecker <brobecker@adacore.com>
3071
3072 * lynx-low.c (struct process_info_private): New type.
3073 (lynx_add_process): New function.
3074 (lynx_create_inferior, lynx_attach): Replace calls to
3075 add_process by calls to lynx_add_process.
3076 (lynx_resume): If PTID is null, then try using
3077 current_process()->private->last_wait_event_ptid.
3078 Add comments.
3079 (lynx_clear_inferiors): Delete. The contents of that function
3080 has been inlined in lynx_mourn;
3081 (lynx_wait_1): Save the ptid in the process's private data.
3082 (lynx_mourn): Free the process' private data. Replace call
3083 to lynx_clear_inferiors by call to clear_inferiors.
3084
96f7a20f
YQ
30852013-05-17 Yao Qi <yao@codesourcery.com>
3086
3087 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3088 the right place.
3089
db0dfaa0
LM
30902013-05-16 Luis Machado <lgustavo@codesourcery.com>
3091
3092 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3093 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3094 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3095 PT_TEXT_END_ADDR guards. Update comments.
3096 (linux_target_op) <read_offsets>: Conditionally define to
3097 linux_read_offsets if the target is UCLIBC and if it defines
3098 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3099
68f5f838
SL
31002013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3101 Andrew Jenner <andrew@codesourcery.com>
3102
3103 * Makefile.in (SFILES): Add linux-nios2-low.c.
3104 (clean): Add action to delete nios2-linux.c.
3105 (nios2-linux.c): New rule.
3106 * configure.srv: Add nios2*-*-linux*.
3107 * linux-nios2-low.c: New.
3108
1ebff1fd
HAQ
31092013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3110
3111 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3112
f6150862
HZ
31132013-04-25 Hui Zhu <hui@codesourcery.com>
3114
3115 PR gdb/15186
f6150862
HZ
3116 * ax.c (ax_printf): Add fflush.
3117
614c279d
TT
31182013-04-22 Tom Tromey <tromey@redhat.com>
3119
3120 * Makefile.in (SFILES): Add filestuff.c.
3121 (OBS): Add filestuff.o.
3122 (filestuff.o): New target.
3123 * config.in, configure: Rebuild.
3124 * configure.ac: Check for fdwalk, pipe2.
3125
7d4e5717
PA
31262013-04-17 Pedro Alves <palves@redhat.com>
3127
3128 * configure.ac (USE_THREAD_DB): Delete variable.
3129 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3130 Don't AC_SUBST USE_THREAD_DB.
3131 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3132 * config.in, configure: Regenerate.
3133
d5c93e41
PA
31342013-04-16 Pedro Alves <palves@redhat.com>
3135
3136 * linux-low.h (struct lwp_info) <thread_known>: Move under
3137 the USE_THREAD_DB #ifdef.
3138
04f5fe89
PA
31392013-04-16 Pedro Alves <palves@redhat.com>
3140
3141 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3142 (linux-low.o): Delete rule.
3143 * linux-low.h: Always include "gdb_thread_db.h" instead of
3144 conditionally including thread_db.h.
3145 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3146 HAVE_THREAD_DB_H.
3147
480b27bf
JK
31482013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3149
3150 * Makefile.in (install-only): Fix make install regression.
3151
43662968
JK
31522013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3153
3154 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3155 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3156 installation.
3157 * gdbserver.1: Remove.
3158
3e74e146
PA
31592013-03-22 Pedro Alves <palves@redhat.com>
3160
3161 * linux-low.c (handle_extended_wait): Don't call
3162 linux_enable_event_reporting.
3163
a8347a2a
TT
31642013-03-15 Tony Theodore <tonyt@logyst.com>
3165
3166 PR build/9098:
3167 * Makefile.in (SHELL): Use @SHELL@.
3168
eeb56fa7
SDJ
31692013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3170
3171 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3172 compiler warning.
3173
4fa7e2ff
JB
31742013-03-13 Joel Brobecker <brobecker@adacore.com>
3175
3176 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3177 Remove extraneous NULL element.
3178
8ddb1965
YQ
31792013-03-13 Yao Qi <yao@codesourcery.com>
3180
3181 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3182 'V' block in trace frame.
3183
9accd112
MM
31842013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3185
3186 * target.h (struct target_ops): Add btrace ops.
3187 (target_supports_btrace): New macro.
3188 (target_enable_btrace): New macro.
3189 (target_disable_btrace): New macro.
3190 (target_read_btrace): New macro.
3191 * gdbthread.h (struct thread_info): Add btrace field.
3192 * server.c: Include btrace-common.h.
3193 (handle_btrace_general_set): New function.
3194 (handle_btrace_enable): New function.
3195 (handle_btrace_disable): New function.
3196 (handle_general_set): Call handle_btrace_general_set.
3197 (handle_qxfer_btrace): New function.
3198 (struct qxfer qxfer_packets[]): Add btrace entry.
3199 * inferiors.c (remove_thread): Disable btrace.
3200 * linux-low: Include linux-btrace.h.
3201 (linux_low_enable_btrace): New function.
3202 (linux_low_read_btrace): New function.
3203 (linux_target_ops): Add btrace ops.
3204 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3205 Add srv_linux_btrace=yes.
3206 (x86_64-*-linux*): Add linux-btrace.o.
3207 Add srv_linux_btrace=yes.
3208 * configure.ac: Define HAVE_LINUX_BTRACE.
3209 * config.in: Regenerated.
3210 * configure: Regenerated.
3211
5cc22e4c
MM
32122013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3213
3214 * server.c (handle_qxfer): Preserve error message if -3 is
3215 returned.
3216 (qxfer): Document the -3 return value.
3217
7c97f91e
MM
32182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3219
3220 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3221 (linux_btrace_h): New variable.
3222 (linux-btrace.o): New rule.
3223
be9a119c 32242013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3225 Hafiz Abid Qadeer <abidh@codesourcery.com>
3226
3227 * tracepoint.c (trace_buffer_size): New global.
3228 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3229 (init_trace_buffer): Change to one-argument function. Allocate
3230 trace buffer memory.
3231 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3232 handle QTBuffer:size packet.
3233 (cmd_bigqtbuffer_size): New function.
3234 (initialize_tracepoint): Call init_trace_buffer with
3235 DEFAULT_TRACE_BUFFER_SIZE.
3236 * server.c (handle_query): Add QTBuffer:size in the
3237 supported packets.
3238
e64f7499
YQ
32392013-03-07 Yao Qi <yao@codesourcery.com>
3240
3241 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3242 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3243 of -1.
3244 (cmd_qtsp): Adjust condition. Do post increment.
3245 Set cur_action and cur_step_action back to 0.
3246
f0ae6fc3
PA
32472013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3248
3249 PR server/15236
3250 * linux-low.c (linux_write_memory): Return early success if LEN is
3251 zero.
3252
b5b0b0af
CV
32532013-03-05 Corinna Vinschen <vinschen@redhat.de>
3254
334ad4a8 3255 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3256
589bc927
TT
32572013-02-28 Tom Tromey <tromey@redhat.com>
3258
3259 * configure.ac: Invoke AC_SYS_LARGEFILE.
3260 * configure, config.in: Rebuild.
3261
dfe07582
CV
32622013-02-28 Corinna Vinschen <vinschen@redhat.com>
3263
3264 * win32-low.c: Throughout, fix format strings and casts of
3265 printf-like functions to avoid type related warnings on all
3266 platforms.
3267 (get_child_debug_event): Print dwDebugEventCode as hex since
3268 that's how it's usually documented.
3269
736cd585
YQ
32702013-02-28 Yao Qi <yao@codesourcery.com>
3271
3272 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3273 pulongest.
3274
e1f58301
JW
32752013-02-27 Jiong Wang <jiwang@tilera.com>
3276
3277 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3278 (reg-tilegx32.c): New rule.
3279 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3280 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3281 different register info initializer according to elf class.
3282 (init_registers_tilgx32): New function. The tilegx32 register info
3283 initializer.
3284 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3285 (tile_store_gregset): Likewise.
3286
d171ca78
YQ
32872013-02-27 Yao Qi <yao@codesourcery.com>
3288
3289 * server.c (process_point_options): Print debug message when
3290 debug_threads is true.
3291
282bbdf3
YQ
32922013-02-26 Yao Qi <yao@codesourcery.com>
3293
3294 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3295
aca22551
PA
32962013-02-19 Pedro Alves <palves@redhat.com>
3297 Kai Tietz <ktietz@redhat.com>
3298
3299 PR gdb/15161
3300
3301 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3302 instead of strtoul to extract address from packet.
3303 (process_serial_event) <'z'>: Likewise.
3304
4f3cee1c
YQ
33052013-02-18 Yao Qi <yao@codesourcery.com>
3306
3307 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3308
8e1d55a3
PA
33092013-02-14 Pedro Alves <palves@redhat.com>
3310
3311 Plug memory leak.
3312
3313 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3314 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3315
458820da
PA
33162013-02-14 Pedro Alves <palves@redhat.com>
3317
3318 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3319
baea0dae
PA
33202013-02-14 Pedro Alves <palves@redhat.com>
3321
3322 * tracepoint.c (save_string): Delete.
3323 (add_tracepoint_action): Use savestring instead of save_string.
3324
0b1afbb3
PA
33252013-02-12 Pedro Alves <palves@redhat.com>
3326
3327 * linux-xtensa-low.c: Ditto.
3328 * xtensa-xtregs.c: Ditto.
3329
8a4ac37e
PA
33302013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3331
3332 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3333 thread_db.
3334
148de6bb
MS
33352013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3336
3337 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3338 aarch64_num_wp_regs and aarch64_num_bp_regs to
3339 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3340
55fac6e0
MS
33412013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3342
3343 * linux-aarch64-low.c (ps_get_thread_area): Replace
3344 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3345
176eb98c
MS
33462013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3347 Marcus Shawcroft <marcus.shawcroft@arm.com>
3348 Nigel Stephens <nigel.stephens@arm.com>
3349 Yufeng Zhang <yufeng.zhang@arm.com>
3350
3351 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3352 (aarch64.c, aarch64-without-fpu.c): New targets.
3353 * configure.srv (aarch64*-*-linux*): New.
3354 * linux-aarch64-low.c: New file.
3355
56f7af9c
MS
33562013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3357
43aaf8b6 3358 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3359 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3360 (dequeue_one_deferred_signal, linux_resume_one_thread)
3361 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3362 (linux_tracefork_grandchild, linux_test_for_tracefork)
3363 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3364 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3365 where the argument is 0.
3366
60f662b0
YQ
33672013-01-25 Yao Qi <yao@codesourcery.com>
3368
3369 * event-loop.c: Include "queue.h".
3370 (gdb_event_p): New typedef.
3371 (struct gdb_event) <next_event>: Remove.
3372 (event_queue): Change to QUEUE(gdb_event_p).
3373 (async_queue_event): Remove.
3374 (gdb_event_xfree): New.
3375 (initialize_event_loop): New.
3376 (process_event): Use API from QUEUE.
3377 (wait_for_event): Likewise.
3378 * server.c (main): Call initialize_event_loop.
3379 * server.h (initialize_event_loop): Declare.
3380
5ae4861a
YQ
33812013-01-18 Yao Qi <yao@codesourcery.com>
3382
3383 * ax.h (struct eval_agent_expr_context): New.
3384 (gdb_eval_agent_expr): Update declaration.
3385 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3386 TFRAME. Add new argument CTX.
3387 * server.h (struct eval_agent_expr_context): Declare.
3388 (agent_mem_read, agent_tsv_read): Update declaration.
3389 (agent_mem_read_string): Likewise.
3390 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3391 (add_traceframe_block): Add new argument TPOINT.
3392 Increase TPOINT->traceframe_usage.
3393 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3394 eval_tracepoint_agent_expr.
3395 (condition_true_at_tracepoint): Likewise.
3396 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3397 (agent_mem_read_string, agent_tsv_read): Likewise.
3398
85e00e85
YQ
33992013-01-16 Yao Qi <yao@codesourcery.com>
3400
3401 * linux-low.c (linux_resume_one_lwp): Don't check
3402 'lwp->bp_reinsert != 0'.
3403
4039cf45
JB
34042013-01-07 Joel Brobecker <brobecker@adacore.com>
3405 Pedro Alves <palves@redhat.com>
3406
3407 * lynx-low.c (ptrace_request_to_str): Define a temporary
3408 macro and use it to simplify this function's implementation.
3409
9044dee2
JB
34102013-01-07 Joel Brobecker <brobecker@adacore.com>
3411
3412 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3413 sets errno.
3414
e6352c8f
JB
34152013-01-07 Joel Brobecker <brobecker@adacore.com>
3416
3417 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3418
50681a27
JB
34192013-01-07 Joel Brobecker <brobecker@adacore.com>
3420
3421 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3422
3f6e77ef
JB
34232013-01-07 Joel Brobecker <brobecker@adacore.com>
3424
3425 * lynx-low.c (lynx_resume): Use the resume_info parameter
3426 to determine the ptid for the lynx_ptrace call, unless
3427 it is equal to minus_one_ptid, in which case we use the
3428 ptid of the current_inferior.
3429 (lynx_wait_1): After having received a thread create/exit
3430 event, resume the inferior's execution using the signaling
3431 thread's ptid, rather than the old ptid.
3432
7fda33ae
JB
34332013-01-07 Joel Brobecker <brobecker@adacore.com>
3434
3435 * lynx-low.c (lynx_resume): Delete variable ret.
3436
b9786c74
JB
34372013-01-01 Joel Brobecker <brobecker@adacore.com>
3438
3439 * gdbreplay.c (gdbreplay_version): Update copyright year.
3440 * server.c (gdbserver_version): Likewise.
3441
8b93d60f
JB
34422012-12-17 Joel Brobecker <brobecker@adacore.com>
3443
3444 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3445 new thread.
3446
037335a7
JB
34472012-12-17 Joel Brobecker <brobecker@adacore.com>
3448
3449 * lynx-low.c (ptrace_request_to_str): Add handling for
3450 PTRACE_GETTRACESIG.
3451
52d4cbd8
JB
34522012-12-17 Joel Brobecker <brobecker@adacore.com>
3453
3454 * lynx-low.c (lynx_attach): Delete variable new_process.
3455
ab8f6ca9
JB
34562012-12-17 Joel Brobecker <brobecker@adacore.com>
3457
3458 * lynx-low.c (lynx_create_inferior): Delete variable
3459 new_process.
3460
78cbc024
JB
34612012-12-17 Joel Brobecker <brobecker@adacore.com>
3462
3463 * lynx-low.c (ptrace_request_to_str): Do not handle
3464 PTRACE_GETTHREADLIST if this macro does not exist.
3465
14a00470
YQ
34662012-12-15 Yao Qi <yao@codesourcery.com>
3467
3468 * Makefile.in (OBS): Add notif.o.
3469 * notif.c, notif.h: New.
3470 * server.c: Include "notif.h".
3471 (struct vstop_notif) <next>: Remove.
3472 <base>: New field.
3473 (queue_stop_reply): Update.
3474 (push_event, send_next_stop_reply): Remove.
3475 (discard_queued_stop_replies): Update.
3476 (notif_stop): New variable.
3477 (handle_v_stopped): Remove.
3478 (handle_v_requests): Don't call handle_v_stopped. Call
3479 handle_ack_notif instead.
3480 (queue_stop_reply_callback): Call notif_event_enque instead
3481 of queue_stop_reply.
3482 (handle_status): Don't call send_next_stop_reply, call
3483 notif_write_event instead.
3484 (kill_inferior_callback): Likewise.
3485 (detach_or_kill_inferior_callback): Likewise.
3486 (main): Call initialize_notif.
3487 (process_serial_event): Call QUEUE_is_empty.
3488 (handle_target_event): Call notif_push instead of push event.
3489 * server.h (push_event): Remove declaration.
3490
61c125b9
TT
34912012-12-10 Tom Tromey <tromey@redhat.com>
3492
3493 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3494 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3495 macros.
3496 (.c.o): Rewrite.
3497 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3498 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3499 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3500 (amd64-linux-ipa.o, ax.o): Rewrite.
3501 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3502 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3503 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3504 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3505 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3506 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3507 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3508 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3509 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3510 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3511 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3512 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3513 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3514 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3515 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3516 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3517 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3518 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3519 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3520 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3521 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3522 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3523 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3524 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3525 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3526 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3527 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3528 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3529 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3530 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3531 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3532 (reg-tilegx.o): Remove.
3533 (all_object_files): New macro.
3534 Include .deps files.
3535 * aclocal.m4, configure: Rebuild.
3536 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3537 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3538 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3539
e90e9ad9
TT
35402012-12-05 Tom Tromey <tromey@redhat.com>
3541
3542 PR gdb/14917:
3543 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3544
02d403bf 35452012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3546
3547 * configure.ac: Check for linux/perf_event.h.
3548 * config.in: Regenerated.
3549 * configure: Regenerated.
3550
0270a750
PA
35512012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3552
3553 * hostio.c (handle_readlink): Decrease buffer size
3554 parameter passed to readlink by one byte.
3555
8c29b58e
YQ
35562012-11-26 Yao Qi <yao@codesourcery.com>
3557
3558 * configure.ac (build_warnings): Append '-Wempty-body'.
3559 * configure: Regenerated.
3560 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3561 body.
3562
8bdce1ff
PM
35632012-11-15 Pierre Muller <muller@sourceware.org>
3564
3565 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3566 * config.in: Regenerate.
3567 * configure: Regenerate.
3568 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3569 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3570 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3571 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3572 header.
3573 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3574 instead of <sys/wait.h> header.
3575 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3576
02d403bf 35772012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3578
3579 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3580 (various make rules): Remove -DGDBSERVER
3581
fbd5db48
YQ
35822012-11-09 Yao Qi <yao@codesourcery.com>
3583
3584 * spu-low.c (current_ptid): Move it to ..
3585 * gdbthread.h: ... here. New.
3586 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3587 * server.c (myresume, process_serial_event): Likewise.
3588 * thread-db.c (thread_db_find_new_threads): Likewise.
3589 * tracepoint.c (run_inferior_command): Likewise.
3590
b3dc46ff
AB
35912012-10-01 Andrew Burgess <aburgess@broadcom.com>
3592
3593 * server.c (handle_search_memory_1): Include access length in
3594 warning message.
3595
07c04788
HPN
35962012-09-05 Michael Brandt <michael.brandt@axis.com>
3597
3598 * linux-crisv32-low.c: Fix compile errors.
3599
918d227b
YQ
36002012-09-04 Yao Qi <yao@codesourcery.com>
3601
3602 * tracepoint.c (cmd_qtsv): Adjust debug message.
3603 Don't check CUR_TPOINT.
3604
18c1b81a
YQ
36052012-08-28 Yao Qi <yao@codesourcery.com>
3606
3607 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3608 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3609 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3610 Remove declarations of xmalloc, xreallloc, xstrdup and
3611 freeargv.
3612 * Makefile.in (libiberty_h): New.
3613 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3614 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3615
dc82f37b
YQ
36162012-08-23 Yao Qi <yao@codesourcery.com>
3617
3618 * server.h: Remove declaration of 'xsnprintf'.
3619
406b1477
KS
36202012-08-22 Keith Seitz <keiths@redhat.com>
3621
3622 * server.h: Include build-gnulib-gbserver/config.h.
3623 * gdbreplay.c: Likewise.
3624
e6712ff1
DE
36252012-08-08 Doug Evans <dje@google.com>
3626
3627 * Makefile.in (SFILES): Add gdb_vecs.c.
3628 (OBS): Add gdb_vecs.o.
3629 (gdb_vecs_h, host_defs_h): New variables.
3630 (thread-db.o): Add $(gdb_vecs_h) dependency.
3631 (gdb_vecs.o): New rule.
3632 * thread-db.c: #include "gdb_vecs.h".
3633 (thread_db_load_search): Use a vector to iterate over path elements.
3634 Handle text appearing after "$pdir".
3635
3636 * configure.ac: Add check for strstr.
3637 * config.in: Regenerate.
3638 * configure: Regenerate.
3639
7c3270ae
UW
36402012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3641
3642 * hostio.c (handle_pread): If pread fails, fall back to attempting
3643 lseek/read.
3644 (handle_pwrite): Likewise for pwrite.
3645
b62e2b27
UW
36462012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3647
3648 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3649 between unsupported TYPE and unimplementable ADDR/LEN combination.
3650 (arm_insert_point): Act on new return value.
3651
78a99e91
PA
36522012-07-31 Pedro Alves <palves@redhat.com>
3653
3654 * server.c (process_point_options): Only skip tokens if we find
3655 one that is unrecognized. Don't treat 'X' specially while
3656 skipping unrecognized tokens.
3657
fcf303ab
UW
36582012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3659
3660 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3661 to 4-byte-align HW breakpoint addresses for Thumb.
3662
7255706c
YQ
36632012-07-27 Yao Qi <yao@codesourcery.com>
3664
3665 PR remote/14161.
3666
3667 * server.h: Declare gdb_agent_about_to_close.
3668 * target.c (kill_inferior): Include "agent.h".
3669 New. Send command 'kill'.
3670 * target.h (kill_inferior): Removed macro.
3671 * tracepoint.c (gdb_agent_about_to_close): New.
3672 (gdb_agent_helper_thread): Handle command 'close'.
3673 Wait endlessly until the inferior stops.
3674 Install gdb_agent_remove_socket to atexit hook.
3675 (agent_socket_name): New static variable.
3676 (gdb_agent_socket_init): Replace local variable 'name' with
3677 'agent_socket_name'.
3678 (gdb_agent_remove_socket): New.
3679
5a3f286f
YQ
36802012-07-27 Yao Qi <yao@codesourcery.com>
3681
3682 * server.c (process_point_options): Stop at 'X' when parsing.
3683
961bd387
ME
36842012-07-19 Michael Eager <eager@eagercon.com>
3685
a261b8f5 3686 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3687 to hw_execute.
3688 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3689 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3690 hardware breakpoint.
3691
aa7c7447
JK
36922012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3693
3694 * gdbserver/linux-low.c (initialize_low): Call
3695 linux_ptrace_init_warnings.
3696
7f216e7c
DE
36972012-07-02 Doug Evans <dje@google.com>
3698
3699 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3700 pointer to int.
3701
d3ce09f5
SS
37022012-07-02 Stan Shebs <stan@codesourcery.com>
3703
3704 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3705 (ax.o): Add it to build rule.
3706 (ax-ipa.o): Ditto.
3707 (OBS): Add format.o.
3708 (IPA_OBS): Add format.o.
3709 * server.c (handle_query): Claim support for breakpoint commands.
3710 (process_point_options): Add command case.
3711 (process_serial_event): Leave running if there are printfs in
3712 effect.
3713 * mem-break.h (any_persistent_commands): Declare.
3714 (add_breakpoint_commands): Declare.
3715 (gdb_no_commands_at_breakpoint): Declare.
3716 (run_breakpoint_commands): Declare.
3717 * mem-break.c (struct point_command_list): New struct.
3718 (struct breakpoint): New field command_list.
3719 (any_persistent_commands): New function.
3720 (add_commands_to_breakpoint): New function.
3721 (add_breakpoint_commands): New function.
3722 (gdb_no_commands_at_breakpoint): New function.
3723 (run_breakpoint_commands): New function.
3724 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3725 locally.
3726 * ax.c: Include format.h.
3727 (ax_printf): New function.
3728 (gdb_eval_agent_expr): Add printf opcode.
3729
2f8f6aed
YQ
37302012-06-13 Yao Qi <yao@codesourcery.com>
3731
3732 * server.c (start_inferior): Remove duplicated writes to fields
3733 'last_resume_kind' and 'last_status' of 'current_inferior'.
3734
0c9070b3
YQ
37352012-06-12 Yao Qi <yao@codesourcery.com>
3736 Pedro Alves <palves@redhat.com>
3737
3738 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3739 comment.
3740 * server.c (handle_v_cont): Extend comment.
3741
c52daf70
YQ
37422012-06-11 Yao Qi <yao@codesourcery.com>
3743
3744 * linux-low.c (linux_attach): Add 'static'.
3745
d38bbb0a
YQ
37462012-06-06 Yao Qi <yao@codesourcery.com>
3747
3748 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3749
89dc0afd
JK
37502012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3751
3752 Fix gcc -flto compilation warning.
3753 * server.c (main): Make variable multi_mode and attach volatile.
3754
75f62ce7
TJB
37552012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3756
3757 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3758 if the platform doesn't know about it.
3759
65f479b6
PA
37602012-05-30 Jeff Kenton <jkenton@tilera.com>
3761
3762 * Makefile.in (SFILES): Add linux-tile-low.c.
3763 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3764 * configure.srv: Handle tilegx-*-linux*.
3765 * linux-tile-low.c: New file.
3766
0c5bf5a9
JK
37672012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3768
3769 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3770
a493e3e2
PA
37712012-05-24 Pedro Alves <palves@redhat.com>
3772
3773 PR gdb/7205
3774
43aaf8b6 3775 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3776
2ea28649
PA
37772012-05-24 Pedro Alves <palves@redhat.com>
3778
3779 PR gdb/7205
3780
3781 Replace target_signal with gdb_signal throughout.
3782
8d409d16
MR
37832012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3784
3785 * linux-low.c (linux_store_registers): Avoid the copying sequence
3786 when no data has been retrieved by ptrace.
3787
23512c01
MGD
37882012-05-22 Will Deacon <will.deacon@arm.com>
3789
3790 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3791 Include asm/ptrace.h.
3792 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3793 already defined.
3794
4934b29e
MR
37952012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3796
3797 * linux-low.c (linux_store_registers): Don't re-retrieve data
3798 with ptrace that has already been obtained from /proc. Always
3799 copy any data retrieved with ptrace to the buffer supplied.
3800
bde24c0a
PA
38012012-05-11 Yao Qi <yao@codesourcery.com>
3802 Pedro Alves <palves@redhat.com>
3803
3804 * linux-low.c (enum stopping_threads_kind): New.
3805 (stopping_threads): Change type to `enum stopping_threads_kind'.
3806 (handle_extended_wait): If stopping and suspending threads, leave
3807 the new_lwp suspended too.
3808 (linux_wait_for_event): Adjust.
3809 (stop_all_lwps): Set `stopping_threads' to
3810 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3811 whether we're suspending threads or just stopping them. Assert no
3812 recursion happens.
3813
623b6bdf
YQ
38142012-04-29 Yao Qi <yao@codesourcery.com>
3815
3816 * server.h: Move some code to ...
3817 * gdbthread.h: ... here. New.
3818 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3819 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3820 (nto-low.o, win32-low.o): Likewise.
3821 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3822 * regcache.c, remote-utils.c, server.c: Likewise.
3823 * target.c, tracepoint.c, win32-low.c: Likewise.
3824
f15f9948
TJB
38252012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3826
3827 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3828 (PTRACE_ARG4_TYPE): Likewise.
3829 (PTRACE_XFER_TYPE): Likewise.
3830 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3831 ptrace to PTRACE_ARG3_TYPE.
3832 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3833 (PTRACE_ARG4_TYPE): Likewise.
3834 (PTRACE_XFER_TYPE): Likewise.
3835 (linux_detach_one_lwp): Cast fourth argument of
3836 ptrace to long then PTRACE_ARG4_TYPE.
3837 (regsets_fetch_inferior_registers): Cast third argument of
3838 ptrace to long then PTRACE_ARG3_TYPE.
3839 (regsets_store_inferior_registers): Likewise.
3840
38ea300a
PA
38412012-04-20 Pedro Alves <palves@redhat.com>
3842
3843 * configure: Regenerate.
3844
c971b7fa
PA
38452012-04-19 Pedro Alves <palves@redhat.com>
3846
43aaf8b6 3847 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 3848 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
3849 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3850 (all, install-only, uninstall, clean-info, all-lib, clean): No
3851 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
3852 (maintainer-clean realclean distclean): Use subdir_do.
3853 (subdir_do): New.
3854 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 3855 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
3856 * acinclude.m4: Include acx_configure_dir.m4.
3857 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3858 calls. Call AC_PROG_RANLIB. Configure gnulib using
3859 ACX_CONFIGURE_DIR.
3860 (GNULIB): New.
3861 (GNULIB_STDINT_H): Adjust.
3862 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3863 * gdbreplay.c: Include build-gnulib/config.h.
3864 * server.h: Likewise.
3865 * aclocal.m4: Regenerate.
3866 * config.in: Regenerate.
3867 * configure: Regenerate.
c971b7fa 3868
809277f8
PA
38692012-04-19 Pedro Alves <palves@redhat.com>
3870
3871 * Makefile.in (LIBGNU, INCGNU): Adjust.
3872 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3873 (all, install-only, uninstall, clean-info, all-lib, clean)
3874 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3875 * configure.ac: Adjust AC_OUTPUT output.
3876 * aclocal.m4: Regenerate.
3877 * configure: Regenerate.
3878
fd9bb8b8
PA
38792012-04-19 Pedro Alves <palves@redhat.com>
3880
3881 * Makefile.in (generated_files): New.
3882 (server_h): Remove the explicit dependency on config.h, and depend
3883 on $generated_files.
3884
1c298c66
PA
38852012-04-19 Pedro Alves <palves@redhat.com>
3886
3887 * Makefile.in (INCGNU): Add -Ignulib.
3888
57c4b50b
PA
38892012-04-19 Pedro Alves <palves@redhat.com>
3890
3891 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3892 (INCGNU): ... this, and spell out -I here.
3893 (GNULIB_LIB): Rename to ...
3894 (LIBGNU): ... this.
3895 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3896
1030e047
PA
38972012-04-19 Pedro Alves <palves@redhat.com>
3898
3899 * config.in: Regenerate.
3900
447d4319
PA
39012012-04-19 Pedro Alves <palves@redhat.com>
3902
3903 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3904 * server.h (memmem): Remove declaration.
3905 * config.in: Regenerate.
3906 * configure: Regenerate.
3907
aad9eab9
YQ
39082012-04-19 Yao Qi <yao@codesourcery.com>
3909
3910 * Makefile.in (SFILES): Add common/vec.c.
3911 (OBS): Add vec.o.
3912 (vec.o): New rule.
3913
3e10640f
YQ
39142012-04-19 Yao Qi <yao@codesourcery.com>
3915
3916 * remote-utils.c (prepare_resume_reply): Replace with macro
3917 target_core_of_thread.
3918 * server.c (handle_qxfer_threads_proper): Likewise.
3919 * target.h (traget_core_of_thread): New macro.
3920
71622373
PA
39212012-04-18 Pedro Alves <palves@redhat.com>
3922
3923 * aclocal.m4: Regenerate.
3924 * configure: Regenerate.
3925
80d26939
YQ
39262012-04-16 Yao Qi <yao@codesourcery.com>
3927
3928 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3929 duplicated on address.
3930
42476b70
YQ
39312012-04-16 Yao Qi <yao@codesourcery.com>
3932
3933 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3934 (struct tracepoint_action_ops) <send>: New field.
3935 (m_tracepoint_action_send, r_tracepoint_action_send): New.
3936 (agent_expr_send, x_tracepoint_action_send): New.
3937 (l_tracepoint_action_send): New.
3938 (cmd_qtdp): Download and install tracepoint
3939 according to `use_agent'.
3940 (run_inferior_command): Add one more parameter `len'.
3941 Update callers.
3942 (tracepoint_send_agent): New.
3943 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3944
7bc83639
YQ
39452012-04-16 Yao Qi <yao@codesourcery.com>
3946
3947 * tracepoint.c (download_tracepoints): Moved to ...
3948 (cmd_qtstart): ... here.
3949
5f18041e
YQ
39502012-04-14 Yao Qi <yao@codesourcery.com>
3951
3952 * tracepoint.c: Include inttypes.h.
3953 (struct collect_memory_action): Use sized types.
3954 (struct tracepoint): Likewise.
3955 (cmd_qtdp, stop_tracing): Update print specifiers.
3956 (cmd_qtp, response_tracepoint): Likewise.
3957 (collect_data_at_tracepoint): Likewise.
3958 (collect_data_at_step): Likewise.
3959
55a8c076
YQ
39602012-04-14 Yao Qi <yao@codesourcery.com>
3961
3962 Import gnulib module inttypes.
3963 * aclocal.m4, config.in, configure: Regenerated.
3964
dc750257
YQ
39652012-04-14 Yao Qi <yao@codesourcery.com>
3966
3967 * Makefile.in (maintainer-clean, realclean, distclean): Remove
3968 Makefile and config.status at last.
3969
0ab5faf9
YQ
39702012-04-13 Yao Qi <yao@codesourcery.com>
3971
3972 * tracepoint.c: Include stdint.h unconditionally.
3973
18f5fd81
TJB
39742012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3975
3976 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3977 on BFD_HAVE_SYS_PROCFS_TYPE.
3978 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3979 * configure: Regenerate.
3980 * config.in: Likewise.
3981
4d47af5c
L
39822012-04-13 H.J. Lu <hongjiu.lu@intel.com>
3983
3984 * Makefile.in (clean): Also remove x32.c x32-linux.c
3985 x32-avx.c x32-avx-linux.c.
3986 (x32.o): New target.
3987 (x32.c): Likewise.
3988 (x32-linux.o): Likewise.
3989 (x32-linux.c): Likewise.
3990 (x32-avx.o): Likewise.
3991 (x32-avx.c): Likewise.
3992 (x32-avx-linux.o): Likewise.
3993 (x32-avx-linux.c): Likewise.
3994
3995 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3996 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3997 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3998 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3999 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4000 i386/x32-avx-linux.xml.
4001
4002 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4003 (init_registers_x32_avx_linux): Likwise.
4004 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4005 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4006
ecedbe58
PA
40072012-04-13 Pedro Alves <palves@redhat.com>
4008
4009 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4010 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4011 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4012 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4013 the sub-make.
4014
c92b5177
L
40152012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4016
4017 * linux-x86-low.c (compat_x32_clock_t): New.
4018 (compat_x32_siginfo_t): Likewise.
4019 (compat_x32_siginfo_from_siginfo): Likewise.
4020 (siginfo_from_compat_x32_siginfo): Likewise.
4021 (linux_is_elf64): Likewise.
4022 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4023 and siginfo_from_compat_x32_siginfo for x32.
4024 (x86_arch_setup): Set linux_is_elf64.
4025
214d508e
L
40262012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4027
4028 PR gdb/13969
4029 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4030 e_machine field.
4031 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4032 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4033 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4034 compatible with process.
4035
c9a1864a
YQ
40362012-04-12 Yao Qi <yao@codesourcery.com>
4037
4038 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4039 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4040 (install-only, install-info, clean): Handle sub dir gnulib.
4041 (all-lib, am--refresh): New targets.
4042 (memmem.o): Remove target.
4043 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4044 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4045 (AC_REPLACE_FUNCS): Remove memmem.
4046 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4047 (AC_OUTPUT): Generate Makefile in gnulib/.
4048 * aclocal.m4, config.in, configure: Regenerated.
4049
367ba2c2
MR
40502012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4051
4052 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4053
9d236627
PA
40542012-04-05 Pedro Alves <palves@redhat.com>
4055
4056 -Werror=strict-aliasing
4057
4058 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4059 pointer.
4060
111217b3
PA
40612012-04-04 Pedro Alves <palves@redhat.com>
4062
4063 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4064 (sparc_store_gregset_from_stack, sparc_store_gregset)
4065 (sparc_breakpoint_at): Fix formatting.
4066
8365dcf5
TJB
40672012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4068
4069 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4070 are available.
4071 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4072 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4073 * config.in: Regenerate.
4074 * configure: Likewise.
4075
689cc2ae
PA
40762012-03-29 Pedro Alves <palves@redhat.com>
4077
4078 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4079 Correct ptrace arguments.
4080
c14dfd32
PA
40812012-03-28 Pedro Alves <palves@redhat.com>
4082
4083 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4084 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4085 (IA64_FR1_REGNUM): New defines.
4086 (ia64_fetch_register): New.
4087 (the_low_target): Install it.
4088 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4089 field.
4090 * linux-low.c (linux_fetch_registers): Try the
4091 the_low_target.fetch_register hook first.
4092
4093 * linux-arm-low.c (the_low_target): Adjust.
4094 * linux-bfin-low.c (the_low_target): Adjust.
4095 * linux-cris-low.c (the_low_target): Adjust.
4096 * linux-crisv32-low.c (the_low_target): Adjust.
4097 * linux-m32r-low.c (the_low_target): Adjust.
4098 * linux-m68k-low.c (the_low_target): Adjust.
4099 * linux-mips-low.c (the_low_target): Adjust.
4100 * linux-ppc-low.c (the_low_target): Adjust.
4101 * linux-s390-low.c (the_low_target): Adjust.
4102 * linux-sh-low.c (the_low_target): Adjust.
4103 * linux-sparc-low.c (the_low_target): Adjust.
4104 * linux-tic6x-low.c (the_low_target): Adjust.
4105 * linux-x86-low.c (the_low_target): Adjust.
4106 * linux-xtensa-low.c (the_low_target): Adjust.
4107
63c88e13
PA
41082012-03-26 Pedro Alves <palves@redhat.com>
4109
4110 * server.c (handle_qxfer_libraries): Don't bail early if
4111 the_target->qxfer_libraries_svr4 is not NULL.
4112
fb723180
PA
41132012-03-26 Pedro Alves <palves@redhat.com>
4114
4115 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4116
0afae3cf
PA
41172012-03-23 Pedro Alves <palves@redhat.com>
4118
4119 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4120 "library-list-svr4" element's start tag when the the DSO list is
4121 empty.
4122
485f1ee4
PA
41232012-03-23 Pedro Alves <palves@redhat.com>
4124
4125 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4126 a variable whose type size is the same as the inferior's pointer
4127 size.
4128
a5362b9a
TS
41292012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4130
4131 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4132 struct siginfo.
4133 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4134 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4135 * linux-low.h: Include <signal.h>.
4136 (struct siginfo): Remove forward declaration.
4137 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4138 struct siginfo.
4139
d226c142
MF
41402012-03-21 Mike Frysinger <vapier@gentoo.org>
4141
4142 * .gitignore: Ignore more files.
4143
122f36ef
PA
41442012-03-19 Pedro Alves <palves@redhat.com>
4145 Jan Kratochvil <jan.kratochvil@redhat.com>
4146
4147 * server.c (cont_thread, general_thread): Add describing comments.
4148 (start_inferior): Clear `cont_thread'.
4149 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4150 of a process.
4151
fc3e5175
YQ
41522012-03-15 Yao Qi <yao@codesourcery.com>
4153
4154 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4155 handling to ...
4156 (cmd_qtdp): ... here.
4157
8d0d92cd
YQ
41582012-03-15 Yao Qi <yao@codesourcery.com>
4159
4160 * tracepoint.c (struct tracepoint_action_ops): New.
4161 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4162 (m_tracepoint_action_download): New.
4163 (r_tracepoint_action_download): New.
4164 (x_tracepoint_action_download): New.
4165 (l_tracepoint_action_download): New.
4166 (add_tracepoint_action): Install `action->ops' according type.
4167 (download_tracepoint_1): Move code `download' function pointer
4168 of various tracepoint_action_ops.
4169
87b0bb13
JK
41702012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4171
4172 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4173 linux_ptrace_attach_warnings.
4174
5f572dec
JK
41752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4176
4177 * Makefile.in (linux-ptrace.o): New.
4178 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4179 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4180 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4181 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4182 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4183 of these targets.
4184 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4185
f4647387
YQ
41862012-03-08 Yao Qi <yao@codesourcery.com>
4187 Pedro Alves <palves@redhat.com>
4188
4189 Fix PR server/13392.
4190 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4191 offset of JMP insn.
4192 * tracepoint.c (remove_tracepoint): New.
4193 (cmd_qtdp): Call remove_tracepoint when failed to install.
4194
9b224c5e
PA
41952012-03-07 Pedro Alves <palves@redhat.com>
4196
4197 * linux-low.c (get_detach_signal): New.
4198 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4199 Pass on pending signals to PTRACE_DETACH. Check the result of the
4200 ptrace call.
4201 * server.c (program_signals, program_signals_p): New.
4202 (handle_general_set): Handle QProgramSignals.
4203 * server.h (program_signals, program_signals_p): Declare.
4204
e237a7e2
JK
42052012-03-05 Pedro Alves <palves@redhat.com>
4206 Jan Kratochvil <jan.kratochvil@redhat.com>
4207
4208 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4209 New comment why.
4210
5808517f
YQ
42112012-03-03 Yao Qi <yao@codesourcery.com>
4212
4213 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4214 agent_look_up_symbols.
4215
58b4daa5
YQ
42162012-03-03 Yao Qi <yao@codesourcery.com>
4217
4218 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4219 (linux-x86-low.o): Likewise.
4220 * server.h: Remove in_process_agent_loaded.
4221 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4222 common/agent.c.
4223 Update callers.
4224
8ffcbaaf
YQ
42252012-03-03 Yao Qi <yao@codesourcery.com>
4226
4227 * tracepoint.c (gdb_agent_capability): New global.
4228 (in_process_agent_loaded_ust): Renamed to
4229 `in_process_agent_supports_ust'.
4230 Update callers.
4231 (in_process_agent_supports_ust): Call agent_capability_check.
4232 (clear_installed_tracepoints): Assert that agent supports
4233 agent.
4234
d1feda86
YQ
42352012-03-03 Yao Qi <yao@codesourcery.com>
4236
4237 * linux-low.c (linux_supports_agent): New.
4238 (linux_target_ops): Initialize field `supports_agent' with
4239 linux_supports_agent.
4240 * target.h (struct target_ops) <supports_agent>: New.
4241 (target_supports_agent): New macro.
4242 * server.c (handle_general_set): Handle packet 'QAgent'.
4243 (handle_query): Send `QAgent+'.
4244 * Makefile.in (server.o): Depends on agent.h.
4245
2fa291ac
YQ
42462012-03-03 Yao Qi <yao@codesourcery.com>
4247
4248 * Makefile.in (OBS): Add agent.o.
4249 Add new rule for agent.o.
4250 Track dependence of tracepoint.c on agent.h.
4251 * tracepoint.c (run_inferior_command_1):
4252 (run_inferior_command): Call agent_run_command.
4253 (gdb_ust_connect_sync_socket): Deleted. Move it to
4254 common/agent.c.
4255 (resume_thread, stop_thread): Likewise.
4256 (gdb_ust_socket_init): Renamed to ...
4257 (gdb_agent_socket_init): ... New.
4258 (gdb_ust_thread): Renamed to ...
4259 (gdb_agent_helper_thread): ... New.
4260 (gdb_ust_init): Move some code to ...
4261 (gdb_agent_init): ... here. New.
4262 [HAVE_UST]: Call gdb_ust_init.
4263 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4264 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4265 * config.in, configure: Regenerated.
4266
05044653
PA
42672012-03-02 Pedro Alves <palves@redhat.com>
4268
4269 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4270 * linux-low.c (struct simple_pid_list): New.
4271 (stopped_pids): New a struct simple_pid_list pointer.
4272 (add_to_pid_list, pull_pid_from_list): New.
4273 (handle_extended_wait): Don't assume the first signal new children
4274 report is SIGSTOP. Adjust call to pull_pid_from_list.
4275 (linux_wait_for_lwp): Adjust.
4276
8d00225b
YQ
42772012-03-02 Yao Qi <yao@codesourcery.com>
4278
4279 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4280 debug log.
4281
19560ba5
YQ
42822012-03-02 Yao Qi <yao@codesourcery.com>
4283
4284 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4285 `stop_pc' and `tpoint'. Update caller.
4286
1faeff08
MR
42872012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4288
4289 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4290 * linux-low.c (use_linux_regsets): New macro.
4291 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4292 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4293 (linux_register_in_regsets): New function.
4294 (usr_fetch_inferior_registers): Skip registers covered by
4295 regsets.
4296 (usr_store_inferior_registers): Likewise.
4297 (usr_fetch_inferior_registers): New macro.
4298 (usr_store_inferior_registers): Likewise.
4299 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4300 (linux_store_registers): Likewise.
4301 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4302 prototype.
4303 (init_registers_mips64_dsp_linux): Likewise.
4304 (init_registers_mips_linux): New macro.
4305 (init_registers_mips_dsp_linux): Likewise.
4306 (mips_dsp_num_regs): Likewise.
4307 (DSP_BASE, DSP_CONTROL): New fallback macros.
4308 (mips_base_regs): New macro.
4309 (mips_regmap): Use it. Fix the size.
4310 (mips_dsp_regmap): New variable.
4311 (mips_dsp_regset_bitmap): Likewise.
4312 (mips_arch_setup): New function.
4313 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4314 than mips_regmap.
4315 (mips_cannot_store_register): Likewise.
4316 (the_low_target): Update .arch_setup, .num_regs and .regmap
4317 initializers. Add .regset_bitmap initializer.
4318 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4319 initializer.
4320 * linux-bfin-low.c (the_low_target): Likewise.
4321 * linux-cris-low.c (the_low_target): Likewise.
4322 * linux-crisv32-low.c (the_low_target): Likewise.
4323 * linux-ia64-low.c (the_low_target): Likewise.
4324 * linux-m32r-low.c (the_low_target): Likewise.
4325 * linux-m68k-low.c (the_low_target): Likewise.
4326 * linux-ppc-low.c (the_low_target): Likewise.
4327 * linux-s390-low.c (the_low_target): Likewise.
4328 * linux-sh-low.c (the_low_target): Likewise.
4329 * linux-sparc-low.c (the_low_target): Likewise.
4330 * linux-tic6x-low.c (the_low_target): Likewise.
4331 * linux-x86-low.c (the_low_target): Likewise.
4332 * linux-xtensa-low.c (the_low_target): Likewise.
4333 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4334 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4335 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4336 srv_xmlfiles.
4337 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4338 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4339
c03e6ccc
YQ
43402012-02-29 Yao Qi <yao@codesourcery.com>
4341 Pedro Alves <palves@redhat.com>
4342
4343 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4344 `step_over_finished' is true.
4345
644cebc9
PA
43462012-02-27 Pedro Alves <palves@redhat.com>
4347
4348 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4349 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4350
c14d7ab2
PA
43512012-02-27 Pedro Alves <palves@redhat.com>
4352
4353 PR server/9684
4354 * linux-low.c (pid_is_stopped): New.
4355 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4356
412c89dd
LM
43572012-02-25 Luis Machado <lgustavo@codesourcery.com>
4358
4359 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4360 of conditions.
4361
b745defe
MR
43622012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4363
4364 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4365
9f3a5c85
LM
43662012-02-24 Luis Machado <lgustavo@codesourcery>
4367
4368 * server.c (handle_query): Advertise support for target-side
4369 breakpoint condition evaluation.
4370 (process_point_options): New function.
4371 (process_serial_event): When inserting a breakpoint, check for
4372 a target-side condition that should be evaluated.
4373
4374 * mem-break.c: Include regcache.h and ax.h.
4375 (point_cond_list_t): New data structure.
4376 (breakpoint) <cond_list>: New field.
4377 (find_gdb_breakpoint_at): Make non-static.
4378 (delete_gdb_breakpoint_at): Clear any target-side
4379 conditions.
4380 (clear_gdb_breakpoint_conditions): New function.
4381 (add_condition_to_breakpoint): Likewise.
4382 (add_breakpoint_condition): Likewise.
4383 (gdb_condition_true_at_breakpoint): Likewise.
4384 (gdb_breakpoint_here): Return result directly instead
4385 of going through a local variable.
4386
4387 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4388 (clear_gdb_breakpoint_conditions): Likewise.
4389 (add_breakpoint_condition): Likewise.
4390 (gdb_condition_true_at_breakpoint): Likewise.
4391
4392 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4393 (need_step_over_p): Take target-side breakpoint condition into
4394 consideration.
4395
5e1dc496
LM
43962012-02-24 Luis Machado <lgustavo@codesourcery>
4397
4398 * server.h: Include tracepoint.h.
4399 (agent_mem_read, agent_get_trace_state_variable_value,
4400 agent_set_trace_state_variable_value,
4401 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4402 get_set_tsv_func_addr): New prototypes.
4403
4404 * ax.h: New include file.
4405 * ax.c: New source file.
4406
4407 * tracepoint.c: Include ax.h.
4408 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4409 agent_expr, eval_result_type): Move to ax.h.
4410 (parse_agent_expr): Rename to ...
4411 (gdb_parse_agent_expr): ... this, make it non-static and move
4412 to ax.h.
4413 (unparse_agent_expr) Rename to ...
4414 (gdb_unparse_agent_expr): ... this, make it non-static and move
4415 to ax.h.
4416 (eval_agent_expr): Rename to ...
4417 (eval_tracepoint_agent_expr): ... this.
4418 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4419 forward declarations.
4420 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4421 (agent_get_trace_state_variable_value): New function.
4422 (agent_set_trace_state_variable_value): New function.
4423 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4424 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4425 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4426 (condition_true_at_tracepoint): Likewise.
4427 (parse_agent_expr): Rename to ...
4428 (gdb_parse_agent_expr): ... this and move to ax.c.
4429 (unparse_agent_expr): Rename to ...
4430 (gdb_unparse_agent_expr): ... this and move to ax.c.
4431 (gdb_agent_op_name): Move to ax.c.
4432 (eval_agent_expr): Rename to ...
4433 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4434 and move to ax.c.
4435 (eval_tracepoint_agent_expr): New function.
4436 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4437 non-static.
5e1dc496
LM
4438 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4439 ax.c.
4440 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4441 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4442 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4443 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4444 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4445 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4446 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4447 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4448 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4449 (compile_bytecodes): Remove forward declaration.
4450 (is_goto_target): Move to ax.c.
4451 (compile_bytecodes): Move to ax.c and call
4452 agent_get_trace_state_variable_value (...) and
4453 agent_set_trace_state_variable_value (...).
4454
4455 * Makefile.in: Update ax.c and IPA dependencies.
4456
277e4e52
PA
44572012-02-24 Pedro Alves <palves@redhat.com>
4458
4459 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4460 (cmd_bigqtbuffer_circular): ... this. Only handle
4461 'QTBuffer:circular:'.
4462 (handle_tracepoint_general_set): Adjust.
4463
bf4c19f7
YQ
44642012-02-16 Yao Qi <yao@codesourcery.com>
4465
4466 * inferiors.c: Move code to ...
4467 * dll.c: .... here. New.
4468 * server.h: Declare clear_dlls.
4469 * Makefile.in (SFILES): Add dll.c.
4470 (OBS): Add dll.o
4471 (dll.o): New rule.
4472
d73f2619
YQ
44732012-02-11 Yao Qi <yao@codesourcery.com>
4474
4475 * server.c: (handle_monitor_command): Add a new parameter
4476 `own_buf'.
4477 (handle_query): Update caller.
4478
f8255c2a
JB
44792012-02-09 Joel Brobecker <brobecker@adacore.com>
4480
4481 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4482 * configure, config.in: Regenerate.
4483 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4484 is not defined.
4485
da84f473
PA
44862012-02-02 Pedro Alves <palves@redhat.com>
4487
4488 Try SIGKILL first, then PTRACE_KILL.
4489 * linux-low.c (linux_kill_one_lwp): New.
4490 (linux_kill_one_lwp): Rename to ...
4491 (kill_one_lwp_callback): ... this. Use the new
4492 linux_kill_one_lwp.
4493
e886a173
PA
44942012-02-02 Pedro Alves <palves@redhat.com>
4495
4496 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4497 inferior.
4498
be07f1a2
PA
44992012-01-27 Pedro Alves <palves@redhat.com>
4500
4501 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4502 (elf_64_file_p): Make static.
4503 (linux_pid_exe_is_elf_64_file): New.
4504 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4505 Delete declarations.
4506 (linux_pid_exe_is_elf_64_file): Declare.
4507 * linux-x86-low.c (x86_arch_setup): Use
4508 linux_pid_exe_is_elf_64_file.
4509
d8301ad1
JK
45102012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4511
4512 * linux-low.c (linux_wait_for_event_1): Rename to ...
4513 (linux_wait_for_event): ... here and merge it with former
4514 linux_wait_for_event - new variable wait_ptid, use it.
4515 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4516
01b17894
PA
45172012-01-23 Pedro Alves <palves@redhat.com>
4518
4519 * server.c (main): Avoid yet another case of infinite loop while
4520 detaching/killing after a longjmp.
4521
e825046f
JK
45222012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4523
4524 Code cleanup.
4525 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4526
b9e7b9c3
UW
45272012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4528
4529 * hostio.c (handle_readlink): New function.
4530 (handle_vFile): Call it to handle "vFile:readlink" packets.
4531
901f9912
UW
45322012-01-20 Pedro Alves <palves@redhat.com>
4533 Ulrich Weigand <ulrich.weigand@linaro.org>
4534
4535 * server.c (handle_v_requests): Only support vAttach and vRun to
4536 start multiple processes when in extended protocol mode.
4537
fc1ab1a0
PA
45382012-01-17 Pedro Alves <palves@redhat.com>
4539
4540 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4541 memalign plus mprotect to allocate the scratch buffer.
4542
7d5d4e98
PA
45432012-01-13 Pedro Alves <palves@redhat.com>
4544
4545 * server.c (attach_inferior): Clear `cont_thread'.
4546
f128d5e9
PA
45472012-01-13 Pedro Alves <palves@redhat.com>
4548
4549 * server.c (main): Avoid infinite loop while detaching/killing
4550 after a longjmp.
4551
06db92f0
DE
45522012-01-09 Doug Evans <dje@google.com>
4553
4554 * server.c (start_inferior): Set last_ptid in --wrapper case.
4555
32d92999
YQ
45562012-01-06 Yao Qi <yao@codesourcery.com>
4557
4558 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4559 defined.
4560 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4561
5e0a92a9
YQ
45622012-01-04 Yao Qi <yao@codesourcery.com>
4563
4564 * tracepoint.c (cmd_qtdp): Print debug message
4565 for static tracepoint.
4566
ae639e8c
YQ
45672012-01-04 Yao Qi <yao@codesourcery.com>
4568
4569 * tracepoint.c (trace_vdebug): Differentiate debug message
4570 between gdbserver and IPA.
4571
f72429c5
YQ
45722012-01-03 Yao Qi <yao@codesourcery.com>
4573
4574 * tracepoint.c (tracepoint_was_hit): Don't collect for
4575 static tracepoint.
4576
12c3e59c
JB
45772012-01-02 Joel Brobecker <brobecker@adacore.com>
4578
4579 * terminal.h: Reformat copyright header.
4580
67827812
JB
45812012-01-02 Joel Brobecker <brobecker@adacore.com>
4582
4583 * server.c (gdbserver_version): Update copyright year.
4584 * gdbreplay.c (gdbreplay_version): Likewise.
4585
3e52c33d
JK
45862011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4587
4588 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4589
4590 Revert:
4591 2011-12-18 Hui Zhu <teawater@gmail.com>
4592 * linux-low.c (linux_create_inferior): Save return value to ret.
4593
66f1260e
HZ
45942011-12-18 Hui Zhu <teawater@gmail.com>
4595
4596 * linux-low.c (linux_create_inferior): Save return value to ret.
4597
e77616d7
DE
45982011-12-16 Doug Evans <dje@google.com>
4599
e7b06c57
DE
4600 * linux-low.c (linux_create_inferior): If stdio connection,
4601 redirect stdin from /dev/null, stdout to stderr.
4602 * remote-utils.c (remote_is_stdio): New static global.
4603 (remote_connection_is_stdio): New function.
4604 (remote_prepare): Handle stdio connection.
4605 (remote_open): Ditto.
4606 (remote_close): Don't close stdin for stdio connections.
4607 (read_prim,write_prim): New functions. Replace all calls to
4608 read/write to these.
4609 * server.c (main): Watch for "-" argument. Move call to
4610 remote_prepare before start_inferior.
4611 * server.h (STDIO_CONNECTION_NAME): New macro.
4612 (remote_connection_is_stdio): Declare.
4613
e77616d7
DE
4614 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4615 in debugging output.
4616
82067193
YQ
46172011-12-15 Yao Qi <yao@codesourcery.com>
4618
4619 * tracepoint.c: Include sys/syscall.h.
4620 (gdb_ust_thread): Remove preprocessor conditional.
4621
82bfbe7e
PA
46222011-12-14 Pedro Alves <pedro@codesourcery.com>
4623
4624 * linux-low.c (linux_detach_one_lwp): Call
4625 the_low_target.prepare_to_resume before detaching.
4626
712c6575
YQ
46272011-12-14 Yao Qi <yao@codesourcery.com>
4628
4629 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4630 of write.
4631
d54d1edf
YQ
46322011-12-14 Yao Qi <yao@codesourcery.com>
4633
4634 * i386-low.c (i386_low_stopped_data_address): Initialize local
4635 variable `control'.
4636
6210a125
PA
46372011-12-13 Pedro Alves <pedro@codesourcery.com>
4638
4639 PR remote/13492
4640
4641 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4642 DR_CONTROL unless necessary. Extend comments.
4643 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4644 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4645
2ece8244
YQ
46462011-12-13 Yao Qi <yao@codesourcery.com>
4647
4648 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4649 macros.
4650 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4651
784867a5
JK
46522011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4653
4654 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4655 Print new debug message for such case.
4656
6bf36717
JK
46572011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4658
4659 Fix overlapping memcpy.
4660 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4661 the read_inferior_memory transfer.
4662 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4663 write_inferior_memory transfer.
4664 (set_fast_tracepoint_jump): New variable buf. Use it for the
4665 read_inferior_memory and write_inferior_memory transfers.
4666 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4667 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4668 Use it for the write_inferior_memory transfer.
4669 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4670 buffers.
4671
50275556
MR
46722011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4673
4674 * linux-low.c (fetch_register, store_register): Make code
4675 consistent, fix formatting.
4676
7325beb4
MR
46772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4678
4679 * linux-low.c (usr_store_inferior_registers): Factor out code
4680 to handle individual registers into...
4681 (store_register): ... this new function.
4682
c642a434
UW
46832011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4684
4685 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4686 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4687 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4688 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4689 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4690 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4691 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4692 (srv_xmlfiles): Add new XML files.
4693
4694 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4695 and <sys/uio.h>.
4696 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4697 (init_registers_s390_linux32v1): Add prototype.
4698 (init_registers_s390_linux32v2): Likewise.
4699 (init_registers_s390_linux64v1): Likewise.
4700 (init_registers_s390_linux64v2): Likewise.
4701 (init_registers_s390x_linux64v1): Likewise.
4702 (init_registers_s390x_linux64v2): Likewise.
4703 (s390_num_regs): Increment to 52.
4704 (s390_regmap): Add orig_r2 register.
4705 (s390_num_regs_3264): Increment to 68.
4706 (s390_regmap_3264): Add orig_r2 register.
4707 (s390_collect_ptrace_register): Handle orig_r2 register.
4708 (s390_supply_ptrace_register): Likewise.
4709 (s390_fill_last_break): New function.
4710 (s390_store_last_break): Likewise.
4711 (s390_fill_system_call): New function.
4712 (s390_store_system_call): Likewise.
4713 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4714 register sets.
4715 (s390_check_regset): New function.
4716 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4717 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4718 Update target_regsets for available register sets.
4719
2268b414
JK
47202011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4721 Jan Kratochvil <jan.kratochvil@redhat.com>
4722
4723 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4724 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4725 New.
4726 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4727 * linux-low.h (struct process_info_private): New member r_debug.
4728 * server.c (handle_qxfer_libraries): Call
4729 the_target->qxfer_libraries_svr4.
4730 (handle_qxfer_libraries_svr4): New function.
4731 (qxfer_packets): New entry "libraries-svr4".
4732 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4733 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4734 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4735 PACKET_qXfer_libraries_svr4.
4736
d6db1fab
UW
47372011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4738
4739 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4740 PSW address/mask between 8-byte and 16-byte formats.
4741 (s390_supply_ptrace_register): Likewise.
4742 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4743 basic addressing mode bit.
4744
242f5f1c
SS
47452011-11-24 Stan Shebs <stan@codesourcery.com>
4746
4747 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4748
f196051f
SS
47492011-11-17 Stan Shebs <stan@codesourcery.com>
4750
4751 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4752 (tracing_start_time): New global.
4753 (tracing_stop_time): New global.
4754 (tracing_user_name): New global.
4755 (tracing_notes): New global.
4756 (tracing_stop_note): New global.
4757 (cmd_qtstart): Set traceframe_usage, start_time.
4758 (stop_tracing): Set stop_time.
4759 (cmd_qtstatus): Report additional status.
4760 (cmd_qtp): New function.
4761 (handle_tracepoint_query): Call it.
4762 (cmd_qtnotes): New function.
4763 (handle_tracepoint_general_set): Call it.
4764 (get_timestamp): Rename from tsv_get_timestamp.
4765
405f8e94
SS
47662011-11-14 Stan Shebs <stan@codesourcery.com>
4767 Kwok Cheung Yeung <kcy@codesourcery.com>
4768
4769 * linux-x86-low.c (small_jump_insn): New.
4770 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4771 trampoline and error message, build a trampoline and issue a small
4772 jump instruction to it.
4773 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4774 trampoline and error message.
4775 (x86_get_min_fast_tracepoint_insn_len): New.
4776 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4777 * linux-low.h (struct linux_target_ops): Add arguments to
4778 install_fast_tracepoint_jump_pad operation, add new operation.
4779 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4780 arguments.
4781 (linux_get_min_fast_tracepoint_insn_len): New function.
4782 (linux_target_op): Add new operation.
4783 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4784 (gdb_trampoline_buffer_end): Ditto.
4785 (gdb_trampoline_buffer_error): Ditto.
4786 (struct ipa_sym_addresses): Add fields for new IPA variables.
4787 (symbol_list): Add entries for new IPA variables.
4788 (struct tracepoint): Add fields to hold the address range of the
4789 trampoline used by the tracepoint.
4790 (trampoline_buffer_head): New static variable.
4791 (trampoline_buffer_tail): Ditto.
4792 (claim_trampoline_space): New function.
4793 (have_fast_tracepoint_trampoline_buffer): New function.
4794 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4795 structure.
4796 (install_fast_tracepoint): Ditto, also add error buffer argument.
4797 (cmd_qtminftpilen): New function.
4798 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4799 (fast_tracepoint_from_trampoline_address): New function.
4800 (fast_tracepoint_collecting): Handle trampoline as part of jump
4801 pad space.
4802 (set_trampoline_buffer_space): New function.
4803 (initialize_tracepoint): Initialize new IPA variables.
4804 * target.h (struct target_ops): Add arguments to
4805 install_fast_tracepoint_jump_pad operation, add new
4806 get_min_fast_tracepoint_insn_len operation.
4807 (target_get_min_fast_tracepoint_insn_len): New.
4808 (install_fast_tracepoint_jump_pad): Add arguments.
4809 * server.h (IPA_BUFSIZ): Define.
4810 * linux-i386-ipa.c: Include extra header files.
4811 (initialize_fast_tracepoint_trampoline_buffer): New function.
4812 (initialize_low_tracepoint): Call it.
4813 * server.h (set_trampoline_buffer_space): Declare.
4814 (claim_trampoline_space): Ditto.
4815 (have_fast_tracepoint_trampoline_buffer): Ditto.
4816
1e4d1764
YQ
48172011-11-14 Yao Qi <yao@codesourcery.com>
4818
4819 * server.c (handle_query): Handle InstallInTrace for qSupported.
4820 * tracepoint.c (add_tracepoint): Sort list.
4821 (install_tracepoint, download_tracepoint): New.
4822 (cmd_qtdp): Call them to install and download tracepoints.
4823 (sort_tracepoints): Removed.
4824 (cmd_qtstart): Update.
4825
5c73ff4e
YQ
48262011-11-14 Yao Qi <yao@codesourcery.com>
4827
4828 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4829 * mem-break.h: Declare.
4830 * tracepoint.c (cmd_qtstart): Move some code to ...
4831 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4832 New.
4833 (download_tracepoints): Move some code to ...
4834 (download_tracepoint_1): ... here. New.
4835
86a30030
YQ
48362011-11-08 Yao Qi <yao@codesourcery.com>
4837
4838 * remote-utils.c (relocate_instruction): A comment fix.
4839
8d26e50c
JB
48402011-11-07 Joel Brobecker <brobecker@adacore.com>
4841
4842 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4843 (i386_dr_low_get_control, i386_dr_low_get_status): Use
4844 dr_status_mirror and dr_control_mirror from debug_reg_state.
4845 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4846 (i386_initial_stuff): Remove use of deleted globals.
4847 (i386_get_thread_context, i386_set_thread_context,
4848 i386_thread_added): Use dr_status_mirror and dr_control_mirror
4849 from debug_reg_state.
4850
a59306a3
YQ
48512011-11-05 Yao Qi <yao@codesourcery.com>
4852
4853 * tracepoint.c (gdb_collect): Loop over tracepoints of same
4854 address as TPOINT's.
4855
3065dfb6
SS
48562011-11-02 Stan Shebs <stan@codesourcery.com>
4857
4858 * tracepoint.c (agent_mem_read_string): New function.
4859 (eval_agent_expr): Call it for tracenz.
4860 * server.c (handle_query): Report support for tracenz.
4861
fd0d8c7c
YQ
48622011-11-02 Yao Qi <yao@codesourcery.com>
4863
4864 * tracepoint.c (cmd_qtstart): Remove unused local variables.
4865
609086b1
YQ
48662011-11-02 Yao Qi <yao@codesourcery.com>
4867
4868 * target.h: Fix a typo in comment.
4869
b9fd1791
PA
48702011-10-31 Pedro Alves <pedro@codesourcery.com>
4871
4872 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
4873 clobber the breakpoints' shadows with fast tracepoint jumps.
4874 * mem-break.h (check_mem_write): Add `myaddr' parameter.
4875 * target.c (write_inferior_memory): Also pass MYADDR down to
4876 check_mem_write.
4877
03583c20
UW
48782011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
4879
4880 * configure.ac: Check support for personality routine.
4881 * configure: Regenerate.
4882 * config.in: Likewise.
4883 * linux-low.c: Include <sys/personality.h>.
4884 Define ADDR_NO_RANDOMIZE if necessary.
4885 (linux_create_inferior): Disable address space randomization when
4886 forking inferior, if requested.
4887 (linux_supports_disable_randomization): New function.
4888 (linux_target_ops): Install it.
4889 * server.h (disable_randomization): Declare.
4890 * server.c (disable_randomization): New global variable.
4891 (handle_general_set): Handle QDisableRandomization.
4892 (handle_query): Likewise for qSupported.
4893 (main): Support --disable-randomization and --no-disable-randomization
4894 command line arguments.
4895 * target.h (struct target_ops): Add supports_disable_randomization.
4896 (target_supports_disable_randomization): New macro.
4897
723b724b
MF
48982011-09-29 Mike Frysinger <vapier@gentoo.org>
4899
4900 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4901 ifdef check.
4902 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4903 [!PT_GETDSBT] (target_loadmap): New definition.
4904 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4905 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4906 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4907 and PT_GETDSBT to LINUX_LOADMAP.
4908 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4909 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4910
55329a5c 49112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
4912
4913 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4914 (arm_linux_hwbp_cap): New static variable.
4915 (arm_linux_get_hwbp_cap): Replace by ...
4916 (arm_linux_init_hwbp_cap): ... this new function.
4917 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4918 (arm_linux_get_hw_watchpoint_count): Likewise.
4919 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4920 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4921 (arm_prepare_to_resume): Use perror_with_name instead of error.
4922
55329a5c 49232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
4924
4925 * linux-arm-low.c: Include <signal.h>.
4926 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4927 (struct arm_linux_hwbp_cap): New data type.
4928 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4929 (struct arm_linux_hw_breakpoint): New data type.
4930 (MAX_BPTS, MAX_WPTS): Define.
4931 (struct arch_process_info, struct arch_lwp_info): New data types.
4932 (arm_linux_get_hwbp_cap): New function.
4933 (arm_linux_get_hw_breakpoint_count): Likewise.
4934 (arm_linux_get_hw_watchpoint_count): Likewise.
4935 (arm_linux_get_hw_watchpoint_max_length): Likewise.
4936 (arm_hwbp_control_initialize): Likewise.
4937 (arm_hwbp_control_is_enabled): Likewise.
4938 (arm_hwbp_control_is_initialized): Likewise.
4939 (arm_hwbp_control_disable): Likewise.
4940 (arm_linux_hw_breakpoint_equal): Likewise.
4941 (arm_linux_hw_point_initialize): Likewise.
4942 (struct update_registers_data): New data structure.
4943 (update_registers_callback: New function.
4944 (arm_insert_point): Likewise.
4945 (arm_remove_point): Likewise.
4946 (arm_stopped_by_watchpoint): Likewise.
4947 (arm_stopped_data_address): Likewise.
4948 (arm_new_process): Likewise.
4949 (arm_new_thread): Likewise.
4950 (arm_prepare_to_resume): Likewise.
4951 (the_low_target): Register arm_insert_point, arm_remove_point,
4952 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4953 arm_new_thread, and arm_prepare_to_resume.
4954
6b9801d4
SS
49552011-09-15 Stan Shebs <stan@codesourcery.com>
4956
4957 * server.h (struct emit_ops): Add compare-goto fields.
4958 * tracepoint.c (gdb_agent_op_sizes): New table.
4959 (emit_eq_goto): New function.
4960 (emit_ne_goto): New function.
4961 (emit_lt_goto): New function.
4962 (emit_le_goto): New function.
4963 (emit_gt_goto): New function.
4964 (emit_ge_goto): New function.
4965 (is_goto_target): New function.
4966 (compile_bytecodes): Recognize special cases of compare-goto
4967 combinations and call specialized emitters for them.
4968 * linux-x86-low.c (amd64_emit_eq_goto): New function.
4969 (amd64_emit_ne_goto): New function.
4970 (amd64_emit_lt_goto): New function.
4971 (amd64_emit_le_goto): New function.
4972 (amd64_emit_gt_goto): New function.
4973 (amd64_emit_ge_goto): New function.
4974 (amd64_emit_ops): Add the new functions.
4975 (i386_emit_eq_goto): New function.
4976 (i386_emit_ne_goto): New function.
4977 (i386_emit_lt_goto): New function.
4978 (i386_emit_le_goto): New function.
4979 (i386_emit_gt_goto): New function.
4980 (i386_emit_ge_goto): New function.
4981 (i386_emit_ops): Add the new functions.
4982
bf15cbda
SS
49832011-09-08 Stan Shebs <stan@codesourcery.com>
4984
4985 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4986 (i386_emit_epilogue): Restore %ebx.
4987
943ca1dd
JZ
49882011-08-31 Jie Zhang <jzhang918@gmail.com>
4989
4990 * server.c (step_thread): Remove definition.
4991 (process_serial_event): Don't handle Hs.
4992 * server.h (step_thread): Remove declaration.
4993 * target.c (set_desired_inferior): Remove use of step_thread.
4994
e3deef73
LM
49952011-08-24 Luis Machado <lgustavo@codesourcery.com>
4996
4997 * linux-low.c: Include linux-procfs.h.
4998 (linux_attach_lwp_1): Update comments.
4999 (linux_attach): Scan for existing threads when attaching to a
5000 process that is the tgid.
5001 * Makefile.in: Update dependencies.
5002
13da1c97
LM
50032011-08-24 Luis Machado <lgustavo@codesourcery.com>
5004
5005 * configure.srv: Add linux-procfs.o dependencies.
5006
881127c9
YQ
50072011-08-14 Yao Qi <yao@codesourcery.com>
5008
5009 * target.h (struct target_ops): Fix indent.
5010 * win32-low.c (win32_target_ops): Fix comment.
5011
58dbd541
YQ
50122011-08-14 Andrew Jenner <andrew@codesourcery.com>
5013 Yao Qi <yao@codesourcery.com>
5014
5015 * Makefile.in (clean): Remove tic6x-*.c files.
5016 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5017 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5018 (tic6x-c64xp-linux.c): Likewise.
5019 * configure.srv: Add support for tic6x-*-uclinux.
5020 * linux-tic6x-low.c: New.
5021 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5022
78d85199
YQ
50232011-08-14 Andrew Stubbs <ams@codesourcery.com>
5024 Yao Qi <yao@codesourcery.com>
5025
5026 * target.h (struct target_ops): Add read_loadmap.
5027 * linux-low.c (struct target_loadseg): New type.
5028 (struct target_loadmap): New type.
5029 (linux_read_loadmap): New function.
5030 (linux_target_ops): Add linux_read_loadmap.
5031 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5032 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5033 to NULL.
78d85199 5034
a959a88d
EZ
50352011-08-05 Eli Zaretskii <eliz@gnu.org>
5036
5037 * win32-low.c: Include <stdint.h>.
5038
1ced966e
PA
50392011-07-22 Pedro Alves <pedro@codesourcery.com>
5040
5041 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5042 to the inferior here.
5043 (i386_remove_aligned_watchpoint): Ditto.
5044 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5045 fit part of the watchpoint in the debug registers.
5046 (i386_update_inferior_debug_regs): New.
5047 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5048 registers, and only update the inferior on success.
5049 (i386_low_remove_watchpoint): Ditto.
5050
d26e3629
KY
50512011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5052
5053 * linux-low.c (compare_ints, unique, list_threads, show_process,
5054 linux_core_of_thread): Delete.
5055 (linux_target_ops): Change linux_core_of_thread to
5056 linux_common_core_of_thread.
5057 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5058 * utils.c (malloc_failure): Change type of argument.
5059 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5060 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5061 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5062 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5063 (IPA_OBJS): Add common-utils-ipa.o.
5064 (ptid_h, linux_osdata_h): New macros.
5065 (server_h): Add common/common-utils.h, common/xml-utils.h,
5066 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5067 common/ptid.h.
5068 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5069 ptid.o, buffer.o): New rules.
5070 (linux-low.o): Add common/linux-osdata.h as a dependency.
5071 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5072 * configure.ac: Add AC_HEADER_DIRENT check.
5073 * config.in: Regenerate.
5074 * configure: Regenerate.
5075 * remote-utils.c (xml_escape_text): Delete.
5076 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5077 buffer_xml_printf): Move to common/buffer.c.
5078 * server.c (main): Remove call to initialize_inferiors.
5079 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5080 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5081 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5082 internal_error, gdb_assert, gdb_assert_fail): Delete.
5083 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5084 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5085 common/buffer.h.
5086 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5087 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5088 initialize_inferiors): Delete.
5089
2275a1a7
PA
50902011-07-20 Pedro Alves <pedro@codesourcery.com>
5091
5092 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5093 symbol error.
5094
0a5b1e09
PA
50952011-05-31 Pedro Alves <pedro@codesourcery.com>
5096
5097 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5098 assertion.
5099 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5100
6938fd34
YQ
51012011-05-26 Yao Qi <yao@codesourcery.com>
5102
5103 * Makefile.in (thread-db.o): Track dependence to
5104 common/gdb_thread_db.h.
5105 * thread-db.c: include gdb_thread_db.h from right place.
5106
b481f9e0
TT
51072011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5108
5109 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5110 __FILE__ and __LINE__ to internal_error.
5111
98a5dd13
DE
51122011-05-13 Doug Evans <dje@google.com>
5113
5114 * thread-db.c (try_thread_db_load_from_sdir): New function.
5115 (try_thread_db_load_from_dir): New function.
5116 (thread_db_load_search): Handle $sdir, ignore $pdir.
5117 Remove trying of system directories if search of
5118 libthread-db-search-path fails, that is now done via $sdir.
5119
d248b706
KY
51202011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5121
5122 * server.c (handle_query): Add EnableDisableTracepoints to the list
5123 of supported features.
43aaf8b6 5124 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5125 tracepoints.
43aaf8b6
PA
5126 (cmd_qtenable_disable): New.
5127 (cmd_qtstart): Install tracepoints even if disabled.
5128 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5129 receiving a QTEnable or QTDisable packet.
5130 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5131 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5132 tracepoints.
5133 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5134
84e578fb
DE
51352011-05-10 Doug Evans <dje@google.com>
5136
5137 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5138
71f55dd8
DE
51392011-05-04 Doug Evans <dje@google.com>
5140
5141 * linux-low.c (linux_join): Skip process lookup.
5142 * spu-low.c (spu_join): Ditto.
5143 * server.c (join_inferiors_callback): Delete.
5144 (process_serial_event): For 'D' packet (detach) call join_inferior
5145 directly.
5146
4d393d60
JM
51472011-05-04 Joseph Myers <joseph@codesourcery.com>
5148
5149 * README: Don't mention xscale*-*-linux*.
5150 * configure.srv (xscale*-*-linux*): Don't handle target.
5151
b00ad6ff
NF
51522011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5153
5154 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5155 casting pointers.
5156 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5157 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5158 (i386_emit_void_call_2): Likewise.
5159
af96c192
YQ
51602011-04-26 Yao Qi <yao@codesourcery.com>
5161
43aaf8b6
PA
5162 * linux-low.c: Move common macros to linux-ptrace.h.
5163 Include linux-ptrace.h.
af96c192
YQ
5164 * Makefile.in (linux_ptrace_h): New.
5165 (linux-low.o): Depends on linux-ptrace.h.
5166
03f2bd59
JK
51672011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5168
5169 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5170 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5171 (remote_prepare): New function with most of the TCP code from ...
5172 (remote_open): ... here. Detect PORT here unconditionally. Move also
5173 setting transport_is_reliable.
5174 * server.c (run_once): New variable.
5175 (gdbserver_usage): Document it.
5176 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5177 the first run if RUN_ONCE.
5178 * server.h (run_once, remote_prepare): New declarations.
5179
7a9dd1b2
TT
51802011-04-19 Tom Tromey <tromey@redhat.com>
5181
5182 * win32-low.c (handle_load_dll): Remove duplicate "the".
5183
81239425
PM
51842011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5185
5186 Remove support for old Cygwin 1.5 versions.
5187 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5188 function to avoid warning.
5189 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5190 warning.
5191
9e0627f1
PM
51922011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5193
5194 * gdbserver/server.h (Macro _): Define it if not available.
5195
588eebee
MS
51962011-03-14 Michael Snyder <msnyder@vmware.com>
5197
348af9f7 5198 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5199
43f70d4c
JB
52002011-03-10 Joel Brobecker <brobecker@adacore.com>
5201
5202 * Makefile.in (maintainer-clean realclean distclean): Remove
5203 "make ... subdir_do" command.
5204
348af9f7
MS
52052011-03-10 Michael Snyder <msnyder@vmware.com>
5206
5207 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5208
5209 * server.c (handle_v_run): Free alloced buffer on early return.
5210
e637a4f5
YQ
52112011-03-09 Yao Qi <yao@codesourcery.com>
5212
5213 Revert:
5214 2011-03-04 Yao Qi <yao@codesourcery.com>
5215
5216 * Makefile.in: Remove GNU make feature --directory.
5217
5218 2011-03-05 Yao Qi <yao@codesourcery.com>
5219
5220 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5221 (subdir_do): New make target. Copied from gdb/Makefile.
5222 (maintainer-clean, realclean, distclean, clean): Call corresponding
5223 make targets in common/Makefile.
5224
5225 2011-02-11 Yao Qi <yao@codesourcery.com>
5226
5227 * configure.ac: Call AC_PROG_RANLIB.
5228 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5229 * configure: Regenerate.
5230
e6edda56
JK
52312011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5232
5233 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5234
e5141119
JB
52352011-03-06 Yao Qi <yao@codesourcery.com>
5236
5237 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5238
64794aa4
JB
52392011-03-05 Yao Qi <yao@codesourcery.com>
5240
5241 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5242 (subdir_do): New make target. Copied from gdb/Makefile.
5243 (maintainer-clean, realclean, distclean, clean): Call corresponding
5244 make targets in common/Makefile.
5245
7a762829
YQ
52462011-03-04 Yao Qi <yao@codesourcery.com>
5247
5248 * Makefile.in: Remove GNU make feature --directory.
5249
348af9f7
MS
52502011-03-04 Michael Snyder <msnyder@vmware.com>
5251
5252 * server.c (queue_stop_reply): Call xmalloc not malloc.
5253
52542011-03-02 Michael Snyder <msnyder@vmware.com>
5255
5256 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5257
9f72fee2
MS
52582011-02-28 Michael Snyder <msnyder@vmware.com>
5259
588eebee
MS
5260 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5261 (cmd_qtframe): Ditto.
5262 (cmd_qtbuffer): Ditto.
5263 (cmd_bigqtbuffer): Ditto.
5264
9f72fee2
MS
5265 * utils.c (decimal2str): Initialize 'width' to nine, then
5266 don't mess with it.
5267
8040bd49
UW
52682011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5269
5270 * hostio.c (require_data): Free *data, not data.
5271
7e52cbd0
JK
52722011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5273
5274 * hostio.c (require_data): Use free, not xfree.
5275
9130f83e
MS
52762011-02-27 Michael Snyder <msnyder@vmware.com>
5277
4b812f4e
MS
5278 * server.c (handle_query): Discard unused value.
5279
9130f83e
MS
5280 * hostio.c (require_data): Free malloc memory before returning
5281 error.
5282
69d37113
MS
52832011-02-26 Michael Snyder <msnyder@vmware.com>
5284
5285 * linux-low.c (list_threads): Call closedir for dirent.
5286
35f5825a
MS
52872011-02-27 Michael Snyder <msnyder@vmware.com>
5288
2a589cef
MS
5289 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5290 a case statement falls through.
5291
0adea5f7
MS
5292 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5293
35f5825a
MS
5294 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5295 in comparison.
5296
238f1c74
MS
52972011-02-26 Michael Snyder <msnyder@vmware.com>
5298
5299 * utils.c (decimal2str): Eliminate dead code and dead param.
5300 (pulongest): Drop dead param from call to decimal2str.
5301 (plongest): Ditto.
5302
633ff500
JB
53032011-02-24 Joel Brobecker <brobecker@adacore.com>
5304
5305 Revert the following patch (not approved yet):
5306 2011-02-21 Hui Zhu <teawater@gmail.com>
5307 * tracepoint.c (tp_printf): New function.
5308 (eval_agent_expr): Handle gdb_agent_op_printf.
5309
f9c6ff72
HZ
53102011-02-21 Hui Zhu <teawater@gmail.com>
5311
5312 * tracepoint.c (tp_printf): New function.
5313 (eval_agent_expr): Handle gdb_agent_op_printf.
5314
94d5e490
TT
53152011-02-18 Tom Tromey <tromey@redhat.com>
5316
5317 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5318 (tracepoint.o): Likewise.
5319 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5320 (gdb_agent_op_names): Likewise.
5321
c7f96d2b
TT
53222011-02-18 Tom Tromey <tromey@redhat.com>
5323
5324 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5325 gdb_agent_op_rot>: New constants.
5326 (gdb_agent_op_names): Add pick and roll.
5327 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5328 cases.
5329
0feedb2c
JK
53302011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5331
5332 * aclocal.m4: Regenerated with aclocal-1.11.1.
5333
b3b9301e
PA
53342011-02-14 Pedro Alves <pedro@codesourcery.com>
5335
5336 * server.c (handle_qxfer_traceframe_info): New.
5337 (qxfer_packets): Register "traceframe-info".
5338 (handle_query): Report support for qXfer:traceframe-info:read+.
5339 * tracepoint.c (match_blocktype): New.
5340 (traceframe_find_block_type): Rename to ...
5341 (traceframe_walk_blocks): ... this. Add callback filter argument,
5342 and use it.
5343 (traceframe_find_block_type): New, reimplemented on top of
5344 traceframe_walk_blocks.
5345 (build_traceframe_info_xml): New.
5346 (traceframe_read_info): New.
5347 * server.h (traceframe_read_info): Declare.
5348
4f3e6fb7
YQ
53492011-02-11 Yao Qi <yao@codesourcery.com>
5350
5351 * configure.ac: Call AC_PROG_RANLIB.
5352 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5353 * configure: Regenerate.
5354
764880b7
PA
53552011-02-07 Pedro Alves <pedro@codesourcery.com>
5356
5357 * server.c (gdb_read_memory): Change return semantics to allow
5358 partial transfers.
5359 (handle_search_memory_1): Adjust.
5360 (process_serial_event) <'m' packet>: Handle partial transfers.
5361 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5362
1c79eb8a
PA
53632011-01-28 Pedro Alves <pedro@codesourcery.com>
5364
5365 * regcache.c (init_register_cache): Initialize
5366 regcache->register_status.
5367 (free_register_cache): Release regcache->register_status.
5368 (regcache_cpy): Copy register_status.
5369 (registers_to_string): Print 'x's for unavailable registers.
5370 (supply_register): Mark the register's status valid or
5371 unavailable, depending on whether a buffer was passed in or not.
5372 (supply_register_zeroed): New.
5373 (supply_regblock): Mark the registers' status valid or
5374 unavailable, depending on whether a buffer was passed in or not.
5375 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5376 (struct regcache): New `register_status' field.
5377 (supply_register_zeroed): Declare.
5378 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5379 supply_register_zeroed, rather than passing a NULL buffer to
5380 supply_register.
5381 * tracepoint.c (fetch_traceframe_registers): Update comment.
5382
85724a0e
PA
53832011-01-28 Pedro Alves <pedro@codesourcery.com>
5384
5385 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5386 buffer explicit.
5387
d08aafef
PA
53882011-01-25 Pedro Alves <pedro@codesourcery.com>
5389
5390 * server.h (decode_xfer_write): Change prototype.
5391 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5392 and don't extract the annex here.
5393 * server.c (decode_xfer_read): Remove `annex' parameter,
5394 and don't extract the annex here.
5395 (decode_xfer): New.
5396 (struct qxfer): New.
5397 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5398 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5399 (handle_qxfer_statictrace): New functions, abstracted out from
5400 handle_query, and made to use the struct qxfer interface.
5401 (handle_threads_qxfer_proper): Rename to ...
5402 (handle_qxfer_threads_proper): ... this.
5403 (handle_threads_qxfer): Rename to ...
5404 (handle_qxfer_threads): ... this. Adjust.
5405 (qxfer_packets): New array.
5406 (handle_qxfer): New function.
5407 (handle_query): Use handle_qxfer.
5408
493e2a69
MS
54092011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5410
5411 * gdbreplay.c: Shorten lines of >= 80 columns.
5412 * linux-low.c: Ditto.
5413 * linux-ppc-low.c: Ditto.
5414 * linux-s390-low.c: Ditto.
5415 * linux-sparc-low.c: Ditto.
5416 * linux-x86-low.c: Ditto.
5417 * linux-xtensa-low.c: Ditto.
5418 * mem-break.c: Ditto.
5419 * nto-low.c: Ditto.
5420 * regcache.h: Ditto.
5421 * remote-utils.c: Ditto.
5422 * server.c: Ditto.
5423 * server.h: Ditto.
5424 * thread-db.c: Ditto.
5425 * tracepoint.c: Ditto.
5426 * utils.c: Ditto.
5427 * win32-low.h: Ditto.
5428
44944448
JB
54292011-01-05 Joel Brobecker <brobecker@adacore.com>
5430
5431 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5432 update.
5433
71ce852c
JB
54342011-01-01 Joel Brobecker <brobecker@adacore.com>
5435
5436 * server.c (gdbserver_version): Update copyright year in version
5437 output.
5438 * gdbreplay.c (gdbreplay_version): Ditto.
5439
eb826dc6
MF
54402010-12-29 Jie Zhang <jie.zhang@analog.com>
5441
5442 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5443 * linux-bfin-low.c: New file.
5444 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5445 PT_DATA_ADDR for BFIN targets.
5446 * Makefile.in (SFILES): Add linux-bfin-low.c.
5447 (clean): Remove reg-bfin.c.
5448 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5449 * README: Mention supported Blackfin targets.
5450
39ab222a
MF
54512010-12-23 Mike Frysinger <vapier@gentoo.org>
5452
5453 * .gitignore: New file.
5454
a1f2ce7d
MF
54552010-11-16 Mike Frysinger <vapier@gentoo.org>
5456
5457 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5458
f474844c
JZ
54592010-10-22 Jie Zhang <jie@codesourcery.com>
5460
5461 * Makefile.in: Add FLAGS_TO_PASS variable.
5462 (install): Remove dependency of install-only and recursively
5463 invoke make for install-only.
5464
f1048712
DE
54652010-10-04 Doug Evans <dje@google.com>
5466
5467 * Makefile.in (uninstall): Use $(DESTDIR).
5468
b53a1623
PA
54692010-09-24 Pedro Alves <pedro@codesourcery.com>
5470
e6ee044d
PA
5471 PR gdb/11842
5472
b53a1623
PA
5473 * linux-x86-low.c (compat_siginfo_from_siginfo)
5474 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5475 si_code is < 0. Check for si_code == SI_TIMER before checking for
5476 si_code < 0.
5477
fa1bd1e4
JB
54782010-09-13 Joel Brobecker <brobecker@adacore.com>
5479
5480 * lynx-i386-low.c: New file.
5481 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5482
47fac8f8
JB
54832010-09-13 Joel Brobecker <brobecker@adacore.com>
5484
5485 * lynx-low.c (ptrace_request_to_str): Remove handling for
5486 request values that have been removed in LynxOS 5.x.
5487
1adfc54d
JB
54882010-09-13 Joel Brobecker <brobecker@adacore.com>
5489
5490 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5491 <ptrace.h>
5492
c2a66c29
NS
54932010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5494
5495 * configure.ac: Add --enable-inprocess-agent option.
5496 * configure: Rebuilt.
5497
32fcada3
YQ
54982010-09-06 Yao Qi <yao@codesourcery.com>
5499
5500 * linux-low.c (linux_kill): Remove unused variable.
5501 (linux_stabilize_threads): Likewise.
5502 * server.c (start_inferior): Likewise.
5503 (queue_stop_reply_callback): Likewise.
5504 * tracepoint.c (do_action_at_tracepoint): Likewise.
5505
0cccb683
YQ
55062010-09-06 Yao Qi <yao@codesourcery.com>
5507
5508 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5509 on return.
5510
423ec54c
JK
55112010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5512
5513 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5514
12ac6819
PA
55152010-09-06 Pedro Alves <pedro@codesourcery.com>
5516
5517 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5518 "$(IPA_DEPFILES)".
5519
8ed54b31
JB
55202010-09-01 Joel Brobecker <brobecker@adacore.com>
5521
5522 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5523 gdbserver/lynx-ppc-low.c: New files.
5524 * Makefile.in (lynx_low_h): New variable.
5525 (lynx-low.o, lynx-ppc-low.o): New rules.
5526 * configure.ac: On LynxOS, link with -lnetinet.
5527 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5528 * configure: regenerate.
5529
bb0116a4
JB
55302010-09-01 Joel Brobecker <brobecker@adacore.com>
5531
5532 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5533 * configure.ac: Add check for vasprintf and vsnprintf.
5534 * configure, config.in: Regenerate.
5535 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5536
a778ab81 55372010-09-01 Joel Brobecker <brobecker@adacore.com>
5538
5539 * gdbreplay.c: Move include of alloca.h up, next to include of
5540 malloc.h.
5541 * server.h: Add include of malloc.h.
5542 * mem-break.c: Remove include of malloc.h.
5543 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5544
8b034a19 55452010-09-01 Joel Brobecker <brobecker@adacore.com>
5546
5547 * Makefile.in (memmem.o): Build with -Wno-error.
5548
55492010-09-01 Joel Brobecker <brobecker@adacore.com>
5550
5551 * utils.c (xsnprintf): Make non-static.
5552 * server.h: Add xsnprintf declaration.
5553 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5554 replace calls to snprintf by calls to xsnprintf throughout.
5555
55562010-09-01 Joel Brobecker <brobecker@adacore.com>
5557
5558 * configure.ac: Add configure check for alloca.
5559 * configure, config.in: Regenerate.
5560 * server.h: Include alloca.h if it exists.
5561 * gdbreplay.c: Include alloca.h if it exists.
5562
1a981360
PA
55632010-08-28 Pedro Alves <pedro@codesourcery.com>
5564
5565 * linux-low.c (__SIGRTMIN): Define if not already defined.
5566 (linux_create_inferior): Check for __ANDROID__ rather than
5567 __SIGRTMIN.
5568 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5569 are already deferred.
5570 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5571 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5572 stopped and already has a pending signal to report.
5573 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5574 a pending signal to report or is moving out of a jump pad.
5575 (linux_init_signals): Check for __ANDROID__ rather than
5576 __SIGRTMIN.
5577
b4d51a55
PA
55782010-08-28 Pedro Alves <pedro@codesourcery.com>
5579
5580 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5581 debug_threads check. Avoid a linear search when not doing debug
5582 output.
5583
ec48365d
PA
55842010-08-27 Pedro Alves <pedro@codesourcery.com>
5585
5586 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5587 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5588 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5589 (process_event): Change local fd's type to gdb_fildes_t.
5590 (create_file_handler): Adjust prototype.
5591 (delete_file_handler): Adjust prototype.
5592 (handle_file_event): Adjust prototype. Use pfildes.
5593 (create_file_event): Adjsut prototype.
5594 * remote-utils.c (remote_desc, listen_desc): Change type to
5595 gdb_fildes_t.
5596 * server.h: New gdb_fildes_t typedef.
5597 [USE_WIN32API]: Include winsock2.h.
5598 (delete_file_handler, add_file_handler): Adjust prototypes.
5599 (pfildes): Declare.
5600 * utils.c (pfildes): New.
5601
854d88f0
PA
56022010-08-27 Pedro Alves <pedro@codesourcery.com>
5603
5604 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5605 * configure: Regenerate.
5606
0146f85b
PA
56072010-08-27 Pedro Alves <pedro@codesourcery.com>
5608
5609 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5610 (linux_done_accessing_memory): ... this.
5611 (linux_target_ops): Adjust.
5612 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5613 * nto-low.c (nto_target_ops): Adjust comment.
5614 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5615 * spu-low.c (spu_target_ops): Adjust comment.
5616 * target.h (target_ops): Rename unprepare_to_access_memory field
5617 to done_accessing_memory.
5618 (unprepare_to_access_memory): Rename to ...
5619 (done_accessing_memory): ... this.
5620
90d74c30
PA
56212010-08-26 Pedro Alves <pedro@codesourcery.com>
5622
5623 * linux-low.c (linux_prepare_to_access_memory): New.
5624 (linux_unprepare_to_access_memory): New.
5625 (linux_target_ops): Install them.
5626 * server.c (read_memory): Rename to ...
5627 (gdb_read_memory): ... this. Use
5628 prepare_to_access_memory/prepare_to_access_memory.
5629 (write_memory): Rename to ...
5630 (gdb_write_memory): ... this. Use
5631 prepare_to_access_memory/prepare_to_access_memory.
5632 (handle_search_memory_1): Adjust.
5633 (process_serial_event): Adjust.
5634 * target.h (struct target_ops): New fields
5635 prepare_to_access_memory and unprepare_to_access_memory.
5636 (prepare_to_access_memory, unprepare_to_access_memory): New.
5637 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5638 prepare_to_access_memory/prepare_to_access_memory.
5639 * nto-low.c (nto_target_ops): Adjust.
5640 * spu-low.c (spu_target_ops): Adjust.
5641 * win32-low.c (win32_target_ops): Adjust.
5642
fd467969
PA
56432010-08-26 Pedro Alves <pedro@codesourcery.com>
5644
5645 * Makefile.in (WARN_CFLAGS): Get it from configure.
5646 (WERROR_CFLAGS): New.
5647 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5648 * configure.ac: Introduce --enable-werror, which adds -Werror to
5649 the compiler command line. Enabled by default. Disable with
5650 --disable-werror. Add -Wdeclaration-after-statement
5651 Wpointer-arith and -Wformat-nonliteral to warning flags.
5652 * configure: Regenerate.
5653
331e2f5f
PA
56542010-08-26 Pedro Alves <pedro@codesourcery.com>
5655
5656 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5657
e581f2b4
PA
56582010-08-26 Pedro Alves <pedro@codesourcery.com>
5659
5660 * gdbreplay.c (remote_error): New.
5661 (gdbchar): New.
5662 (expect): Use gdbchar. Check for error reading from GDB.
5663 Clarify sync error output.
5664 (play): Check for errors writing to GDB.
5665 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5666 * remote-utils.c (getpkt): Check for errors writing to the remote
5667 descriptor.
5668
3c11dd79
PA
56692010-08-25 Pedro Alves <pedro@codesourcery.com>
5670
5671 * linux-low.c (linux_wait_1): Move non-debugging code out of
5672 `debug_threads' control.
5673
d20a8ad9
PA
56742010-08-25 Pedro Alves <pedro@codesourcery.com>
5675
5676 * linux-low.c (linux_wait_1): Don't set last_status here.
5677 * server.c (push_event, queue_stop_reply_callback): Assert we're
5678 not pushing a TARGET_WAITKIND_IGNORE event.
5679 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5680 (myresume, handle_target_event): Set the thread's last_resume_kind
5681 and last_status from the target returned status.
5682
964e4306
PA
56832010-08-25 Pedro Alves <pedro@codesourcery.com>
5684
5685 PR threads/10729
5686
5687 * linux-x86-low.c (update_debug_registers_callback): New.
5688 (i386_dr_low_set_addr): Use it.
5689 (i386_dr_low_get_addr): New.
5690 (i386_dr_low_set_control): Use update_debug_registers_callback.
5691 (i386_dr_low_get_control): New.
5692 (i386_dr_low_get_status): Adjust.
5693 * linux-low.c (linux_stop_lwp): New.
5694 * linux-low.h (linux_stop_lwp): Declare.
5695
5696 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5697 argument instead of a i386_debug_reg_state.
5698 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5699 a i386_debug_reg_state.
5700 (i386_insert_aligned_watchpoint): Adjust.
5701 (i386_remove_aligned_watchpoint): Adjust.
5702 (i386_low_stopped_data_address): Read the debug registers from the
5703 inferior instead of from the mirrors.
5704 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5705 (i386_dr_low_get_addr): Declare.
5706 (i386_dr_low_get_control): Declare.
5707 (i386_dr_low_get_status): Change prototype.
5708
5709 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5710 (i386_dr_low_get_addr): New.
5711 (i386_dr_low_get_control): New.
5712 (i386_dr_low_get_status): Adjust prototype. Return
5713 dr_status_mirror.
5714 (i386_initial_stuff): Clear dr_status_mirror and
5715 dr_control_mirror.
5716 (i386_get_thread_context): Adjust.
5717 (i386_set_thread_context): Adjust.
5718 (i386_thread_added): Adjust.
5719
5f21a75b
PA
57202010-08-24 Pedro Alves <pedro@codesourcery.com>
5721
5722 * linux-low.h (linux_thread_area): Delete declaration.
5723
3e4c1235
TS
57242010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5725
5726 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5727 after its termination.
5728
1971b033
PA
57292010-08-09 Pedro Alves <pedro@codesourcery.com>
5730
5731 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5732 (gdb_wants_all_stopped): Delete.
5733 (linux_wait_1): Don't call them.
5734 * server.c (handle_v_cont): Tag all threads as want-stopped.
5735 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5736 stopped as "client-wants-stopped".
5737
310444ac
PA
57382010-07-31 Pedro Alves <pedro@codesourcery.com>
5739
5740 * Makefile.in (signals_h): New.
5741 (server_h): Depend on it.
5742 (server.o): Don't depend on $(signals_def).
5743 (signals.o): Depend on $(signals_def).
5744
a19cae16
JK
57452010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5746
5747 * Makefile.in (signals_def): New.
5748 (server_h): Append include/gdb/signals.h and signals_def.
5749 (server.o): Append signals_def.
5750
30d50328
JK
57512010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5752
5753 * server.c (handle_target_event): Use target_signal_to_host for
5754 resume_info.sig initialization.
5755 * target.h (struct thread_resume) <sig>: New comment.
5756
5c3216e2
OS
57572010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5758
c6f46ca0
OS
5759 * server.c (handle_query): strcpy() the returned string from paddress()
5760 instead of sprintf().
5c3216e2
OS
5761 * utils.c (paddress): Return phex_nz().
5762
6bd31874
JB
57632010-07-07 Joel Brobecker <brobecker@adacore.com>
5764
5765 * server.c (handle_v_cont): Call mourn_inferior if process
5766 just exited.
5767 (myresume): Likewise.
5768
0fb4aa4b
PA
57692010-07-01 Pedro Alves <pedro@codesourcery.com>
5770
5771 Static tracepoints, and integration with UST.
5772
5773 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5774 * mem-break.c (uninsert_all_breakpoints)
5775 (reinsert_all_breakpoints): New.
5776 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5777 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5778 (gdb_agent_ust_loaded, helper_thread_id)
5779 (gdb_agent_helper_thread_id): New macros.
5780 (struct ipa_sym_addresses): Add addr_ust_loaded,
5781 addr_helper_thread_id, addr_cmd_buf.
5782 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5783 (in_process_agent_loaded_ust): New.
5784 (write_e_ust_not_loaded): New.
5785 (maybe_write_ipa_ust_not_loaded): New.
5786 (struct collect_static_trace_data_action): New.
5787 (enum tracepoint_type) <static_tracepoint>: New.
5788 (struct tracepoint) <handle>: Mention static tracepoints.
5789 (struct static_tracepoint_ctx): New.
5790 (CMD_BUF_SIZE): New.
5791 (add_tracepoint_action): Handle static tracepoint actions.
5792 (unprobe_marker_at): New.
5793 (clear_installed_tracepoints): Handle static tracepoints.
5794 (cmd_qtdp): Handle static tracepoints.
5795 (probe_marker_at): New.
5796 (cmd_qtstart): Handle static tracepoints.
5797 (response_tracepoint): Handle static tracepoints.
5798 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5799 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5800 (get_context_regcache): Handle static tracepoints.
5801 (do_action_at_tracepoint): Handle static tracepoint actions.
5802 (traceframe_find_block_type): Handle static trace data blocks.
5803 (traceframe_read_sdata): New.
5804 (download_tracepoints): Download static tracepoint actions.
5805 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5806 (GDB_PROBE_NAME): New.
5807 (ust_ops): New.
5808 (GET_UST_SYM): New.
5809 (USTF): New.
5810 (dlsym_ust): New.
5811 (ust_marker_to_static_tracepoint): New.
5812 (gdb_probe): New.
5813 (collect_ust_data_at_tracepoint): New.
5814 (gdb_ust_probe): New.
5815 (UNIX_PATH_MAX, SOCK_DIR): New.
5816 (gdb_ust_connect_sync_socket): New.
5817 (resume_thread, stop_thread): New.
5818 (run_inferior_command): New.
5819 (init_named_socket): New.
5820 (gdb_ust_socket_init): New.
5821 (cstr_to_hexstr): New.
5822 (next_st): New.
5823 (first_marker, next_marker): New.
5824 (response_ust_marker): New.
5825 (cmd_qtfstm, cmd_qtsstm): New.
5826 (unprobe_marker_at, probe_marker_at): New.
5827 (cmd_qtstmat, gdb_ust_thread): New.
5828 (gdb_ust_init): New.
5829 (initialize_tracepoint_ftlib): Call gdb_ust_init.
5830 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5831 (ST_REGENTRY): New.
5832 (x86_64_st_collect_regmap): New.
5833 (X86_64_NUM_ST_COLLECT_GREGS): New.
5834 (AMD64_RIP_REGNUM): New.
5835 (supply_static_tracepoint_registers): New.
5836 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5837 (ST_REGENTRY): New.
5838 (i386_st_collect_regmap): New.
5839 (i386_NUM_ST_COLLECT_GREGS): New.
5840 (supply_static_tracepoint_registers): New.
5841 * server.c (handle_query): Handle qXfer:statictrace:read.
5842 <qSupported>: Report support for StaticTracepoints, and
5843 qXfer:statictrace:read features.
5844 * server.h (traceframe_read_sdata)
5845 (supply_static_tracepoint_registers): Declare.
5846 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5847 (unpack_varlen_hex): Include in IPA build.
5848 * Makefile.in (ustlibs, ustinc): New.
5849 (IPA_OBJS): Add remote-utils-ipa.o.
5850 ($(IPA_LIB)): Link -ldl and -lpthread.
5851 (UST_CFLAGS): New.
5852 (IPAGENT_CFLAGS): Add UST_CFLAGS.
5853 * config.in, configure: Regenerate.
5854
9e4344e5
PA
58552010-06-20 Ian Lance Taylor <iant@google.com>
5856 Pedro Alves <pedro@codesourcery.com>
5857
5858 * linux-x86-low.c (always_true): Delete.
5859 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5860 trying to fool the compiler with always_true.
5861
c6beb2cb
PA
58622010-06-20 Pedro Alves <pedro@codesourcery.com>
5863
5864 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5865 conditions in gdbserver.
5866
d2ed6730
UW
58672010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
5868
5869 * spu-low.c (spu_read_memory): Wrap around local store limit.
5870 (spu_write_memory): Likewise.
5871
4e29fb54
PA
58722010-06-15 Pedro Alves <pedro@codesourcery.com>
5873
5874 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5875 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5876 LONGEST uses.
5877 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5878 uses.
5879 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5880 uses with LONGEST uses.
5881
6a271cae
PA
58822010-06-14 Stan Shebs <stan@codesourcery.com>
5883 Pedro Alves <pedro@codesourcery.com>
5884
5885 Bytecode compiler.
5886
5887 * linux-x86-low.c: Include limits.h.
5888 (add_insns): New.
5889 (always_true): New.
5890 (EMIT_ASM): New.
5891 (EMIT_ASM32): New.
5892 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5893 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5894 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5895 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5896 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5897 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5898 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5899 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5900 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5901 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5902 (amd64_emit_void_call_2): New.
5903 (amd64_emit_ops): New.
5904 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5905 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5906 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5907 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5908 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5909 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5910 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5911 (i386_emit_call, i386_emit_reg, i386_emit_pop)
5912 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5913 (i386_emit_stack_adjust, i386_emit_int_call_1)
5914 (i386_emit_void_call_2): New.
5915 (i386_emit_ops): New.
5916 (x86_emit_ops): New.
5917 (the_low_target): Install x86_emit_ops.
5918 * server.h (struct emit_ops): New.
5919 (get_raw_reg_func_addr): Declare.
5920 (current_insn_ptr, emit_error): Declare.
5921 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5922 (set_trace_state_variable_value): New defines.
5923 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5924 addr_get_trace_state_variable_value and
5925 addr_set_trace_state_variable_value.
5926 (symbol_list): New fields for get_raw_reg,
5927 get_trace_state_variable_value and set_trace_state_variable_value.
5928 (condfn): New typedef.
5929 (struct tracepoint): New field `compiled_cond'.
5930 (do_action_at_tracepoint): Clear compiled_cond.
5931 (get_trace_state_variable_value, set_trace_state_variable_value):
5932 Export in the IPA.
5933 (condition_true_at_tracepoint): If there's a compiled condition,
5934 run that.
5935 (current_insn_ptr, emit_error): New globals.
5936 (struct bytecode_address): New.
5937 (get_raw_reg_func_addr): New.
5938 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5939 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5940 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5941 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5942 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5943 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5944 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5945 (compile_tracepoint_condition, compile_bytecodes): New.
5946 * target.h (emit_ops): Forward declare.
5947 (struct target_ops): New field emit_ops.
5948 (target_emit_ops): New.
5949 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5950 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5951 * linux-low.c (linux_emit_ops): New.
5952 (linux_target_ops): Install it.
5953 * linux-low.h (struct linux_target_ops): New field emit_ops.
5954
92b72907
UW
59552010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
5956
5957 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5958 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5959
fa593d66
PA
59602010-06-01 Pedro Alves <pedro@codesourcery.com>
5961 Stan Shebs <stan@codesourcery.com>
5962
5963 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5964 (all): Depend on $(extra_libraries).
5965 (install-only): Install the IPA.
5966 (IPA_OBJS, IPA_LIB): New.
5967 (clean): Remove the IPA lib.
5968 (IPAGENT_CFLAGS): New.
5969 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5970 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5971 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5972 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5973 * configure.ac: Check for atomic builtins support in the compiler.
5974 (IPA_DEPFILES, extra_libraries): Define.
5975 * configure.srv (ipa_obj): Add description.
5976 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5977 (i[34567]86-*-linux*): Set ipa_obj.
5978 (x86_64-*-linux*): Set ipa_obj.
5979 * linux-low.c (stabilizing_threads): New.
5980 (supports_fast_tracepoints): New.
5981 (linux_detach): Stabilize threads before detaching.
5982 (handle_tracepoints): Handle internal tracing breakpoints. Assert
5983 the lwp is either not stabilizing, or is moving out of a jump pad.
5984 (linux_fast_tracepoint_collecting): New.
5985 (maybe_move_out_of_jump_pad): New.
5986 (enqueue_one_deferred_signal): New.
5987 (dequeue_one_deferred_signal): New.
5988 (linux_wait_for_event_1): If moving out of a jump pad, defer
5989 pending signals to later.
5990 (linux_stabilize_threads): New.
5991 (linux_wait_1): Check if threads need moving out of jump pads, and
5992 do it if so.
5993 (stuck_in_jump_pad_callback): New.
5994 (move_out_of_jump_pad_callback): New.
5995 (lwp_running): New.
5996 (linux_resume_one_lwp): Handle moving out of jump pads.
5997 (linux_set_resume_request): Dequeue deferred signals.
5998 (need_step_over_p): Also step over fast tracepoint jumps.
5999 (start_step_over): Also uninsert fast tracepoint jumps.
6000 (finish_step_over): Also reinsert fast tracepoint jumps.
6001 (linux_install_fast_tracepoint_jump): New.
6002 (linux_target_ops): Install linux_stabilize_threads and
6003 linux_install_fast_tracepoint_jump_pad.
6004 * linux-low.h (linux_target_ops) <get_thread_area,
6005 install_fast_tracepoint_jump_pad>: New fields.
6006 (struct lwp_info) <collecting_fast_tracepoint,
6007 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6008 (linux_get_thread_area): Declare.
6009 * linux-x86-low.c (jump_insn): New.
6010 (x86_get_thread_area): New.
6011 (append_insns): New.
6012 (push_opcode): New.
6013 (amd64_install_fast_tracepoint_jump_pad): New.
6014 (i386_install_fast_tracepoint_jump_pad): New.
6015 (x86_install_fast_tracepoint_jump_pad): New.
6016 (the_low_target): Install x86_get_thread_area and
6017 x86_install_fast_tracepoint_jump_pad.
6018 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6019 (struct fast_tracepoint_jump): New.
6020 (fast_tracepoint_jump_insn): New.
6021 (fast_tracepoint_jump_shadow): New.
6022 (find_fast_tracepoint_jump_at): New.
6023 (fast_tracepoint_jump_here): New.
6024 (delete_fast_tracepoint_jump): New.
6025 (set_fast_tracepoint_jump): New.
6026 (uninsert_fast_tracepoint_jumps_at): New.
6027 (reinsert_fast_tracepoint_jumps_at): New.
6028 (set_breakpoint_at): Use write_inferior_memory.
6029 (uninsert_raw_breakpoint): Use write_inferior_memory.
6030 (check_mem_read): Mask out fast tracepoint jumps.
6031 (check_mem_write): Mask out fast tracepoint jumps.
6032 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6033 (set_fast_tracepoint_jump): Declare.
6034 (delete_fast_tracepoint_jump)
6035 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6036 (reinsert_fast_tracepoint_jumps_at): Declare.
6037 * regcache.c: Don't compile many functions when building the
6038 in-process agent library.
6039 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6040 the register buffer in the heap.
6041 (free_register_cache): If the register buffer isn't owned by the
6042 regcache, don't free it.
6043 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6044 pre-existing register caches.
6045 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6046 type.
6047 (convert_ascii_to_int): : Constify `from' parameter type.
6048 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6049 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6050 the needed buffer in-place.
6051 (relocate_instruction): New.
6052 * server.c (handle_query) <qSymbols>: If the target supports
6053 tracepoints, give it a chance of looking up symbols. Report
6054 support for fast tracepoints.
6055 (handle_status): Stabilize threads.
6056 (process_serial_event): Adjust.
6057 * server.h (struct fast_tracepoint_jump): Forward declare.
6058 (struct process_info) <fast_tracepoint_jumps>: New field.
6059 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6060 (decode_X_packet, decode_M_packet): Adjust.
6061 (relocate_instruction): Declare.
6062 (in_process_agent_loaded): Declare.
6063 (tracepoint_look_up_symbols): Declare.
6064 (struct fast_tpoint_collect_status): Declare.
6065 (fast_tracepoint_collecting): Declare.
6066 (force_unlock_trace_buffer): Declare.
6067 (handle_tracepoint_bkpts): Declare.
6068 (initialize_low_tracepoint)
6069 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6070 * target.h (struct target_ops) <stabilize_threads,
6071 install_fast_tracepoint_jump_pad>: New fields.
6072 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6073 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6074 [HAVE_STDINT_H]: Include stdint.h.
6075 (trace_debug_1): Rename to ...
6076 (trace_vdebug): ... this.
6077 (trace_debug): Rename to ...
6078 (trace_debug_1): ... this. Add `level' parameter.
6079 (trace_debug): New.
6080 (ATTR_USED, ATTR_NOINLINE): New.
6081 (IP_AGENT_EXPORT): New.
6082 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6083 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6084 (about_to_request_buffer_space, trace_buffer_is_full)
6085 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6086 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6087 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6088 (traceframe_write_count, traceframes_created)
6089 (trace_state_variables)
6090 New renaming defines.
6091 (struct ipa_sym_addresses): New.
6092 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6093 (symbol_list): New.
6094 (ipa_sym_addrs): New.
6095 (all_tracepoint_symbols_looked_up): New.
6096 (in_process_agent_loaded): New.
6097 (write_e_ipa_not_loaded): New.
6098 (maybe_write_ipa_not_loaded): New.
6099 (tracepoint_look_up_symbols): New.
6100 (debug_threads) [IN_PROCESS_AGENT]: New.
6101 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6102 (UNKNOWN_SIDE_EFFECTS): New.
6103 (stop_tracing): New.
6104 (flush_trace_buffer): New.
6105 (stop_tracing_bkpt): New.
6106 (flush_trace_buffer_bkpt): New.
6107 (read_inferior_integer): New.
6108 (read_inferior_uinteger): New.
6109 (read_inferior_data_pointer): New.
6110 (write_inferior_data_pointer): New.
6111 (write_inferior_integer): New.
6112 (write_inferior_uinteger): New.
6113 (struct collect_static_trace_data_action): Delete.
6114 (enum tracepoint_type): New.
6115 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6116 <actions_str, step_actions, step_actions_str>: Only include in
6117 GDBserver.
fa593d66
PA
6118 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6119 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6120 (tracepoints): Use IP_AGENT_EXPORT.
6121 (last_tracepoint): Don't include in the IPA.
6122 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6123 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6124 (alloced_trace_state_variables): New.
6125 (trace_state_variables): Use IP_AGENT_EXPORT.
6126 (traceframe_t): Delete unused variable.
6127 (circular_trace_buffer): Don't include in the IPA.
6128 (trace_buffer_start): Delete.
6129 (struct trace_buffer_control): New.
6130 (trace_buffer_free): Delete.
6131 (struct ipa_trace_buffer_control): New.
6132 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6133 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6134 New.
6135 (trace_buffer_ctrl): New.
6136 (TRACE_BUFFER_CTRL_CURR): New.
6137 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6138 Reimplement as macros.
6139 (trace_buffer_wrap): Delete.
6140 (traceframe_write_count, traceframe_read_count)
6141 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6142 (struct tracepoint_hit_ctx) <type>: New field.
6143 (struct fast_tracepoint_ctx): New.
6144 (memory_barrier): New.
6145 (cmpxchg): New.
6146 (record_tracepoint_error): Update atomically in the IPA.
6147 (clear_inferior_trace_buffer): New.
6148 (about_to_request_buffer_space): New.
6149 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6150 updating the same buffer.
6151 (add_tracepoint): Default the tracepoint's type to trap
6152 tracepoint, and orig_size to -1.
6153 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6154 internal variables.
6155 (create_trace_state_variable): New parameter `gdb'. Handle it.
6156 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6157 (cmd_qtdp): Handle fast tracepoints.
6158 (cmd_qtdv): Adjust.
6159 (max_jump_pad_size): New.
6160 (gdb_jump_pad_head): New.
6161 (get_jump_space_head): New.
6162 (claim_jump_space): New.
6163 (sort_tracepoints): New.
6164 (MAX_JUMP_SIZE): New.
6165 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6166 IPA.
6167 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6168 support. Upload fast traceframes, and delete internal IPA
6169 breakpoints.
6170 (stop_tracing_handler): New.
6171 (flush_trace_buffer_handler): New.
6172 (cmd_qtstop): Upload fast tracepoints.
6173 (response_tracepoint): Handle fast tracepoints.
6174 (tracepoint_finished_step): Upload fast traceframes. Set the
6175 tracepoint hit context's tracepoint type.
6176 (handle_tracepoint_bkpts): New.
6177 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6178 type. Add comment about fast tracepoints.
6179 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6180 non-existing action_str field.
6181 (get_context_regcache): Handle fast tracepoints.
6182 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6183 to the regcache.
6184 (fast_tracepoint_from_jump_pad_address): New.
6185 (fast_tracepoint_from_ipa_tpoint_address): New.
6186 (collecting_t): New.
6187 (force_unlock_trace_buffer): New.
6188 (fast_tracepoint_collecting): New.
6189 (collecting): New.
6190 (gdb_collect): New.
6191 (write_inferior_data_ptr): New.
6192 (target_tp_heap): New.
6193 (target_malloc): New.
6194 (download_agent_expr): New.
6195 (UALIGN): New.
6196 (download_tracepoints): New.
6197 (download_trace_state_variables): New.
6198 (upload_fast_traceframes): New.
6199 (IPA_FIRST_TRACEFRAME): New.
6200 (IPA_NEXT_TRACEFRAME_1): New.
6201 (IPA_NEXT_TRACEFRAME): New.
6202 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6203 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6204 (gdb_jump_pad_buffer_end): New.
6205 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6206 (initialize_tracepoint): Adjust.
6207 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6208 buffer. Initialize the low module.
6209 * utils.c (PREFIX, TOOLNAME): New.
6210 (malloc_failure): Use PREFIX.
6211 (error): In the IPA, an error causes an exit.
6212 (fatal, warning): Use PREFIX.
6213 (internal_error): Use TOOLNAME.
6214 (NUMCELLS): Increase to 10.
6215 * configure, config.in: Regenerate.
6216
d149dd1d
PA
62172010-06-01 Pedro Alves <pedro@codesourcery.com>
6218
6219 * server.c (handle_query) <qSupported>: Do two passes over the
6220 qSupported string to avoid nesting strtok.
6221
f6528abd
JK
62222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6223
6224 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6225 (CDEPS): New.
6226 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6227 -Wl,--dynamic-list.
6228 * configure: Regenerate.
6229 * proc-service.list: New.
6230
ca2a87a0
JK
62312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6232
6233 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6234 New comment.
6235
363a6e9f
OS
62362010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6237
6238 * gdbreplay.c (remote_open): Check error return from socket() call by
6239 its equality to -1 not by it being negative.
6240 * remote-utils.c (remote_open): Likewise.
6241
d23b6cb1
PA
62422010-05-23 Pedro Alves <pedro@codesourcery.com>
6243
6244 * config.h: Regenerate.
6245
28d3cf85
MK
62462010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6247
6248 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6249 doesn't provide PTRACE_GET_THREAD_AREA.
6250
fea36a59
MK
62512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6252
6253 * linux-m68k-low.c: Include <asm/ptrace.h>
6254 (ps_get_thread_area): Implement.
6255
24b066ba
DE
62562010-05-03 Doug Evans <dje@google.com>
6257
6258 * event-loop.c (struct callback_event): New struct.
6259 (callback_list): New global.
6260 (append_callback_event, delete_callback_event): New functions.
6261 (process_callback): New function.
6262 (start_event_loop): Call it.
6263 * remote-utils.c (NOT_SCHEDULED): Define.
6264 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6265 moved out of readchar.
6266 (readchar): Rewrite. Call reschedule before returning.
6267 (reset_readchar): New function.
6268 (remote_close): Call it.
6269 (process_remaining, reschedule): New functions.
6270 * server.h (callback_handler_func): New typedef.
6271 (append_callback_event, delete_callback_event): Declare.
6272
9836d6ea
PA
62732010-05-03 Pedro Alves <pedro@codesourcery.com>
6274
6275 * proc-service.c (ps_pglobal_lookup): Use
6276 thread_db_look_up_one_symbol.
6277 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6278 parameter. Use it instead of all_symbols_looked_up.
6279 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6280 field.
6281 (all_symbols_looked_up): Don't declare.
6282 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6283 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6284 field.
6285 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6286 Set all_symbols_looked_up here.
6287 (thread_db_look_up_one_symbol): New.
6288 (thread_db_get_tls_address): Adjust.
6289 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6290 thread_db object on the heap, and tentatively set it in the
6291 process structure.
6292 (thread_db_init): Don't set all_symbols_looked_up here.
6293 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6294
7984d532
PA
62952010-05-03 Pedro Alves <pedro@codesourcery.com>
6296
6297 * linux-low.c (linux_kill, linux_detach): Adjust.
6298 (status_pending_p_callback): Remove redundant statement. Check
6299 for !TARGET_WAITIKIND_IGNORE, instead of
6300 TARGET_WAITKIND_STOPPED.
6301 (handle_tracepoints): Make sure LWP is locked. Adjust.
6302 (linux_wait_for_event_1): Adjust.
6303 (linux_cancel_breakpoints): New.
6304 (unsuspend_one_lwp): New.
6305 (unsuspend_all_lwps): New.
6306 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6307 (send_sigstop_callback): Change return type to int, add new
6308 `except' parameter and handle it.
6309 (suspend_and_send_sigstop_callback): New.
6310 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6311 pass them down. If SUSPEND, also increment the lwp's suspend
6312 count.
6313 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6314 (need_step_over_p): Don't consider suspended LWPs.
6315 (start_step_over): Adjust.
6316 (proceed_one_lwp): Change return type to int, add new `except'
6317 parameter and handle it.
6318 (unsuspend_and_proceed_one_lwp): New.
6319 (proceed_all_lwps): Use find_inferior instead of
6320 for_each_inferior.
6321 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6322 also decrement the suspend count of LWPs. Pass `except' down,
6323 instead of hacking its suspend count.
6324 (linux_pause_all): Add `freeze' parameter. Adjust.
6325 (linux_unpause_all): New.
6326 (linux_target_ops): Install linux_unpause_all.
6327 * server.c (handle_status): Adjust.
6328 * target.h (struct target_ops): New fields `unpause_all' and
6329 `cancel_breakpoints'. Add new parameter to `pause_all'.
6330 (pause_all): Add new `freeze' parameter.
6331 (unpause_all): New.
6332 (cancel_breakpoints): New.
6333 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6334 cancel breakpoints.
6335 (cmd_qtstart): Pause threads.
6336 (stop_tracing): Pause threads, and cancel breakpoints.
6337 * win32-low.c (win32_target_ops): Adjust.
6338
e471f25b
PA
63392010-05-03 Pedro Alves <pedro@codesourcery.com>
6340
6341 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6342 the inferior right away from here...
6343 (linux_wait_1): ... to here, and adjust to check the thread's
6344 last_resume_kind instead of the lwp's step or stop_expected flags.
6345
1915ef4f
PA
63462010-05-02 Pedro Alves <pedro@codesourcery.com>
6347
6348 * README: Use consistent `GDB' and `GDBserver' spellings.
6349
f9e39928
PA
63502010-05-02 Pedro Alves <pedro@codesourcery.com>
6351
6352 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6353 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6354 (linux_detach_one_lwp): Assume the lwp is stopped.
6355 (any_thread_of): Delete.
6356 (linux_detach): Stop all lwps here. Don't blindly delete all
6357 breakpoints.
6358 (delete_lwp_callback): New.
6359 (linux_mourn): Delete all lwps of the process that is gone.
6360 (linux_wait_1): Don't delete the last lwp of the process here.
6361 * mem-break.h (mark_breakpoints_out): Declare.
6362 * mem-break.c (mark_breakpoints_out): New.
6363 (free_all_breakpoints): Use it.
6364 * server.c (handle_target_event): If the process is gone, mark
6365 breakpoints out.
6366 * thread-db.c (struct thread_db) <create_bp>: New field.
6367 (thread_db_enable_reporting): Fix prototype. Store a thread event
6368 breakpoint reference in the thread_db struct.
6369 (thread_db_load_search): Clear the thread_db object.
6370 (try_thread_db_load_1): Ditto.
6371 (switch_to_process): New.
6372 (disable_thread_event_reporting): Use it.
6373 (remove_thread_event_breakpoints): New.
6374 (thread_db_detach, thread_db_mourn): Use it.
6375
1e7fc18c
PA
63762010-05-01 Pedro Alves <pedro@codesourcery.com>
6377
6378 * linux-low.c (linux_enable_event_reporting): New.
6379 (linux_wait_for_event_1, handle_extended_wait): Use it.
6380
02fc4de7
PA
63812010-04-30 Pedro Alves <pedro@codesourcery.com>
6382
6383 * linux-low.c (linux_kill_one_lwp, linux_kill)
6384 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6385 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6386 SIGSTOP even if the LWP is stopped.
6387 (send_sigstop_callback): New.
6388 (stop_all_lwps): Use send_sigstop_callback instead.
6389 (linux_resume_one_thread): Adjust.
6390 (proceed_one_lwp): Still proceed an LWP that the client has
6391 requested to stop, if we haven't reported it as stopped yet. Make
6392 sure that LWPs the client want stopped, have a pending SIGSTOP.
6393
bc3b5632
DE
63942010-04-26 Doug Evans <dje@google.com>
6395
ae1ada35
DE
6396 * server.c (handle_general_set): Make static.
6397
bc3b5632
DE
6398 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6399 Print received char after testing for error/eof instead of before.
6400 (input_interrupt): Tweak comment.
6401
65730243
DE
64022010-04-23 Doug Evans <dje@google.com>
6403
6404 * server.c (start_inferior): Print inferior argv if --debug.
6405
a8ae7dc0
AR
64062010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6407
6408 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6409 * nto-x86-low.c: Include server.h
6410
1c07cc19
PM
64112010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6412
6413 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6414 be consistent with other sources of this directory.
6415 (init_registers_amd64): Correct name of source file of this function
6416 in the comment.
6417
e0a61e09
PM
64182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6419
6420 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6421 64-bit executables.
6422
54709339
PM
64232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6424
6425 * win32-i386-low.c: Add 64-bit support.
6426 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6427 (init_registers_amd64): Declare.
6428 (mappings): Add 64-bit version of array.
6429 (init_windows_x86): New function.
6430 (the_low_target): Change init_arch field to init_windows_x86.
6431
e8f0053d
PM
64322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6433
6434 * win32-low.c: Adapt to support also 64-bit architecture.
6435 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6436 (get_image_name): Use SIZE_T type for local variable `done'.
6437 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6438 (toolhelp_get_dll_name): Idem.
6439 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6440 Use uintptr_t typecast to avoid warning.
6441 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6442 (handle_exception): Use phex_nz to avoid warning.
6443 (win32_wait): Remove unused local variable `process'.
6444
c481e77e
PM
64452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6446
6447 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6448 `amd64-avx.o'.
6449
12ea4b69
PM
64502010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6451
6452 * configure.ac: Use `ws2_32' library for srv_mingw.
6453 * configure: Regenerate.
6454 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6455 * remote-utils.c: Likewise.
6456
f6d1620c
L
64572010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6458
6459 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6460 if __x86_64__ is defined.
6461
8e642873
PM
64622010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6463
6464 * configure: Regenerate.
6465
711e434b
PM
64662010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6467
6468 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6469 * target.h (target_ops): New get_tib_address field.
6470 * win32-low.h (win32_thread_info): Add thread_local_base field.
6471 * win32-low.c (child_add_thread): Add tlb argument.
6472 Set thread_local_base field to TLB.
6473 (get_child_debug_event): Adapt to child_add_thread change.
6474 (win32_get_tib_address): New function.
6475 (win32_target_ops): Set get_tib_address field to
6476 win32_get_tib_address.
6477 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6478
505106cd
PA
64792010-04-12 Pedro Alves <pedro@codesourcery.com>
6480
505106cd
PA
6481 * linux-low.c (linux_mourn): Also remove the process.
6482 * server.c (handle_target_event): Don't remove the process here.
6483 * nto-low.c (nto_mourn): New.
6484 (nto_target_ops): Install it.
6485 * spu-low.c (spu_mourn): New.
6486 (spu_target_ops): Install it.
6487 * win32-low.c (win32_mourn): New.
6488 (win32_target_ops): Install it.
6489
e8470a06
PA
64902010-04-12 Pedro Alves <pedro@codesourcery.com>
6491
6492 * server.h (buffer_xml_printf): Remove redundant `;'.
6493
45ba0d02
PA
64942010-04-12 Pedro Alves <pedro@codesourcery.com>
6495
6496 * regcache.c (set_register_cache): Invalidate regcaches before
6497 changing the register cache layout.
6498 (regcache_invalidate_one): Allow a NULL regcache.
6499 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6500 regcaches before changing the register cache layout or the target
6501 regsets.
6502
59e04013
L
65032010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6504
6505 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6506 variable warning on Linux/x86-64.
6507
8336d594
PA
65082010-04-11 Pedro Alves <pedro@codesourcery.com>
6509
6510 GDBserver disconnected tracing support.
6511
6512 * linux-low.c (linux_remove_process): Delete.
6513 (add_lwp): Don't set last_resume_kind here.
6514 (linux_kill): Use `mourn'.
6515 (linux_detach): Use `thread_db_detach', and `mourn'.
6516 (linux_mourn): New.
6517 (linux_attach_lwp_1): Adjust comment.
6518 (linux_attach): last_resume_kind moved the thread_info; adjust.
6519 (status_pending_p_callback): Adjust.
6520 (linux_wait_for_event_1): Adjust.
6521 (count_events_callback, select_singlestep_lwp_callback)
6522 (select_event_lwp_callback, cancel_breakpoints_callback)
6523 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6524 (proceed_one_lwp): Adjust.
6525 (linux_async): Add debug output.
6526 (linux_thread_stopped): New.
6527 (linux_pause_all): New.
6528 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6529 linux_pause_all.
6530 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6531 (thread_db_free): Delete declaration.
6532 (thread_db_detach, thread_db_mourn): Declare.
6533 * thread-db.c (thread_db_init): Use thread_db_mourn.
6534 (thread_db_free): Delete, split in two.
6535 (disable_thread_event_reporting): New.
6536 (thread_db_detach): New.
6537 (thread_db_mourn): New.
6538
6539 * server.h (struct thread_info) <last_resume_kind>: New field.
6540 <attached>: Add comment.
6541 <gdb_detached>: New field.
6542 (handler_func): Change return type to int.
6543 (handle_serial_event, handle_target_event): Ditto.
6544 (gdb_connected): Declare.
6545 (tracing): Delete.
6546 (disconnected_tracing): Declare.
6547 (stop_tracing): Declare.
6548
6549 * server.c (handle_query) <qSupported>: Report support for
6550 disconnected tracing.
6551 (queue_stop_reply_callback): Account for running threads.
6552 (gdb_wants_thread_stopped): New.
6553 (gdb_wants_all_threads_stopped): New.
6554 (gdb_reattached_process): New.
6555 (handle_status): Clear the `gdb_detached' flag of all processes.
6556 In all-stop, stop all threads.
6557 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6558 (process_serial_event): If the remote connection breaks, or if an
6559 exit was forced with "monitor exit", force an event loop exit.
6560 Handle disconnected tracing on detach.
6561 (handle_serial_event): Adjust.
6562 (handle_target_event): If GDB isn't connected, forward events back
6563 to the inferior, unless the last process exited, in which case,
6564 exit gdbserver. Adjust interface.
6565
6566 * remote-utils.c (remote_open): Don't block in accept. Instead
6567 register an event loop source on the listen socket file
6568 descriptor. Refactor bits into ...
6569 (listen_desc): ... this new global.
6570 (gdb_connected): ... this new function.
6571 (enable_async_notification): ... this new function.
6572 (handle_accept_event): ... this new function.
6573 (remote_close): Clear remote_desc.
6574
6575 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6576
6577 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6578 New fields.
6579 (mourn_inferior): Define.
6580 (target_process_qsupported): Avoid the dangling else problem.
6581 (thread_stopped): Define.
6582 (pause_all): Define.
6583 (target_waitstatus_to_string): Declare.
6584 * target.c (target_waitstatus_to_string): New.
6585
6586 * tracepoint.c (tracing): Make extern.
6587 (disconnected_tracing): New.
6588 (stop_tracing): Make extern. Handle tracing stops due to GDB
6589 disconnecting.
6590 (cmd_qtdisconnected): New.
6591 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6592 (handle_tracepoint_general_set): Handle QTDisconnected.
6593
6594 * event-loop.c (event_handler_func): Change return type to int.
6595 (process_event): Bail out if the event handler wants the event
6596 loop to stop.
6597 (handle_file_event): Ditto.
6598 (start_event_loop): Bail out if the event handler wants the event
6599 loop to stop.
6600
6601 * nto-low.c (nto_target_ops): Adjust.
6602 * spu-low.c (spu_wait): Don't remove the process here.
6603 (spu_target_ops): Adjust.
6604 * win32-low.c (win32_wait): Don't remove the process here.
6605 (win32_target_ops): Adjust.
6606
5d267c4c
PA
66072010-04-11 Pedro Alves <pedro@codesourcery.com>
6608
6609 * regcache.c (realloc_register_cache): Invalidate inferior's
6610 regcache before recreating it.
6611
623ccd72
PA
66122010-04-09 Pedro Alves <pedro@codesourcery.com>
6613
6614 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6615
219f2f23
PA
66162010-04-09 Stan Shebs <stan@codesourcery.com>
6617 Pedro Alves <pedro@codesourcery.com>
6618
6619 * server.h (LONGEST): New.
6620 (struct thread_info) <while_stepping>: New field.
6621 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6622 Declare.
6623 (initialize_tracepoint, handle_tracepoint_general_set)
6624 (handle_tracepoint_query, tracepoint_finished_step)
6625 (tracepoint_was_hit, release_while_stepping_state_list):
6626 (current_traceframe): Declare.
6627 * server.c (handle_general_set): Handle tracepoint packets.
6628 (read_memory): New.
6629 (write_memory): New.
6630 (handle_search_memory_1): Use read_memory.
6631 (handle_query): Report support for conditional tracepoints, trace
6632 state variables, and tracepoint sources. Handle tracepoint
6633 queries.
6634 (main): Initialize the tracepoints module.
6635 (process_serial_event): Handle traceframe reads/writes.
6636
6637 * linux-low.c (handle_tracepoints): New.
6638 (linux_wait_1): Call it.
6639 (linux_resume_one_lwp): Handle while-stepping.
6640 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6641 (linux_target_ops): Install them.
6642 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6643 New field.
6644 * linux-x86-low.c (x86_supports_tracepoints): New.
6645 (the_low_target). Install it.
6646
6647 * mem-break.h (delete_breakpoint): Declare.
6648 * mem-break.c (delete_breakpoint): Make external.
6649
6650 * target.h (struct target_ops): Add `supports_tracepoints',
6651 `read_pc', and `write_pc' fields.
6652 (target_supports_tracepoints): Define.
6653 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6654 (phex_nz): New.
6655
6656 * regcache.h (struct regcache) <registers_owned>: New field.
6657 (init_register_cache, regcache_cpy): Declare.
6658 (regcache_read_pc, regcache_write_pc): Declare.
6659 (register_cache_size): Declare.
6660 (supply_regblock): Declare.
6661 * regcache.c (init_register_cache): New.
6662 (new_register_cache): Use it.
6663 (regcache_cpy): New.
6664 (register_cache_size): New.
6665 (supply_regblock): New.
6666 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6667
219f2f23
PA
6668 * tracepoint.c: New.
6669
6670 * Makefile.in (OBS): Add tracepoint.o.
6671 (tracepoint.o): New rule.
6672
3a13a53b
L
66732010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6674
6675 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6676 (i386-mmx.o): New.
6677 (i386-mmx.c): Likewise.
6678 (i386-mmx-linux.o): Likewise.
6679 (i386-mmx-linux.c): Likewise.
6680
6681 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6682 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6683 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6684 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6685
6686 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6687 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6688 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6689
1570b33e
L
66902010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6691
6692 * Makefile.in (clean): Updated.
6693 (i386-avx.o): New.
6694 (i386-avx.c): Likewise.
6695 (i386-avx-linux.o): Likewise.
6696 (i386-avx-linux.c): Likewise.
6697 (amd64-avx.o): Likewise.
6698 (amd64-avx.c): Likewise.
6699 (amd64-avx-linux.o): Likewise.
6700 (amd64-avx-linux.c): Likewise.
6701
6702 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6703 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6704 (srv_amd64_regobj): Add amd64-avx.o.
6705 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6706 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6707 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6708 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6709 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6710 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6711 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6712
6713 * i387-fp.c: Include "i386-xstate.h".
6714 (i387_xsave): New.
6715 (i387_cache_to_xsave): Likewise.
6716 (i387_xsave_to_cache): Likewise.
6717 (x86_xcr0): Likewise.
6718
6719 * i387-fp.h (i387_cache_to_xsave): Likewise.
6720 (i387_xsave_to_cache): Likewise.
6721 (x86_xcr0): Likewise.
6722
6723 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6724 * linux-crisv32-low.c (target_regsets): Likewise.
6725 * linux-m68k-low.c (target_regsets): Likewise.
6726 * linux-mips-low.c (target_regsets): Likewise.
6727 * linux-ppc-low.c (target_regsets): Likewise.
6728 * linux-s390-low.c (target_regsets): Likewise.
6729 * linux-sh-low.c (target_regsets): Likewise.
6730 * linux-sparc-low.c (target_regsets): Likewise.
6731 * linux-xtensa-low.c (target_regsets): Likewise.
6732
6733 * linux-low.c: Include <sys/uio.h>.
6734 (regsets_fetch_inferior_registers): Support nt_type.
6735 (regsets_store_inferior_registers): Likewise.
6736 (linux_process_qsupported): New.
6737 (linux_target_ops): Add linux_process_qsupported.
6738
6739 * linux-low.h (regset_info): Add nt_type.
6740 (linux_target_ops): Add process_qsupported.
6741
6742 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6743 and <sys/uio.h>.
6744 (init_registers_i386_avx_linux): New.
6745 (init_registers_amd64_avx_linux): Likewise.
6746 (xmltarget_i386_linux_no_xml): Likewise.
6747 (xmltarget_amd64_linux_no_xml): Likewise.
6748 (PTRACE_GETREGSET): Likewise.
6749 (PTRACE_SETREGSET): Likewise.
6750 (x86_fill_xstateregset): Likewise.
6751 (x86_store_xstateregset): Likewise.
6752 (use_xml): Likewise.
6753 (x86_linux_update_xmltarget): Likewise.
6754 (x86_linux_process_qsupported): Likewise.
6755 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6756 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6757 init_registers_i386_linux here. Call
6758 x86_linux_update_xmltarget.
6759 (the_low_target): Add x86_linux_process_qsupported.
6760
6761 * server.c (handle_query): Call target_process_qsupported.
6762
6763 * target.h (target_ops): Add process_qsupported.
6764 (target_process_qsupported): New.
6765
fc7238bb
PA
67662010-04-03 Pedro Alves <pedro@codesourcery.com>
6767
6768 * inferiors.c (add_thread): Set last_status kind to
6769 TARGET_WAITKIND_IGNORE.
6770 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6771 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6772 (linux_wait_1): Move `thread' local definition to block that uses
6773 it. Don't NULL initialize `event_child'.
6774 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6775 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6776 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6777
bdabb078
PA
67782010-04-01 Pedro Alves <pedro@codesourcery.com>
6779
6780 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6781 an extended waitstatus, or by a watchpoint.
6782 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6783 thread was stepping or has been stopped by a watchpoint.
6784
d3bbe7a0
PA
67852010-04-01 Pedro Alves <pedro@codesourcery.com>
6786
6787 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6788 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6789 of another, then delete the previous, and validate all
6790 breakpoints.
6791 (validate_inserted_breakpoint): New.
6792 (delete_disabled_breakpoints): New.
6793 (validate_breakpoints): New.
6794 (check_mem_read): Validate breakpoints before trusting their
6795 shadow. Delete disabled breakpoints.
6796 (check_mem_write): Validate breakpoints before trusting they
6797 should be inserted. Delete disabled breakpoints.
6798 * mem-break.h (validate_breakpoints):
6799 * server.c (handle_query): Validate breakpoints when we see a
6800 qSymbol query.
6801
8b07ae33
PA
68022010-04-01 Pedro Alves <pedro@codesourcery.com>
6803
6804 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6805 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6806 if we could tell there's a GDB breakpoint at stop_pc.
6807 (need_step_over_p): Don't do a step over if we find a GDB
6808 breakpoint at the resume PC.
6809
6810 * mem-break.c (struct raw_breakpoint): New.
6811 (enum bkpt_type): New type `gdb_breakpoint'.
6812 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6813 fields. New field `raw'.
6814 (find_raw_breakpoint_at): New.
6815 (set_raw_breakpoint_at): Handle refcounting. Create a raw
6816 breakpoint instead.
6817 (set_breakpoint_at): Adjust.
6818 (delete_raw_breakpoint): New.
6819 (release_breakpoint): New.
6820 (delete_breakpoint): Rename to...
6821 (delete_breakpoint_1): ... this. Add proc parameter. Use
6822 release_breakpoint. Return ENOENT.
6823 (delete_breakpoint): Reimplement.
6824 (find_breakpoint_at): Delete.
6825 (find_gdb_breakpoint_at): New.
6826 (delete_breakpoint_at): Delete.
6827 (set_gdb_breakpoint_at): New.
6828 (delete_gdb_breakpoint_at): New.
6829 (gdb_breakpoint_here): New.
6830 (set_reinsert_breakpoint): Use release_breakpoint.
6831 (uninsert_breakpoint): Rename to ...
6832 (uninsert_raw_breakpoint): ... this.
6833 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6834 (reinsert_raw_breakpoint): Change parameter type to
6835 raw_breakpoint.
6836 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6837 instead.
6838 (check_breakpoints): Adjust. Use release_breakpoint.
6839 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6840 (breakpoint_inserted_here): Ditto.
6841 (check_mem_read): Adjust to iterate over raw breakpoints instead.
6842 Don't trust the breakpoint's shadow if it is not inserted.
6843 (check_mem_write): Adjust to iterate over raw breakpoints instead.
6844 (delete_all_breakpoints): Adjust.
6845 (free_all_breakpoints): Mark all breakpoints as uninserted, and
6846 use delete_breakpoint_1.
6847
6848 * mem-break.h (breakpoints_supported): Delete declaration.
6849 (set_gdb_breakpoint_at): Declare.
6850 (gdb_breakpoint_here): Declare.
6851 (delete_breakpoint_at): Delete.
6852 (delete_gdb_breakpoint_at): Declare.
6853
6854 * server.h (struct raw_breakpoint): Forward declare.
6855 (struct process_info): New field `raw_breakpoints'.
6856
6857 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6858 breakpoints.
6859
6bf5e0ba
PA
68602010-03-24 Pedro Alves <pedro@codesourcery.com>
6861
6862 * linux-low.c (status_pending_p_callback): Fix comment.
6863 (linux_wait_for_event_1): Move most of the internal breakpoint
6864 handling from here...
6865 (linux_wait_1): ... to here.
6866 (count_events_callback): New.
6867 (select_singlestep_lwp_callback): New.
6868 (select_event_lwp_callback): New.
6869 (cancel_breakpoints_callback): New.
6870 (select_event_lwp): New.
6871 (linux_wait_1): Simplify internal breakpoint handling. Give equal
6872 priority to all LWPs that have had events that should be reported
6873 to the client. Cancel breakpoints when about to reporting the
6874 event to the client, not while stopping lwps. No longer cancel
6875 finished single-steps here.
6876 (cancel_finished_single_step): Delete.
6877 (cancel_finished_single_steps): Delete.
6878
414a389f
PA
68792010-03-24 Pedro Alves <pedro@codesourcery.com>
6880
6881 * mem-break.c (enum bkpt_type): New.
6882 (struct breakpoint): New field `type'.
6883 (set_breakpoint_at): Change return type to struct breakpoint
6884 pointer. Set type to `other_breakpoint' by default.
6885 (delete_breakpoint): Rewrite, supporting more than one breakpoint
6886 in the breakpoint list.
6887 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6888 (reinsert_breakpoint): Rename to ...
6889 (reinsert_raw_breakpoint): ... this.
6890 (reinsert_breakpoints_at): Adjust.
6891 * mem-break.h (struct breakpoint): Declare.
6892 (set_breakpoint_at): Change return type to struct breakpoint
6893 pointer.
6894
2280c721
PA
68952010-03-24 Pedro Alves <pedro@codesourcery.com>
6896
6897 * server.c (handle_query): Assign, not compare.
6898
d50171e4
PA
68992010-03-24 Pedro Alves <pedro@codesourcery.com>
6900
6901 Teach linux gdbserver to step-over-breakpoints.
6902
6903 * linux-low.c (can_hardware_single_step): New.
6904 (supports_breakpoints): New.
6905 (handle_extended_wait): If stopping threads, read the stop pc of
6906 the new cloned LWP.
6907 (get_pc): New.
6908 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
6909 low target doesn't support retrieving the PC.
6910 (add_lwp): Set last_resume_kind to resume_continue.
6911 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
6912 (linux_attach): Don't clear stop_expected. Set the lwp's
6913 last_resume_kind to resume_stop.
6914 (linux_detach_one_lwp): Don't check for removed breakpoints.
6915 (check_removed_breakpoint): Delete.
6916 (status_pending_p): Rename to ...
6917 (status_pending_p_callback): ... this. Don't check for removed
6918 breakpoints. Don't consider threads that are stopped from GDB's
6919 perspective.
6920 (linux_wait_for_lwp): Always read the stop_pc here.
6921 (cancel_breakpoint): New.
6922 (step_over_bkpt): New global.
6923 (linux_wait_for_event_1): Implement stepping over breakpoints.
6924 (gdb_wants_lwp_stopped): New.
6925 (gdb_wants_all_stopped): New.
6926 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
6927 single-step traps here. Store the thread's last reported target
6928 wait status.
6929 (send_sigstop): Don't clear stop_expected. Always set it,
6930 instead.
6931 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6932 (cancel_finished_single_step): New.
6933 (cancel_finished_single_steps): New.
6934 (wait_for_sigstop): Don't cancel finished single-step traps here.
6935 (linux_resume_one_lwp): Don't check for removed breakpoints.
6936 Don't set `step' on non-hardware step archs.
6937 (linux_set_resume_request): Ignore resume_stop requests if already
6938 stopping or stopped. Set the lwp's last_resume_kind.
6939 (resume_status_pending_p): Don't check for removed breakpoints.
6940 (need_step_over_p): New.
6941 (start_step_over): New.
6942 (finish_step_over): New.
6943 (linux_resume_one_thread): Always queue a sigstop for resume_stop
6944 requests. Clear the thread's last reported target waitstatus.
6945 Don't use the `suspended' flag. Don't consider pending breakpoints.
6946 (linux_resume): Start a step-over if necessary.
6947 (proceed_one_lwp): New.
6948 (proceed_all_lwps): New.
6949 (unstop_all_lwps): New.
6950 * linux-low.h (struct lwp_info): Rewrite comment for the
6951 `suspended' flag. Add the `stop_pc' field. Delete the
6952 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
6953 Add `'last_resume_kind' and `need_step_over' fields.
6954 * inferiors.c (struct thread_info): Delete, moved elsewhere.
6955 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6956 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
6957 (set_raw_breakpoint_at): New.
6958 (set_breakpoint_at): Rewrite to use it.
6959 (reinsert_breakpoint_handler): Delete.
6960 (set_reinsert_breakpoint): New.
6961 (reinsert_breakpoint_by_bp): Delete.
6962 (delete_reinsert_breakpoints): New.
6963 (uninsert_breakpoint): Rewrite.
6964 (uninsert_breakpoints_at): New.
6965 (reinsert_breakpoint): Rewrite.
6966 (reinsert_breakpoints_at): New.
6967 (check_breakpoints): Rewrite.
6968 (breakpoint_here): New.
6969 (breakpoint_inserted_here): New.
6970 (check_mem_read): Adjust.
6971 * mem-break.h (breakpoints_supported, breakpoint_here)
6972 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6973 (reinsert_breakpoint_by_bp): Delete declaration.
6974 (delete_reinsert_breakpoints): Declare.
6975 (reinsert_breakpoint): Delete declaration.
6976 (reinsert_breakpoints_at): Declare.
6977 (uninsert_breakpoint): Delete declaration.
6978 (uninsert_breakpoints_at): Declare.
6979 (check_breakpoints): Adjust prototype.
6980 * server.h: Adjust include order.
6981 (struct thread_info): Declare here. Add a `last_status' field.
6982
30ba68cb
MS
69832010-03-23 Michael Snyder <msnyder@vmware.com>
6984
6985 * server.c (crc32): New function.
6986 (handle_query): Add handling for 'qCRC:' request.
6987
b9a881c2
PA
69882010-03-23 Pedro Alves <pedro@codesourcery.com>
6989
6990 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6991 lwp had been stopped by a watchpoint.
6992
e92d13d5
PA
69932010-03-16 Pedro Alves <pedro@codesourcery.com>
6994
6995 * server.h (internal_error): Declare.
6996 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6997 * utils.c (internal_error): New function.
6998
64daa791
AS
69992010-03-15 Andreas Schwab <schwab@redhat.com>
7000
7001 * configure.srv: Fix typo setting srv_regobj.
7002
f52cd8cd
PA
70032010-03-15 Pedro Alves <pedro@codesourcery.com>
7004
7005 * linux-low.c (fetch_register): Avoid passing a non string literal
7006 format to `error'.
7007 (usr_store_inferior_registers): Ditto.
7008
93ae6fdc
PA
70092010-03-14 Pedro Alves <pedro@codesourcery.com>
7010
7011 * linux-low.c (linux_write_memory): Bail out early if peeking
7012 memory failed.
7013
c3adc08c
PA
70142010-03-14 Pedro Alves <pedro@codesourcery.com>
7015
7016 * linux-low.h (struct lwp_info): New fields
7017 `stopped_by_watchpoint' and `stopped_data_address'.
7018 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7019 here, and cache them in the lwp object.
7020 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7021 directly.
7022 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7023 field.
7024 (linux_stopped_by_watchpoint): Rewrite.
7025 (linux_stopped_data_address): Rewrite.
7026
bce522a2
PA
70272010-03-06 Simo Melenius <simo.melenius@iki.fi>
7028
7029 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7030 switching the current inferior, not before.
7031
90884b2b
L
70322010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7033
7034 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7035 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7036 i386-linux.c and amd64-linux.c.
7037 (reg-i386.o): Removed.
7038 (reg-i386.c): Likewise.
7039 (reg-i386-linux.o): Likewise.
7040 (reg-i386-linux.c): Likewise.
7041 (reg-x86-64.o): Likewise.
7042 (reg-x86-64.c): Likewise.
7043 (reg-x86-64-linux.o): Likewise.
7044 (reg-x86-64-linux.c): Likewise.
7045 (i386.o): New.
7046 (i386.c): Likewise.
7047 (i386-linux.o): Likewise.
7048 (i386-linux.c): Likewise.
7049 (amd64.o): Likewise.
7050 (amd64.c): Likewise.
7051 (amd64-linux.o): Likewise.
7052 (amd64-linux.c): Likewise.
7053
7054 * configure.srv (srv_i386_regobj): New.
7055 (srv_i386_linux_regobj): Likewise.
7056 (srv_amd64_regobj): Likewise.
7057 (srv_amd64_linux_regobj): Likewise.
7058 (srv_i386_32bit_xmlfiles): Likewise.
7059 (srv_i386_64bit_xmlfiles): Likewise.
7060 (srv_i386_xmlfiles): Likewise.
7061 (srv_amd64_xmlfiles): Likewise.
7062 (srv_i386_linux_xmlfiles): Likewise.
7063 (srv_amd64_linux_xmlfiles): Likewise.
7064 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7065 srv_xmlfiles to $srv_i386_xmlfiles.
7066 (i[34567]86-*-mingw32ce*): Likewise.
7067 (i[34567]86-*-mingw*): Likewise.
7068 (i[34567]86-*-nto*): Likewise.
7069 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7070 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7071 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7072 (x86_64-*-linux*): Likewise.
7073
7074 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7075 (init_registers_amd64_linux): New.
7076 (x86_arch_setup): Replace init_registers_x86_64_linux with
7077 init_registers_amd64_linux.
7078
193f13e6
MK
70792010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7080
7081 * configure.ac: Check for libdl. If it is not available link against
7082 static libthread_db.
7083 * configure: Regenerate.
7084
85d721b8
PA
70852010-02-22 Pedro Alves <pedro@codesourcery.com>
7086
7087 PR9605
7088
7089 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7090 handing a read watchpoint.
7091 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7092
6076632b
DE
70932010-02-12 Doug Evans <dje@google.com>
7094
7095 * linux-low.c (linux_supports_tracefork_flag): Document.
7096 (linux_look_up_symbols): Add comment.
7097
3327ccf7
L
70982010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7099
7100 * regcache.c (supply_register): Clear regcache if buf is NULL.
7101
0718675c 71022010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7103 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7104
7105 * inferiors.c (find_inferior): Add function documentation.
7106 (unloaded_dll): Handle the case where the unloaded dll has not
7107 been previously registered in the dll list.
7108
177321bd
DJ
71092010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7110
7111 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7112 (thumb2_breakpoint): New.
7113 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7114
2b009048
DJ
71152010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7116
7117 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7118 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7119 breakpoints.
7120
3be029c7
PA
71212010-01-21 Pedro Alves <pedro@codesourcery.com>
7122
7123 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7124
18f5de3b
JK
71252010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7126
7127 * linux-s390-low.c (s390_collect_ptrace_register)
7128 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7129
3743bb4f
DE
71302010-01-21 Doug Evans <dje@google.com>
7131
14ce3065
DE
7132 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7133 (PTRACE_ARG4_TYPE): New macro.
7134 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7135 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7136 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7137 (usr_store_inferior_registers): Ditto.
7138 (linux_read_memory, linux_write_memory): Ditto.
7139 (linux_test_for_tracefork): Ditto.
7140
3743bb4f
DE
7141 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7142 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7143
8b315be5
PA
71442010-01-21 Pedro Alves <pedro@codesourcery.com>
7145
7146 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7147 target.
7148
85492558
PA
71492010-01-21 Pedro Alves <pedro@codesourcery.com>
7150
7151 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7152 prototype to take a regcache. Adjust.
7153
442ea881
PA
71542010-01-20 Pedro Alves <pedro@codesourcery.com>
7155
7156 * regcache.h (struct thread_info): Forward declare.
7157 (struct regcache): New.
7158 (new_register_cache): Adjust prototype.
7159 (get_thread_regcache): Declare.
7160 (free_register_cache): Adjust prototype.
7161 (registers_to_string, registers_from_string): Ditto.
7162 (supply_register, supply_register_by_name, collect_register)
7163 (collect_register_as_string, collect_register_by_name): Ditto.
7164 * regcache.c (struct inferior_regcache_data): Delete.
7165 (get_regcache): Rename to ...
7166 (get_thread_regcache): ... this. Adjust. Switch inferior before
7167 fetching registers.
7168 (regcache_invalidate_one): Adjust.
7169 (regcache_invalidate): Fix prototype.
7170 (new_register_cache): Return the new register cache.
7171 (free_register_cache): Change prototype.
7172 (realloc_register_cache): Adjust.
7173 (registers_to_string): Change prototype to take a regcache. Adjust.
7174 (registers_from_string): Ditto.
7175 (register_data): Ditto.
7176 (supply_register): Ditto.
7177 (supply_register_by_name): Ditto.
7178 (collect_register): Ditto.
7179 (collect_register_as_string): Ditto.
7180 (collect_register_by_name): Ditto.
7181 * server.c (process_serial_event): Adjust.
7182 * linux-low.h (regset_fill_func, regset_store_func): Change
7183 prototype.
7184 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7185 Change prototype.
7186 * linux-low.c (get_stop_pc): Adjust.
7187 (check_removed_breakpoint): Adjust.
7188 (linux_wait_for_event): Adjust.
7189 (linux_resume_one_lwp): Adjust.
7190 (fetch_register): Add regcache parameter. Adjust.
7191 (usr_store_inferior_registers): Ditto.
7192 (regsets_fetch_inferior_registers): Ditto.
7193 (regsets_store_inferior_registers): Ditto.
7194 (linux_fetch_registers, linux_store_registers): Ditto.
7195 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7196 regcache. Adjust.
43aaf8b6
PA
7197 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7198 Ditto.
442ea881
PA
7199 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7200 prototype to take a regcache.
7201 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7202 * remote-utils.c (convert_ascii_to_int, outreg)
7203 (prepare_resume_reply): Change prototype to take a regcache.
7204 Adjust.
7205 * target.h (struct target_ops) <fetch_registers, store_registers>:
7206 Change prototype to take a regcache.
7207 (fetch_inferior_registers, store_inferior_registers): Change
7208 prototype to take a regcache. Adjust.
7209 * proc-service.c (ps_lgetregs): Adjust.
7210 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7211 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7212 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7213 take a regcache. Adjust.
7214 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7215 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7216 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7217 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7218 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7219 (cris_cannot_fetch_register):
7220 (cris_breakpoint_at): Change prototype to take a regcache.
7221 Adjust.
7222 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7223 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7224 to take a regcache. Adjust.
7225 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7226 Adjust.
7227 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7228 take a regcache. Adjust.
7229 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7230 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7231 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7232 * linux-mips-low.c (mips_get_pc):
7233 (mips_set_pc): Change prototype to take a regcache. Adjust.
7234 (mips_reinsert_addr): Adjust.
7235 (mips_collect_register): Change prototype to take a regcache.
7236 Adjust.
7237 (mips_supply_register):
7238 (mips_collect_register_32bit, mips_supply_register_32bit)
7239 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7240 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7241 * linux-ppc-low.c (ppc_supply_ptrace_register)
7242 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7243 (parse_spufs_run): Adjust.
7244 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7245 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7246 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7247 take a regcache. Adjust.
7248 * linux-s390-low.c (s390_collect_ptrace_register)
7249 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7250 (s390_set_pc): Change prototype to take a regcache. Adjust.
7251 (s390_arch_setup): Adjust.
7252 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7253 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7254 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7255 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7256 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7257 regcache. Adjust.
7258 (sparc_breakpoint_at): Adjust.
7259 * linux-xtensa-low.c (xtensa_fill_gregset):
7260 (xtensa_store_gregset):
7261 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7262 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7263 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7264 prototype to take a regcache. Adjust.
7265 * win32-arm-low.c (arm_fetch_inferior_register)
7266 (arm_store_inferior_register): Change prototype to take a
7267 regcache. Adjust.
7268 * win32-i386-low.c (i386_fetch_inferior_register)
7269 (i386_store_inferior_register): Change prototype to take a
7270 regcache. Adjust.
7271 * win32-low.c (child_fetch_inferior_registers)
7272 (child_store_inferior_registers): Change prototype to take a
7273 regcache. Adjust.
7274 (win32_wait): Adjust.
7275 (win32_fetch_inferior_registers): Change prototype to take a
7276 regcache. Adjust.
7277 (win32_store_inferior_registers): Adjust.
7278 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7279 store_inferior_register>: Change prototype to take a regcache.
7280
60c3d7b0
DE
72812010-01-20 Doug Evans <dje@google.com>
7282
7283 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7284 #ifdef.
7285 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7286 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7287
dc146f7c
VP
72882010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7289
7290 * linux-low.c (linux_core_of_thread): New.
7291 (compare_ints, show_process, list_threads): New.
7292 (linux_qxfer_osdata): Report threads and cores.
7293 (linux_target_op): Register linux_core_of_thread.
7294 * remote-utils.c (prepare_resume_reply): Report the core.
7295 (buffer_xml_printf): Support %d specifier.
7296 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7297 New.
7298 (handle_query): Handle qXfer:threads. Announce availability
7299 thereof.
7300 * target.h (struct target_ops): New field core_of_thread.
7301
7803799a
UW
73022010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7303
7304 * Makefile.in (clean): Remove new generated files.
7305 (reg-s390.o, reg-s390.c): Remove rules.
7306 (reg-s390x.o, reg-s390x.c): Likewise.
7307 (s390-linux32.o, s390-linux32.c): Add rules.
7308 (s390-linux64.o, s390-linux64.c): Likewise.
7309 (s390x-linux64.o, s390x-linux64.c): Likewise.
7310 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7311 * linux-s390-low.c: Include <elf.h>.
7312 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7313 (init_registers_s390): Remove prototype.
7314 (init_registers_s390x): Likewise.
7315 (init_registers_s390_linux32): Add prototype.
7316 (init_registers_s390_linux64): Likewise.
7317 (init_registers_s390x_linux64): Likewise.
7318 (s390_num_regs_3264): New define.
7319 (s390_regmap_3264): New global variable.
7320 (s390_cannot_fetch_register): Remove obsolete check.
7321 (s390_cannot_store_register): Likewise.
7322 (s390_collect_ptrace_register): Handle upper/lower register halves.
7323 (s390_supply_ptrace_register): Likewise.
7324 (s390_fill_gregset): Update to register number changes.
7325 (s390_get_hwcap): New routine.
7326 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7327 Install appropriate regmap and register set.
7328
6e7ffa39
JB
73292010-01-01 Joel Brobecker <brobecker@adacore.com>
7330
7331 * server.c (gdbserver_version): Update copyright year to 2010.
7332 * gdbreplay.c (gdbreplay_version): Likewise.
7333
957f3f49
DE
73342009-12-28 Doug Evans <dje@google.com>
7335
7336 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7337 elf/external.h. Include <elf.h> instead but only if necessary.
7338
ca5c370d
PA
73392009-12-28 Pedro Alves <pedro@codesourcery.com>
7340
7341 * linux-low.c (linux_remove_process): Remove `detaching'
7342 parameter. Don't release/detach from thread_db here.
7343 (linux_kill): Release/detach from thread_db here, ...
7344 (linux_detach): ... and here, before actually detaching.
7345 (linux_wait_1): ... and here, when a process exits.
7346 * thread-db.c (any_thread_of): New.
7347 (thread_db_free): Switch the current inferior to a thread of the
7348 passed in process.
7349
4ee62156
DE
73502009-12-21 Doug Evans <dje@google.com>
7351
d90e6a88
DE
7352 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7353
c5f62d5f
DE
7354 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7355 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7356 warning ifndef __NR_tkill. Move setting of errno there too.
7357 Delete unnecessary resetting of errno after syscall.
7358 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7359
10e86dd7
DE
7360 * configure.ac: Check for dladdr.
7361 * config.in: Regenerate.
7362 * configure: Regenerate.
7363 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7364 (try_thread_db_load): Update.
7365
4ee62156
DE
7366 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7367
00f515da
DE
73682009-12-18 Doug Evans <dje@google.com>
7369
e9464885
DE
7370 * event-loop.c: Include unistd.h if it exists.
7371
07d4f67e
DE
7372 * linux-low.c (my_waitpid): Move definition away from being in
7373 between linux_tracefork_child/linux_test_for_tracefork.
7374
00f515da
DE
7375 * gdb_proc_service.h (psaddr_t): Fix type.
7376 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7377 signature to match glibc.
7378
1de1badb
DE
73792009-12-16 Doug Evans <dje@google.com>
7380
7381 * linux-low.c (linux_read_memory): Fix argument to read.
7382
aeeb81d1
PA
73832009-11-26 Pedro Alves <pedro@codesourcery.com>
7384
7385 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7386 events, don't leave current_inferior pointing at null.
7387
10357975
PA
73882009-11-26 Pedro Alves <pedro@codesourcery.com>
7389
7390 * win32-low.c (LOG): Delete.
7391 (OUTMSG): Output to stderr.
7392 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7393 on compile time LOG macro.
7394 (win32_wait): Fix debug output.
7395
cf6e3471
PA
73962009-11-26 Pedro Alves <pedro@codesourcery.com>
7397
7398 * win32-low.c (win32_add_one_solib): If the dll name is
7399 "ntdll.dll", prepend the system directory to the dll path.
7400
0c85e18e
MK
74012009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7402
7403 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7404
9ac544ce 74052009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7406 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7407
7408 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7409 * configure.ac: Check for __mcoldfire__ and set
7410 gdb_cv_m68k_is_coldfire.
7411 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7412 reg-cf.o and reg-m68k.o.
7413 * configure: Regenerated.
7414
fd7dd3e6
PA
74152009-11-16 Pedro Alves <pedro@codesourcery.com>
7416
7417 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7418 Pass it to thread_db_free.
7419 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7420 proper `detaching' argument to linux_remove_process.
7421 * linux-low.h (thread_db_free): Add `detaching' parameter.
7422 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7423 to thread_db_free.
7424 (thread_db_free): Add `detaching' parameter. Only
7425 call td_ta_clear_event if detaching from process.
7426
75aa492e
MK
74272009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7428
7429 * thread-db.c (thread_db_free): Fix typo.
7430
21e1bee4
PP
74312009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7432
7433 PR gdb/10838
7434 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7435
8838b45e
NS
74362009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7437
7438 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7439 with an i686 compiler.
7440 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7441 needed.
7442 * configure: Rebuilt.
7443
8a35fb51
SL
74442009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7445
7446 PR gdb/10783
7447
7448 * server.c (handle_search_memory_1): Correct read_addr initialization
7449 in loop for searching subsequent chunks.
7450
96f15937
PP
74512009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7452
7453 * configure.ac: New --with-libthread-db option.
7454 * thread-db.c: Allow direct dependence on libthread_db.
7455 (thread_db_free): Adjust.
7456 * config.in: Regenerate.
7457 * configure: Likewise.
889bf7c5 7458
5f7d1694
PP
74592009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7460
7461 PR gdb/10757
7462 * thread-db.c (attach_thread): New function.
7463 (maybe_attach_thread): Return success/failure.
7464 (find_new_threads_callback): Adjust.
889bf7c5
PA
7465 (thread_db_find_new_threads): Loop until no new threads.
7466
88e3b899
PA
74672009-10-13 Pedro Alves <pedro@codesourcery.com>
7468
7469 * proc-service.c (ps_lgetregs): Formatting.
7470
cdbfd419
PP
74712009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7472
7473 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7474 * configure.ac: Adjust.
7475 * linux-low.h (struct process_info_private): Move members to struct
7476 thread_db.
7477 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7478 * linux-low.c (linux_remove_process): Adjust.
7479 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7480 * server.c (handle_query): Move code ...
7481 (handle_monitor_command): ... here. New function.
7482 * target.h (struct target_ops): New member.
7483 * thread-db.c (struct thread_db): New.
7484 (libthread_db_search_path): New variable.
7485 (thread_db_create_event, thread_db_enable_reporting)
7486 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7487 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7488 (try_thread_db_load_1, dladdr_to_soname): New functions.
7489 (try_thread_db_load, thread_db_load_search): New functions.
7490 (thread_db_init): Search for libthread_db.
7491 (thread_db_free): New function.
7492 (thread_db_handle_monitor_command): Likewise.
7493 * config.in: Regenerate.
7494 * configure: Regenerate.
889bf7c5 7495
4168d2d6
UW
74962009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7497
7498 * spu-low.c (spu_kill): Wait for inferior to terminate.
7499 Call clear_inferiors.
7500 (spu_detach): Call clear_inferiors.
7501
81ecdfbb
RW
75022009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7503
7504 * aclocal.m4: Regenerate.
7505 * config.in: Likewise.
7506 * configure: Likewise.
7507
0b9ff2c0
UW
75082009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7509
7510 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7511 (parse_spufs_run): New function.
7512 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7513 (ppc_breakpoint_at): Handle SPU breakpoints.
7514
efcbbd14
UW
75152009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7516
7517 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7518 (SPUFS_MAGIC): Define.
7519 (spu_enumerate_spu_ids): New function.
7520 (linux_qxfer_spu): New function.
7521 (linux_target_ops): Install linux_qxfer_spu.
7522
f4d9bade
UW
75232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7524
7525 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7526 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7527 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7528 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7529 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7530 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7531 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7532 (init_registers_powerpc_cell32l): Add prototype.
7533 (init_registers_powerpc_cell64l): Likewise.
7534 (ppc_arch_setup): Detect Cell/B.E. architecture.
7535
96e946ca
RW
75362009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7537
7538 * Makefile.in (datarootdir): New variable.
7539
58d6951d
DJ
75402009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7541
7542 * linux-low.c (linux_write_memory): Update debugging output.
7543 * Makefile.in (clean): Add new descriptions.
7544 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7545 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7546 * configure.srv: Add new files for arm*-*-linux*.
7547 * linux-arm-low.c: Add new declarations.
7548 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7549 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7550 (HWCAP_VFPv3D16): New.
7551 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7552 instead of __IWMMXT__.
7553 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7554 (arm_arch_setup): New.
7555 (target_regsets): Remove #ifdef. Add VFP regset.
7556 (the_low_target): Use arm_arch_setup.
7557
12b42a12
DJ
75582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7559
7560 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7561 the main thread again.
7562
ac8c974e
AR
75632009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7564
7565 Adding Neutrino gdbserver.
7566 * configure: Regenerated.
7567 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7568 * configure.srv (i[34567]86-*-nto*): New target.
7569 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7570 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7571 (nto_comctrl) [__QNX__]: New function.
7572 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7573
4424e0c3 75742009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7575
7576 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7577 srv_tgtobj.
7578
912cf4ba
PA
75792009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7580 Pedro Alves <pedro@codesourcery.com>
7581
7582 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7583 don't support CONTEXT_EXTENDED_REGISTERS.
7584 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7585 (the_low_target): Install them.
7586 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7587 failing with ERROR_PIPE_NOT_CONNECTED.
7588
aa5ca48f
DE
75892009-06-30 Doug Evans <dje@google.com>
7590 Pierre Muller <muller@ics.u-strasbg.fr>
7591
7592 Add h/w watchpoint support to x86-linux, win32-i386.
7593 * Makefile.in (SFILES): Add i386-low.c
7594 (i386_low_h): Define.
7595 (i386-low.o): Add dependencies.
7596 (linux-x86-low.o): Add i386-low.h dependency.
7597 (win32-i386-low.o): Ditto.
7598 * i386-low.c: New file.
7599 * i386-low.h: New file.
7600 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7601 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7602 * linux-low.c (linux_add_process): Initialize arch_private.
7603 (linux_remove_process): Free arch_private.
7604 (add_lwp): Initialize arch_private.
7605 (delete_lwp): Free arch_private.
7606 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7607 provided.
7608 * linux-low.h (process_info_private): New member arch_private.
7609 (lwp_info): New member arch_private.
7610 (linux_target_ops): New members new_process, new_thread,
7611 prepare_to_resume.
7612 (ptid_of): New macro.
7613 * linux-x86-low.c: Include stddef.h, i386-low.h.
7614 (arch_process_info): New struct.
7615 (arch_lwp_info): New struct.
7616 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7617 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7618 (i386_dr_low_get_status): New function.
7619 (x86_insert_point, x86_remove_point): New functions.
7620 (x86_stopped_by_watchpoint): New function.
7621 (x86_stopped_data_address): New function.
7622 (x86_linux_new_process, x86_linux_new_thread): New functions.
7623 (x86_linux_prepare_to_resume): New function.
7624 (the_low_target): Add entries for insert_point, remove_point,
7625 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7626 prepare_to_resume.
7627 * server.c (debug_hw_points): New global.
7628 (monitor_show_help): Document set debug-hw-points.
7629 (handle_query): Process "set debug-hw-points".
7630 * server.h (debug_hw_points): Declare.
7631 (paddress): Declare.
7632 * utils.c (NUMCELLS, CELLSIZE): New macros.
7633 (get_sell, xsnprintf, paddress): New functions.
7634 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7635 remove_point, stopped_by_watchpoint, stopped_data_address.
7636 * win32-i386-low.c: Include i386-low.h.
7637 (debug_reg_state): Replaces dr.
7638 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7639 (i386_dr_low_get_status): New function.
7640 (i386_insert_point, i386_remove_point): New functions.
7641 (i386_stopped_by_watchpoint): New function.
7642 (i386_stopped_data_address): New function.
7643 (i386_initial_stuff): Update.
7644 (get_thread_context,set_thread_context,i386_thread_added): Update.
7645 (the_low_target): Add entries for insert_point,
7646 remove_point, stopped_by_watchpoint, stopped_data_address.
7647 * win32-low.c (win32_insert_watchpoint): New function.
7648 (win32_remove_watchpoint): New function.
7649 (win32_stopped_by_watchpoint): New function.
7650 (win32_stopped_data_address): New function.
7651 (win32_target_ops): Add entries for insert_watchpoint,
7652 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7653 * win32-low.h (win32_target_ops): New members insert_point,
7654 remove_point, stopped_by_watchpoint, stopped_data_address.
7655
d993e290
PA
76562009-06-25 Pedro Alves <pedro@codesourcery.com>
7657
7658 * server.c (process_serial_event): Re-return unsupported, not
7659 error, if the type isn't recognized. Re-allow supporting only
7660 insert or remove packets. Also call require_running for
7661 breakpoints. Add missing break statement to default case. Tidy.
7662 * target.h (struct target_ops): Rename insert_watchpoint to
7663 insert_point, and remove_watchpoint to remove_point.
7664
7665 * linux-low.h (struct linux_target_ops): Likewise.
7666 * linux-low.c (linux_insert_watchpoint): Rename to ...
7667 (linux_insert_point): ... this. Adjust.
7668 (linux_remove_watchpoint): Rename to ...
7669 (linux_remove_point): ... this. Adjust.
7670 (linux_target_ops): Adjust.
7671 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7672 (cris_insert_point): ... this.
7673 (cris_remove_watchpoint): Rename to ...
7674 (cris_remove_point): ... this.
7675 (the_low_target): Adjust.
7676
0f54c268
PM
76772009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7678
7679 * server.c (handle_v_kill): Pass signal_pid to
7680 kill_inferior if multi_process is zero.
7681
c6314022
AR
76822009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7683
7684 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7685 * target.h (target_ops): Comment for *_watchpoint to make it clear
7686 the functions can get types '0' and '1'.
7687
4463ce24
AR
76882009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7689
7690 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7691 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7692 * regcache.c (get_regcache): Likewise.
7693 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7694 * win32-low.c (child_fetch_inferior_registers): Remove check for
7695 regno 0.
7696
cf8fd78b
PA
76972009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7698 Pedro Alves <pedro@codesourcery.com>
7699
7700 * target.h (struct target_ops) <supports_multi_process>: New
7701 callback.
7702 (target_supports_multi_process): New.
7703 * server.c (handle_query): Even if GDB reports support, only
7704 enable multi-process if the target also supports it. Report
7705 multi-process support only if the target backend supports it.
7706 * linux-low.c (linux_supports_multi_process): New function.
7707 (linux_target_ops): Install it as target_supports_multi_process
7708 callback.
7709
47c0c975
DE
77102009-05-24 Doug Evans <dje@google.com>
7711
e09875d4
DE
7712 Global renaming of find_thread_pid to find_thread_ptid.
7713 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7714 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7715 All callers updated.
7716
e27d73f6
DE
7717 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7718 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7719 directly.
7720
47c0c975
DE
7721 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7722 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7723 (linux_resume_one_lwp): Ditto.
7724
2acc282a
DE
77252009-05-23 Doug Evans <dje@google.com>
7726
7727 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7728 from struct inferior_list_entry * to struct lwp_info *.
7729 All callers updated.
7730
9f1036c1
DE
77312009-05-13 Doug Evans <dje@google.com>
7732
7733 * linux-x86-low.c: Don't include assert.h.
7734 (x86_siginfo_fixup): Use fatal, not assert.
7735 (x86_arch_setup): Fix comment.
7736
d0722149
DE
77372009-05-12 Doug Evans <dje@google.com>
7738
7739 Biarch support for i386/amd64 gdbserver.
7740 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7741 Add linux-x86-low.c.
7742 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7743 (linux-x86-low.o): Add.
7744 * linux-x86-64-low.c: Delete.
7745 * linux-i386-low.c: Delete.
7746 * linux-x86-low.c: New file.
7747 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7748 linux-x86-low.o.
7749 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7750 linux-x86-low.o.
7751 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7752 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7753 (linux_child_pid_to_exec_file): New function.
7754 (elf_64_header_p, elf_64_file_p): New functions.
7755 (siginfo_fixup): New function.
7756 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7757 give target a chance to convert layout.
7758 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7759 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7760
fdeb2a12
DE
77612009-05-07 Doug Evans <dje@google.com>
7762
7763 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7764 (regsets_store_inferior_registers): Ditto.
7765
a6dbe5df
PA
77662009-05-06 Pedro Alves <pedro@codesourcery.com>
7767
7768 PR server/10048
7769
7770 * linux-low.c (must_set_ptrace_flags): Delete.
7771 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7772 of the global.
7773 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7774 `lwp->must_set_ptrace_flags' instead.
ba42693b 7775 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7776 (linux_wait_1): ... not here.
7777
5091eb23
DE
77782009-04-30 Doug Evans <dje@google.com>
7779
9f767825
DE
7780 * inferiors.c (started_inferior_callback): New function.
7781 (attached_inferior_callback): New function.
7782 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7783 * server.c (print_started_pid, print_attached_pid): New functions.
7784 (detach_or_kill_for_exit): New function.
7785 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7786 * server.h (have_started_inferiors_p): Declare.
7787 (have_attached_inferiors_p): Declare.
7788
5091eb23
DE
7789 * inferiors.c (remove_process): Fix memory leak, free process.
7790 * linux-low.c (linux_remove_process): New function.
7791 (linux_kill): Call it instead of remove_process.
7792 (linux_detach, linux_wait_1): Ditto.
7793
155c8968
PA
77942009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7795
7796 * configure.srv: Add x86 Windows CE target.
7797
7fe519cb
UW
77982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7799
7800 * inferiors.c (get_thread_process): Make global.
7801 * server.h (get_thread_process): Add prototype.
7802 * thread-db.c (find_one_thread): Use get_thread_process
7803 instead of current_process.
7804 (thread_db_get_tls_address): Do not crash if called when
7805 thread layer is not yet initialized.
7806
5472f405
UW
78072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7808
7809 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7810 * spu-low.c (current_tid): Rename to ...
7811 (current_ptid): ... this.
7812 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7813 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7814 ptid_get_lwp (current_ptid) instead of current_tid.
7815 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7816 instead of current_tid. Use find_process_pid to verify pid
7817 argument is valid. Pass proper argument to remove_process.
7818 (spu_thread_alive): Compare current_ptid instead of current_tid.
7819 (spu_resume): Likewise.
7820
55ac2b99
PA
78212009-04-02 Pedro Alves <pedro@codesourcery.com>
7822
7823 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7824 variable.
7825
95954743
PA
78262009-04-01 Pedro Alves <pedro@codesourcery.com>
7827
7828 Implement the multiprocess extensions, and add linux multiprocess
7829 support.
7830
7831 * server.h (ULONGEST): Declare.
7832 (struct ptid, ptid_t): New.
7833 (minus_one_ptid, null_ptid): Declare.
7834 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7835 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7836 (struct inferior_list_entry): Change `id' type from unsigned from
7837 to ptid_t.
7838 (struct sym_cache, struct breakpoint, struct
7839 process_info_private): Forward declare.
7840 (struct process_info): Declare.
7841 (current_process): Declare.
7842 (all_processes): Declare.
7843 (initialize_inferiors): Declare.
7844 (add_thread): Adjust to use ptid_t.
7845 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7846 (add_process, remove_process, find_thread_pid): Declare.
7847 (find_inferior_id): Adjust to use ptid_t.
7848 (cont_thread, general_thread, step_thread): Change type to ptid_t.
7849 (multi_process): Declare.
7850 (push_event): Adjust to use ptid_t.
7851 (read_ptid, write_ptid): Declare.
7852 (prepare_resume_reply): Adjust to use ptid_t.
7853 (clear_symbol_cache): Declare.
7854 * inferiors.c (all_processes): New.
7855 (null_ptid, minus_one_ptid): New.
7856 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7857 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7858 (add_thread): Change unsigned long to ptid. Remove gdb_id
7859 parameter. Adjust.
7860 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7861 (gdb_id_to_thread): Rename to ...
7862 (find_thread_pid): ... this. Change unsigned long to ptid.
7863 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7864 (loaded_dll, pull_pid_from_list): Adjust.
7865 (add_process, remove_process, find_process_pid)
7866 (get_thread_process, current_process, initialize_inferiors): New.
7867 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7868 (struct target_waitstatus) <related_pid>: Ditto.
7869 (struct target_ops) <kill, detach>: Add `pid' argument. Change
7870 return type to int.
7871 (struct target_ops) <join>: Add `pid' argument.
7872 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7873 (struct target_ops) <wait>: Add `ptid' field. Change return type
7874 to ptid.
7875 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7876 (mywait): Add `ptid' argument. Change return type to ptid_t.
7877 (target_pid_to_str): Declare.
7878 * target.c (set_desired_inferior): Adjust to use ptids.
7879 (mywait): Add new `ptid' argument. Adjust.
7880 (target_pid_to_str): New.
7881 * mem-break.h (free_all_breakpoints): Declare.
7882 * mem-break.c (breakpoints): Delelete.
7883 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7884 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7885 to use per-process breakpoint list.
7886 (free_all_breakpoints): New.
7887 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7888 (symbol_cache, all_symbols_looked_up): Delete.
7889 (hexchars): New.
7890 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7891 read_ptid): New.
7892 (prepare_resume_reply): Change ptid argument's type from unsigned
7893 long to ptid_t. Adjust. Implement W;process and X;process.
7894 (free_sym_cache, clear_symbol_cache): New.
7895 (look_up_one_symbol): Adjust to per-process symbol cache. *
7896 * server.c (cont_thread, general_thread, step_thread): Change type
7897 to ptid_t.
7898 (attached): Delete.
7899 (multi_process): New.
7900 (last_ptid): Change type to ptid_t.
7901 (struct vstop_notif) <ptid>: Change type to ptid_t.
7902 (queue_stop_reply, push_event): Change `ptid' argument's type to
7903 ptid_t.
7904 (discard_queued_stop_replies): Add `pid' argument.
7905 (start_inferior): Adjust to use ptids. Adjust to mywait interface
7906 changes. Don't reference the `attached' global.
7907 (attach_inferior): Adjust to mywait interface changes.
7908 (handle_query): Adjust to use ptids. Parse GDB's qSupported
7909 features. Handle and report "multiprocess+". Handle
7910 "qAttached:PID".
7911 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
7912 changes.
7913 (handle_v_kill): New.
7914 (handle_v_stopped): Adjust to use target_pid_to_str.
7915 (handle_v_requests): Allow multiple attaches and runs when
7916 multiprocess extensions are in effect. Handle "vKill".
7917 (myresume): Adjust to use ptids.
7918 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
7919 (handle_status): Adjust to discard_queued_stop_replies interface
7920 change.
7921 (first_thread_of, kill_inferior_callback)
7922 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7923 (main): Call initialize_inferiors. Adjust to use ptids, killing
7924 and detaching from all inferiors. Handle multiprocess packet
7925 variants.
7926 * linux-low.h: Include gdb_proc_service.h.
7927 (struct process_info_private): New.
7928 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7929 <lwpid_of>: Use ptid_get_lwp.
7930 (get_lwp_thread): Adjust.
7931 (struct lwp_info): Add `dead' member.
7932 (find_lwp_pid): Declare.
7933 * linux-low.c (thread_db_active): Delete.
7934 (new_inferior): Adjust comment.
7935 (inferior_pid): Delete.
7936 (linux_add_process): New.
7937 (handle_extended_wait): Adjust.
7938 (add_lwp): Change unsigned long to ptid.
7939 (linux_create_inferior): Add process to processes table. Adjust
7940 to use ptids. Don't set new_inferior here.
7941 (linux_attach_lwp): Rename to ...
7942 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
7943 it. Adjust to use ptids.
7944 (linux_attach_lwp): New.
7945 (linux_attach): Add process to processes table. Don't set
7946 new_inferior here.
7947 (struct counter): New.
7948 (second_thread_of_pid_p, last_thread_of_process_p): New.
7949 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
7950 multiple processes.
7951 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
7952 processes. Remove process from process table.
7953 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
7954 to multiple processes.
7955 (any_thread_of): New.
7956 (linux_detach): Add `pid' argument, and handle it. Remove process
7957 from processes table.
7958 (linux_join): Add `pid' argument. Handle it.
7959 (linux_thread_alive): Change unsighed long argument to ptid_t.
7960 Consider dead lwps as not being alive.
7961 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
7962 threads we're not interested in.
7963 (same_lwp, find_lwp_pid): New.
7964 (linux_wait_for_lwp): Change `pid' argument's type from int to
7965 ptid_t. Adjust.
7966 (linux_wait_for_event): Rename to ...
7967 (linux_wait_for_event_1): ... this. Change `pid' argument's type
7968 from int to ptid_t. Adjust.
7969 (linux_wait_for_event): New.
7970 (linux_wait_1): Add `ptid' argument. Change return type to
7971 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
7972 that exit from the process table.
7973 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
7974 Adjust.
7975 (mark_lwp_dead): New.
7976 (wait_for_sigstop): Adjust to use ptids. If a process exits while
7977 stopping all threads, mark its main lwp as dead.
7978 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7979 ptids.
7980 (fetch_register, usr_store_inferior_registers)
7981 (regsets_fetch_inferior_registers)
7982 (regsets_store_inferior_registers, linux_read_memory)
7983 (linux_write_memory): Inline `inferior_pid'.
7984 (linux_look_up_symbols): Adjust to use per-process
7985 `thread_db_active'.
7986 (linux_request_interrupt): Adjust to use ptids.
7987 (linux_read_auxv): Inline `inferior_pid'.
7988 (initialize_low): Don't reference thread_db_active.
7989 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7990 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7991 (ps_getpid): Return the pid of the current inferior.
7992 * thread-db.c (proc_handle, thread_agent): Delete.
7993 (thread_db_create_event, thread_db_enable_reporting): Adjust to
7994 per-process data.
7995 (find_one_thread): Change argument type to ptid_t. Adjust to
7996 per-process data.
7997 (maybe_attach_thread): Adjust to per-process data and ptids.
7998 (thread_db_find_new_threads): Ditto.
7999 (thread_db_init): Ditto.
8000 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8001 processes table. Adjust to use ptids.
8002 (spu_kill, spu_detach): Adjust interface. Remove process from
8003 processes table.
8004 (spu_join, spu_thread_alive): Adjust interface.
8005 (spu_wait): Adjust interface. Remove process from processes
8006 table. Adjust to use ptids.
8007 * win32-low.c (current_inferior_tid): Delete.
8008 (current_inferior_ptid): New.
8009 (debug_event_ptid): New.
8010 (thread_rec): Take a ptid. Adjust.
8011 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8012 (child_delete_thread): Ditto.
8013 (do_initial_child_stuff): Add `attached' argument. Add process to
8014 processes table.
8015 (child_fetch_inferior_registers, child_store_inferior_registers):
8016 Adjust.
8017 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8018 (win32_attach): Pass 1 to do_initial_child_stuff.
8019 (win32_kill): Adjust interface. Remove process from processes
8020 table.
8021 (win32_detach): Ditto.
8022 (win32_join): Adjust interface.
8023 (win32_thread_alive): Take a ptid.
8024 (win32_resume): Adjust to use ptids.
8025 (get_child_debug_event): Ditto.
8026 (win32_wait): Adjust interface. Remove exiting process from
8027 processes table.
8028
bd99dc85
PA
80292009-04-01 Pedro Alves <pedro@codesourcery.com>
8030
8031 Non-stop mode support.
8032
8033 * server.h (non_stop): Declare.
8034 (gdb_client_data, handler_func): Declare.
8035 (delete_file_handler, add_file_handler, start_event_loop):
8036 Declare.
8037 (handle_serial_event, handle_target_event, push_event)
8038 (putpkt_notif): Declare.
8039 * target.h (enum resume_kind): New.
8040 (struct thread_resume): Replace `step' field by `kind' field.
8041 (TARGET_WNOHANG): Define.
8042 (struct target_ops) <wait>: Add `options' argument.
8043 <supports_non_stop, async, start_non_stop>: New fields.
8044 (target_supports_non_stop, target_async): New.
8045 (start_non_stop): Declare.
8046 (mywait): Add `options' argument.
8047 * target.c (mywait): Add `options' argument. Print child exit
8048 notifications here.
8049 (start_non_stop): New.
8050 * server.c (non_stop, own_buf, mem_buf): New globals.
8051 (struct vstop_notif): New.
8052 (notif_queue): New global.
8053 (queue_stop_reply, push_event, discard_queued_stop_replies)
8054 (send_next_stop_reply): New.
8055 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8056 interface changes.
8057 (attach_inferior): In non-stop mode, don't wait for the target
8058 here.
8059 (handle_general_set): Handle QNonStop.
8060 (handle_query): When handling qC, return the current general
8061 thread, instead of the first thread of the list.
8062 (handle_query): If the backend supports non-stop mode, include
8063 QNonStop+ in the qSupported query response.
8064 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8065 and non-stop mode.
8066 (handle_v_attach, handle_v_run): Handle non-stop mode.
8067 (handle_v_stopped): New.
8068 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8069 (myresume): Adjust to use resume_kind. Handle non-stop.
8070 (queue_stop_reply_callback): New.
8071 (handle_status): Handle non-stop mode.
8072 (main): Clear non_stop flag on reconnection. Use the event-loop.
8073 Refactor serial protocol handling from here ...
8074 (process_serial_event): ... to this new function. When GDB
8075 selects any thread, select one here. In non-stop mode, wait until
8076 GDB acks all pending events before exiting.
8077 (handle_serial_event, handle_target_event): New.
8078 * remote-utils.c (remote_open): Install remote_desc in the event
8079 loop.
8080 (remote_close): Remove remote_desc from the event loop.
8081 (putpkt_binary): Rename to...
8082 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8083 (putpkt_binary): New as wrapper around putpkt_binary_1.
8084 (putpkt_notif): New.
8085 (prepare_resume_reply): In non-stop mode, don't change the
8086 general_thread.
8087 * event-loop.c: New.
8088 * Makefile.in (OBJ): Add event-loop.o.
8089 (event-loop.o): New rule.
8090
8091 * linux-low.h (pid_of): Moved here.
8092 (lwpid_of): New.
8093 (get_lwp_thread): Use lwpid_of.
8094 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8095 * linux-low.c (pid_of): Delete.
8096 (inferior_pid): Use lwpid_of.
8097 (linux_event_pipe): New.
8098 (target_is_async_p): New.
8099 (delete_lwp): New.
8100 (handle_extended_wait): Use lwpid_of.
8101 (add_lwp): Don't set lwpid field.
8102 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8103 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8104 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8105 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8106 first. Adjust to linux_wait_for_event interface changes. Use
8107 lwpid_of.
8108 (linux_detach): Don't delete the main lwp here.
8109 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8110 (status_pending_p): Don't consider explicitly suspended lwps.
8111 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8112 pointer. Add OPTIONS argument. Change return type to int. Use
8113 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8114 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8115 pointer. Add status pointer argument. Return a pid instead of a
8116 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8117 changes. In non-stop mode, don't switch to a random thread.
8118 (linux_wait): Rename to...
8119 (linux_wait_1): ... this. Add target_options argument, and handle
8120 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8121 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8122 clean exit and signal exit code. Don't stop all threads in
8123 non-stop mode. In all-stop mode, only stop all threads when
8124 reporting a stop to GDB. Handle explicit thread stop requests.
8125 (async_file_flush, async_file_mark): New.
8126 (linux_wait): New.
8127 (send_sigstop): Use lwpid_of.
8128 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8129 interface changes. In non-stop mode, don't switch to a random
8130 thread.
8131 (linux_resume_one_lwp): Use lwpid_of.
8132 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8133 (linux_resume_one_thread): ... this. Handle resume_stop. In
8134 non-stop mode, don't look for pending flag in all threads.
8135 (resume_status_pending_p): Don't consider explicitly suspended
8136 threads.
8137 (my_waitpid): Reimplement. Emulate __WALL.
8138 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8139 Use lwpid_of.
8140 (sigchld_handler, linux_supports_non_stop, linux_async)
8141 (linux_start_non_stop): New.
8142 (linux_target_ops): Register linux_supports_non_stop, linux_async
8143 and linux_start_non_stop.
8144 (initialize_low): Install SIGCHLD handler.
8145 * thread-db.c (thread_db_create_event, find_one_thread)
8146 (thread_db_get_tls_address): Use lwpid_of.
8147 * win32-low.c (win32_detach): Adjust to use resume_kind.
8148 (win32_wait): Add `options' argument.
8149 * spu-low.c (spu_resume): Adjust to use resume_kind.
8150 (spu_wait): Add `options' argument.
8151
5b1c542e
PA
81522009-04-01 Pedro Alves <pedro@codesourcery.com>
8153
8154 Decouple target code from remote protocol.
8155
8156 * target.h (enum target_waitkind): New.
8157 (struct target_waitstatus): New.
8158 (struct target_ops) <wait>: Return an unsigned long. Take a
8159 target_waitstatus pointer instead of a char pointer.
8160 (mywait): Likewise.
8161 * target.c (mywait): Change prototype to return an unsigned long.
8162 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8163 * server.h (thread_from_wait, old_thread_from_wait): Delete
8164 declarations.
8165 (prepare_resume_reply): Change prototype to take a
8166 target_waitstatus.
8167 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8168 (last_status, last_ptid): New.
8169 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8170 pid instead of a signal.
8171 (attach_inferior): Remove "status" and "signal" parameters.
8172 Adjust.
8173 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8174 not as an address.
8175 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8176 (handle_v_requests, myresume): Remove "status" and "signal"
8177 parameters. Adjust.
8178 (handle_status): New.
8179 (main): Delete local `status'. Adjust.
8180 * remote-utils.c: Include target.h.
8181 (prepare_resume_reply): Change prototype to take a
8182 target_waitstatus. Adjust.
8183
8184 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8185 interface.
8186 * spu-low.c (spu_wait): Adjust.
8187 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8188 Delete.
8189 (win32_wait): Adjust.
8190
2bd7c093
PA
81912009-04-01 Pedro Alves <pedro@codesourcery.com>
8192
8193 * target.h (struct thread_resume): Delete leave_stopped member.
8194 (struct target_ops): Add a `n' argument to the `resume' callback.
8195 * server.c (start_inferior): Adjust.
8196 (handle_v_cont, myresume): Adjust.
8197 * linux-low.c (check_removed_breakpoint): Adjust to resume
8198 interface change, and to removed leave_stopped field.
8199 (resume_ptr): Delete.
8200 (struct thread_resume_array): New.
8201 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8202 resume interface change.
8203 (linux_continue_one_thread, linux_queue_one_thread)
8204 (resume_status_pending_p): Check if the resume field is NULL
8205 instead of checking the leave_stopped member.
8206 (linux_resume): Adjust to the target resume interface change.
8207 * spu-low.c (spu_resume): Adjust to the target resume interface
8208 change.
8209 * win32-low.c (win32_detach, win32_resume): Ditto.
8210
c35fafde
PA
82112009-04-01 Pedro Alves <pedro@codesourcery.com>
8212
8213 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8214 flag.
8215 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8216 pending.
8217 (linux_continue_one_thread): Only preserve the stepping flag if
8218 there's a pending breakpoint.
8219
0a59d50b
PA
82202009-03-31 Pedro Alves <pedro@codesourcery.com>
8221
8222 * server.c (main): After the inferior having exited, call
8223 remote_close before exiting gdbserver.
8224
f04c6d38
TJB
82252009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8226
8227 Fix size of FPSCR in Power 7 processors.
8228 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8229 (PPC_FEATURE_HAS_DFP): New #define.
8230 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8231 size of the FPSCR.
8232
78e5cee6
PA
82332009-03-23 Pedro Alves <pedro@codesourcery.com>
8234
8235 * server.c (handle_query) Whitespace and formatting.
8236
1b3f6016
PA
82372009-03-22 Pedro Alves <pedro@codesourcery.com>
8238
8239 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8240 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8241 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8242 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8243 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8244 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8245 Makefile.in, configure.ac: Fix whitespace throughout.
8246 * configure: Regenerate.
8247
a07b2135
PA
82482009-03-22 Pedro Alves <pedro@codesourcery.com>
8249
8250 * inferiors.c (find_inferior): Make it safe for the callback
8251 function to delete the currently iterated inferior.
8252
67cc2626
PA
82532009-03-22 Pedro Alves <pedro@codesourcery.com>
8254
8255 * Makefile.in (linuw_low_h): Move higher.
8256 (thread-db.o): Depend on $(linux_low_h).
8257
54a0b537
PA
82582009-03-17 Pedro Alves <pedro@codesourcery.com>
8259
8260 Rename "process" to "lwp" throughout.
8261
8262 * linux-low.c (all_processes): Rename to...
8263 (all_lwps): ... this.
8264 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8265 (add_process): Rename to ...
8266 (add_lwp): ... this. Adjust.
8267 (linux_create_inferior): Adjust.
8268 (linux_attach_lwp): Adjust.
8269 (linux_attach): Adjust.
8270 (linux_kill_one_process): Rename to ...
8271 (linux_kill_one_lwp): ... this. Adjust.
8272 (linux_kill): Adjust.
8273 (linux_detach_one_process): Rename to ...
8274 (linux_detach_one_lwp): ... this. Adjust.
8275 (linux_detach): Adjust.
8276 (check_removed_breakpoint): Adjust.
8277 (status_pending_p): Adjust.
8278 (linux_wait_for_process): Rename to ...
8279 (linux_wait_for_lwp): ... this. Adjust.
8280 (linux_wait_for_event): Adjust.
8281 (send_sigstop): Adjust.
8282 (wait_for_sigstop): Adjust.
8283 (stop_all_processes): Rename to ...
8284 (stop_all_lwps): ... this.
8285 (linux_resume_one_process): Rename to ...
8286 (linux_resume_one_lwp): ... this. Adjust.
8287 (linux_set_resume_request, linux_continue_one_thread)
8288 (linux_queue_one_thread, resume_status_pending_p)
8289 (usr_store_inferior_registers, regsets_store_inferior_registers)
8290 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8291 Adjust.
8292 * linux-low.h (get_process): Rename to ...
8293 (get_lwp): ... this. Adjust.
8294 (get_thread_process): Rename to ...
8295 (get_thread_lwp): ... this. Adjust.
8296 (get_process_thread): Rename to ...
8297 (get_lwp_thread): ... this. Adjust.
8298 (struct process_info): Rename to ...
8299 (struct lwp_info): ... this.
8300 (all_processes): Rename to ...
8301 (all_lwps): ... this.
8302 * proc-service.c (ps_lgetregs): Adjust.
8303 * thread-db.c (thread_db_create_event, find_one_thread)
8304 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8305
0b16c5cf
PA
83062009-03-14 Pedro Alves <pedro@codesourcery.com>
8307
8308 * server.c (handle_query): Handle "qAttached".
8309
32de4b9d
NS
83102009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8311
8312 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8313 GPLv3, update license URL.
8314
2aecd87f
DE
83152009-03-01 Doug Evans <dje@google.com>
8316
93efd302 8317 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8318 (server_h): Add gdb_signals.h.
8319 (signals.o): Update.
8320 * server.h (target_signal_from_host,target_signal_to_host_p)
8321 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8322
86b1f9c5
PM
83232009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8324
8325 * remote-utils.c (getpkt): Also generate remote-debug
8326 information if noack_mode is set.
8327
4aa995e1
PA
83282009-02-06 Pedro Alves <pedro@codesourcery.com>
8329
8330 * server.c (handle_query): Report qXfer:siginfo:read and
8331 qXfer:siginfo:write as supported and handle them.
8332 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8333 * linux-low.c (linux_xfer_siginfo): New.
8334 (linux_target_ops): Set it.
8335
62709adf
PA
83362009-01-26 Pedro Alves <pedro@codesourcery.com>
8337
8338 * server.c (gdbserver_usage): Mention --remote-debug.
8339 (main): Accept '--remote-debug' switch.
8340
aef93bd7
DE
83412009-01-18 Doug Evans <dje@google.com>
8342
8343 * regcache.c (new_register_cache): No need to check result of xcalloc.
8344 * server.c (handle_search_memory): Back out calls to xmalloc,
8345 result is checked and error is returned to user upon failure.
8346 (handle_query): Ditto. Add more checks for result of malloc.
8347 (handle_v_cont): Check result of malloc, report error back to
8348 user upon failure.
8349 (handle_v_run): Ditto. Call freeargv.
8350 * server.h (freeargv): Declare.
8351 * utils.c (freeargv): New fn.
8352
54363045
DE
83532009-01-15 Doug Evans <dje@google.com>
8354
f626972c
DE
8355 * gdbreplay.c (perror_with_name): Make arg const char *.
8356 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8357 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8358 * utils.c (perror_with_name): Make arg const char *.
54363045 8359
18aae699
PA
83602009-01-14 Pedro Alves <pedro@codesourcery.com>
8361
8362 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8363 when handling a EXIT_PROCESS_DEBUG_EVENT.
8364
ff703abe
JB
83652009-01-06 Joel Brobecker <brobecker@adacore.com>
8366
8367 * gdbreplay.c (gdbreplay_version): Update copyright year.
8368 * server.c (gdbserver_version): Likewise.
8369
f21cc1a2 83702009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8371
8372 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8373 (handle_extended_wait): Improve comment.
0e21c1ec 8374
bca929d3
DE
83752008-12-13 Doug Evans <dje@google.com>
8376
8377 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8378 * server.h (ATTR_MALLOC): New macro.
8379 (xmalloc,xcalloc,xstrdup): Declare.
8380 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8381 * inferiors.c: Ditto.
8382 * linux-low.c: Ditto.
8383 * mem-break.c: Ditto.
8384 * regcache.c: Ditto.
8385 * remote-utils.c: Ditto.
8386 * server.c: Ditto.
8387 * target.c: Ditto.
8388 * win32-low.c: Ditto.
8389
97438e3f
DE
83902008-12-12 Doug Evans <dje@google.com>
8391
896c7fbb
DE
8392 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8393 in debugging printf.
8394
97438e3f
DE
8395 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8396
e3b886f8
DE
83972008-12-09 Doug Evans <dje@google.com>
8398
8399 * linux-low.h (struct process_info): Delete member tid, unused.
8400 * thread-db.c (find_one_thread): Update.
8401 (maybe_attach_thread): Update.
8402
07e059b5
VP
84032008-12-02 Pedro Alves <pedro@codesourcery.com>
8404
889bf7c5
PA
8405 * target.h (struct target_ops): Add qxfer_osdata member.
8406 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8407 and dirent.h.
8408 (linux_qxfer_osdata): New functions.
8409 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8410 callback.
8411 * server.c (handle_query): Handle "qXfer:osdata:read:".
8412 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8413 (buffer_xml_printf): New functions.
8414 * server.h (struct buffer): New.
8415 (buffer_grow_str, buffer_grow_str0): New macros.
8416 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8417 (buffer_xml_printf): Declare.
07e059b5 8418
4cab47ab
DE
84192008-11-24 Doug Evans <dje@google.com>
8420
8421 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8422
f142445f
DJ
84232008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8424
8425 * server.c (handle_v_run): Always use the supplied argument list.
8426
d0107bb6 84272008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8428
d0107bb6
BW
8429 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8430 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8431
2c4ad781
TJB
84322008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8433
8434 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8435 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8436 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8437 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8438 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8439 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8440 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8441 XML target descriptions.
8442 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8443 when inferior is running on an ISA 2.05 or later processor. Add
8444 special case to return offset for full 64-bit slot of FPSCR when
8445 in 32-bits.
8446
dfb64f85
DJ
84472008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8448
8449 * Makefile.in (SFILES, clean): Added sparc64 files.
8450 (reg-sparc64.o, reg-sparc64.c): New.
8451 * configure.srv (sparc*-*-linux*): New configuration.
8452 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8453 syscall arguments for SPARC.
8454 (regsets_store_inferior_registers): Likewise.
8455 * linux-sparc-low.c: New file.
8456
66b6e1dd
DE
84572008-10-21 Doug Evans <dje@google.com>
8458
8459 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8460 (READLINE_DIR,READLINE_DEP): Delete.
8461 (INTERNAL_CFLAGS): Update.
8462 (LINTFLAGS): Update.
8463
9b710a42
PA
84642008-10-10 Pedro Alves <pedro@codesourcery.com>
8465
8466 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8467 whole argv from the last run, not just argv[0].
8468
5822d809
PA
84692008-09-08 Pedro Alves <pedro@codesourcery.com>
8470
8471 * regcache.c (new_register_cache): Return NULL if the register
8472 cache size isn't known yet.
8473 (free_register_cache): Avoid dereferencing a NULL regcache.
8474
74aac56f
DJ
84752008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8476
8477 * configure.srv: Merge MIPS and MIPS64.
8478
400b20f5
MR
84792008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8480
8481 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8482
677c5bb1
LM
84832008-08-18 Luis Machado <luisgpm@br.ibm.com>
8484
8485 * Makefile.in: Add required vsx dependencies.
8486
8487 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8488 Declare init_registers_powerpc_vsx32l.
8489 Declare init_registers_powerpc_vsx64l.
8490 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8491 (ppc_arch_setup): Check for VSX in hwcap.
8492 (ppc_fill_vsxregset): New function.
8493 (ppc_store_vsxregset): New function.
8494 Add new VSX entry in regset_info target_regsets.
8495
8496 * configure.srv: Add new VSX dependencies.
8497
a6f3e723
SL
84982008-08-12 Pedro Alves <pedro@codesourcery.com>
8499
8500 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8501 (remote_open): Set or clear transport_is_reliable.
8502 (putpkt_binary): Don't expect acks in noack mode.
8503 (getpkt): Don't send ack/nac in noack mode.
8504 * server.c (handle_general_set): Handle QStartNoAckMode.
8505 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8506 qSupported.
8507 (main): Reset noack_mode on every connection.
8508 * server.h (noack_mode): Declare.
8509
a417dc56
RW
85102008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8511
8512 * Makefile.in (GDBREPLAY_OBS): New variable.
8513 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8514
3221518c
UW
85152008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8516 Daniel Jacobowitz <dan@codesourcery.com>
8517
8518 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8519 (usr_store_inferior_registers): Likewise.
8520 (regsets_store_inferior_registers): Likewise.
8521
ec56be1b
PA
85222008-07-31 Rolf Jansen <rj@surtec.com>
8523 Pedro Alves <pedro@codesourcery.com>
8524
8525 * configure.ac: Check for memmem declaration.
8526 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8527 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8528 (disable_packet_qfThreadInfo): Unconditionally compile.
8529 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8530 * configure, config.in: Regenerate.
8531
2fe5e3ff
DE
85322008-07-28 Doug Kwan <dougkwan@google.com>
8533
8534 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8535 (linux_write_memory): Remove declaration of errno.
8536
836acd6d
UW
85372008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8538
8539 * linux-low.c (handle_extended_wait): Do not use "status"
8540 variable uninitialized.
8541
aeba519e
PA
85422008-07-07 Pedro Alves <pedro@codesourcery.com>
8543
8544 * server.c (handle_v_attach): Inhibit reporting dll changes.
8545
db42f210
PA
85462008-06-27 Pedro Alves <pedro@codesourcery.com>
8547
8548 * remote-utils.c (prepare_resume_reply): If requested, don't
8549 output "thread:TID" in the T stop reply.
8550
8551 * server.c (disable_packet_vCont, disable_packet_Tthread)
8552 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8553 (handle_query): If requested, disable support for qC, qfThreadInfo
8554 and qsThreadInfo.
8555 (handle_v_requests): If requested, disable support for vCont.
8556 (gdbserver_show_disableable): New.
8557 (main): Handle --disable-packet and --disable-packet=LIST.
8558
8559 * server.h (disable_packet_vCont, disable_packet_Tthread)
8560 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8561
8e4c5421
CD
85622008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8563
8564 * server.c (gdbserver_usage): Mention --version.
8565
6e23a804
DJ
85662008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8567
8568 * Makefile.in (gdbreplay.o): New rule.
8569
90aa6a40
JM
85702008-06-06 Joseph Myers <joseph@codesourcery.com>
8571
8572 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8573 message, not gdbserver.
8574
c16158bc 85752008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8576 Nathan Sidwell <nathan@codesourcery.com>
8577 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8578
8579 * acinclude.m4: Include ../../config/acx.m4.
8580 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8581 * configure, config.in: Regenerate.
8582 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8583 * server.c (gdbserver_version): Print PKGVERSION.
8584 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8585 (main): Adjust gdbserver_usage calls.
8586 * gdbreplay.c (version, host_name): Add declarations.
8587 (gdbreplay_version, gdbreplay_usage): New.
8588 (main): Accept --version and --help options.
8589
aeb75bf5
DJ
85902008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8591
8592 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8593 (arm_breakpoint_at): Handle Thumb.
8594 (the_low_target): Add comment.
8595
76b233dd
UW
85962008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8597
8598 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8599
08388c79
DE
86002008-05-09 Doug Evans <dje@google.com>
8601
a3c83fae
DE
8602 * server.h (decode_search_memory_packet): Declare.
8603 * remote-utils.c (decode_search_memory_packet): New fn.
8604 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8605 (handle_search_memory): New fn.
8606 (handle_query): Process qSearch:memory packets.
8607
bb9c3d36
UW
86082008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8609
8610 * regcache.c (registers_length): Remove.
8611 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8612 full register packet.
8613 * regcache.h (registers_length): Remove prototype.
8614 * server.h (PBUFSIZ): Define to 16384.
8615
7284e1be
UW
86162008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8617
8618 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8619 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8620 powerpc-64l.o, and powerpc-altivec64l.o.
8621 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8622 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8623 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8624 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8625 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8626 to srv_xmlfiles.
8627
8628 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8629 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8630 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8631 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8632 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8633 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8634 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8635 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8636 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8637 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8638 (clean): Update.
8639
8640 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8641 (init_registers_powerpc_32l): ... this new prototype.
8642 (init_registers_powerpc_32): Remove, replace by ...
8643 (init_registers_powerpc_altivec32l): ... this new prototype.
8644 (init_registers_powerpc_e500): Remove, replace by ...
8645 (init_registers_powerpc_e500l): ... this new prototype.
8646 (init_registers_ppc64): Remove, replace by ...
8647 (init_registers_powerpc_64l): ... this new prototype.
8648 (init_registers_powerpc_64): Remove, replace by ...
8649 (init_registers_powerpc_altivec64l): ... this new prototype.
8650 (ppc_num_regs): Set to 73.
8651 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8652 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8653 (ppc_cannot_store_register): Handle orig_r3 and trap.
8654 (ppc_arch_setup): Update init_registers_... calls.
8655 (ppc_fill_gregset): Handle orig_r3 and trap.
8656
8657 * inferiors.c (clear_inferiors): Reset current_inferior.
8658
fdc59709
PB
86592008-04-23 Paolo Bonzini <bonzini@gnu.org>
8660
889bf7c5
PA
8661 * acinclude.m4: Add override.m4.
8662 * configure: Regenerate.
fdc59709 8663
c9b2f845
UW
86642008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8665
8666 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8667 initial call to init_register_ppc64.
8668
550512b8
UW
86692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8670
43aaf8b6
PA
8671 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8672 single powerpc*-*-linux* case.
550512b8
UW
8673 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8674
b6430ec3
UW
86752008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8676
8677 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8678 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8679 from reg_xmlfiles.
8680 * linux-ppc-low.c: Include <elf.h>.
8681 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8682 (ppc_hwcap): New global variable.
8683 (ppc_regmap): Remove __SPE__ #ifdef sections.
8684 (ppc_regmap_e500): New global variable.
8685 (ppc_cannot_store_register): Update __SPE__ special case.
8686 (ppc_get_hwcap): New function.
8687 (ppc_arch_setup): Use it to determine whether inferior supports
8688 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8689 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8690 Do not access registers if target does not support AltiVec.
8691 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8692 Do not access registers if target does not support SPE.
8693 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8694
52fa2412
UW
86952008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8696
8697 * linux-low.c (disabled_regsets, num_regsets): New.
8698 (use_regsets_p): Delete.
8699 (linux_wait_for_process): Clear disabled_regsets.
8700 (regsets_fetch_inferior_registers): Check and set it.
8701 (regsets_store_inferior_registers): Likewise.
8702 (linux_fetch_registers, linux_store_registers): Do not use
8703 use_regsets_p.
8704 (initialize_low): Allocate disabled_regsets.
8705
e28b3332
DJ
87062008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8707
8708 * Makefile.in (LIBOBJS): New.
8709 (OBS): Use LIBOBJS.
8710 (memmem.o): New rule.
8711 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8712 * configure: Regenerated.
8713
4536995d
UW
87142008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8715
8716 * server.c (handle_query): Never return "unsupported" for
8717 qXfer:features:read queries.
8718
221c031f
UW
87192008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8720
8721 * server.c (get_features_xml): Fix inverted condition.
8722 (handle_query): Always support qXfer:feature:read.
8723
ccd213ac
DJ
87242008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8725
8726 * server.c (wrapper_argv): New.
8727 (start_inferior): Handle wrapper_argv. If set, expect an extra
8728 trap.
8729 (gdbserver_usage): Document --wrapper.
8730 (main): Parse --wrapper.
8731
6fe305f7
UW
87322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8733
8734 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8735 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8736 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8737 (ppc_set_pc): Likewise.
8738 (ppc_arch_setup): New function.
8739 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8740 of collect_register.
889bf7c5 8741 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8742
5b0a002e
UW
87432008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8744
8745 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8746 instead of linux-ppc64-low.o.
8747 * linux-ppc64-low.c: Remove file.
8748 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8749 (linux-ppc64-low.o): Remove rule.
8750
8751 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8752 (init_registers_powerpc_64): Likewise.
8753 (ppc_regmap): Conditionally define depending on __powerpc64__.
8754 (ppc_cannot_store_register): Do not special-case "fpscr" when
8755 compiled on __powerpc64__.
8756 (ppc_collect_ptrace_register): New function.
8757 (ppc_supply_ptrace_register): New function.
8758 (ppc_breakpoint): Change type to "unsigned int".
8759 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8760 (the_low_target): Conditionally provide initializers for the
889bf7c5 8761 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8762 collect_ptrace_register and supply_ptrace_register members.
8763
9b4b61c8
UW
87642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8765
8766 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8767 * server.c (gdbserver_xmltarget): Define.
8768 (get_features_xml): Use it to replace "target.xml" and arch_string.
8769
8770 * configure.srv: Remove srv_xmltarget. Add XML files that were
8771 mentioned there to srv_xmlfiles instead. Remove conditional tests
8772 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8773 srv_xmlfiles and srv_regobj to include all possible choices.
8774 * configure.ac (srv_xmltarget): Remove.
8775 (srv_xmlfiles): Do not add "target.xml".
8776 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8777 checks for supplementary target information.
8778 * configure: Regenerate.
8779 * Makefile.in (XML_TARGET): Remove.
8780 (target.xml): Remove rule.
8781 (clean): Do not clean up target.xml.
8782 (.PRECIOUS): Do not mention target.xml.
8783
8784 * target.h (struct target_ops): Remove arch_string member.
8785 * linux-low.c (linux_arch_string): Remove.
8786 (linux_target_ops): Remove arch_string initializer.
8787 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8788 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8789 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8790 * spu-low.c (spu_arch_string): Remove.
8791 (spu_target_ops): Remove arch_string initializer.
8792 * win32-low.c (win32_arch_string): Remove.
8793 (win32_target_ops): Remove arch_string initializer.
8794 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8795 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8796 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8797
ee1a7ae4
UW
87982008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8799
8800 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8801 by collect_ptrace_register and supply_ptrace_register hooks.
8802 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8803 instead of checking for the_low_target.left_pad_xfer.
8804 (usr_store_inferior_registers): Use collect_ptrace_register callback
8805 instead of checking for the_low_target.left_pad_xfer.
8806
8807 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8808 (s390_supply_ptrace_register): Likewise.
8809 (s390_fill_gregset): Call s390_collect_ptrace_register.
8810 (the_low_target): Update.
8811
8812 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8813 (ppc_supply_ptrace_register): Likewise.
8814 (the_low_target): Update.
8815
8816 * linux-i386-low.c (the_low_target): Update.
8817 * linux-x86-64-low.c (the_low_target): Update.
8818
d61ddec4
UW
88192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8820
8821 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8822 reg-s390.o and reg-s390x.o.
8823
8824 * linux-low.c (new_inferior): New global variable.
8825 (linux_create_inferior, linux_attach): Set it.
8826 (linux_wait_for_process): Call the_low_target.arch_setup after the
8827 target has stopped for the first time.
8828 (initialize_low): Do not call the_low_target.arch_setup.
8829
8830 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8831 (s390_set_pc): Likewise.
8832 (s390_arch_setup): New function.
8833 (the_low_target): Use s390_arch_setup as arch_setup routine.
8834
8835 * regcache.c (realloc_register_cache): New function.
8836 (set_register_cache): Call it for each existing regcache.
8837
d05b4ac3
UW
88382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8839
8840 * server.h (init_registers): Remove prototype.
8841
8842 * linux-low.h (struct linux_target_ops): Add arch_setup field.
8843 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8844 instead of init_registers ().
8845 * linux-arm-low.c (init_registers_arm): Add prototype.
8846 (init_registers_arm_with_iwmmxt): Likewise.
8847 (the_low_target): Add initializer for arch_setup field.
8848 * linux-cris-low.c (init_registers_cris): Add prototype.
8849 (the_low_target): Add initializer for arch_setup field.
8850 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8851 (the_low_target): Add initializer for arch_setup field.
8852 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8853 (the_low_target): Add initializer for arch_setup field.
8854 * linux-ia64-low.c (init_registers_ia64): Add prototype.
8855 (the_low_target): Add initializer for arch_setup field.
8856 * linux-m32r-low.c (init_registers_m32r): Add prototype.
8857 (the_low_target): Add initializer for arch_setup field.
8858 * linux-m68k-low.c (init_registers_m68k): Add prototype.
8859 (the_low_target): Add initializer for arch_setup field.
8860 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8861 (init_registers_mips64_linux): Likewise.
8862 (the_low_target): Add initializer for arch_setup field.
8863 * linux-ppc-low.c (init_registers_ppc): Add prototype.
8864 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8865 (the_low_target): Add initializer for arch_setup field.
8866 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8867 (init_registers_powerpc_64): Likewise.
8868 (the_low_target): Add initializer for arch_setup field.
8869 * linux-s390-low.c (init_registers_s390): Add prototype.
8870 (init_registers_s390x): Likewise.
8871 (the_low_target): Add initializer for arch_setup field.
8872 * linux-sh-low.c (init_registers_sh): Add prototype.
8873 (the_low_target): Add initializer for arch_setup field.
8874 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8875 (the_low_target): Add initializer for arch_setup field.
8876 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8877 (the_low_target): Add initializer for arch_setup field.
8878
8879 * win32-low.h (struct win32_target_ops): Add arch_setup field.
8880 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8881 instead of init_registers ().
8882 * win32-arm-low.c (init_registers_arm): Add prototype.
8883 (the_low_target): Add initializer for arch_setup field.
8884 * win32-i386-low.c (init_registers_i386): Add prototype.
8885 (the_low_target): Add initializer for arch_setup field.
8886
8887 * spu-low.c (init_registers_spu): Add prototype.
8888 (initialize_low): Call initialie_registers_spu () instead of
8889 initialize_registers ().
8890
fd96d250
PA
88912008-02-19 Pedro Alves <pedro@codesourcery.com>
8892
8893 * server.c (handle_v_requests): When handling the vRun and vAttach
8894 packets, if already debugging a process, don't kill it. Return an
8895 error instead.
8896
d41b6bb4
DJ
88972008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
8898
8899 * server.c (handle_query): Correct length check.
8900
5ac588cf
PA
89012008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
8902
8903 * win32-low.c (do_initial_child_stuff): Add process handle
8904 parameter. Set current_process_handle and current_process_id from the
8905 parameters. Clear globals.
8906 (win32_create_inferior): Don't set current_process_handle and
8907 current_process_id here. Instead pass them on the call to
8908 do_initial_child_stuff.
8909 (win32_attach): Likewise.
8910 (win32_clear_inferiors): New.
8911 (win32_kill): Don't close the current process handle or the
8912 current thread handle here. Instead call win32_clear_inferiors.
8913 (win32_detach): Don't open a new handle to the process. Call
8914 win32_clear_inferiors.
8915 (win32_join): Don't rely on current_process_handle; open a new
8916 handle using the process id.
8917 (win32_wait): Call win32_clear_inferiors when the inferior process
8918 has exited.
8919
ecd7ecbc
DJ
89202008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
8921
8922 * server.c (monitor_show_help): Add "exit".
8923
1525d545
MG
89242008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
8925
ecd7ecbc 8926 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
8927 (clean): Add reg-xtensa.c.
8928 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
8929 * configure.srv (xtensa*-*-linux*) New target.
8930 * linux-xtensa-low.c: New.
8931 * xtensa-xtregs.c: New.
1525d545 8932
59a016f0
PA
89332008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
8934
8935 * hostio.c: Don't include errno.h.
8936 (errno_to_fileio_errno): Move to hostio-errno.
8937 * hostio.c: (hostio_error): Remove the error parameter. Defer the
8938 error number outputting to the target->hostio_last_error callback.
8939 (hostio_packet_error): Use FILEIO_EINVAL directly.
8940 (handle_open, handle_pread, hostio_error, handle_unlink): Update
8941 calls to hostio_error.
8942 * hostio-errno.c: New.
8943 * server.h (hostio_last_error_from_errno): Declare.
8944 * target.h (target_ops): Add hostio_last_error member.
8945 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8946 as hostio_last_error handler.
889bf7c5 8947 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
8948 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8949 (wince_hostio_last_error): New functions.
8950 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8951 as hostio_last_error handler.
8952 (win32_target_ops) [!_WIN32_WCE]: Register
8953 hostio_last_error_from_errno as hostio_last_error handler.
8954 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8955 (hostio-errno.o): New rule.
8956 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8957 * configure.srv (srv_hostio_err_objs): New variable. Default to
8958 hostio-errno.o.
8959 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8960 * configure: Regenerate.
8961
2d717e4f
DJ
89622008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8963
8964 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8965 (linux_kill, linux_detach): Clean up the process list.
8966 * remote-utils.c (remote_open): Improve port number parsing.
8967 (putpkt_binary, input_interrupt): Only send interrupts if the target
8968 is running.
8969 * server.c (extended_protocol): Make static.
8970 (attached): Define earlier.
8971 (exit_requested, response_needed, program_argv): New variables.
8972 (target_running): New.
8973 (start_inferior): Clear attached here.
8974 (attach_inferior): Set attached here.
8975 (require_running): Define.
8976 (handle_query): Use require_running and target_running. Implement
8977 "monitor exit".
8978 (handle_v_attach, handle_v_run): New.
8979 (handle_v_requests): Use require_running. Handle vAttach and vRun.
8980 (gdbserver_usage): Update.
8981 (main): Redo argument parsing. Handle --debug and --multi. Handle
8982 --attach along with other options or after the port. Save
8983 program_argv. Support no initial program. Resynchronize
8984 communication with GDB after an error. Handle "monitor exit".
8985 Use require_running and target_running. Always allow the extended
8986 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
8987 restart in extended mode.
8988 * README: Refer to the GDB manual. Update --attach usage.
8989
7407e2de
AS
89902007-12-20 Andreas Schwab <schwab@suse.de>
8991
8992 * linux-low.c (STACK_SIZE): Define.
8993 (linux_tracefork_child): Use it. Use __clone2 on ia64.
8994 (linux_test_for_tracefork): Likewise.
8995
b65d95c5
DJ
89962007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
8997
8998 * linux-low.c (linux_wait_for_event): Update messages. Do not
8999 reinsert auto-delete breakpoints.
9000 * mem-break.c (struct breakpoint): Change return type of handler to
9001 int.
9002 (set_breakpoint_at): Update handler type.
9003 (reinsert_breakpoint_handler): Return 1 instead of calling
9004 delete_breakpoint.
9005 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9006 setting a new one.
9007 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9008 * mem-break.h (set_breakpoint_at): Update handler type.
9009 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9010 * win32-low.c (auto_delete_breakpoint): New.
9011 (get_child_debug_event): Use it.
9012
4e799345
DJ
90132007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9014
9015 * configure.ac: Check for pread and pwrite.
9016 * hostio.c (handle_pread): Fall back to lseek and read.
9017 (handle_pwrite): Fall back to lseek and write.
9018 * config.in, configure: Regenerated.
9019
27524b67
DJ
90202007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9021
9022 * server.c (myresume): Add own_buf argument.
9023 (main): Update calls.
9024
a20d5e98
DJ
90252007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9026
9027 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9028 * remote-utils.c (remote_open): Do not call disable_async_io.
9029 (block_async_io): Delete.
9030 (unblock_async_io): Make static.
9031 (initialize_async_io): New.
9032 * server.c (handle_v_cont): Handle async I/O here.
9033 (myresume): Likewise. Move other common resume tasks here...
9034 (main): ... from here. Call initialize_async_io. Disable async
9035 I/O before the main loop.
9036 * server.h (initialize_async_io): Declare.
9037 (block_async_io, unblock_async_io): Delete prototypes.
9038 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9039
b79d787e
DJ
90402007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9041
9042 * remote-utils.c (readchar): Allow binary data in received messages.
9043
d97903b2
PA
90442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9045
9046 * win32-low.c (attaching): New global.
9047 (win32_create_inferior): Clear the `attaching' global.
9048 (win32_attach): Set the `attaching' global.
9049 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9050 attaching. Only set a breakpoint at the entry point if not
9051 attaching.
9052
311de423
PA
90532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9054
9055 * server.c (main): Don't report dll events on the initial
9056 connection on attaches.
9057
6c2d16d2
PA
90582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9059
9060 * server.c (main): Relax numerical bases supported for the pid of
9061 the --attach command line argument.
9062
5ca906e6
PA
90632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9064
9065 * win32-low.c (win32_attach): Call OpenProcess before
9066 DebugActiveProcess, not after. Add last error output to error
9067 call.
9068
9c6c8194
PA
90692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9070
9071 * win32-low.c (win32_get_thread_context)
9072 (win32_set_thread_context): New functions.
9073 (thread_rec): Use win32_get_thread_context.
9074 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9075 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9076 field.
9077
4d5d1aaa
PA
90782007-12-03 Leo Zayas
9079 Pedro Alves <pedro_alves@portugalmail.pt>
9080
9081 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9082 global variables.
9083 (child_add_thread): Minor cleanup.
9084 (child_continue): Resume artificially suspended threads before
9085 calling ContinueDebugEvent.
9086 (suspend_one_thread): New.
9087 (fake_breakpoint_event): New.
9088 (get_child_debug_event): Change return type to int. Check here if
9089 gdb sent an interrupt request. If a soft interrupt was requested,
9090 fake a breakpoint event. Return 0 if there is no event to handle,
9091 and 1 otherwise.
9092 (win32_wait): Don't check here if gdb sent an interrupt request.
9093 Ensure there is a valid event to handle.
9094 (win32_request_interrupt): Add soft interruption method as last
9095 resort.
9096
c436e841
PA
90972007-12-03 Leo Zayas
9098 Pedro Alves <pedro_alves@portugalmail.pt>
9099
9100 * win32-low.h (win32_thread_info): Add descriptions to the
9101 structure members. Replace `suspend_count' counter by a
9102 `suspended' flag.
9103 * win32-low.c (thread_rec): Update condition of when to get the
9104 context from the inferior. Rely on ContextFlags being set if it
9105 has already been retrieved. Only suspend the inferior thread if
9106 we haven't already. Warn if that fails.
9107 (continue_one_thread): s/suspend_count/suspended/. Only call
9108 ResumeThread once. Warn if that fails.
9109
e7b5fa67
PA
91102007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9111
9112 * win32-low.c (win32_wait): Don't read from the inferior when it
9113 has already exited.
9114
a385171d
PA
91152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9116
9117 * Makefile.in (win32_low_h): New variable.
9118 (win32-low.o): Add dependency on $(win32_low_h).
9119 (win32-arm-low.o, win32-i386-low.o): New rules.
9120
f80c84b3
DJ
91212007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9122
9123 * hostio.c: Correct copyright year.
9124
a6b151f1
DJ
91252007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9126
9127 * Makefile.in (OBS): Add hostio.o.
9128 (hostio.o): New rule.
9129 * server.h (handle_vFile): Declare.
9130 * hostio.c: New file.
9131 * server.c (handle_v_requests): Take packet_len and new_packet_len
9132 for binary packets. Call handle_vFile.
9133 (main): Update call to handle_v_requests.
9134
f9387fc3
DJ
91352007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9136
9137 * linux-low.c: Include <sched.h>.
9138
51c2684e
DJ
91392007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9140
9141 * linux-low.c (linux_tracefork_grandchild): New.
9142 (linux_tracefork_child): Use clone.
9143 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9144
75f83163
JB
91452007-10-31 Joel Brobecker <brobecker@adacore.com>
9146
9147 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9148
da5898ce
DJ
91492007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9150
9151 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9152
24a09b5f
DJ
91532007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9154
9155 * inferiors.c (change_inferior_id): Delete.
9156 (add_pid_to_list, pull_pid_from_list): New.
9157 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9158 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9159 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9160 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9161 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9162 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9163 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9164 (using_threads): Always set to 1.
9165 (handle_extended_wait): New.
9166 (add_process): Do not set TID.
9167 (linux_create_inferior): Set must_set_ptrace_flags.
9168 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9169 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9170 (linux_thread_alive): Rename TID argument to LWPID.
9171 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9172 (linux_wait_for_event): Do not use TID or check using_threads. Update
9173 call to dead_thread_notify. Call handle_extended_wait.
9174 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9175 (send_sigstop): Delete sigstop_sent.
9176 (wait_for_sigstop): Avoid TID.
9177 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9178 (linux_test_for_tracefork): New.
9179 (linux_lookup_signals): Use thread_db_active and
9180 linux_supports_tracefork_flag.
9181 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9182 * linux-low.h (get_process_thread): Avoid TID.
9183 (struct process_ifo): Move thread_known and tid to the end. Remove
9184 sigstop_sent.
9185 (linux_attach_lwp, thread_db_init): Update prototypes.
9186 * server.h (change_inferior_id): Delete prototype.
9187 (add_pid_to_list, pull_pid_from_list): New prototypes.
9188 * thread-db.c (thread_db_use_events): New.
9189 (find_first_thread): Rename to...
9190 (find_one_thread): ...this. Update callers and messages. Do not
9191 call fatal. Check thread_db_use_events. Do not call
9192 change_inferior_id or new_thread_notify.
9193 (maybe_attach_thread): Update. Do not call new_thread_notify.
9194 (thread_db_init): Set thread_db_use_events. Check use_events.
9195 * utils.c (fatal, warning): Correct message prefix.
9196
30ed0a8f
DJ
91972007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9198
9199 * Makefile.in (clean): Remove new files.
9200 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9201 (powerpc-64.o, powerpc-64.c): New rules.
9202 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9203 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9204 with SPE.
9205 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9206 SPE targets.
9207 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9208 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9209 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9210 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9211 (target_regsets): Add AltiVec and SPE register sets.
9212 * configure.ac: Check for AltiVec and SPE.
9213 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9214 (ppc_fill_vrregset, ppc_store_vrregset): New.
9215 (target_regsets): Add AltiVec register set.
9216 * configure: Regenerated.
9217
fd462a61
DJ
92182007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9219
9220 * linux-low.c (O_LARGEFILE): Define.
9221 (linux_read_memory): Use /proc/PID/mem.
9222 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9223 * configure, config.in: Regenerated.
9224
69f223ed
DJ
92252007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9226
9227 * linux-low.c (linux_wait_for_event): Do not pass signals while
9228 single-stepping.
9229
aec18585
PA
92302007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9231
9232 * win32-low.c (create_process): New.
9233 (win32_create_inferior): Use create_process instead of
9234 CreateProcess. If create_process failed retry appending an ".exe"
9235 suffix. Store the GetLastError result immediatelly after
9236 create_process calls and use it on the call to error.
9237
34d86ddd
PA
92382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9239
9240 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9241
5a0e3bd0
JB
92422007-08-23 Joel Brobecker <brobecker@adacore.com>
9243
9244 * configure.ac: Switch license to GPLv3.
9245
f88c79e6
MS
92462007-08-01 Michael Snyder <msnyder@access-company.com>
9247
9248 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9249
6b3d9b83
PA
92502007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9251
9252 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9253 typedef.
9254 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9255 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9256 CloseToolhelp32Snapshot.
9257 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9258 CloseToolhelp32Snapshot.
9259
c588c53c
MS
92602007-07-27 Michael Snyder <michael.snyder@access-company.com>
9261
9262 * server.c (main): Check for inferior exit before main loop.
9263
aa0403d9
PA
92642007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9265
9266 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9267 instead of on tmp_desc.
9268
255e7678
DJ
92692007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9270 Daniel Jacobowitz <dan@codesourcery.com>
9271
9272 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9273 (add_thread): Minor cleanups.
9274 (clear_inferiors): Move lower in the file. Clear the DLL
9275 list.
9276 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9277 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9278 (xml_escape_text): New.
9279 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9280 for qSupported.
9281 (handle_v_cont): Report errors.
9282 (gdbserver_version): Update.
9283 (main): Correct size of own_buf. Do not report initial DLL events.
9284 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9285 (unloaded_dll, xml_escape_text): New.
9286 * win32-low.c (enum target_waitkind): Update comments.
9287 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9288 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9289 (win32_EnumProcessModules, win32_GetModuleInformation)
9290 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9291 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9292 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9293 (win32_Module32First, win32_Module32Next, load_toolhelp)
9294 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9295 (get_child_debug_event): Handle DLL events.
9296 (win32_wait): Likewise.
9297
0d37add9
DJ
92982007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9299
9300 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9301 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9302
45e2715e
PA
93032007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9304
9305 * win32-low.c (handle_output_debug_string): Ignore event if not
9306 waiting.
9307
c5674cf1
PA
93082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9309
9310 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9311
2bbe3cc1
DJ
93122007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9313
9314 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9315
ae13219e
DJ
93162007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9317
9318 * inferiors.c (change_inferior_id): Add comment.
9319 * linux-low.c (check_removed_breakpoint): Add an early
9320 prototype. Improve debug output.
9321 (linux_attach): Doc update.
9322 (linux_detach_one_process, linux_detach): Clean up before releasing
9323 each process.
9324 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9325 * linux-low.h (struct process_info): Doc improvement.
9326 * mem-break.c (delete_all_breakpoints): New.
9327 * mem-break.h (delete_all_breakpoints): New prototype.
9328 * thread-db.c (find_first_thread): New.
9329 (thread_db_create_event): Call it instead of
9330 thread_db_find_new_threads. Clean up unused variables.
9331 (maybe_attach_thread): Remove first thread handling.
9332 (thread_db_find_new_threads): Use find_first_thread.
9333 (thread_db_get_tls_address): Likewise.
9334
4105de34
DJ
93352007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9336
9337 * thread-db.c (thread_db_find_new_threads): Add prototype.
9338 (thread_db_create_event): Check for the main thread before adding
9339 a new thread.
9340 (maybe_attach_thread): Only enable event reporting if TID == 0.
9341 (thread_db_get_tls_address): Check for new threads.
9342
2b876972
DJ
93432007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9344
9345 * linux-low.c (linux_create_inferior): Try execv before execvp.
9346 * spu-low.c (spu_create_inferior): Likewise.
9347
7a245884
DJ
93482007-06-13 Mike Frysinger <vapier@gentoo.org>
9349
9350 * linux-low.c (linux_create_inferior): Change execv to execvp.
9351 * spu-low.c (spu_create_inferior): Likewies.
9352
117ce543
DJ
93532007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9354
9355 * Makefile.in (clean): Clean new files instead of deleted ones.
9356 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9357 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9358 rules.
9359 * configure.srv: Specify XML files and new regformats for MIPS and
9360 MIPS64 GNU/Linux.
9361 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9362 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9363 an entry for the restart register.
9364 (mips_cannot_fetch_register, mips_cannot_store_register)
9365 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9366 register names to match the XML descriptions.
9367 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9368 restart register instead of $0.
9369
0e7f50da
UW
93702007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9371 Markus Deuling <deuling@de.ibm.com>
9372
9373 * remote-utils.c (decode_xfer_write): New function.
9374 * server.h (decode_xfer_write): Add prototype.
9375 * server.c (handle_query): Add PACKET_LEN argument. Support
9376 qXfer:spu:read and qXfer:spu:write packets.
9377 (main): Pass packet_len to handle_query.
9378 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9379 * target.h (target_ops): Add qxfer_spu.
9380
374c1d38
UW
93812007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9382
9383 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9384 accessing non-seekable spufs files.
9385
bb63802a
UW
93862007-05-16 Markus Deuling <deuling@de.ibm.com>
9387
889bf7c5 9388 * server.c (handle_query): Add reply for qC packet.
bb63802a 9389
7390519e
PA
93902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9391 Leo Zayas <lerele@champenstudios@com>
9392
9393 * server.h (check_remote_input_interrupt_request): New function.
9394 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9395 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9396 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9397 (check_remote_input_interrupt_request): New function.
9398 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9399 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9400 winapi_GenerateConsoleCtrlEvent): New typedefs.
9401 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9402 to 250 ms.
9403 (win32_wait): Check for remote interrupt request
9404 with check_remote_input_interrupt_request.
9405 (win32_request_interrupt): New function.
9406 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9407
34b34921
PA
94082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9409
9410 * win32-low.c (debug_registers_changed,
9411 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9412 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9413 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9414 (thread_rec): Get context using the low target.
9415 (child_add_thread): Call thread_added on the low target,
9416 which does the same thing.
9417 (regptr): Delete.
9418 (do_initial_child_stuff): Remove debug registers references.
9419 Set context using the low target. Resume threads after
9420 setting the contexts.
9421 (child_continue): Remove dead variable. Remove debug
9422 registers references.
9423 (child_fetch_inferior_registers): Go through the low target.
9424 (do_child_store_inferior_registers): Remove.
9425 (child_store_inferior_registers): Go through the low target.
9426 (win32_resume): Remove debug registers references.
9427 Set context using the low target.
9428 (handle_exception): Change return type to void. Don't record
9429 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9430 first chance exception.
889bf7c5 9431 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9432 goto loop. Always return after waiting for debug event.
9433 (win32_wait): Convert to switch statement. Handle spurious
9434 events.
9435
9436 * win32-i386-low.c (debug_registers_changed,
9437 debug_registers_used): New.
9438 (initial_stuff): Rename to ...
9439 (i386_initial_stuff): ... this. Clear debug registers
9440 state variables.
9441 (store_debug_registers): Delete.
9442 (i386_get_thread_context): New.
9443 (load_debug_registers): Delete.
9444 (i386_set_thread_context): New.
9445 (i386_thread_added): New.
9446 (single_step): Rename to ...
9447 (i386_single_step): ... this.
9448 (do_fetch_inferior_registers): Rename to ...
9449 (i386_fetch_inferior_register): ... this.
9450 (i386_store_inferior_register): New.
9451 (the_low_target): Adapt to new interface.
9452
9453 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9454 (arm_get_thread_context): New.
9455 (arm_set_thread_context): New.
9456 (regptr): New.
9457 (do_fetch_inferior_registers): Rename to ...
9458 (arm_fetch_inferior_register): ... this.
9459 (arm_store_inferior_register): New.
9460 (arm_wince_breakpoint): Reimplement as unsigned long.
9461 (arm_wince_breakpoint_len): Define.
9462 (the_low_target): Adapt to new interface.
9463
9464 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9465 load_debug_registers. Add get_thread_context, set_thread_context,
9466 thread_added and store_inferior_register. Rename
9467 fetch_inferior_registers to fetch_inferior_register.
9468 (regptr): Remove declaration.
9469
dd6953e1
PA
94702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9471
9472 * linux-low.c (linux_detach): Change return type to int. Return 0.
9473 * spu-low.c (spu_detach): Likewise.
9474
444d6139
PA
94752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9476
9477 * target.h (target_ops): Change return type of detach to int.
9478 Add join.
9479 (join_inferior): New.
9480 * server.c (main): Don't skip detach support on mingw32.
9481 If the inferior doesn't support detaching return error.
9482 Call join_inferior instead of using waitpid.
9483 * linux-low.c (linux_join): New.
9484 (linux_target_op): Add linux_join.
9485 * spu-low.c (spu_join): New.
9486 (spu_target_ops): Add spu_join.
9487 * win32-low.c (win32_detach): Adapt to new interface.
9488 Reopen current_process_handle before detaching. Issue a child
9489 resume before detaching.
9490 (win32_join): New.
9491 (win32_target_op): Add win32_join.
9492
1d5315fe
PA
94932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9494
9495 * win32-low.c (win32-attach): Fix return value.
9496 * target.h (target_ops): Describe ATTACH return values.
9497
bf914831
PA
94982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9499
9500 * win32-low.c (GETPROCADDRESS): Define.
9501 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9502 (winapi_DebugSetProcessKillOnExit): Likewise.
9503 (win32_create_inferior): Force usage of ansi CreateProcessA.
9504 (win32_attach): Use GETPROCADDRESS.
9505 (win32_detach): Likewise.
9506
f72f3e60
PA
95072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9508
9509 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9510
ed50f18f
PA
95112007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9512
9513 * win32-low.c: Commit leftover changes from 2007-03-29.
9514
0c2ead7e
DJ
95152007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9516
9517 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9518 fields short instead of int. Add explicit padding.
9519 (i387_cache_to_fsave): Remove unnecessary casts.
9520 (i387_fsave_to_cache): Doc fix.
9521 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9522
73725ff3
DJ
95232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9524
9525 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9526 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9527
d99f33d8
PA
95282007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9529
9530 * configure.srv (arm*-*-mingw32ce*): Move near the other
9531 arm targets.
9532
68070c10
PA
95332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9534
2482afc6 9535 * configure.ac: Add errno checking.
68070c10
PA
9536 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9537 sys/file.h and malloc.h.
9538 (AC_CHECK_DECLS): Add perror.
9539 (srv_mingwce): Handle.
2482afc6 9540 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9541 win32-i386-low.o to srv_tgtobj.
9542 (i[34567]86-*-mingw*): Likewise.
9543 (arm*-*-mingw32ce*): Add case.
9544 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9545 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9546 [__MINGW32CE__] (strerror): New function.
9547 [__MINGW32CE__] (errno): Define to GetLastError.
9548 [__MINGW32CE__] (COUNTOF): New macro.
9549 (remote_open): Remove extra close call.
9550 * mem-break.c (delete_breakpoint_at): New function.
9551 * mem-break.h (delete_breakpoint_at): Declare.
9552 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9553 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9554 [USE_WIN32API] (read, write): Add char* casts.
9555 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9556 * server.h: Include wincecompat.h on Windows CE.
9557 [HAVE_ERRNO_H]: Check.
9558 (perror): Declare if not declared.
9559 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9560 (perror_with_name): Remove errno declaration.
9561 * wincecompat.h: New.
9562 * wincecompat.c: New.
9563 * win32-low.h: New.
9564 * win32-arm-low.c: New.
9565 * win32-i386-low.c: New.
9566 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9567 (OUTMSG2): Make it safe.
9568 (_T): New macro.
9569 (COUNTOF): New macro.
9570 (NUM_REGS): Get it from the low target.
9571 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9572 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9573 (thread_rec): Let low target handle debug registers.
9574 (child_add_thread): Likewise.
9575 (child_init_thread_list): Likewise.
9576 (continue_one_thread): Likewise.
9577 (regptr): New.
9578 (do_child_fetch_inferior_registers): Move to ...
9579 * win32-i386-low.c: ... here, and rename to ...
9580 (do_fetch_inferior_registers): ... this.
889bf7c5 9581 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9582 Go through the low target.
9583 (do_child_store_inferior_registers): Use regptr.
9584 (strwinerror): New function.
9585 (win32_create_inferior): Handle Windows CE.
9586 Use strwinerror instead of strerror on Windows error
9587 codes. Add program to the error output.
9588 Don't close the main thread handle on Windows CE.
9589 (win32_attach): Use coredll.dll on Windows CE.
9590 (win32_kill): Close current process and current
9591 thread handles.
9592 (win32_detach): Use coredll.dll on Windows CE.
9593 (win32_resume): Let low target handle debug registers, and
9594 step request.
9595 (handle_exception): Add/Remove initial breakpoint. Avoid
9596 non-existant WSTOPSIG on Windows CE.
9597 (win32_read_inferior_memory): Cast to remove warning.
9598 (win32_arch_string): Go through the low target.
9599 (initialize_low): Call set_breakpoint_data with the low
9600 target's breakpoint.
9601 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9602 FOP_REGNUM, mappings): Move to ...
9603 * win32-i386-low.c: ... here.
9604 * win32-low.c (win32_thread_info): Move to ...
9605 * win32-low.h: ... here.
9606 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9607 win32-arm-low.c and wincecompat.c.
9608 (all:): Add $EXEEXT.
9609 (install-only:): Likewise.
9610 (gdbserver:): Likewise.
9611 (gdbreplay:): Likewise.
9612 * config.in: Regenerate.
9613 * configure: Regenerate.
9614
41093d81
PA
96152007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9616
9617 * win32-low.c: Rename typedef thread_info to
9618 win32_thread_info throughout.
9619
544afa54
PA
96202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9621
9622 * win32-i386-low.c: Rename to ...
9623 * win32-low.c: ... this.
9624 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9625 * Makefile.in: Likewise.
9626
bce7165d
PA
96272007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9628
9629 * remote-utils.c (monitor_output): Constify msg parameter.
9630 * server.h (monitor_output): Likewise.
9631 * win32-i386-low.c (handle_output_debug_string): New.
9632 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9633 handle_output_debug_string.
9634 (get_child_debug_event): Likewise.
9635
506c7aa0
DJ
96362007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9637
9638 * server.c (main): Correct strtoul check.
9639
42c81e2a
DJ
96402007-03-27 Jon Ringle <jon@ringle.org>
9641
9642 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9643
9453113a
DJ
96442007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9645
9646 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9647
64a69107
DJ
96482007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9649
9650 * terminal.h: Check HAVE_SGTTY_H.
9651
96522007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9653
9654 * remote-utils.c (remote_open): Print out the assigned port number.
9655
c74d0ad8
DJ
96562007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9657
9658 * remote-utils.c (monitor_output): New function.
9659 * server.c (debug_threads): Define here.
9660 (monitor_show_help): New function.
9661 (handle_query): Handle qRcmd.
9662 (main): Do not handle 'd' packet.
9663 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9664 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9665 of debug_threads.
9666
de7c3b4a
PA
96672007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9668
9669 * Makefile.in (EXEEXT): New.
9670 (clean): Use $(EXEEXT).
9671
ef57601b
PA
96722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9673
9674 * target.h (target_ops): Rename send_signal to request_interrupt,
9675 and remove enum target_signal parameter.
9676 * linux-low.c (linux_request_interrupt): Rename from
9677 linux_send_signal, and always send SIGINT.
9678 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9679 and always send SIGINT.
9680 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9681 of send_signal.
9682 (input_interrupt): Likewise.
9683
820f2bda
PA
96842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9685
9686 * server.c (get_features_xml): Check if target implemented
9687 arch_string.
9688 * win32-i386-low.c (win32_arch_string): New.
9689 (win32_target_ops): Add win32_arch_string as arch_string member.
9690
ab39bf24
UW
96912007-02-22 Markus Deuling <deuling@de.ibm.com>
9692
9693 * spu-low.c (spu_arch_string): New.
9694 (spu_target_ops): Add spu_arch_string.
9695
61ff6e04
DJ
96962007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9697
9698 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9699 * configure.ac: Do not check for terminal.h.
9700 * configure, config.in: Regenerated.
9701
fb1e4ffc
DJ
97022007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9703
9704 * Makefile.in (OBS): Add $(XML_BUILTIN).
9705 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9706 (clean): Update.
9707 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9708 (arm-with-iwmmxt.c): New.
9709 * config.in, configure: Regenerate.
9710 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9711 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9712 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9713 (arm*-*-linux*): Add iWMMXt and regset support.
9714 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9715 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9716 (arm_store_wmmxregset, target_regsets): New.
9717 * server.c (get_features_xml): Take annex argument. Check builtin
9718 XML documents.
9719 (handle_query): Handle multiple annexes.
9720
0f48aa01
DJ
97212007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9722
9723 * remote-utils.c [USE_WIN32API] (read, write): Define.
9724 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9725 write.
9726
23181151
DJ
97272007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9728
9729 * linux-i386-low.c (the_low_target): Set arch_string.
9730 * linux-x86-64-low.c (the_low_target): Likewise.
9731 * linux-low.c (linux_arch_string): New.
9732 (linux_target_ops): Add it.
9733 * linux-low.h (struct linux_target_ops): Add arch_string.
9734 * server.c (write_qxfer_response): Use const void * for DATA.
9735 (get_features_xml): New.
9736 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9737 * target.h (struct target_ops): Add arch_string method.
9738
9d606399
DJ
97392007-01-03 Denis Pilat <denis.pilat@st.com>
9740 Daniel Jacobowitz <dan@codesourcery.com>
9741
9742 * linux-low.c (linux_kill): Handle being called with no threads.
9743 * win32-i386-low.c (win32_kill): Likewise.
9744 (get_child_debug_event): Clear current_process_handle.
9745
97462006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9747 Daniel Jacobowitz <dan@codesourcery.com>
9748
9749 * remote-utils.c (remote_open): Check the type of specified
9750 serial port devices before opening them.
9751 * server.c (main): Kill the inferior if an error occurs during
9752 the first remote_open.
9753
a5e13d24
DJ
97542006-12-05 Markus Deuling <deuling@de.ibm.com>
9755
9756 * README: Update supported targets.
9757
186947f7
DJ
97582006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9759
9760 * Makefile.in (clean): Remove reg-mips64.c.
9761 (reg-mips64.c, reg-mips64.o): New rules.
9762 * configure.srv: Handle mips64. Include regset support for mips.
9763 * linux-mips-low.c (union mips_register): New.
9764 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9765 (mips_breakpoint, mips_breakpoint_at): Use int.
9766 (mips_collect_register, mips_supply_register)
9767 (mips_collect_register_32bit, mips_supply_register_32bit)
9768 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9769 (mips_store_fpregset, target_regsets): New.
9770 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9771
a13e2c95
UW
97722006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9773
9774 * configure.srv: Add target "spu*-*-*".
9775 * Makefile.in (clean): Remove reg-spu.c.
9776 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9777 * spu-low.c: New file.
9778
cb7283db
DJ
97792006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9780
9781 * configure.ac: Correct td_thr_tls_get_addr test.
9782 * configure: Regenerated.
9783
89be2091
DJ
97842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9785
9786 * linux-low.c (linux_wait_for_event): Reformat. Use the
9787 pass_signals array.
9788 * remote-utils.c (decode_address_to_semicolon): New.
9789 * server.c (pass_signals, handle_general_set): New.
9790 (handle_query): Mention QPassSignals for qSupported.
9791 (main): Call handle_general_set.
9792 * server.h (pass_signals, decode_address_to_semicolon): New.
9793
000ef4f0
DJ
97942006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9795
9796 * server.c (handle_query): Correct error handling for read_auxv.
9797
b7149293
UW
97982005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9799
9800 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9801 and srv_linux_thread_db to yes.
9802 * linux-s390-low.c (s390_fill_gregset): New function.
9803 (target_regsets): Define data structure.
9804
dae5f5cf
DJ
98052006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9806
9807 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9808 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
9809 * config.in, configure: Regenerated.
9810 * inferiors.c (gdb_id_to_thread): New function.
9811 (gdb_id_to_thread_id): Use it.
9812 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9813 * linux-low.h (struct process_info): Add th member.
9814 (thread_db_get_tls_address): New prototype.
9815 * remote-utils.c (decode_address): Make non-static.
9816 * server.c (handle_query): Handle qGetTLSAddr.
9817 * server.h (gdb_id_to_thread, decode_address): New prototypes.
9818 * target.h (struct target_ops): Add get_tls_address.
9819 * thread-db.c (maybe_attach_thread): Save the thread handle.
9820 (thread_db_get_tls_address): New.
9821
32ca6d61
DJ
98222006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
9823
9824 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9825 (linux_resume_one_process): Take a siginfo_t *. Update all
9826 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
9827 (struct pending_signals): Add a siginfo_t.
9828 (linux_wait_for_process): Always set last_status.
9829 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9830 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9831 * linux-low.h (struct process_info): Add last_status.
9832
5ffff7c1
DJ
98332006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
9834
9835 * remote-utils.c (try_rle): New function.
9836 (putpkt_binary): Use it.
9837
8695c747
DJ
98382006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
9839
9840 * Makefile.in (clean): Clean reg-x86-64-linux.c.
9841 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9842 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9843 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9844 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9845 point registers.
9846
290fadea
RS
98472006-08-08 Richard Sandiford <richard@codesourcery.com>
9848
9849 * server.c (terminal_fd): New variable.
9850 (old_foreground_pgrp): Likewise.
9851 (restore_old_foreground_pgrp): New function.
9852 (start_inferior): Record the terminal file descriptor in terminal_fd
9853 and its original foreground group in old_foreground_pgrp. Register
9854 restore_old_foreground_pgrp with atexit().
9855
9f2e1e63
DJ
98562006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
9857
9858 * server.c (handle_query): Correct qPart to qXfer.
9859
b80864fb
DJ
98602006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
9861
9862 * configure.ac: Check for more headers which are missing on
9863 Windows. Automatically supply -lwsock32 and USE_WIN32API.
9864 * configure.srv: Add Cygwin and mingw32.
9865 * remote-utils.c: Don't include headers unconditionally which
9866 are missing on mingw32. Include <winsock.h> for mingw32.
9867 (remote_open): Adjust for mingw32 support. Flush
9868 standard error after writing to it.
9869 (remote_close, putpkt_binary, input_interrupt, block_async_io)
9870 (unblock_async_io, enable_async_io, disable_async_io)
9871 (readchar, getpkt): Update for Winsock support.
9872 (prepare_resume_reply): Expect a protocol signal number.
9873 * server.c: Disable <sys/wait.h> on mingw32.
9874 (start_inferior): Adjust for mingw32 support. Flush
9875 standard error after writing to it.
9876 (attach_inferior): Likewise. Use protocol signal
9877 numbers.
9878 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
9879 and names.
9880 * win32-i386-low.c: New file.
9881 * Makefile.in (XM_CLIBS): Set.
9882 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9883 (win32-i386-low.o): New dependency rule.
9884 * linux-low.c (linux_wait): Use target signal numbers.
9885 * target.h (struct target_ops): Doc fix.
9886 * server.h (target_signal_to_name): New prototype.
9887 * gdbreplay.c: Don't include headers unconditionally which
9888 are missing on mingw32. Include <winsock.h> for mingw32.
9889 (remote_close, remote_open): Adjust for Winsock support.
9890 * configure, config.in: Regenerated.
9891
0876f84a
DJ
98922006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9893
9894 * server.c (decode_xfer_read, write_qxfer_response): New.
9895 (handle_query): Take a packet length argument. Handle
9896 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
9897 the qSupported response.
9898 (main): Update call to handle_query.
9899
01f9e8fa
DJ
99002006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
9901
9902 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9903 (putpkt_binary): Renamed from putpkt and adjusted for binary
9904 data.
9905 (putpkt): New wrapper for putpkt_binary.
9906 (readchar): Don't mask off the high bit.
9907 (decode_X_packet): New function.
9908 * server.c (main): Call putpkt_binary if a handler sets the packet
9909 length. Save the length of the incoming packet. Handle 'X'.
9910 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9911
be2a5f71
DJ
99122006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
9913
9914 * server.c (handle_query): Handle qSupported.
9915
ea025f5f
DJ
99162006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9917
9918 * remote-utils.c (all_symbols_looked_up): New variable.
9919 (look_up_one_symbol): Check it.
9920 * server.h (look_up_one_symbol): New declaration.
9921 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9922
9308fc88
DJ
99232006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
9924
9925 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 9926 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
9927 (PTRACE_GET_THREAD_AREA): Define.
9928 (ps_get_thread_area): New function.
9929
52fb6437
NS
99302006-05-09 Nathan Sidwell <nathan@codesourcery.com>
9931
9932 * configure.srv (m68k*-*-uclinux*): New target.
9933 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9934 (linux_resume_one_process): Remove extraneous cast.
9935 (linux_read_offsets): New.
9936 (linux_target_op): Add linux_read_offsets on mmuless systems.
9937 * server.c (handle_query): Add qOffsets logic.
9938 * target.h (struct target_ops): Add read_offsets.
9939
21b0f40c
DJ
99402006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9941
9942 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9943 (PTRACE_GET_THREAD_AREA): Define.
9944 (ps_get_thread_area): New function.
9945 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9946 (linux-x86-64-low.o): Update.
9947
0050a760
DJ
99482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
9949
9950 * configure.ac: Remove checks for prfpregset_t.
9951 * gdb_proc_service.h: New file.
9952 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9953 new "gdb_proc_service.h".
9954 * proc-service.c: Likewise.
9955 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9956 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9957 * Makefile.in (gdb_proc_service_h): Updated.
9958 * configure, config.in: Regenerated.
9959
b92a518e
DJ
99602006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
9961
9962 * remote-utils.c (prepare_resume_reply): Move declaration
9963 of gdb_id_from_wait to the top of the block.
9964
545587ee
DJ
99652006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
9966
9967 * linux-low.c (regsets_store_inferior_registers): Read the regset
9968 from the target before filling it.
9969
9db87ebd
DJ
99702006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9971
9972 * server.c (attach_inferior): Return SIGTRAP for a successful
9973 attach.
9974
dd24457d
DJ
99752006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9976
9977 * Makefile.in (OBS): Add version.o.
9978 (STAGESTUFF): Delete.
9979 (version.o): Add dependencies.
9980 (version.c): Replace rule.
9981 (clean): Remove version.c.
9982 * server.c (gdbserver_version): New.
9983 (gdbserver_usage): Use printf.
9984 (main): Handle --version and --help.
9985 * server.h (version, host_name): Add declarations.
9986
6f0f660e
EZ
99872005-12-23 Eli Zaretskii <eliz@gnu.org>
9988
889bf7c5
PA
9989 * linux-arm-low.c:
9990 * linux-arm-low.c:
9991 * inferiors.c:
9992 * i387-fp.h:
9993 * i387-fp.c:
9994 * gdbreplay.c:
9995 * regcache.c:
9996 * proc-service.c:
9997 * mem-break.h:
9998 * mem-break.c:
9999 * linux-x86-64-low.c:
10000 * linux-sh-low.c:
10001 * linux-s390-low.c:
10002 * linux-ppc64-low.c:
10003 * linux-ppc-low.c:
10004 * linux-mips-low.c:
10005 * linux-m68k-low.c:
10006 * linux-m32r-low.c:
10007 * linux-low.h:
10008 * linux-low.c:
10009 * linux-ia64-low.c:
10010 * linux-i386-low.c:
10011 * linux-crisv32-low.c:
10012 * thread-db.c:
10013 * terminal.h:
10014 * target.h:
10015 * target.c:
10016 * server.h:
10017 * server.c:
10018 * remote-utils.c:
10019 * regcache.h:
10020 * utils.c:
10021 * Makefile.in:
10022 * configure.ac:
6f0f660e
EZ
10023 * gdbserver.1: Add (C) after Copyright. Update the FSF
10024 address.
10025
9d1fb177
DJ
100262005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10027
10028 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10029 (arm_breakpoint_at): Recognize both breakpoints.
10030 (the_low_target): Use the correct breakpoint instruction.
10031
011a70c2
DJ
100322005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10033
10034 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10035 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10036 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10037 (the_low_target): Update.
10038
7fb85e41
AS
100392005-10-25 Andreas Schwab <schwab@suse.de>
10040
10041 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10042
10043 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10044 (ia64_num_regs): Reduce to 462.
10045
3db0444b
DJ
100462005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10047
10048 * acinclude.m4: Correct quoting.
10049 * aclocal.m4: Regenerated.
10050
10051 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10052 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10053 (thread_db_init): Call thread_db_err_str.
10054 * configure.ac: Check for TD_VERSION.
10055 * config.in, configure: Regenerated.
10056
bee0189a
DJ
100572005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10058
10059 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10060
e9d25b98
DJ
100612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10062
10063 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10064 is not available. Define HAVE_PTRACE_GETREGS if it is.
10065 * config.in, configure: Regenerated.
10066 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10067 * linux-i386-low.c, linux-m68k-low.c: Update to use
10068 HAVE_PTRACE_GETREGS.
10069 * linux-low.c (regsets_fetch_inferior_registers)
10070 (regsets_store_inferior_registers): Only return 0 if we processed
10071 GENERAL_REGS.
10072 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10073 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10074
a06660f7
DJ
100752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10076
10077 * inferiors.c (struct thread_info): Add gdb_id.
10078 (add_thread): Add gdb_id argument.
10079 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10080 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10081 calls to add_thread.
10082 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10083 * server.c (handle_query): Use thread_to_gdb_id.
10084 (handle_v_cont, main): Use gdb_id_to_thread_id.
10085 * server.h (add_thread): Update prototype.
10086 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10087 prototypes.
10088
5a1f5858
DJ
100892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10090
10091 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10092 left-padded registers.
10093 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10094 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10095
e122f1f5
SE
100962005-07-01 Steve Ellcey <sje@cup.hp.com>
10097
10098 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10099 * configure: Regenerate.
10100 * config.in: Regenerate.
10101 * server.h (NEED_DECLARATION_STRERROR):
10102 Replace with !HAVE_DECL_STRERROR.
10103
d592fa2f
DJ
101042005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10105
10106 * linux-low.c (linux_wait, linux_send_signal): Don't test
10107 an unsigned long variable for > 0 if it could be MAX_ULONG.
10108 * server.c (myresume): Likewise.
10109 * target.c (set_desired_inferior): Likewise.
10110
ccbd4912
MK
101112005-06-13 Mark Kettenis <kettenis@gnu.org>
10112
10113 * configure.ac: Simplify and improve check for socklen_t.
10114 * configure, config.in: Regenerate.
10115
f450004a
DJ
101162005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10117
10118 * acconfig.h: Remove.
10119 * configure.ac: Add a test for socklen_t. Use three-argument
10120 AC_DEFINE throughout.
10121 * config.in: Regenerated using autoheader 2.59.
10122 * configure: Regenerated.
10123
10124 * gdbreplay.c (socklen_t): Provide a default.
10125 (remote_open): Use socklen_t.
10126 * remote-utils.c (socklen_t): Provide a default.
10127 (remote_open): Use socklen_t.
10128 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10129 unsigned char.
10130
10131 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10132 char for buffers.
10133 * linux-low.c (linux_read_memory, linux_write_memory)
10134 (linux_read_auxv): Likewise.
10135 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10136 (check_mem_write): Likewise.
10137 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10138 Likewise.
10139 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10140 (registers_from_string, register_data): Likewise.
10141 * server.c (handle_query, main): Likewise.
10142 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10143 (decode_M_packet): Likewise.
10144 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10145 * target.h (struct target_ops): Update read_memory, write_memory,
10146 and read_auxv.
10147 (read_inferior_memory, write_inferior_memory): Update.
10148 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10149 to unsigned char *.
10150 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10151 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10152 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10153 linux-s390-low.c, linux-sh-low.c: Update for changes in
10154 read_inferior_memory and the_low_target->breakpoint.
10155
eee84df1
DJ
101562005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10157
10158 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10159 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10160 * configure.srv: Add powerpc64-*-linux*.
10161 * linux-ppc64-low.c: New file.
10162
45b134e5
OF
101632005-05-23 Orjan Friberg <orjanf@axis.com>
10164
10165 * linux-cris-low.c: New file with support for CRIS.
10166 * linux-crisv32-low.c: Ditto for CRISv32.
10167 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10168 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10169 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10170 reg-crisv32.o, and reg-crisv32.c to make rules.
10171 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10172 recognized targets.
10173
48d93c75
UW
101742005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10175
10176 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10177 of sizeof (PTRACE_XFER_TYPE).
10178 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10179
e013ee27
OF
101802005-05-12 Orjan Friberg <orjanf@axis.com>
10181
889bf7c5 10182 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10183 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10184 pointers for hardware watchpoint support.
10185 * linux-low.h (struct linux_target_ops): Ditto.
10186 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10187 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10188 to linux_target_ops.
10189 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10190 reply packet.
10191 * server.c (main): Recognize 'Z' and 'z' packets.
10192
b0ded00b
UW
101932005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10194
10195 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10196 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10197 (the_low_target): Add new members.
10198
8643e2ad
DJ
101992005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10200
10201 * proc-service.c (ps_lgetregs): Search all_processes instead of
10202 all_threads.
10203
fc620387
DJ
102042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10205
10206 * server.c (start_inferior): Change return type to int.
10207 (attach_inferior): Change sigptr to int *.
10208 (handle_v_cont, handle_v_requests): Change signal to int *.
10209 (main): Change signal to int.
10210
102112005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10212
10213 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10214 * configure.srv: Add m32r*-*-linux*.
10215 * linux-m32r-low.c: New file.
10216
e0e76420
DJ
102172005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10218
10219 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10220
a1928bad
DJ
102212005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10222
10223 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10224 Take unsigned long arguments for PIDs.
10225 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10226 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10227 (wait_for_sigstop, linux_resume_one_process)
10228 (regsets_fetch_inferior_registers, linux_send_signal)
10229 (linux_read_auxv): Likewise. Update the types of variables holding
10230 PIDs. Update format string specifiers.
10231 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10232 * remote-utils.c (prepare_resume_reply): Likewise.
10233 * server.c (cont_thread, general_thread, step_thread)
10234 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10235 unsigned long.
10236 (handle_query): Update format specifiers.
10237 (handle_v_cont, main): Use strtoul for thread IDs.
10238 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10239 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10240 (general_thread, step_thread, thread_from_wait)
10241 (old_thread_from_wait): Update.
10242 * target.h (struct thread_resume): Use unsigned long for THREAD.
10243 (struct target_ops): Use unsigned long for arguments to attach and
10244 thread_alive.
10245
dcdb98d2
DJ
102462005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10247
10248 * acinclude.m4: Include bfd/bfd.m4 directly.
10249 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10250 <agriffis@toolchain.org>.
10251 * aclocal.m4, configure: Regenerated.
10252
bec39cab
AC
102532005-01-07 Andrew Cagney <cagney@gnu.org>
10254
10255 * configure.ac: Rename configure.in, require autoconf 2.59.
10256 * configure: Re-generate.
10257
434c4c77
DJ
102582004-12-08 Daniel Jacobowitz <dan@debian.org>
10259
10260 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10261 LIBS when finished.
10262 * aclocal.m4: Regenerated.
10263 * configure: Regenerated.
10264
db1d3e1b
AS
102652004-11-21 Andreas Schwab <schwab@suse.de>
10266
10267 * linux-m68k-low.c (m68k_num_gregs): Define.
10268 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10269 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10270 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10271 (m68k_breakpoint_at): New. Add to the_low_target.
10272
10273 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10274 srv_linux_thread_db to yes.
10275
43360365
JB
102762004-10-20 Joel Brobecker <brobecker@gnat.com>
10277
10278 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10279 (ARCH_SET_FS): Likewise.
10280 (ARCH_GET_FS): Likewise.
10281 (ARCH_GET_GS): Likewise.
10282
fd500816
DJ
102832004-10-16 Daniel Jacobowitz <dan@debian.org>
10284
10285 * linux-i386-low.c (ps_get_thread_area): New.
10286 * linux-x86-64-low.c (ps_get_thread_area): New.
10287 * linux-low.c: Include <sys/syscall.h>.
10288 (linux_kill_one_process): Don't kill the first thread here.
10289 (linux_kill): Kill the first thread here.
10290 (kill_lwp): New function.
10291 (send_sigstop, linux_send_signal): Use it.
10292 * proc-service.c: Clean up #ifdefs.
10293 (fpregset_info): Delete.
10294 (ps_lgetregs): Update and enable implementation.
10295 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10296 implementations.
10297 * remote-utils.c (struct sym_cache, symbol_cache): New.
10298 (input_interrupt): Print a clearer message.
10299 (async_io_enabled): New variable.
10300 (enable_async_io, disable_async_io): Use it. Update comments.
10301 (look_up_one_symbol): Use the symbol cache.
10302 * thread-db.c (thread_db_look_up_symbols): New function.
10303 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10304
f6de3c42
DJ
103052004-10-16 Daniel Jacobowitz <dan@debian.org>
10306
10307 * configure.in: Test for -rdynamic.
10308 * configure: Regenerated.
10309 * Makefile (INTERNAL_LDFLAGS): New.
10310 (gdbserver, gdbreplay): Use it.
10311
2c0fc042
AC
103122004-09-02 Andrew Cagney <cagney@gnu.org>
10313
10314 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10315
075b3282
DJ
103162004-03-23 Daniel Jacobowitz <drow@mvista.com>
10317
10318 * linux-low.c (linux_wait): Clear all_processes list also.
10319
fa6a77dc
DJ
103202004-03-12 Daniel Jacobowitz <drow@mvista.com>
10321
10322 * linux-low.c: Include <errno.h>. Remove extern declaration of
10323 errno.
10324
6d782a97
DJ
103252004-03-12 Daniel Jacobowitz <drow@mvista.com>
10326
10327 * gdbreplay.c, server.h, utils.c: Update copyright years.
10328
3a7fb99b
DJ
103292004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10330
10331 * server.c (main): Print child status or termination signal from
10332 variable 'signal', not 'sig'.
10333
c3e735a6
DJ
103342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10335
10336 * linux-low.c (linux_read_memory): Change return type to
10337 int. Check for and return error from ptrace().
10338 * target.c (read_inferior_memory): Change return type to int. Pass
10339 back return status from the_target->read_memory().
10340 * target.h (struct target_ops): Adapt *read_memory() prototype.
10341 Update comment.
10342 (read_inferior_memory): Adapt prototype.
10343 * server.c (main): Return an error packet if
10344 read_inferior_memory() returns an error.
10345
a59d1c82
DJ
103462004-03-04 Daniel Jacobowitz <drow@mvista.com>
10347
10348 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10349 Unify with other clean targets.
10350
dc3f8883
DJ
103512004-02-29 Daniel Jacobowitz <drow@mvista.com>
10352
10353 * server.c (handle_v_cont): Call set_desired_inferior.
10354
89a208da
DJ
103552004-02-29 Daniel Jacobowitz <drow@mvista.com>
10356
10357 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10358
62ea82f5
DJ
103592004-02-29 Daniel Jacobowitz <drow@mvista.com>
10360
10361 * linux-low.c (linux_wait): Unblock async I/O.
10362 (linux_resume): Block and enable async I/O.
10363 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10364 * server.h (block_async_io, unblock_async_io): Add prototypes.
10365
6910d122
DJ
103662004-02-29 Daniel Jacobowitz <drow@mvista.com>
10367
10368 * remote-utils.c (remote_open): Print a status notice after
10369 opening a TCP port.
10370 * server.c (attach_inferior): Print a status notice after
10371 attaching.
10372
103732004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10374
10375 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10376
c89dc5d4
DJ
103772004-02-26 Daniel Jacobowitz <drow@mvista.com>
10378
10379 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10380 error packet.
10381 * server.c, target.h: Update copyright years.
10382
4b8dad4a
RM
103832004-02-25 Roland McGrath <roland@redhat.com>
10384
10385 * target.h (struct target_ops): New member `read_auxv'.
10386 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10387 * linux-low.c (linux_read_auxv): New function.
10388 (linux_target_ops): Initialize `read_auxv' member to that.
10389
d7446758
JB
103902004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10391
10392 Committed by Jim Blandy <jimb@redhat.com>.
10393
10394 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10395 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10396 instead of GPR_SIZE to distiguish s390 and s390x targets.
10397
5544ad89
DJ
103982004-01-31 Daniel Jacobowitz <drow@mvista.com>
10399
10400 * linux-low.c: Update copyright year.
10401 (check_removed_breakpoint): Clear pending_is_breakpoint.
10402 (linux_set_resume_request, linux_queue_one_thread)
10403 (resume_status_pending_p): New functions.
10404 (linux_continue_one_thread): Use process->resume.
10405 (linux_resume): Only resume threads if there are no pending events.
10406 * linux-low.h (struct process_info): Add resume request
10407 pointer.
10408
2a68b70e
DJ
104092004-01-30 Daniel Jacobowitz <drow@mvista.com>
10410
10411 * regcache.c (new_register_cache): Clear the allocated register
10412 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10413
64386c31
DJ
104142003-10-13 Daniel Jacobowitz <drow@mvista.com>
10415
10416 * linux-low.c (linux_resume): Take a struct thread_resume *
10417 argument.
10418 (linux_wait): Update call.
10419 (resume_ptr): New static variable.
10420 (linux_continue_one_thread): Renamed from
10421 linux_continue_one_process. Use resume_ptr.
10422 (linux_resume): Use linux_continue_one_thread.
10423 * server.c (handle_v_cont, handle_v_requests): New functions.
10424 (myresume): New function.
10425 (main): Handle 'v' case.
10426 * target.h (struct thread_resume): New type.
10427 (struct target_ops): Change argument of "resume" to struct
10428 thread_resume *.
10429 (myresume): Delete macro.
10430
c938e9b0
L
104312003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10432
10433 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10434 (uninstall): Support DESTDIR.
10435
7f313d07
BC
10436Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10437
10438 * configure.srv: Add xscale*linux copy of arm*linux entry.
10439
3b2fc2ea
DJ
104402003-07-24 Daniel Jacobowitz <drow@mvista.com>
10441
10442 * linux-arm-low.c (arm_reinsert_addr): New function.
10443 (the_low_target): Add arm_reinsert_addr.
10444
1c0a559e
MK
104452003-07-08 Mark Kettenis <kettenis@gnu.org>
10446
10447 * mem-break.c: Remove whitespace at end of file.
10448
43d5792c
DJ
104492003-06-28 Daniel Jacobowitz <drow@mvista.com>
10450
10451 * configure.in: Check whether we need to prototype strerror.
10452 * server.h: Optionally prototype strerror.
10453 * gdbreplay.c (perror_with_name): Use strerror.
10454 * linux-low.c (linux_attach_lwp): Use strerror.
10455 * utils.c (perror_with_name): Use strerror.
10456 * config.in, configure: Regenerated.
10457
c8a86edf
DJ
104582003-06-28 Daniel Jacobowitz <drow@mvista.com>
10459
10460 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10461 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10462
73d37363
DJ
104632003-06-20 Daniel Jacobowitz <drow@mvista.com>
10464
10465 * Makefile.in (SFILES): Update.
10466 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10467 low-sun3.c: Remove files.
10468
6ad8ae5c
DJ
104692003-06-17 Daniel Jacobowitz <drow@mvista.com>
10470
10471 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10472 (linux_detach_one_process, linux_detach): New functions.
10473 (linux_target_ops): Add linux_detach.
10474 * server.c (main): Handle 'D' packet.
10475 * target.h (struct target_ops): Add "detach" member.
10476 (detach_inferior): Define.
10477
1581182a
MK
104782003-06-13 Mark Kettenis <kettenis@gnu.org>
10479
10480 From Kelley Cook <kelleycook@wideopenwest.com>:
10481 * configure.srv: Accept i[34567]86 variants.
10482
e5379b03
DJ
104832003-06-05 Daniel Jacobowitz <drow@mvista.com>
10484
10485 * linux-low.c (linux_wait_for_event): Correct comment typos.
10486 (linux_resume_one_process): Call check_removed_breakpoint.
10487 (linux_send_signal): New function.
10488 (linux_target_ops): Add linux_send_signal.
10489 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10490 of kill.
10491 * target.h (struct target_ops): Add send_signal.
10492
2ff29de4
JB
104932003-05-29 Jim Blandy <jimb@redhat.com>
10494
10495 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10496 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10497 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10498 away part of the register's value.
10499
254787d4
DJ
105002003-03-26 Daniel Jacobowitz <drow@mvista.com>
10501
10502 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10503 (linux_wait_for_event, linux_init_signals): Likewise.
10504
94e10508
DJ
105052003-03-17 Daniel Jacobowitz <drow@mvista.com>
10506
10507 * configure.in: Check for stdlib.h.
10508 * configure: Regenerated.
10509 * config.in: Regenerated.
10510
4c0711e0
DJ
105112003-01-04 Andreas Schwab <schwab@suse.de>
10512
10513 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10514
ef66e766
AC
105152003-01-02 Andrew Cagney <ac131313@redhat.com>
10516
10517 * Makefile.in: Remove obsolete code.
10518
a1358604
DJ
105192002-11-20 Daniel Jacobowitz <drow@mvista.com>
10520
10521 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10522 defined(PT_FPR0_HI).
10523
23ce3b1c
DJ
105242002-11-17 Stuart Hughes <seh@zee2.com>
10525
10526 * linux-arm-low.c (arm_num_regs): Increase.
10527 (arm_regmap): Include status register.
10528
105292002-11-17 Daniel Jacobowitz <drow@mvista.com>
10530
10531 * linux-low.c (register_addr): Remove incorrect -1 check.
10532
a9fa9f7d
DJ
105332002-08-29 Daniel Jacobowitz <drow@mvista.com>
10534
10535 * linux-low.c (linux_create_inferior): Call setpgid. Return
10536 the new PID.
10537 (unstopped_p, linux_signal_pid): Remove.
10538 (linux_target_ops): Remove linux_signal_pid.
10539 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10540 global instead of target method.
10541 * target.h (struct target_ops): Remove signal_pid. Update comment
10542 for create_inferior.
10543 * server.c (signal_pid): New variable.
10544 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10545 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10546 (attach_inferior): Set signal_pid.
10547
17574093
DJ
105482002-08-23 Daniel Jacobowitz <drow@mvista.com>
10549
10550 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10551
105522002-08-20 Jim Blandy <jimb@redhat.com>
10553
10554 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10555 default for this.
10556
105572002-08-01 Andrew Cagney <cagney@redhat.com>
10558
10559 * Makefile.in: Make chill references obsolete.
10560
105612002-07-24 Kevin Buettner <kevinb@redhat.com>
10562
10563 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10564 * configure: Regenerate.
10565 * config.in: Regenerate.
10566
105672002-07-09 David O'Brien <obrien@FreeBSD.org>
10568
10569 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10570 (perror_with_name, remote_close, remote_open, expect, play): Static.
10571
105722002-07-04 Michal Ludvig <mludvig@suse.cz>
10573
4b8dad4a 10574 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10575 byte offsets instead of an array of indexes.
10576 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10577
105782002-06-13 Daniel Jacobowitz <drow@mvista.com>
10579
10580 * regcache.c: Add comment.
10581
105822002-06-11 Daniel Jacobowitz <drow@mvista.com>
10583
10584 * thread-db.c: New file.
10585 * proc-service.c: New file.
10586 * acinclude.m4: New file.
10587 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10588 proc-service.o, and thread-db.o.
10589 (linux-low.o): Add USE_THREAD_DB.
10590 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10591 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10592 * aclocal.m4: Regenerated.
10593 * config.in: Regenerated.
10594 * configure: Regenerated.
10595 * configure.in: Check for proc_service.h, sys/procfs.h,
10596 thread_db.h, and linux/elf.h headrs.
10597 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10598 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10599 Check for -lthread_db and thread support.
10600 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10601 PowerPC, and SuperH.
10602 * i387-fp.c: Constify arguments.
10603 * i387-fp.h: Likewise.
10604 * inferiors.c: (struct thread_info): Renamed from
10605 `struct inferior_info'. Remove PID member. Use generic inferior
10606 list header. All uses updated.
10607 (inferiors, signal_pid): Removed.
10608 (all_threads): New variable.
10609 (get_thread): Define.
10610 (add_inferior_to_list): New function.
10611 (for_each_inferior): New function.
10612 (change_inferior_id): New function.
10613 (add_inferior): Removed.
10614 (remove_inferior): New function.
10615 (add_thread): New function.
10616 (free_one_thread): New function.
10617 (remove_thread): New function.
10618 (clear_inferiors): Use for_each_inferior and free_one_thread.
10619 (find_inferior): New function.
10620 (find_inferior_id): New function.
10621 (inferior_target_data): Update argument type.
10622 (set_inferior_target_data): Likewise.
10623 (inferior_regcache_data): Likewise.
10624 (set_inferior_regcache_data): Likewise.
10625 * linux-low.c (linux_bp_reinsert): Remove.
10626 (all_processes, stopping_threads, using_thrads)
10627 (struct pending_signals, debug_threads, pid_of): New.
10628 (inferior_pid): Replace with macro.
10629 (struct inferior_linux_data): Remove.
10630 (get_stop_pc, add_process): New functions.
10631 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10632 Use add_process and add_thread.
10633 (linux_attach_lwp): New function, based on old linux_attach. Use
10634 add_process and add_thread. Set stop_expected for new threads.
10635 (linux_attach): New function.
10636 (linux_kill_one_process): New function.
10637 (linux_kill): Kill all LWPs.
10638 (linux_thread_alive): Use find_inferior_id.
10639 (check_removed_breakpoints, status_pending_p): New functions.
10640 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10641 Update. Use WNOHANG. Wait for cloned processes also. Update process
10642 struct for the found process.
10643 (linux_wait_for_event): New function.
10644 (linux_wait): Use it. Support LWPs.
10645 (send_sigstop, wait_for_sigstop, stop_all_processes)
10646 (linux_resume_one_process, linux_continue_one_process): New functions.
10647 (linux_resume): Support LWPs.
10648 (REGISTER_RAW_SIZE): Remove.
10649 (fetch_register): Use register_size instead. Call supply_register.
10650 (usr_store_inferior_registers): Likewise. Call collect_register.
10651 Fix recursive case.
10652 (regsets_fetch_inferior_registers): Improve error message.
10653 (regsets_store_inferior_registers): Add debugging.
10654 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10655 (unstopped_p, linux_signal_pid): New functions.
10656 (linux_target_ops): Add linux_signal_pid.
10657 (linux_init_signals): New function.
10658 (initialize_low): Call it. Initialize using_threads.
10659 * regcache.c (inferior_regcache_data): Add valid
10660 flag.
10661 (get_regcache): Fetch registers lazily. Add fetch argument
10662 and update all callers.
10663 (regcache_invalidate_one, regcache_invalidate): New
10664 functions.
10665 (new_register_cache): Renamed from create_register_cache.
10666 Return the new regcache.
10667 (free_register_cache): Change argument to a void *.
10668 (registers_to_string, registers_from_string): Call get_regcache
10669 with fetch flag set.
10670 (register_data): Make static. Pass fetch flag to get_regcache.
10671 (supply_register): Call get_regcache with fetch flag clear.
10672 (collect_register): Call get_regcache with fetch flag set.
10673 (collect_register_as_string): New function.
10674 * regcache.h: Update.
10675 * remote-utils.c (putpkt): Flush after debug output and use
10676 stderr.
10677 Handle input interrupts while waiting for an ACK.
10678 (input_interrupt): Use signal_pid method.
10679 (getpkt): Flush after debug output and use stderr.
10680 (outreg): Use collect_register_as_string.
10681 (new_thread_notify, dead_thread_notify): New functions.
10682 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10683 and general_thread.
10684 (look_up_one_symbol): Flush after debug output.
10685 * server.c (step_thread, server_waiting): New variables.
10686 (start_inferior): Don't use signal_pid. Update call to mywait.
10687 (attach_inferior): Update call to mywait.
10688 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10689 (main): Don't fetch/store registers explicitly. Use
10690 set_desired_inferior. Support proposed ``Hs'' packet. Update
10691 calls to mywait.
10692 * server.h: Update.
10693 (struct inferior_list, struct_inferior_list_entry): New.
10694 * target.c (set_desired_inferior): New.
10695 (write_inferior_memory): Constify.
10696 (mywait): New function.
10697 * target.h: Update.
10698 (struct target_ops): New signal_pid method.
10699 (mywait): Removed macro, added prototype.
10700
10701 * linux-low.h (regset_func): Removed.
10702 (regset_fill_func, regset_store_func): New.
10703 (enum regset_type): New.
10704 (struct regset_info): Add type field. Use new operation types.
10705 (struct linux_target_ops): stop_pc renamed to get_pc.
10706 Add decr_pc_after_break and breakpoint_at.
10707 (get_process, get_thread_proess, get_process_thread)
10708 (strut process_info, all_processes, linux_attach_lwp)
10709 (thread_db_init): New.
10710
10711 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10712 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10713 (the_low_target): Add new members.
10714 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10715 (i386_store_fpxregset): Constify.
10716 (target_regsets): Add new kind identifier.
10717 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10718 (i386_set_pc): Add debugging.
10719 (i386_breakpoint_at): New function.
10720 (the_low_target): Add new members.
10721 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10722 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10723 (mips_breakpoint_at): New.
10724 (the_low_target): Add new members.
10725 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10726 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10727 (the_low_target): Add new members.
10728 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10729 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10730 (the_low_target): Add new members.
10731 * linux-x86-64-low.c (target_regsets): Add new kind
10732 identifier.
10733
107342002-05-15 Daniel Jacobowitz <drow@mvista.com>
10735
10736 From Martin Pool <mbp@samba.org>:
10737 * server.c (gdbserver_usage): New function.
10738 (main): Call it.
10739
107402002-05-14 Daniel Jacobowitz <drow@mvista.com>
10741
10742 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10743 stop_at -> stop_pc.
10744
107452002-05-04 Andrew Cagney <ac131313@redhat.com>
10746
10747 * Makefile.in: Remove obsolete code.
10748
107492002-04-24 Michal Ludvig <mludvig@suse.cz>
10750
10751 * linux-low.c (regsets_fetch_inferior_registers),
10752 (regsets_store_inferior_registers): Removed cast to int from
10753 ptrace() calls.
10754 * regcache.h: Added declaration of struct inferior_info.
10755
107562002-04-20 Daniel Jacobowitz <drow@mvista.com>
10757
10758 * inferiors.c (struct inferior_info): Add regcache_data.
10759 (add_inferior): Call create_register_cache.
10760 (clear_inferiors): Call free_register_cache.
10761 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10762 * regcache.c (struct inferior_regcache_data): New.
10763 (registers): Remove.
10764 (get_regcache): New function.
10765 (create_register_cache, free_register_cache): New functions.
10766 (set_register_cache): Don't initialize the register cache here.
10767 (registers_to_string, registers_from_string, register_data): Call
10768 get_regcache.
10769 * regcache.h: Add prototypes.
10770 * server.h: Likewise.
10771
107722002-04-20 Daniel Jacobowitz <drow@mvista.com>
10773
10774 * mem-break.c: New file.
10775 * mem-break.h: New file.
10776 * Makefile.in: Add mem-break.o rule; update server.h
10777 dependencies.
10778 * inferiors.c (struct inferior_info): Add target_data
10779 member.
10780 (clear_inferiors): Free target_data member if set.
10781 (inferior_target_data, set_inferior_target_data): New functions.
10782 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10783 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10784 * linux-low.c (linux_bp_reinsert): New variable.
10785 (struct inferior_linux_data): New.
10786 (linux_create_inferior): Use set_inferior_target_data.
10787 (linux_attach): Likewise. Call add_inferior.
10788 (linux_wait_for_one_inferior): New function.
10789 (linux_wait): Call it.
10790 (linux_write_memory): Add const.
10791 (initialize_low): Call set_breakpoint_data.
10792 * linux-low.h (struct linux_target_ops): Add breakpoint
10793 handling members.
10794 * server.c (attach_inferior): Remove extra add_inferior
10795 call.
10796 * server.h: Include mem-break.h. Update inferior.c
10797 prototypes.
10798 * target.c (read_inferior_memory)
10799 (write_inferior_memory): New functions.
10800 * target.h (read_inferior_memory)
10801 (write_inferior_memory): Change macros to prototypes.
10802 (struct target_ops): Update comments. Add const to write_memory
10803 definition.
10804
108052002-04-11 Daniel Jacobowitz <drow@mvista.com>
10806
10807 * linux-low.c (usr_store_inferior_registers): Support
10808 registers which are allowed to fail to store.
10809 * linux-low.h (linux_target_ops): Likewise.
10810 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10811 (ppc_cannot_store_register): FPSCR may not be storable.
10812
108132002-04-09 Daniel Jacobowitz <drow@mvista.com>
10814
10815 * server.h: Include <string.h> if HAVE_STRING_H.
10816 * ChangeLog: Correct paths in last ChangeLog entry.
10817
108182002-04-09 Daniel Jacobowitz <drow@mvista.com>
10819
10820 * linux-low.h: Remove obsolete prototypes.
10821 (struct linux_target_ops): New.
10822 (extern the_low_target): New.
10823 * linux-low.c (num_regs, regmap): Remove declarations.
10824 (register_addr): Use the_low_target explicitly.
10825 (fetch_register): Likewise.
10826 (usr_fetch_inferior_registers): Likewise.
10827 (usr_store_inferior_registers): Likewise.
10828 * linux-arm-low.c (num_regs): Remove.
10829 (arm_num_regs): Define.
10830 (arm_regmap): Renamed from regmap, made static.
10831 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10832 made static.
10833 (arm_cannot_store_register): Renamed from cannot_store_register,
10834 made static.
10835 (the_low_target): New.
10836 * linux-i386-low.c (num_regs): Remove.
10837 (i386_num_regs): Define.
10838 (i386_regmap): Renamed from regmap, made static.
10839 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10840 made static.
10841 (i386_cannot_store_register): Renamed from cannot_store_register,
10842 made static.
10843 (the_low_target): New.
10844 * linux-ia64-low.c (num_regs): Remove.
10845 (ia64_num_regs): Define.
10846 (ia64_regmap): Renamed from regmap, made static.
10847 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10848 made static.
10849 (ia64_cannot_store_register): Renamed from cannot_store_register,
10850 made static.
10851 (the_low_target): New.
10852 * linux-m68k-low.c (num_regs): Remove.
10853 (m68k_num_regs): Define.
10854 (m68k_regmap): Renamed from regmap, made static.
10855 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10856 made static.
10857 (m68k_cannot_store_register): Renamed from cannot_store_register,
10858 made static.
10859 (the_low_target): New.
10860 * linux-mips-low.c (num_regs): Remove.
10861 (mips_num_regs): Define.
10862 (mips_regmap): Renamed from regmap, made static.
10863 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10864 made static.
10865 (mips_cannot_store_register): Renamed from cannot_store_register,
10866 made static.
10867 (the_low_target): New.
10868 * linux-ppc-low.c (num_regs): Remove.
10869 (ppc_num_regs): Define.
10870 (ppc_regmap): Renamed from regmap, made static.
10871 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10872 made static.
10873 (ppc_cannot_store_register): Renamed from cannot_store_register,
10874 made static.
10875 (the_low_target): New.
10876 * linux-s390-low.c (num_regs): Remove.
10877 (s390_num_regs): Define.
10878 (s390_regmap): Renamed from regmap, made static.
10879 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10880 made static.
10881 (s390_cannot_store_register): Renamed from cannot_store_register,
10882 made static.
10883 (the_low_target): New.
10884 * linux-sh-low.c (num_regs): Remove.
10885 (sh_num_regs): Define.
10886 (sh_regmap): Renamed from regmap, made static.
10887 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10888 made static.
10889 (sh_cannot_store_register): Renamed from cannot_store_register,
10890 made static.
10891 (the_low_target): New.
10892 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10893 (the_low_target): New.
10894
108952002-04-09 Daniel Jacobowitz <drow@mvista.com>
10896
10897 * Makefile.in: Add stamp-h target.
10898 * configure.in: Create stamp-h.
10899 * configure: Regenerated.
10900
109012002-04-09 Daniel Jacobowitz <drow@mvista.com>
10902
10903 * inferiors.c: New file.
10904 * target.c: New file.
10905 * target.h: New file.
10906 * Makefile.in: Add target.o and inferiors.o. Update
10907 dependencies.
10908 * linux-low.c (inferior_pid): New static variable,
10909 moved from server.c.
10910 (linux_create_inferior): Renamed from create_inferior.
10911 Call add_inferior. Return 0 on success instead of a PID.
10912 (linux_attach): Renamed from myattach.
10913 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
10914 (linux_thread_alive): Renamed from mythread_alive.
10915 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
10916 child dies.
10917 (linux_resume): Renamed from myresume. Add missing ``return 0''.
10918 (regsets_store_inferior_registers): Correct error message.
10919 Add missing ``return 0''.
10920 (linux_fetch_registers): Renamed from fetch_inferior_registers.
10921 (linux_store_registers): Renamed from store_inferior_registers.
10922 (linux_read_memory): Renamed from read_inferior_memory.
10923 (linux_write_memory): Renamed from write_inferior_memory.
10924 (linux_target_ops): New structure.
10925 (initialize_low): Call set_target_ops ().
10926 * remote-utils.c (unhexify): New function.
10927 (hexify): New function.
10928 (input_interrupt): Send signals to ``signal_pid''.
10929 * server.c (inferior_pid): Remove.
10930 (start_inferior): Update create_inferior call.
10931 (attach_inferior): Call add_inferior.
10932 (handle_query): New function.
10933 (main): Call handle_query for `q' packets.
10934 * server.h: Include "target.h". Remove obsolete prototypes.
10935 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10936
109372002-04-09 Daniel Jacobowitz <drow@mvista.com>
10938
10939 * Makefile.in: Add WARN_CFLAGS. Update configury
10940 dependencies.
10941 * configure.in: Check for <string.h>
10942 * configure: Regenerate.
10943 * config.in: Regenerate.
10944 * gdbreplay.c: Include needed system headers.
10945 (remote_open): Remove strchr prototype.
10946 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10947 * regcache.c (supply_register): Change buf argument to const void *.
10948 (supply_register_by_name): Likewise.
10949 (collect_register): Change buf argument to void *.
10950 (collect_register_by_name): Likewise.
10951 * regcache.h: Add missing prototypes.
10952 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10953 * server.c (handle_query): New function.
10954 (attached): New static variable, moved out of main.
10955 (main): Quiet longjmp clobber warnings.
10956 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
10957 * utils.c (error): Remove NORETURN.
10958 (fatal): Likewise.
This page took 1.591242 seconds and 4 git commands to generate.