[gdbserver] Disable conditional breakpoints on no-hardware-single-step targets
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
45614f15
YQ
12015-05-08 Yao Qi <yao.qi@linaro.org>
2
3 * linux-low.c (linux_supports_conditional_breakpoints): New
4 function.
5 (linux_target_ops): Install new target method.
6 * lynx-low.c (lynx_target_ops): Install NULL hook for
7 supports_conditional_breakpoints.
8 * nto-low.c (nto_target_ops): Likewise.
9 * spu-low.c (spu_target_ops): Likewise.
10 * win32-low.c (win32_target_ops): Likewise.
11 * server.c (handle_query): Check
12 target_supports_conditional_breakpoints.
13 * target.h (struct target_ops) <supports_conditional_breakpoints>:
14 New field.
15 (target_supports_conditional_breakpoints): New macro.
16
80ad801e
PA
172015-05-06 Pedro Alves <palves@redhat.com>
18
19 PR server/18081
20 * server.c (start_inferior): If the process exits, mourn it.
21
819843c7
GB
222015-04-21 Gary Benson <gbenson@redhat.com>
23
24 * hostio.c (fileio_open_flags_to_host): Factored out to
25 fileio_to_host_openflags in common/fileio.c. Single use
26 updated.
27
a2d5a9d7
MF
282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
29
30 * linux-xtensa-low.c (xtensa_fill_gregset)
31 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
32 XCHAL_HAVE_LOOP.
33
deb44829
MF
342015-04-17 Max Filippov <jcmvbkbc@gmail.com>
35
36 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
37 (regs_info): Replace usrregs pointer with NULL.
38
e57f1de3
GB
392015-04-17 Gary Benson <gbenson@redhat.com>
40
41 * target.h (struct target_ops) <pid_to_exec_file>: New field.
42 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
43 * server.c (handle_qxfer_exec_file): New function.
44 (qxfer_packets): Add exec-file entry.
45 (handle_query): Report qXfer:exec-file:read as supported packet.
46
62828379
RN
472015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
48
49 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
50
b88bb450
GB
512015-04-09 Gary Benson <gbenson@redhat.com>
52
53 * hostio-errno.c (errno_to_fileio_error): Remove function.
54 Update caller to use remote_fileio_to_fio_error.
55
c8f4bfdd
YQ
562015-04-09 Yao Qi <yao.qi@linaro.org>
57
58 * linux-low.c (linux_insert_point): Call
59 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
60 (linux_remove_point): Call remove_memory_breakpoint if type is
61 raw_bkpt_type_sw.
62 * linux-x86-low.c (x86_insert_point): Don't call
63 insert_memory_breakpoint.
64 (x86_remove_point): Don't call remove_memory_breakpoint.
65
41f98f02
PA
662015-04-01 Pedro Alves <palves@redhat.com>
67 Cleber Rosa <crosa@redhat.com>
68
69 * server.c (gdbserver_usage): Reorganize and extend the usage
70 message.
71
2bf6fb9d
PA
722015-03-24 Pedro Alves <palves@redhat.com>
73
74 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
75 output. Also dump TRAP_TRACE.
76 (linux_low_filter_event): In debug output, distinguish a
77 resume_stop SIGSTOP from a delayed SIGSTOP.
78
369f6daa
GB
792015-03-24 Gary Benson <gbenson@redhat.com>
80
81 * linux-x86-low.c (x86_linux_new_thread): Moved to
82 nat/x86-linux.c.
83 (x86_linux_prepare_to_resume): Likewise.
84
8e5d4070
GB
852015-03-24 Gary Benson <gbenson@redhat.com>
86
87 * Makefile.in (x86-linux-dregs.o): New rule.
88 * configure.srv: Add x86-linux-dregs.o to relevant targets.
89 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
90 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
91 (x86_linux_dr_get): Likewise.
92 (x86_linux_dr_set): Likewise.
93 (update_debug_registers_callback): Likewise.
94 (x86_linux_dr_set_addr): Likewise.
95 (x86_linux_dr_get_addr): Likewise.
96 (x86_linux_dr_set_control): Likewise.
97 (x86_linux_dr_get_control): Likewise.
98 (x86_linux_dr_get_status): Likewise.
99 (x86_linux_update_debug_registers): Likewise.
100
2b95d440
GB
1012015-03-24 Gary Benson <gbenson@redhat.com>
102
103 * linux-x86-low.c (x86_linux_update_debug_registers):
104 New function, factored out from...
105 (x86_linux_prepare_to_resume): ...this.
106
14b0bc68
GB
1072015-03-24 Gary Benson <gbenson@redhat.com>
108
109 * linux-x86-low.c (x86_linux_dr_get): Update comments.
110 (x86_linux_dr_set): Likewise.
111 (update_debug_registers_callback): Likewise.
112 (x86_linux_dr_set_addr): Likewise.
113 (x86_linux_dr_get_addr): Likewise.
114 (x86_linux_dr_set_control): Likewise.
115 (x86_linux_dr_get_control): Likewise.
116 (x86_linux_dr_get_status): Likewise.
117 (x86_linux_prepare_to_resume): Likewise.
118
5dfe6ca8
GB
1192015-03-24 Gary Benson <gbenson@redhat.com>
120
121 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
122 Use perror_with_name. Pass string through gettext.
123 (x86_linux_dr_set): Likewise.
124
d33472ad
GB
1252015-03-24 Gary Benson <gbenson@redhat.com>
126
127 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
128 (x86_linux_dr_set_addr): ...this.
129 (x86_dr_low_get_addr): Rename to...
130 (x86_linux_dr_get_addr): ...this.
131 (x86_dr_low_set_control): Rename to...
132 (x86_linux_dr_set_control): ...this.
133 (x86_dr_low_get_control): Rename to...
134 (x86_linux_dr_get_control): ...this.
135 (x86_dr_low_get_status): Rename to...
136 (x86_linux_dr_get_status): ...this.
137 (x86_dr_low): Update with new function names.
138
4b134ca1
GB
1392015-03-24 Gary Benson <gbenson@redhat.com>
140
141 * Makefile.in (x86-linux.o): New rule.
142 * configure.srv: Add x86-linux.o to relevant targets.
143 * linux-low.c (lwp_set_arch_private_info): New function.
144 (lwp_arch_private_info): Likewise.
145 * linux-x86-low.c: Include nat/x86-linux.h.
146 (arch_lwp_info): Removed structure.
147 (update_debug_registers_callback):
148 Use lwp_set_debug_registers_changed.
149 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
150 and lwp_set_debug_registers_changed.
151 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
152
34c703da
GB
1532015-03-24 Gary Benson <gbenson@redhat.com>
154
155 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
156 * linux-arm-low.c (arm_new_thread): Likewise.
157 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
158 * linux-mips-low.c (mips_linux_new_thread): Likewise.
159 * linux-x86-low.c (x86_linux_new_thread): Likewise.
160 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
161
cff068da
GB
1622015-03-24 Gary Benson <gbenson@redhat.com>
163
164 * linux-low.c (ptid_of_lwp): New function.
165 (lwp_is_stopped): Likewise.
166 (lwp_stop_reason): Likewise.
167 * linux-x86-low.c (update_debug_registers_callback):
168 Use lwp_is_stopped.
169 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
170 lwp_stop_reason.
171
b2f7c7e8
GB
1722015-03-24 Gary Benson <gbenson@redhat.com>
173
174 * linux-low.h (linux_stop_lwp): Remove declaration.
175
6d4ee8c6
GB
1762015-03-24 Gary Benson <gbenson@redhat.com>
177
178 * linux-low.h: Include nat/linux-nat.h.
179 * linux-low.c (iterate_over_lwps_args): New structure.
180 (iterate_over_lwps_filter): New function.
181 (iterate_over_lwps): Likewise.
182 * linux-x86-low.c (update_debug_registers_callback):
183 Update signature to what iterate_over_lwps expects.
184 Remove PID check that iterate_over_lwps now performs.
185 (x86_dr_low_set_addr): Use iterate_over_lwps.
186 (x86_dr_low_set_control): Likewise.
187
70a0bb6b
GB
1882015-03-24 Gary Benson <gbenson@redhat.com>
189
190 * linux-x86-low.c (x86_debug_reg_state): New function.
191 (x86_linux_prepare_to_resume): Use the above.
192
7b669087
GB
1932015-03-24 Gary Benson <gbenson@redhat.com>
194
195 * linux-low.c (current_lwp_ptid): New function.
196 * linux-x86-low.c: Include nat/linux-nat.h.
197 (x86_dr_low_get_addr): Use current_lwp_ptid.
198 (x86_dr_low_get_control): Likewise.
199 (x86_dr_low_get_status): Likewise.
200
eef49a3d
PA
2012015-03-20 Pedro Alves <palves@redhat.com>
202
203 * tracepoint.c (cmd_qtstatus): Make "str" const.
204
b2333d22
PA
2052015-03-20 Pedro Alves <palves@redhat.com>
206
207 * server.c (handle_general_set): Make "req_str" const.
208
23f238d3
PA
2092015-03-19 Pedro Alves <palves@redhat.com>
210
211 * linux-low.c (linux_resume_one_lwp): Rename to ...
212 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
213 instead call perror_with_name.
214 (check_ptrace_stopped_lwp_gone): New function.
215 (linux_resume_one_lwp): Reimplement as wrapper around
216 linux_resume_one_lwp_throw that swallows errors if the LWP is
217 gone.
218
91baf43f
PA
2192015-03-19 Pedro Alves <palves@redhat.com>
220
221 * linux-low.c (count_events_callback, select_event_lwp_callback):
222 No longer check whether the thread has resume_stop as last resume
223 kind.
224
8bf3b159
PA
2252015-03-19 Pedro Alves <palves@redhat.com>
226
227 * linux-low.c (count_events_callback, select_event_lwp_callback):
228 Use the lwp's status_pending_p field, not the thread's.
229
b90fc188
PA
2302015-03-19 Pedro Alves <palves@redhat.com>
231
232 * linux-low.c (select_event_lwp_callback): Update comments to
233 no longer mention SIGTRAP.
234
464b0089
GB
2352015-03-18 Gary Benson <gbenson@redhat.com>
236
237 * server.c (handle_query): Do not report vFile:fstat as supported.
238
aa9e327f
GB
2392015-03-11 Gary Benson <gbenson@redhat.com>
240
241 * hostio.c (sys/types.h): New include.
242 (sys/stat.h): Likewise.
243 (common-remote-fileio.h): Likewise.
244 (handle_fstat): New function.
245 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 246
791c0056
GB
2472015-03-11 Gary Benson <gbenson@redhat.com>
248
249 * configure.ac (AC_CHECK_MEMBERS): Add checks for
250 struct stat.st_blocks and struct stat.st_blksize.
251 * configure: Regenerate.
252 * config.in: Likewise.
253 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
254 (OBS): Add common-remote-fileio.o.
255 (common-remote-fileio.o): New rule.
256
9a9df970
PA
2572015-03-09 Pedro Alves <palves@redhat.com>
258
259 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
260 'struct sockaddr' pointer in 'accept' call.
261
9eb1356e
PA
2622015-03-09 Pedro Alves <palves@redhat.com>
263
264 Revert:
265 2015-03-07 Pedro Alves <palves@redhat.com>
266 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
267 or <winsock2.h> here. Instead include "gdb_socket.h".
268 (remote_open): Use union gdb_sockaddr_u.
269 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
270 or <winsock2.h> here. Instead include "gdb_socket.h".
271 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
272 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
273 or <sys/un.h>.
274 (init_named_socket, gdb_agent_helper_thread): Use union
275 gdb_sockaddr_u.
276
aac331e4
PA
2772015-03-07 Pedro Alves <palves@redhat.com>
278
279 * configure.ac (build_warnings): Move
280 -Wdeclaration-after-statement to the C-specific set.
281 * configure: Regenerate.
282
366c75fc
PA
2832015-03-07 Pedro Alves <palves@redhat.com>
284
285 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
286 or <winsock2.h> here. Instead include "gdb_socket.h".
287 (remote_open): Use union gdb_sockaddr_u.
288 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
289 or <winsock2.h> here. Instead include "gdb_socket.h".
290 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
291 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
292 or <sys/un.h>.
293 (init_named_socket, gdb_agent_helper_thread): Use union
294 gdb_sockaddr_u.
295
492d29ea
PA
2962015-03-07 Pedro Alves <palves@redhat.com>
297
298 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
299 instead.
300
60a191ed
YQ
3012015-03-06 Yao Qi <yao.qi@linaro.org>
302
303 * linux-aarch64-low.c (aarch64_insert_point): Use
304 show_debug_regs as a boolean.
305 (aarch64_remove_point): Likewise.
306
f5771b1d
PA
3072015-03-05 Pedro Alves <palves@redhat.com>
308
309 * lynx-low.c (lynx_target_ops): Install NULL hooks for
310 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
311 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
312 * nto-low.c (nto_target_ops): Likewise.
313 * spu-low.c (spu_target_ops): Likewise.
314 * win32-low.c (win32_target_ops): Likewise.
315
3e572f71
PA
3162015-03-04 Pedro Alves <palves@redhat.com>
317
318 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
319 Decide whether a breakpoint triggered based on the SIGTRAP's
320 siginfo.si_code.
321 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
322 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
323 (linux_low_filter_event): Check for breakpoints before checking
324 watchpoints.
325 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
326 siginfo.si_code.
327 (linux_stopped_by_sw_breakpoint)
328 (linux_supports_stopped_by_sw_breakpoint)
329 (linux_stopped_by_hw_breakpoint)
330 (linux_supports_stopped_by_hw_breakpoint): New functions.
331 (linux_target_ops): Install new target methods.
332
1ec68e26
PA
3332015-03-04 Pedro Alves <palves@redhat.com>
334
335 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
336 * server.c (swbreak_feature, hwbreak_feature): New globals.
337 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
338 (captured_main): Clear swbreak_feature and hwbreak_feature.
339 * server.h (swbreak_feature, hwbreak_feature): Declare.
340 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
341 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
342 supports_stopped_by_hw_breakpoint>: New fields.
343 (target_supports_stopped_by_sw_breakpoint)
344 (target_stopped_by_sw_breakpoint)
345 (target_supports_stopped_by_hw_breakpoint)
346 (target_stopped_by_hw_breakpoint): Declare.
347
15c66dd6
PA
3482015-03-04 Pedro Alves <palves@redhat.com>
349
350 enum lwp_stop_reason -> enum target_stop_reason
351 * linux-low.c (check_stopped_by_breakpoint): Adjust.
352 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
353 (linux_wait_1, stuck_in_jump_pad_callback)
354 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
355 (linux_stopped_by_watchpoint):
356 * linux-low.h (enum lwp_stop_reason): Delete.
357 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
358 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
359
98fc70d6
YQ
3602015-03-04 Yao Qi <yao.qi@linaro.org>
361
362 * Makefile.in (SFILES): Add linux-aarch64-low.c.
363
dd2ac174
GB
3642015-03-03 Gary Benson <gbenson@redhat.com>
365
366 * hostio.c (handle_vFile): Fix prefix lengths.
367
d68e53f4
MM
3682015-03-03 Markus Metzger <markus.t.metzger@intel.com>
369
370 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
371 ptr_bits.
372
bf2d68ab
AA
3732015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
374
375 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
376 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
377 (clean): Add "rm -f" for above C files.
378 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
379 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
380 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
381 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
382 * linux-s390-low.c (HWCAP_S390_VX): New macro.
383 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
384 (init_registers_s390x_vx_linux64)
385 (init_registers_s390x_tevx_linux64)
386 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
387 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
388 declarations.
389 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
390 (s390_store_vxrs_high): New functions.
391 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
392 NT_S390_VXRS_HIGH.
393 (s390_arch_setup): Add logic for selecting one of the new target
394 descriptions. Activate the new vector regsets if applicable.
395 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
396 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
397 and init_registers_s390x_tevx_linux64.
398
c966a859
PA
3992015-03-01 Pedro Alves <palves@redhat.com>
400
401 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
402 parameter.
403
4180215b
PA
4042015-02-27 Pedro Alves <palves@redhat.com>
405
406 * linux-x86-low.c (u_debugreg_offset): New function.
407 (x86_linux_dr_get, x86_linux_dr_set): Use it.
408
749bab01
PA
4092015-02-27 Pedro Alves <palves@redhat.com>
410
411 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
412 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
413 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
414 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
415 (ps_lsetfpregs, ps_getpid)
416 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
417 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
418 (ps_lsetxregs, ps_plog): Declare.
419
3c14e5a3
PA
4202015-02-27 Pedro Alves <palves@redhat.com>
421
422 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
423 IP_AGENT_EXPORT_FUNC.
424 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
425 IP_AGENT_EXPORT_FUNC.
426 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
427 (IP_AGENT_EXPORT): Delete.
428 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
429 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
430 (gdb_trampoline_buffer_error, collecting, gdb_collect)
431 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
432 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
433 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
434 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
435 (traceframe_read_count, traceframe_write_count)
436 (traceframes_created, trace_state_variables, get_raw_reg)
437 (get_trace_state_variable_value, set_trace_state_variable_value)
438 (ust_loaded, helper_thread_id, cmd_buf): Use
439 IPA_SYM_EXPORTED_NAME.
440 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
441 (tracepoints) Use IP_AGENT_EXPORT_VAR.
442 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
443 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
444 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
445 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
446 EXTERN_C_PUSH/EXTERN_C_POP.
447 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
448 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
449 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
450 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
451 (traceframe_write_count, traceframe_read_count)
452 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
453 (about_to_request_buffer_space, get_trace_state_variable_value)
454 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
455 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
456 EXTERN_C_PUSH/EXTERN_C_POP.
457 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
458 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
459 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
460 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
461 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
462 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
463 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
464 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
465 Define.
466 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
467 (IP_AGENT_EXPORT_VAR_DECL): Define.
468 (tracing): Declare.
469 (gdb_agent_get_raw_reg): Declare.
470
fe978cb0
PA
4712015-02-27 Tom Tromey <tromey@redhat.com>
472 Pedro Alves <palves@redhat.com>
473
474 Rename symbols whose names are reserved C++ keywords throughout.
475
3bc3d82a
PA
4762015-02-27 Pedro Alves <palves@redhat.com>
477
478 * Makefile.in (COMPILER): New, get it from autoconf.
479 (CXX): Get from autoconf instead.
480 (COMPILE.pre): Use COMPILER.
481 (CC-LD): Rename to ...
482 (CC_LD): ... this. Use COMPILER.
483 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
484 (CXX_FOR_TARGET): Default to g++ instead of gcc.
485 * acinclude.m4: Include build-with-cxx.m4.
486 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
487 Disable -Werror by default if building in C++ mode.
488 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
489 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
490 the C++ compiler. Save/restore CXXFLAGS too.
491 * configure: Regenerate.
492
07697489
PA
4932015-02-27 Pedro Alves <palves@redhat.com>
494
495 * acinclude.m4: Include libiberty.m4.
496 * configure.ac: Call libiberty_INIT.
497 * config.in, configure: Regenerate.
498
9beb7c4e
PA
4992015-02-26 Pedro Alves <palves@redhat.com>
500
501 * linux-low.c (linux_wait_1): When incrementing the PC past a
502 program breakpoint always use the_low_target.breakpoint_len as
503 increment, rather than the maximum between that and
504 the_low_target.decr_pc_after_break.
505
8090aef2
PA
5062015-02-23 Pedro Alves <palves@redhat.com>
507
508 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
509 thread was doing a step-over; always adjust the PC if
510 we stepped over a permanent breakpoint.
511 (linux_wait_1): If we stepped over breakpoint that was on top of a
512 permanent breakpoint, manually advance the PC past it.
513
bc9540e8
PA
5142015-02-23 Pedro Alves <palves@redhat.com>
515
516 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
517 modes.
518 (x86_fill_gregset, x86_store_gregset): Use it when handling
519 $orig_eax.
520
2db9a427
PA
5212015-02-20 Pedro Alves <palves@redhat.com>
522
523 * thread-db.c: Include "nat/linux-procfs.h".
524 (thread_db_init): Skip listing new threads if the kernel supports
525 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
526
afa8d396
PA
5272015-02-20 Pedro Alves <palves@redhat.com>
528
529 * linux-low.c (status_pending_p_callback): Use ptid_match.
530
c9587f88
AT
5312015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
532
533 PR breakpoints/16812
534 * linux-low.c (wstatus_maybe_breakpoint): Remove.
535 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
536 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
537
b05ec7a5
AT
5382015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
539
540 PR breakpoints/15956
541 * tracepoint.c (cmd_qtinit): Add check for current_thread.
542
d33501a5
MM
5432015-02-09 Markus Metzger <markus.t.metzger@intel.com>
544
545 * linux-low.c (linux_low_btrace_conf): Print size.
546 * server.c (handle_btrace_conf_general_set): New.
547 (hanle_general_set): Call handle_btrace_conf_general_set.
548 (handle_query): Report Qbtrace-conf:bts:size as supported.
549
f4abbc16
MM
5502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
551
552 * linux-low.c (linux_low_enable_btrace): Update parameters.
553 (linux_low_btrace_conf): New.
554 (linux_target_ops)<to_btrace_conf>: Initialize.
555 * server.c (current_btrace_conf): New.
556 (handle_btrace_enable): Rename to ...
557 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
558 to target_enable_btrace. Update comment. Update users.
559 (handle_qxfer_btrace_conf): New.
560 (qxfer_packets): Add btrace-conf entry.
561 (handle_query): Report qXfer:btrace-conf:read as supported packet.
562 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
563 (target_ops)<read_btrace_conf>: New.
564 (target_enable_btrace): Update parameters.
565 (target_read_btrace_conf): New.
566
043c3577
MM
5672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
568
569 * server.c (handle_btrace_general_set): Remove call to
570 target_supports_btrace.
571 (supported_btrace_packets): New.
572 (handle_query): Call supported_btrace_packets.
573 * target.h: include btrace-common.h.
574 (btrace_target_info): Removed.
575 (supports_btrace, target_supports_btrace): Update parameters.
576
734b0e4b
MM
5772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
578
579 * Makefile.in (SFILES): Add common/btrace-common.c.
580 (OBS): Add common/btrace-common.o.
581 (btrace-common.o): Add build rules.
582 * linux-low: Include btrace-common.h.
583 (linux_low_read_btrace): Use struct btrace_data. Call
584 btrace_data_init and btrace_data_fini.
585
d6c146e9
PA
5862015-02-06 Pedro Alves <palves@redhat.com>
587
588 * thread-db.c (find_new_threads_callback): Add debug output.
589
20ba1ce6
PA
5902015-02-04 Pedro Alves <palves@redhat.com>
591
592 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
593 (resume_stopped_resumed_lwps): New function.
594 (linux_wait_for_event_filtered): Use it.
595
8cc73a39
SDJ
5962015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
597
598 * Makefile.in (SFILES): Add linux-personality.c.
599 (linux-personality.o): New rule.
600 * configure.srv (srv_linux_obj): Add linux-personality.o to the
601 list of objects to be built.
602 * linux-low.c: Include nat/linux-personality.h.
603 (linux_create_inferior): Remove code to disable address space
604 randomization (moved to ../nat/linux-personality.c). Create
605 cleanup to disable address space randomization.
606
fb23d554
SDJ
6072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
608
609 * Makefile.in (posix-strerror.o): New rule.
610 (mingw-strerror.o): Likewise.
611 * configure: Regenerated.
612 * configure.ac: Source file ../common/common.host. Initialize new
613 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
614
cdf43629
YQ
6152015-01-14 Yao Qi <yao@codesourcery.com>
616
617 * Makefile.in (SFILES): Add nat/ppc-linux.c.
618 (ppc-linux.o): New rule.
619 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
620 * configure.ac: AC_CHECK_FUNCS(getauxval).
621 * config.in: Re-generated.
622 * configure: Re-generated.
623 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
624 ppc64_64bit_inferior_p
625
514c5338
YQ
6262015-01-14 Yao Qi <yao@codesourcery.com>
627
628 * linux-ppc-low.c: Include "nat/ppc-linux.h".
629 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
630 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
631 (PT_ORIG_R3, PT_TRAP): Likewise.
632 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
633 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
634 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
635
3368c1e5
JB
6362015-01-10 Joel Brobecker <brobecker@adacore.com>
637
638 * i387-fp.c (i387_cache_to_xsave): In look over
639 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
640 zmmh_low_space field by use of zmmh_high_space.
641
582511be
PA
6422015-01-09 Pedro Alves <palves@redhat.com>
643
644 * linux-low.c (step_over_bkpt): Move higher up in the file.
645 (handle_extended_wait): Don't store the stop_pc here.
646 (get_stop_pc): Adjust comments and rename to ...
647 (check_stopped_by_breakpoint): ... this. Record whether the LWP
648 stopped for a software breakpoint or hardware breakpoint.
649 (thread_still_has_status_pending_p): New function.
650 (status_pending_p_callback): Use
651 thread_still_has_status_pending_p. If the event is no longer
652 interesting, resume the LWP.
653 (handle_tracepoints): Add assert.
654 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
655 (wstatus_maybe_breakpoint): New function.
656 (cancel_breakpoint): Delete function.
657 (check_stopped_by_watchpoint): New function, factored out from
658 linux_low_filter_event.
659 (lp_status_maybe_breakpoint): Delete function.
660 (linux_low_filter_event): Remove filter_ptid argument.
661 Leave thread group exits pending here. Store the LWP's stop PC.
662 Always leave events pending.
663 (linux_wait_for_event_filtered): Pull all events out of the
664 kernel, and leave them all pending.
665 (count_events_callback, select_event_lwp_callback): Consider all
666 events.
667 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
668 (select_event_lwp): Only give preference to the stepping LWP in
669 all-stop mode. Adjust comments.
670 (ignore_event): New function.
671 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
672 references to cancel_breakpoints. Adjust to renames. Also give
673 equal priority to all LWPs that have had events in non-stop mode.
674 If reporting a software breakpoint event, unadjust the LWP's PC.
675 (linux_wait): If linux_wait_1 returned an ignored event, retry.
676 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
677 Adjust.
678 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
679 (resume_status_pending_p): Use thread_still_has_status_pending_p.
680 (linux_stopped_by_watchpoint): Adjust.
681 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
682 * linux-low.h (enum lwp_stop_reason): New.
683 (struct lwp_info) <stop_pc>: Adjust comment.
684 <stopped_by_watchpoint>: Delete field.
685 <stop_reason>: New field.
686 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
687 * mem-break.c (software_breakpoint_inserted_here)
688 (hardware_breakpoint_inserted_here): New function.
689 * mem-break.h (software_breakpoint_inserted_here)
690 (hardware_breakpoint_inserted_here): Declare.
691 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
692 (cancel_breakpoints): Delete.
693 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
694 (upload_fast_traceframes): Remove references to
695 cancel_breakpoints.
696
a33e3959
PA
6972015-01-09 Pedro Alves <palves@redhat.com>
698
699 * thread-db.c (find_new_threads_callback): Ignore thread if the
700 kernel thread ID is -1.
701
8784d563
PA
7022015-01-09 Pedro Alves <palves@redhat.com>
703
704 * linux-low.c (linux_attach_fail_reason_string): Move to
705 nat/linux-ptrace.c, and rename.
706 (linux_attach_lwp): Update comment.
707 (attach_proc_task_lwp_callback): New function.
708 (linux_attach): Adjust to rename and use
709 linux_proc_attach_tgid_threads.
710 (linux_attach_fail_reason_string): Delete declaration.
711
76f2b779
JB
7122015-01-01 Joel Brobecker <brobecker@adacore.com>
713
714 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
715 * server.c (gdbserver_version): Likewise.
716
fafcc06a
SDJ
7172014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
718
719 * remote-utils.c: Include ctype.h.
720 (input_interrupt): Explicitly handle the case when the char
721 received is the NUL byte. Improve the printing of non-ASCII
722 characters.
723
beed38b8
JB
7242014-12-16 Joel Brobecker <brobecker@adacore.com>
725
726 * linux-low.c (linux_low_filter_event): Update call to
727 linux_enable_event_reporting following the addition of
728 a new parameter to that function.
729
bf330350
CU
7302014-12-16 Catalin Udma <catalin.udma@freescale.com>
731
732 PR server/17457
733 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
734 (AARCH64_FPCR_REGNO): Likewise.
735 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
736 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
737 (aarch64_store_fpregset): Likewise.
738
5227d625
JB
7392014-12-15 Joel Brobecker <brobecker@adacore.com>
740
741 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
742 Remove FIXME comment about assumption about N.
743
f93b65a0
JB
7442014-12-13 Joel Brobecker <brobecker@adacore.com>
745
746 * configure.ac: If large-file support is disabled in GDBserver,
747 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
748 * configure: Regenerate.
749
e5a9158d
AA
7502014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
751
752 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
753 warning upon ENODATA from ptrace.
754 * linux-s390-low.c (s390_store_tdb): New.
755 (s390_regsets): Add regset for NT_S390_TDB.
756
feea5f36
AA
7572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
758
759 * linux-low.c (regsets_store_inferior_registers): Skip regsets
760 without a fill_function.
761 * linux-s390-low.c (s390_fill_last_break): Remove.
762 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
763 (s390_arch_setup): Use regset's size instead of fill_function for
764 loop end condition.
765
098dbe61
AA
7662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
767
768 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
769 the regset's store function when ptrace returned an error.
770 * regcache.c (get_thread_regcache): Invalidate register cache
771 before fetching inferior's registers.
772
28eef672
AA
7732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
774
775 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
776 while-loop as for-loop.
777 (regsets_store_inferior_registers): Likewise.
778
bdca27a2
YQ
7792014-11-28 Yao Qi <yao@codesourcery.com>
780
781 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
782 * config.in, configure: Re-generate.
783 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
784 is defined.
785
9c232dda
YQ
7862014-11-21 Yao Qi <yao@codesourcery.com>
787
788 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
789 (AC_CHECK_HEADERS): Remove malloc.h.
790 * configure: Re-generated.
791 * config.in: Re-generated.
792 * server.h: Don't include alloca.h and malloc.h.
793 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
794 Don't include malloc.h.
795
43968415
JB
7962014-11-17 Joel Brobecker <brobecker@adacore.com>
797
798 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
799 corresponding ERRNO check in same block.
800
40e91bc7
PA
8012014-11-12 Pedro Alves <palves@redhat.com>
802
803 * server.c (cont_thread): Update comment.
804 (start_inferior, attach_inferior): No longer clear cont_thread.
805 (handle_v_cont): No longer set cont_thread.
806 (captured_main): Clear cont_thread each time a GDB connects.
807
c2c118cf
PA
8082014-11-12 Pedro Alves <palves@redhat.com>
809
810 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
811 thread, and don't resume all threads if the Hc thread has exited.
812
78708b7c
PA
8132014-11-12 Pedro Alves <palves@redhat.com>
814
815 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
816 the process group instead of to a specific LWP.
817
a2abc7de
PA
8182014-10-15 Pedro Alves <palves@redhat.com>
819
820 PR server/17487
821 * win32-arm-low.c (arm_set_thread_context): Remove current_event
822 parameter.
823 (arm_set_thread_context): Delete.
824 (the_low_target): Adjust.
825 * win32-i386-low.c (debug_registers_changed)
826 (debug_registers_used): Delete.
827 (update_debug_registers_callback): New function.
828 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
829 needing to update their debug registers.
830 (win32_get_current_dr): New function.
831 (x86_dr_low_get_addr, x86_dr_low_get_control)
832 (x86_dr_low_get_status): Fetch the debug register from the thread
833 record's context.
834 (i386_initial_stuff): Adjust.
835 (i386_get_thread_context): Remove current_event parameter. Don't
836 clear debug_registers_changed nor copy DR values to
837 debug_reg_state.
838 (i386_set_thread_context): Delete.
839 (i386_prepare_to_resume): New function.
840 (i386_thread_added): Mark the thread as needing to update irs
841 debug registers.
842 (the_low_target): Remove i386_set_thread_context and install
843 i386_prepare_to_resume.
844 * win32-low.c (win32_get_thread_context): Adjust.
845 (win32_set_thread_context): Use SetThreadContext
846 directly.
847 (win32_prepare_to_resume): New function.
848 (win32_require_context): New function, factored out from ...
849 (thread_rec): ... this.
850 (continue_one_thread): Call win32_prepare_to_resume on each thread
851 we're about to continue.
852 (win32_resume): Call win32_prepare_to_resume on the event thread.
853 * win32-low.h (struct win32_thread_info)
854 <debug_registers_changed>: New field.
855 (struct win32_target_ops): Change prototype of set_thread_context,
856 delete set_thread_context and add prepare_to_resume.
857 (win32_require_context): New declaration.
858
a442d071
GB
8592014-10-08 Gary Benson <gbenson@redhat.com>
860
861 * server.h: Do not include common-exceptions.h.
862
6f1947e8
GB
8632014-10-08 Gary Benson <gbenson@redhat.com>
864
865 * server.h: Do not include cleanups.h.
866
63b434a4
JH
8672014-09-30 James Hogan <james.hogan@imgtec.com>
868
869 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
870 mips64-dsp-linux.c.
871
c4d9ceb6
YQ
8722014-09-23 Yao Qi <yao@codesourcery.com>
873
874 * linux-low.c (lp_status_maybe_breakpoint): New function.
875 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
876 (count_events_callback): Likewise.
877 (select_event_lwp_callback): Likewise.
878 (cancel_breakpoints_callback): Likewise.
879
89a5711c
DB
8802014-09-19 Don Breazeal <donb@codesourcery.com>
881
882 * linux-low.c (handle_extended_wait): Call
883 linux_ptrace_get_extended_event.
884 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
885 linux_is_extended_waitstatus.
886
bffc0964
JB
8872014-09-16 Joel Brobecker <brobecker@adacore.com>
888
889 * Makefile.in (CPPFLAGS): Define.
890 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
891 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
892
0bfdf32f
GB
8932014-09-16 Gary Benson <gbenson@redhat.com>
894
895 * inferiors.h (current_inferior): Renamed as...
896 (current_thread): New variable. All uses updated.
897 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
898 (maybe_move_out_of_jump_pad): Likewise.
899 (cancel_breakpoint): Likewise.
900 (linux_low_filter_event): Likewise.
901 (wait_for_sigstop): Likewise.
902 (linux_resume_one_lwp): Likewise.
903 (need_step_over_p): Likewise.
904 (start_step_over): Likewise.
905 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
906 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
907 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
908 and save_inferior as saved_thread.
909 * regcache.c (get_thread_regcache): Renamed saved_inferior as
910 saved_thread.
911 (regcache_invalidate_thread): Likewise.
912 * remote-utils.c (prepare_resume_reply): Likewise.
913 * thread-db.c (thread_db_get_tls_address): Likewise.
914 (disable_thread_event_reporting): Likewise.
915 (remove_thread_event_breakpoints): Likewise.
916 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
917 as saved_thread.
918 * target.h (set_desired_inferior): Renamed as...
919 (set_desired_thread): New declaration. All uses updated.
920 * server.c (myresume): Updated comment to reference thread instead
921 of inferior.
922 (handle_serial_event): Likewise.
923 (handle_target_event): Likewise.
924
361c8ade
GB
9252014-09-12 Tom Tromey <tromey@redhat.com>
926 Gary Benson <gbenson@redhat.com>
927
928 * regcache.h: Include common-regcache.h.
929 (regcache_read_pc): Don't declare.
930 * regcache.c (get_thread_regcache_for_ptid): New function.
931
bd9269f7
GB
9322014-09-11 Tom Tromey <tromey@redhat.com>
933 Gary Benson <gbenson@redhat.com>
934
935 * symbol.c: New file.
936 * Makefile.in (SFILES): Add symbol.c.
937 (OBS): Add symbol.o.
938
f8c1d06b
GB
9392014-09-11 Gary Benson <gbenson@redhat.com>
940
941 * target.c (target_stop_ptid, target_continue_ptid): New
942 functions.
943
721ec300
GB
9442014-09-11 Tom Tromey <tromey@redhat.com>
945 Gary Benson <gbenson@redhat.com>
946
947 * target.h: Include target/target.h.
948 * target.c (target_read_memory, target_read_uint32)
949 (target_write_memory): New functions.
950
c5e92cca
GB
9512014-09-11 Gary Benson <gbenson@redhat.com>
952
953 * server.h (debug_hw_points): Don't declare.
954 * server.c (debug_hw_points): Don't define. Replace all uses
955 with show_debug_regs.
956 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
957 all uses with show_debug_regs.
958
2e4bb98a
EBM
9592014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
960
961 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
962 endianness into account.
963 (ppc_supply_ptrace_register): Likewise.
964
ac740bc7
JH
9652014-09-03 James Hogan <james.hogan@imgtec.com>
966
967 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
968 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
969
97ea6506
GB
9702014-09-03 Gary Benson <gbenson@redhat.com>
971
972 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
973 ALL_DEBUG_ADDRESS_REGISTERS.
974
df7e5265
GB
9752014-09-02 Gary Benson <gbenson@redhat.com>
976
977 * i386-low.h: Renamed as...
978 * x86-low.h: New file. All type, function and variable name
979 prefixes changed from "i386_" to "x86_". All references updated.
980 * i386-low.c: Renamed as...
981 * x86-low.c: New file. All type, function and variable name
982 prefixes changed from "i386_" to "x86_". All references updated.
983
ed859da7
GB
9842014-09-02 Gary Benson <gbenson@redhat.com>
985
986 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
987 (x86_linux_new_thread): Likewise.
988
860789c7
GB
9892014-08-29 Gary Benson <gbenson@redhat.com>
990
991 * server.h (setjmp.h): Do not include.
992 (toplevel): Do not declare.
993 (common-exceptions.h): Include.
994 (cleanups.h): Likewise.
995 * server.c (toplevel): Do not define.
996 (exit_code): New static global.
997 (detach_or_kill_for_exit_cleanup): New function.
998 (main): New function. Original main renamed to...
999 (captured_main): New function.
1000 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1001
ff55e1b5
GB
10022014-08-29 Gary Benson <gbenson@redhat.com>
1003
1004 * Makefile.in (SFILES): Add common/common-exceptions.c.
1005 (OBS): Add common-exceptions.o.
1006 (common-exceptions.o): New rule.
1007 * utils.c (prepare_to_throw_exception): New function.
1008
e9bcb658
GB
10092014-08-29 Gary Benson <gbenson@redhat.com>
1010
1011 * config.in: Regenerate.
1012 * configure: Likewise.
1013
e3180625
GB
10142014-08-29 Gary Benson <gbenson@redhat.com>
1015
1016 * Makefile.in (SFILES): Add common/cleanups.c.
1017 (OBS): cleanups.o.
1018 (cleanups.o): New rule.
1019
e3d6ba5d
GB
10202014-08-29 Gary Benson <gbenson@redhat.com>
1021
1022 * utils.c (internal_vwarning): New function.
1023
7096e886
GB
10242014-08-28 Gary Benson <gbenson@redhat.com>
1025
1026 * utils.h (fatal): Remove declaration.
1027 * utils.c (fatal): Remove function.
1028
14ce3192
GB
10292014-08-28 Gary Benson <gbenson@redhat.com>
1030
1031 * tracepoint.c (gdb_agent_init): Replace fatal with
1032 perror_with_name.
1033 (initialize_tracepoint): Likewise.
1034
50278d59
GB
10352014-08-28 Gary Benson <gbenson@redhat.com>
1036
1037 * remote-utils.c (remote_prepare): Replace fatal with error.
1038
aa96c426
GB
10392014-08-28 Gary Benson <gbenson@redhat.com>
1040
1041 * linux-low.c (linux_async): Replace fatal with warning.
1042 Tidy up and return.
1043 (linux_start_non_stop): Return -1 if linux_async failed.
1044
f7160e97
GB
10452014-08-28 Gary Benson <gbenson@redhat.com>
1046
1047 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1048 gdb_assert.
1049 (i386_dr_low_get_addr): Remove vague comment.
1050 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1051 gdb_assert.
1052
38e08fca
GB
10532014-08-28 Gary Benson <gbenson@redhat.com>
1054
1055 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1056 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1057 internal_error.
1058 (linux_resume_one_lwp): Likewise.
1059 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1060 gdb_assert.
1061 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1062 with internal_error.
1063 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1064 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1065 (find_register_by_name): Replace fatal with internal_error.
1066 (find_regno): Likewise.
1067 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1068 * thread-db.c (thread_db_create_event): Likewise.
1069 (thread_db_load_search): Likewise.
1070 (try_thread_db_load_1): Likewise.
1071 * tracepoint.c (get_jump_space_head): Replace fatal with
1072 internal_error.
1073 (claim_trampoline_space): Likewise.
1074 (have_fast_tracepoint_trampoline_buffer): Likewise.
1075 (cmd_qtstart): Likewise.
1076 (stop_tracing): Likewise.
1077 (fast_tracepoint_collecting): Likewise.
1078 (target_malloc): Likewise.
1079 (download_tracepoint): Likewise.
1080 (download_trace_state_variables): Replace check with gdb_assert.
1081 (upload_fast_traceframes): Replace fatal with internal_error.
1082
34abf635
GB
10832014-08-19 Tom Tromey <tromey@redhat.com>
1084 Gary Benson <gbenson@redhat.com>
1085
1086 * Makefile.in (SFILES): Add common/common-debug.c.
1087 (OBS): Add common-debug.o.
1088 (common-debug.o): New rule.
1089 * debug.h (debug_printf): Don't declare.
1090 * debug.c (debug_printf): Renamed and rewritten as...
1091 (debug_vprintf): New function.
1092
f6e94d78
GB
10932014-08-19 Gary Benson <gbenson@redhat.com>
1094
1095 * utils.h: Do not include print-utils.h.
1096
9239eeab
GB
10972014-08-19 Tom Tromey <tromey@redhat.com>
1098 Gary Benson <gbenson@redhat.com>
1099
1100 * server.h: Add static assertion.
1101 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1102
ef87c8bb
GB
11032014-08-19 Tom Tromey <tromey@redhat.com>
1104 Gary Benson <gbenson@redhat.com>
1105
1106 * Makefile.in (SFILES): Add common/errors.c.
1107 (OBS): Add errors.o.
1108 (IPA_OBS): Add errors-ipa.o.
1109 (errors.o): New rule.
1110 (errors-ipa.o): Likewise.
1111 * utils.h (perror_with_name, error, warning): Don't declare.
1112 * utils.c (warning): Renamed and rewritten as...
1113 (vwarning): New function.
1114 (error): Renamed and rewritten as...
1115 (verror): New function.
1116 (internal_error): Renamed and rewritten as...
1117 (internal_verror): New function.
1118
bb974a24
GB
11192014-08-07 Gary Benson <gbenson@redhat.com>
1120
1121 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1122 * configure: Regenerate.
1123 * config.in: Likewise.
1124 * server.h: Do not include errno.h.
1125 * event-loop.c: Likewise.
1126 * hostio-errno.c: Likewise.
1127 * linux-low.c: Likewise.
1128 * remote-utils.c: Likewise.
1129 * spu-low.c: Likewise.
1130 * utils.c: Likewise.
1131 * gdbreplay.c: Unconditionally include errno.h.
1132
6d3d12eb
GB
11332014-08-07 Gary Benson <gbenson@redhat.com>
1134
1135 * server.h: Do not include string.h.
1136 * event-loop.c: Likewise.
1137 * linux-low.c: Likewise.
1138 * regcache.c: Likewise.
1139 * remote-utils.c: Likewise.
1140 * spu-low.c: Likewise.
1141 * utils.c: Likewise.
1142
dccbb609
GB
11432014-08-07 Gary Benson <gbenson@redhat.com>
1144
1145 * server.h: Do not include gdb_assert.h.
1146
e76df0d0
GB
11472014-08-07 Gary Benson <gbenson@redhat.com>
1148
1149 * server.h: Do not include common-utils.h.
1150
4cb9c816
GB
11512014-08-07 Gary Benson <gbenson@redhat.com>
1152
1153 * server.h: Do not include ptid.h.
1154 * notif.h: Likewise.
1155
3995eeee
GB
11562014-08-07 Gary Benson <gbenson@redhat.com>
1157
1158 * server.h: Do not include gdb_locale.h.
1159
cb9f1a9b
GB
11602014-08-07 Gary Benson <gbenson@redhat.com>
1161
1162 * server.h: Do not include gdb/signals.h.
1163 * win32-low.c: Likewise.
1164
a5fceff8
GB
11652014-08-07 Gary Benson <gbenson@redhat.com>
1166
1167 * server.h: Do not include pathmax.h.
1168
b9391142
GB
11692014-08-07 Gary Benson <gbenson@redhat.com>
1170
1171 * server.h: Do not include libiberty.h.
1172 * linux-bfin-low.c: Likewise.
1173
0e443c87
GB
11742014-08-07 Gary Benson <gbenson@redhat.com>
1175
1176 * server.h: Do not include ansidecl.h.
1177
8ebb3f56
GB
11782014-08-07 Gary Benson <gbenson@redhat.com>
1179
1180 * linux-x86-low.c: Do not include stddef.h.
1181 * lynx-ppc-low.c: Likewise.
1182 * tracepoint.c: Likewise.
1183
8980bdf6
GB
11842014-08-07 Gary Benson <gbenson@redhat.com>
1185
1186 * server.h: Do not include stdarg.h.
1187 * nto-low.c: Likewise.
1188
d7096f71
GB
11892014-08-07 Gary Benson <gbenson@redhat.com>
1190
1191 * server.h: Do not include stdlib.h.
1192 * inferiors.c: Likewise.
1193 * linux-low.c: Likewise.
1194 * regcache.c: Likewise.
1195 * spu-low.c: Likewise.
1196 * tracepoint.c: Likewise.
1197 * utils.c: Likewise.
1198
d02f550d
GB
11992014-08-07 Gary Benson <gbenson@redhat.com>
1200
1201 * server.h: Do not include stdio.h.
1202 * linux-low.c: Likewise.
1203 * remote-utils.c: Likewise.
1204 * spu-low.c: Likewise.
1205 * utils.c: Likewise.
1206 * wincecompat.c: Likewise.
1207
87f6c4e3
GB
12082014-08-06 Gary Benson <gbenson@redhat.com>
1209
1210 * regcache.c (init_register_cache): Move conditionals inside if.
1211
7089dca4
GB
12122014-08-06 Gary Benson <gbenson@redhat.com>
1213
1214 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1215
462f517e
GB
12162014-07-31 Gary Benson <gbenson@redhat.com>
1217
1218 * ax.h: Do not include server.h.
1219 * gdbthread.h: Likewise.
1220 * lynx-low.h: Likewise.
1221 * notif.h: Likewise.
1222
976411d6
GB
12232014-07-30 Gary Benson <gbenson@redhat.com>
1224
1225 * server.h: Include common-defs.h.
1226 Do not include config.h or build-gnulib-gdbserver/config.h.
1227
d41f6d8e
GB
12282014-07-30 Gary Benson <gbenson@redhat.com>
1229
1230 * hostio-errno.c: Move server.h to top of includes list.
1231 * inferiors.c: Likewise.
1232 * linux-x86-low.c: Likewise.
1233 * notif.c: Include server.h.
1234
314c6a35
TT
12352014-07-24 Tom Tromey <tromey@redhat.com>
1236 Gary Benson <gbenson@redhat.com>
1237
1238 * server.h (CORE_ADDR): Now unsigned.
1239
69ff6be5
PA
12402014-07-16 Pedro Alves <palves@redhat.com>
1241
1242 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1243
ce9e3fe7
PA
12442014-07-15 Pedro Alves <palves@redhat.com>
1245
1246 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1247 copy.
1248
e76126e8
PA
12492014-07-11 Pedro Alves <palves@redhat.com>
1250
1251 * linux-low.c (kill_wait_lwp): New function, based on
1252 kill_one_lwp_callback, but use my_waitpid directly.
1253 (kill_one_lwp_callback, linux_kill): Use it.
1254
8e9db26e
PA
12552014-06-23 Pedro Alves <palves@redhat.com>
1256
1257 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1258 before setting DR0..DR3.
1259
698b3e08
GB
12602014-06-20 Gary Benson <gbenson@redhat.com>
1261
1262 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1263 * configure: Regenerated.
1264 * config.in: Likewise.
1265
125f8a3d
GB
12662014-06-20 Gary Benson <gbenson@redhat.com>
1267
1268 * Makefile.in (SFILES): Update locations for files moved
1269 from common to nat.
1270 (object file files): Reordered.
1271
42995dbd
GB
12722014-06-20 Gary Benson <gbenson@redhat.com>
1273
1274 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1275 (i386_dr_low_set_addr): Likewise.
1276 (i386_dr_low_get_addr): Likewise.
1277 (i386_dr_low_can_set_control): Likewise.
1278 (i386_dr_low_set_control): Likewise.
1279 (i386_dr_low_get_control): Likewise.
1280 (i386_dr_low_get_status): Likewise.
1281 (i386_get_debug_register_length): Likewise.
1282 * linux-x86-low.c (i386_dr_low_set_addr):
1283 Changed signature. Made static.
1284 (i386_dr_low_get_addr): Likewise.
1285 (i386_dr_low_set_control): Likewise.
1286 (i386_dr_low_get_control): Likewise.
1287 (i386_dr_low_get_status): Likewise.
1288 (i386_dr_low): New global variable.
1289 * win32-i386-low.c (i386_dr_low_set_addr):
1290 Changed signature. Made static.
1291 (i386_dr_low_get_addr): Likewise.
1292 (i386_dr_low_set_control): Likewise.
1293 (i386_dr_low_get_control): Likewise.
1294 (i386_dr_low_get_status): Likewise.
1295 (i386_dr_low): New global variable.
1296
e1d2394b
MS
12972014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1298
1299 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1300 * Makefile.in (AR, AR_FLAGS): Define.
1301 * configure: Regenerate.
1302
3a8ee006
GB
13032014-06-19 Gary Benson <gbenson@redhat.com>
1304
1305 * Makefile.in (i386-dregs.o): New rule.
1306 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1307 * i386-low.c (target.h): Remove include.
1308 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1309 (DR_CONTROL_SHIFT): Likewise.
1310 (DR_CONTROL_SIZE): Likewise.
1311 (DR_RW_EXECUTE): Likewise.
1312 (DR_RW_WRITE): Likewise.
1313 (DR_RW_READ): Likewise.
1314 (DR_RW_IORW): Likewise.
1315 (DR_LEN_1): Likewise.
1316 (DR_LEN_2): Likewise.
1317 (DR_LEN_4): Likewise.
1318 (DR_LEN_8): Likewise.
1319 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1320 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1321 (DR_ENABLE_SIZE): Likewise.
1322 (DR_LOCAL_SLOWDOWN): Likewise.
1323 (DR_GLOBAL_SLOWDOWN): Likewise.
1324 (DR_CONTROL_RESERVED): Likewise.
1325 (I386_DR_CONTROL_MASK): Likewise.
1326 (I386_DR_VACANT): Likewise.
1327 (I386_DR_LOCAL_ENABLE): Likewise.
1328 (I386_DR_GLOBAL_ENABLE): Likewise.
1329 (I386_DR_DISABLE): Likewise.
1330 (I386_DR_SET_RW_LEN): Likewise.
1331 (I386_DR_GET_RW_LEN): Likewise.
1332 (I386_DR_WATCH_HIT): Likewise.
1333 (i386_wp_op_t): Likewise.
1334 (i386_show_dr): Likewise.
1335 (i386_length_and_rw_bits): Likewise.
1336 (i386_insert_aligned_watchpoint): Likewise.
1337 (i386_remove_aligned_watchpoint): Likewise.
1338 (i386_handle_nonaligned_watchpoint): Likewise.
1339 i386_update_inferior_debug_regs(): Likewise.
1340 (i386_dr_insert_watchpoint): Likewise.
1341 (i386_dr_remove_watchpoint): Likewise.
1342 (i386_dr_region_ok_for_watchpoint): Likewise.
1343 (i386_dr_stopped_data_address): Likewise.
1344 (i386_dr_stopped_by_watchpoint): Likewise.
1345
8f26655c
GB
13462014-06-19 Gary Benson <gbenson@redhat.com>
1347
1348 * i386-low.c (i386_dr_show): Renamed to
1349 i386_show_dr and made static. All uses updated.
1350 (i386_dr_length_and_rw_bits): Renamed to
1351 i386_length_and_rw_bits and made static.
1352 All uses updated.
1353 (i386_dr_insert_aligned_watchpoint): Renamed to
1354 i386_insert_aligned_watchpoint and made static.
1355 All uses updated.
1356 (i386_dr_remove_aligned_watchpoint): Renamed to
1357 i386_remove_aligned_watchpoint and made static.
1358 All uses updated.
1359 (i386_dr_update_inferior_debug_regs): Renamed to
1360 i386_update_inferior_debug_regs and made static.
1361 All uses updated.
1362
b9228891
GB
13632014-06-18 Gary Benson <gbenson@redhat.com>
1364
5171def3
GB
1365 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1366 (i386_dr_low_can_set_control): Likewise.
1367 (i386_get_debug_register_length): Likewise.
1368 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1369 (i386_dr_low_can_set_control): Likewise.
1370 (i386_get_debug_register_length): Likewise.
1371
13722014-06-17 Gary Benson <gbenson@redhat.com>
1373
b9228891
GB
1374 * i386-low.h (i386-dregs.h): New include.
1375 (DR_FIRSTADDR): Now in i386-dregs.h.
1376 (DR_LASTADDR): Likewise.
1377 (DR_NADDR): Likewise.
1378 (DR_STATUS): Likewise.
1379 (DR_CONTROL): Likewise.
1380 (i386_debug_reg_state): Likewise.
1381 (i386_dr_insert_watchpoint): Likewise.
1382 (i386_dr_remove_watchpoint): Likewise.
1383 (i386_dr_region_ok_for_watchpoint): Likewise.
1384 (i386_dr_stopped_data_address): Likewise.
1385 (i386_dr_stopped_by_watchpoint): Likewise.
1386 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1387
4be83cc2
GB
13882014-06-18 Gary Benson <gbenson@redhat.com>
1389
1390 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1391 i386_dr_insert_watchpoint.
1392 (i386_low_remove_watchpoint): Renamed to
1393 i386_dr_remove_watchpoint.
1394 (i386_low_region_ok_for_watchpoint): Renamed to
1395 i386_dr_region_ok_for_watchpoint.
1396 (i386_low_stopped_data_address): Renamed to
1397 i386_dr_stopped_data_address.
1398 (i386_low_stopped_by_watchpoint): Renamed to
1399 i386_dr_stopped_by_watchpoint.
1400 * i386-low.c (i386_show_dr): Renamed to
1401 i386_dr_show and made nonstatic. All uses updated.
1402 (i386_length_and_rw_bits): Renamed to
1403 i386_dr_length_and_rw_bits and made nonstatic.
1404 All uses updated.
1405 (i386_insert_aligned_watchpoint): Renamed to
1406 i386_dr_insert_aligned_watchpoint and made nonstatic.
1407 All uses updated.
1408 (i386_remove_aligned_watchpoint): Renamed to
1409 i386_dr_remove_aligned_watchpoint and made nonstatic.
1410 All uses updated.
1411 (i386_update_inferior_debug_regs): Renamed to
1412 i386_dr_update_inferior_debug_regs and made nonstatic.
1413 All uses updated.
1414 (i386_low_insert_watchpoint): Renamed to
1415 i386_dr_insert_watchpoint. All uses updated.
1416 (i386_low_remove_watchpoint): Renamed to
1417 i386_dr_remove_watchpoint. All uses updated.
1418 (i386_low_region_ok_for_watchpoint): Renamed to
1419 i386_dr_region_ok_for_watchpoint. All uses updated.
1420 (i386_low_stopped_data_address): Renamed to
1421 i386_dr_stopped_data_address. All uses updated.
1422 (i386_low_stopped_by_watchpoint): Renamed to
1423 i386_dr_stopped_by_watchpoint. All uses updated.
1424
131aa0d4
GB
14252014-06-18 Gary Benson <gbenson@redhat.com>
1426
1427 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1428 (i386_dr_low_can_set_control): Likewise.
1429 (i386_insert_aligned_watchpoint): New check.
1430
d9305f7f
GB
14312014-06-18 Gary Benson <gbenson@redhat.com>
1432
1433 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1434 Renamed to state.
1435
e927c9fc
GB
14362014-06-18 Gary Benson <gbenson@redhat.com>
1437
1438 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1439 instead of fatal and error.
1440 (i386_handle_nonaligned_watchpoint): Likewise.
1441
1b6d4134
GB
14422014-06-18 Gary Benson <gbenson@redhat.com>
1443
1444 * i386-low.c (i386_get_debug_register_length): New macro.
1445 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1446 (i386_show_dr): Use debug_printf instead of fprintf. Use
1447 phex to format values.
1448
6e62758f
GB
14492014-06-18 Gary Benson <gbenson@redhat.com>
1450
1451 * i386-low.h: Comment changes.
1452 * i386-low.c: Likewise.
1453
fc6e2f03
GB
14542014-06-18 Gary Benson <gbenson@redhat.com>
1455
1456 * i386-low.c: Whitespace changes.
1457
f9d1eeed
TT
14582014-06-12 Tom Tromey <tromey@redhat.com>
1459
1460 * utils.c (freeargv): Remove.
1461
0b04e523
TT
14622014-06-12 Tom Tromey <tromey@redhat.com>
1463
1464 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1465 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1466 (parse_debug_format_options): Likewise.
1467 (gdbserver_usage): Likewise.
1468 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1469 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1470 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1471 against libiberty.
1472 ($(LIBGNU)): Depend on libiberty.
1473 (all-lib): Recurse into all subdirs.
1474 (install-only): Invoke "install" target in subdirs.
1475 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1476 targets.
1477 * configure: Rebuild.
1478 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1479 for vasprintf, vsnprintf, or gettimeofday.
1480 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1481 srv_tgtobj.
1482
270c9937
JB
14832014-06-05 Joel Brobecker <brobecker@adacore.com>
1484
1485 * development.sh: Delete.
1486 * Makefile.in (config.status): Adjust dependency on development.sh.
1487 * configure.ac: Adjust development.sh source call.
1488 * configure: Regenerate.
1489
0a261ed8
PA
14902014-06-02 Pedro Alves <palves@redhat.com>
1491
1492 * ax.c (gdb_free_agent_expr): New function.
1493 * ax.h (gdb_free_agent_expr): New declaration.
1494 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1495 list.
1496 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1497 static.
1498 (clear_breakpoint_conditions_and_commands): New function.
1499 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1500 (clear_breakpoint_conditions_and_commands): New declaration.
1501
e9dae05e
RR
15022014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1503
1504 * linux-aarch64-low.c (asm/ptrace.h): Include.
1505
5876f503
JK
15062014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1507
1508 Fix TLS access for -static -pthread.
1509 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1510 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1511 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1512
802e8e6d
PA
15132014-05-20 Pedro Alves <palves@redhat.com>
1514
1515 * linux-aarch64-low.c (aarch64_insert_point)
1516 (aarch64_remove_point): No longer check whether the type is
1517 supported here. Adjust to new interface.
1518 (the_low_target): Install aarch64_supports_z_point_type as
1519 supports_z_point_type method.
1520 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1521 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1522 instead of a Z packet char. Adjust.
1523 (arm_supports_z_point_type): New function.
1524 (arm_insert_point, arm_remove_point): Adjust to new interface.
1525 (the_low_target): Install arm_supports_z_point_type.
1526 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1527 (cris_insert_point, cris_remove_point): Adjust to new interface.
1528 Don't check whether the type is supported here.
1529 (the_low_target): Install cris_supports_z_point_type.
1530 * linux-low.c (linux_supports_z_point_type): New function.
1531 (linux_insert_point, linux_remove_point): Adjust to new interface.
1532 * linux-low.h (struct linux_target_ops) <insert_point,
1533 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1534 raw_breakpoint pointer parameter.
1535 <supports_z_point_type>: New method.
1536 * linux-mips-low.c (mips_supports_z_point_type): New function.
1537 (mips_insert_point, mips_remove_point): Adjust to new interface.
1538 Use mips_supports_z_point_type.
1539 (the_low_target): Install mips_supports_z_point_type.
1540 * linux-ppc-low.c (the_low_target): Install NULL as
1541 supports_z_point_type method.
1542 * linux-s390-low.c (the_low_target): Install NULL as
1543 supports_z_point_type method.
1544 * linux-sparc-low.c (the_low_target): Install NULL as
1545 supports_z_point_type method.
1546 * linux-x86-low.c (x86_supports_z_point_type): New function.
1547 (x86_insert_point): Adjust to new insert_point interface. Use
1548 insert_memory_breakpoint. Adjust to new
1549 i386_low_insert_watchpoint interface.
1550 (x86_remove_point): Adjust to remove_point interface. Use
1551 remove_memory_breakpoint. Adjust to new
1552 i386_low_remove_watchpoint interface.
1553 (the_low_target): Install x86_supports_z_point_type.
1554 * lynx-low.c (lynx_target_ops): Install NULL as
1555 supports_z_point_type callback.
1556 * nto-low.c (nto_supports_z_point_type): New.
1557 (nto_insert_point, nto_remove_point): Adjust to new interface.
1558 (nto_target_ops): Install nto_supports_z_point_type.
1559 * mem-break.c: Adjust intro comment.
1560 (struct raw_breakpoint) <raw_type, size>: New fields.
1561 <inserted>: Update comment.
1562 <shlib_disabled>: Delete field.
1563 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1564 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1565 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1566 (raw_bkpt_type_to_target_hw_bp_type): New function.
1567 (find_enabled_raw_code_breakpoint_at): New function.
1568 (find_raw_breakpoint_at): New type and size parameters. Use them.
1569 (insert_memory_breakpoint): New function, based off
1570 set_raw_breakpoint_at.
1571 (remove_memory_breakpoint): New function.
1572 (set_raw_breakpoint_at): Reimplement.
1573 (set_breakpoint): New, based on set_breakpoint_at.
1574 (set_breakpoint_at): Reimplement.
1575 (delete_raw_breakpoint): Go through the_target->remove_point
1576 instead of assuming memory breakpoints.
1577 (find_gdb_breakpoint_at): Delete.
1578 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1579 (find_gdb_breakpoint): New function.
1580 (set_gdb_breakpoint_at): Delete.
1581 (z_type_supported): New function.
1582 (set_gdb_breakpoint_1): New function, loosely based off
1583 set_gdb_breakpoint_at.
1584 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1585 (delete_gdb_breakpoint_at): Delete.
1586 (delete_gdb_breakpoint_1): New function, loosely based off
1587 delete_gdb_breakpoint_at.
1588 (delete_gdb_breakpoint): New function.
1589 (clear_gdb_breakpoint_conditions): Rename to ...
1590 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1591 breakpoint.
1592 (add_condition_to_breakpoint): Make static.
1593 (add_breakpoint_condition): Take a struct breakpoint pointer
1594 instead of an address. Adjust.
1595 (gdb_condition_true_at_breakpoint): Rename to ...
1596 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1597 z_type parameter.
1598 (gdb_condition_true_at_breakpoint): Reimplement.
1599 (add_breakpoint_commands): Take a struct breakpoint pointer
1600 instead of an address. Adjust.
1601 (gdb_no_commands_at_breakpoint): Rename to ...
1602 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1603 parameter. Return true if no breakpoint was found. Change debug
1604 output.
1605 (gdb_no_commands_at_breakpoint): Reimplement.
1606 (run_breakpoint_commands): Rename to ...
1607 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1608 and change return type to boolean.
1609 (run_breakpoint_commands): New function.
1610 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1611 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1612 breakpoint. Go through the_target->remove_point instead of
1613 assuming memory breakpoint.
1614 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1615 software and hardware breakpoints.
1616 (reinsert_raw_breakpoint): Go through the_target->insert_point
1617 instead of assuming memory breakpoint.
1618 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1619 software and hardware breakpoints.
1620 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1621 Check both software and hardware breakpoints.
1622 (validate_inserted_breakpoint): Assert the breakpoint is a
1623 software breakpoint. Set the inserted flag to -1 instead of
1624 setting shlib_disabled.
1625 (delete_disabled_breakpoints): Adjust.
1626 (validate_breakpoints): Only validate software breakpoints.
1627 Adjust to inserted flag change.
1628 (check_mem_read, check_mem_write): Skip breakpoint types other
1629 than software breakpoints. Adjust to inserted flag change.
1630 * mem-break.h (enum raw_bkpt_type): New enum.
1631 (raw_breakpoint, struct process_info): Forward declare.
1632 (Z_packet_to_target_hw_bp_type): Delete declaration.
1633 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1634 (set_gdb_breakpoint, delete_gdb_breakpoint)
1635 (clear_breakpoint_conditions): New declarations.
1636 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1637 (breakpoint_inserted_here): Update comment.
1638 (add_breakpoint_condition, add_breakpoint_commands): Replace
1639 address parameter with a breakpoint pointer parameter.
1640 (gdb_breakpoint_here): Update comment.
1641 (delete_gdb_breakpoint_at): Delete.
1642 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1643 * server.c (process_point_options): Take a struct breakpoint
1644 pointer instead of an address. Adjust.
1645 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1646 delete_gdb_breakpoint.
1647 * spu-low.c (spu_target_ops): Install NULL as
1648 supports_z_point_type method.
1649 * target.h: Include mem-break.h.
1650 (struct target_ops) <prepare_to_access_memory>: Update comment.
1651 <supports_z_point_type>: New field.
1652 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1653 instead of a char. Also take a raw breakpoint pointer.
1654 * win32-arm-low.c (the_low_target): Install NULL as
1655 supports_z_point_type.
1656 * win32-i386-low.c (i386_supports_z_point_type): New function.
1657 (i386_insert_point, i386_remove_point): Adjust to new interface.
1658 (the_low_target): Install i386_supports_z_point_type.
1659 * win32-low.c (win32_supports_z_point_type): New function.
1660 (win32_insert_point, win32_remove_point): Adjust to new interface.
1661 (win32_target_ops): Install win32_supports_z_point_type.
1662 * win32-low.h (struct win32_target_ops):
1663 <supports_z_point_type>: New method.
1664 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1665 instead of a char. Also take a raw breakpoint pointer.
1666
932539e3
PA
16672014-05-20 Pedro Alves <palves@redhat.com>
1668
1669 * mem-break.h: Include break-common.h.
1670 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1671 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1672 (Z_packet_to_target_hw_bp_type): New declaration.
1673 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1674 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1675 (Z_PACKET_ACCESS_WP): Delete macros.
1676 (Z_packet_to_hw_type): Delete function.
1677 * i386-low.h: Don't include break-common.h here.
1678 (Z_packet_to_hw_type): Delete declaration.
1679 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1680 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1681 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1682 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1683 * linux-aarch64-low.c: Don't include break-common.h here.
1684 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1685 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1686 (Z_packet_to_target_hw_bp_type): Delete function.
1687 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1688 function.
1689 (mips_insert_point, mips_remove_point): Use
1690 Z_packet_to_target_hw_bp_type.
1691
4ff0d3d8
PA
16922014-05-20 Pedro Alves <palves@redhat.com>
1693
1694 * linux-aarch64-low.c: Include break-common.h.
1695 (enum target_point_type): Delete.
1696 (Z_packet_to_point_type): Rename to ...
1697 (Z_packet_to_target_hw_bp_type): ... this, and return a
1698 target_hw_bp_type instead.
1699 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1700 instead of an enum target_point_type.
1701 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1702 breakpoint type.
1703 (aarch64_dr_state_insert_one_point)
1704 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1705 (aarch64_handle_aligned_watchpoint)
1706 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1707 Take an enum target_hw_bp_type instead of an enum
1708 target_point_type.
1709 (aarch64_supports_z_point_type): New function.
1710 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1711 use Z_packet_to_target_hw_bp_type.
1712
786dc519
JB
17132014-05-20 Joel Brobecker <brobecker@adacore.com>
1714
1715 * configure.ac: Only use -Werror by default when DEVELOPMENT
1716 is true.
1717 * configure: Regenerate.
1718
9e0aa64f
JK
17192014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1720
1721 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1722 * linux-x86-low.c (X86_64_USER_REGS): New.
1723 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1724
2b577b92
YQ
17252014-04-28 Yao Qi <yao@codesourcery.com>
1726
1727 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1728 name.
1729
94611da2
PA
17302014-04-25 Pedro Alves <palves@redhat.com>
1731
1732 PR server/16255
1733 * linux-low.c (linux_attach_fail_reason_string): New function.
1734 (linux_attach_lwp): Delete.
1735 (linux_attach_lwp_1): Rename to ...
1736 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1737 argument. Remove "initial" parameter. Return int instead of
1738 void. Don't error or warn here.
1739 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1740 failure to attach to the tgid. Call warning when failing to
1741 attach to an lwp.
1742 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1743 argument. Remove "initial" parameter. Return int instead of
1744 void. Don't error or warn here.
1745 (linux_attach_fail_reason_string): New declaration.
1746 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1747 interface change. Use linux_attach_fail_reason_string.
1748
01f9f808
MS
17492014-04-24 Michael Sturm <michael.sturm@mintel.com>
1750 Walfred Tedeschi <walfred.tedeschi@intel.com>
1751
1752 * Makefile.in: Added rules to handle new files
1753 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1754 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1755 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1756 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1757 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1758 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1759 x32-avx512-linux.o.
1760 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1761 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1762 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1763 i386/x32-avx512.xml.
1764 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1765 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1766 i386/x32-avx512-linux.xml.
1767 * i387-fp.c (num_avx512_k_registers): New constant for number
1768 of K registers.
1769 (num_avx512_zmmh_low_registers): New constant for number of
1770 lower ZMM registers (0-15).
1771 (num_avx512_zmmh_high_registers): New constant for number of
1772 higher ZMM registers (16-31).
1773 (num_avx512_ymmh_registers): New contant for number of higher
1774 YMM registers (ymm16-31 added by avx521 on x86_64).
1775 (num_avx512_xmm_registers): New constant for number of higher
1776 XMM registers (xmm16-31 added by AVX512 on x86_64).
1777 (struct i387_xsave): Add space for AVX512 registers.
1778 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1779 Add code to handle AVX512 registers.
1780 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1781 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1782 prototypei from generated file.
1783 (tdesc_amd64_avx512_linux): Likewise.
1784 (init_registers_x32_avx512_linux): Likewise.
1785 (tdesc_x32_avx512_linux): Likewise.
1786 (init_registers_i386_avx512_linux): Likewise.
1787 (tdesc_i386_avx512_linux): Likewise.
1788 (x86_64_regmap): Add AVX512 registers.
1789 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1790 mask.
1791 (initialize_low_arch): Add code to initialize AVX512 registers.
1792
51aa91f9
PA
17932014-04-23 Pedro Alves <palves@redhat.com>
1794
1795 * mem-break.c (find_gdb_breakpoint_at): Make static.
1796 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1797
a4165e94
PA
17982014-04-23 Pedro Alves <palves@redhat.com>
1799
1800 * i386-low.c: Don't include break-common.h here.
1801 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1802 prototype to take target_hw_bp_type as argument instead of a Z
1803 packet char.
1804 * i386-low.h: Include break-common.h here.
1805 (Z_packet_to_hw_type): Declare.
1806 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1807 prototypes.
1808 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1809 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1810 (x86_remove_point): Convert the packet number to a
1811 target_hw_bp_type before calling i386_low_remove_watchpoint.
1812 * win32-i386-low.c (i386_insert_point): Convert the packet number
1813 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1814 (i386_remove_point): Convert the packet number to a
1815 target_hw_bp_type before calling i386_low_remove_watchpoint.
1816
b8acf843
PA
18172014-04-23 Pedro Alves <palves@redhat.com>
1818
1819 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1820
d708bcd1
PA
18212014-04-10 Pedro Alves <palves@redhat.com>
1822
1823 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1824 Check if the condition or command is NULL before checking if the
1825 breakpoint is known. On success, return true.
1826 * mem-break.h (add_breakpoint_condition): Document return.
1827 (add_breakpoint_commands): Add describing comment.
1828 * server.c (skip_to_semicolon): New function.
1829 (process_point_options): Use it.
1830
2eec7d5b
PA
18312014-04-09 Pedro Alves <palves@redhat.com>
1832
1833 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1834 to lwpid_of.
1835
fa96cb38
PA
18362014-02-27 Pedro Alves <palves@redhat.com>
1837
1838 PR 12702
1839 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1840 macros.
1841 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1842 output.
1843 (last_thread_of_process_p): Take a PID argument instead of a
1844 thread pointer.
1845 (linux_wait_for_lwp): Delete.
1846 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1847 functions.
1848 (linux_low_filter_event): New function, party factored out from
1849 linux_wait_for_event.
1850 (linux_wait_for_event): Rename to ...
1851 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1852 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1853 sigsuspend. Check for zombie leaders.
1854 (linux_wait_for_event): Reimplement as wrapper around
1855 linux_wait_for_event_filtered.
1856 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1857 a normal or signal exit is seen, it's the whole process exiting.
1858 (wait_for_sigstop): No longer a for_each_inferior callback.
1859 Rewrite on top of linux_wait_for_event_filtered.
1860 (stop_all_lwps): Call wait_for_sigstop directly.
1861 * server.c (resume, handle_target_event): Handle
1862 TARGET_WAITKIND_NO_RESUMED.
1863
d763de10
JB
18642014-02-26 Joel Brobecker <brobecker@adacore.com>
1865
1866 * win32-low.c (psapi_get_dll_name,
1867 * win32_CreateToolhelp32Snapshot): Delete.
1868 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1869 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1870 Delete.
1871 (handle_load_dll): Add function description.
1872 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1873
850a0f76
JB
18742014-02-26 Joel Brobecker <brobecker@adacore.com>
1875
1876 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1877 Add comment.
1878 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1879 base address when calling win32_add_one_solib.
1880 (handle_load_dll): Delete local variable load_addr.
1881 Remove 0x1000 offset applied to DLL base address when calling
1882 win32_add_one_solib.
1883 (handle_unload_dll): Add comment.
1884
f25b3fc3
JB
18852014-02-26 Joel Brobecker <brobecker@adacore.com>
1886
1887 * win32-low.c (win32_add_all_dlls): Renames
1888 win32_ensure_ntdll_loaded. Rewrite function documentation.
1889 Adjust implementation to always load all DLLs.
1890 Add 0x1000 offset to DLL base address when calling
1891 win32_add_one_solib.
1892 (child_initialization_done): New static global.
1893 (do_initial_child_stuff): Set child_initialization_done to
1894 zero during child initialization, and 1 after. Replace call
1895 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1896 Add comment.
1897 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1898 (handle_unload_dll): Add function documentation.
1899 (get_child_debug_event): Ignore load and unload DLL events
1900 during child initialization.
1901
d86d4aaf
DE
19022014-02-20 Doug Evans <dje@google.com>
1903
3bc32da3 1904 Remove global all_lwps.
d86d4aaf
DE
1905 * inferiors.h (ptid_of): Move here from linux-low.h.
1906 (pid_of, lwpid_of): Ditto.
1907 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1908 parameter is a struct thread_info * now.
1909 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1910 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1911 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1912 directly.
1913 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1914 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1915 * linux-arm-low.c (update_registers_callback): Update, "entry"
1916 parameter is a struct thread_info * now.
1917 Fetch lwpid from current_inferior directly.
1918 (arm_insert_point): Pass &all_threads to find_inferior instead of
1919 &all_lwps.
1920 (arm_remove_point): Ditto.
1921 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1922 (arm_prepare_to_resume): Fetch pid from thread.
1923 (arm_read_description): Fetch lwpid from current_inferior directly.
1924 * linux-low.c (all_lwps): Delete.
1925 (delete_lwp): Delete call to remove_inferior.
1926 (handle_extended_wait): Fetch lwpid from thread.
1927 (add_lwp): Don't set lwp->entry.id. Remove call to
1928 add_inferior_to_list.
1929 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1930 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1931 (kill_one_lwp_callback): Ditto.
1932 (linux_kill): Don't dereference NULL pointer.
1933 Fetch ptid,lwpid from thread.
1934 (get_detach_signal): Fetch ptid from thread.
1935 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1936 Simplify call to regcache_invalidate_thread.
1937 (delete_lwp_callback): Update, "entry" parameter is a
1938 struct thread_info * now. Fetch pid from thread.
1939 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1940 (status_pending_p_callback): Update, "entry" parameter is a
1941 struct thread_info * now. Fetch ptid from thread.
1942 (find_lwp_pid): Update, "entry" parameter is a
1943 struct thread_info * now.
1944 (linux_wait_for_lwp): Fetch pid from thread.
1945 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1946 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1947 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1948 (dequeue_one_deferred_signal): Ditto.
1949 (cancel_breakpoint): Fetch ptid from current_inferior.
1950 (linux_wait_for_event): Pass &all_threads to find_inferior,
1951 not &all_lwps. Fetch ptid, lwpid from thread.
1952 (count_events_callback): Update, "entry" parameter is a
1953 struct thread_info * now.
1954 (select_singlestep_lwp_callback): Ditto.
1955 (select_event_lwp_callback): Ditto.
1956 (cancel_breakpoints_callback): Ditto.
1957 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1958 not &all_lwps.
1959 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1960 (unsuspend_one_lwp): Update, "entry" parameter is a
1961 struct thread_info * now.
1962 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1963 not &all_lwps.
1964 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1965 Fetch lwpid from thread, not lwp.
1966 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1967 Pass &all_threads to find_inferior, not &all_lwps.
1968 (send_sigstop): Fetch lwpid from thread, not lwp.
1969 (send_sigstop_callback): Update, "entry" parameter is a
1970 struct thread_info * now.
1971 (suspend_and_send_sigstop_callback): Ditto.
1972 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1973 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1974 struct thread_info * now.
1975 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1976 from thread, lwp.
1977 (lwp_running): Update, "entry" parameter is a
1978 struct thread_info * now.
1979 (stop_all_lwps): Fetch ptid from thread.
1980 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1981 (linux_resume_one_lwp): Fetch lwpid from thread.
1982 (linux_set_resume_request): Update, "entry" parameter is a
1983 struct thread_info * now. Fetch pid, lwpid from thread.
1984 (resume_status_pending_p): Update, "entry" parameter is a
1985 struct thread_info * now.
1986 (need_step_over_p): Ditto. Fetch lwpid from thread.
1987 (start_step_over): Fetch lwpid from thread.
1988 (linux_resume_one_thread): Update, "entry" parameter is a
1989 struct thread_info * now. Fetch lwpid from thread.
1990 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1991 (proceed_one_lwp): Update, "entry" parameter is a
1992 struct thread_info * now. Fetch lwpid from thread.
1993 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1994 struct thread_info * now.
1995 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1996 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1997 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1998 directly.
1999 (regsets_store_inferior_registers): Ditto.
2000 (fetch_register, store_register): Ditto.
2001 (linux_read_memory, linux_write_memory): Ditto.
2002 (linux_request_interrupt): Ditto.
2003 (linux_read_auxv): Ditto.
2004 (linux_xfer_siginfo): Ditto.
2005 (linux_qxfer_spu): Ditto.
2006 (linux_qxfer_libraries_svr4): Ditto.
2007 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2008 moved to inferiors.h.
2009 (get_lwp): Delete.
2010 (get_thread_lwp): Update.
2011 (struct lwp_info): Delete member "entry". Simplify comment for
2012 member "thread".
2013 (all_lwps): Delete.
2014 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2015 current_inferior directly.
2016 (update_watch_registers_callback): Update, "entry" parameter is a
2017 struct thread_info * now. Fetch pid from thread.
2018 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2019 (mips_insert_point): Fetch lwpid from current_inferior.
2020 Pass &all_threads to find_inferior, not &all_lwps.
2021 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2022 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2023 directly.
2024 (mips_stopped_data_address): Ditto.
2025 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2026 directly.
2027 * linux-tile-low.c (tile_arch_setup): Ditto.
2028 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2029 (update_debug_registers_callback): Update, "entry" parameter is a
2030 struct thread_info * now. Fetch pid from thread.
2031 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2032 Pass &all_threads to find_inferior, not &all_lwps.
2033 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2034 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2035 Pass &all_threads to find_inferior, not &all_lwps.
2036 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2037 (i386_dr_low_get_status): Ditto.
2038 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2039 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2040 (x86_linux_read_description): Ditto.
2041 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2042
3b8361aa
DE
20432014-02-20 Doug Evans <dje@google.com>
2044
2045 * inferiors.c (get_first_inferior): Fix buglet.
2046
f7667f0d
DE
20472014-02-19 Doug Evans <dje@google.com>
2048
2049 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2050 * inferiors.c (add_thread): Change result type to struct thread_info *.
2051 All callers updated.
2052 (add_lwp): Call add_thread here instead of in callers.
2053 All callers updated.
2054 * linux-low.h (get_lwp_thread): Rewrite.
2055 (struct lwp_info): New member "thread".
2056
b3312d80
DE
20572014-02-19 Doug Evans <dje@google.com>
2058
2059 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2060 All callers updated.
2061
ecc6f45c
DE
20622014-02-19 Doug Evans <dje@google.com>
2063
2064 * inferiors.c (add_thread): Fix whitespace.
2065
649ebbca
DE
20662014-02-19 Doug Evans <dje@google.com>
2067
2068 * dll.c (clear_dlls): Replace accessing list implemention details
2069 with API function.
2070 * gdbthread.h (get_first_thread): Declare.
2071 * inferiors.c (for_each_inferior_with_data): New function.
2072 (get_first_thread): New function.
2073 (find_thread_ptid): Simplify.
2074 (get_first_inferior): New function.
2075 (clear_list): Delete.
2076 (one_inferior_p): New function.
2077 (clear_inferior_list): New function.
2078 (clear_inferiors): Update.
2079 * inferiors.h (for_each_inferior_with_data): Declare.
2080 (clear_inferior_list): Declare.
2081 (one_inferior_p): Declare.
2082 (get_first_inferior): Declare.
2083 * linux-low.c (linux_wait_for_event): Replace accessing list
2084 implemention details with API function.
2085 * server.c (target_running): Ditto.
2086 (accumulate_file_name_length): New function.
2087 (emit_dll_description): New function.
2088 (handle_qxfer_libraries): Replace accessing list implemention
2089 details with API function.
2090 (handle_qxfer_threads_worker): New function.
2091 (handle_qxfer_threads_proper): Replace accessing list implemention
2092 details with API function.
2093 (handle_query): Ditto.
2094 (visit_actioned_threads_callback_ftype): New typedef.
2095 (visit_actioned_threads_data): New struct.
2096 (visit_actioned_threads): Rewrite to be find_inferior callback.
2097 (resume): Call find_inferior.
2098 (handle_status): Replace accessing list implemention
2099 details with API function.
2100 (process_serial_event): Replace accessing list implemention details
2101 with API function.
2102 * target.c (set_desired_inferior): Replace accessing list implemention
2103 details with API function.
2104 * tracepoint.c (same_process_p): New function.
2105 (gdb_agent_about_to_close): Replace accessing list implemention
2106 details with API function.
2107 * win32-low.c (child_delete_thread): Replace accessing list
2108 implemention details with API function.
2109 (match_dll_by_basename): New function.
2110 (dll_is_loaded_by_basename): New function.
2111 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2112 details call to dll_is_loaded_by_basename.
2113
80894984
DE
21142014-02-19 Doug Evans <dje@google.com>
2115
2116 * dll.h (struct dll_info): Add comment.
2117 * gdbthread.h (struct thread_info): Add comment.
2118 (current_ptid): Simplify.
2119 * inferiors.c (add_process): Update.
2120 (remove_process): Update.
2121 * inferiors.h (struct process_info): Rename member "head" to "entry".
2122 * linux-low.c (delete_lwp): Update.
2123 (add_lwp): Update.
2124 (last_thread_of_process_p): Update.
2125 (kill_one_lwp_callback, linux_kill): Update.
2126 (status_pending_p_callback): Update.
2127 (wait_for_sigstop): Update. Simplify read of ptid.
2128 (start_step_over): Update.
2129 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2130 (get_lwp_thread): Update.
2131 (struct lwp_info): Rename member "head" to "entry".
2132 * regcache.h (inferior_list_entry): Delete.
2133 * server.c (kill_inferior_callback): Update.
2134 (detach_or_kill_inferior_callback): Update.
2135 (print_started_pid): Update.
2136 (print_attached_pid): Update.
2137 (process_serial_event): Simplify read of ptid.
2138 * thread-db.c (thread_db_create_event): Update.
2139 (thread_db_get_tls_address): Update.
2140 * win32-low.c (current_inferior_ptid): Simplify.
2141
46917d26
TT
21422014-02-19 Tom Tromey <tromey@redhat.com>
2143
2144 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2145 argument.
2146 (target_supports_btrace): Update.
2147
0759a81e
YQ
21482014-02-14 Yao Qi <yao@codesourcery.com>
2149
2150 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2151 (rsp-low-ipa.o): New target.
2152
a7191e8b
TT
21532014-02-12 Tom Tromey <tromey@redhat.com>
2154
2155 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2156 convert_ascii_to_int.
2157 * regcache.c (registers_to_string): Likewise.
2158 * remote-utils.c (decode_M_packet): Likewise.
2159 * server.c (process_serial_event): Likewise.
2160
ff0e980e
TT
21612014-02-12 Tom Tromey <tromey@redhat.com>
2162
2163 * server.c (handle_query, handle_v_run): Use hex2bin, not
2164 unhexify.
2165 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2166
e9371aff
TT
21672014-02-12 Tom Tromey <tromey@redhat.com>
2168
2169 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2170 convert_int_to_ascii.
2171 * regcache.c (registers_to_string, collect_register_as_string):
2172 Likewise.
2173 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2174 Likewise.
2175 * server.c (process_serial_event): Likewise.
2176 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2177 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2178
971dc0b8
TT
21792014-02-12 Tom Tromey <tromey@redhat.com>
2180
2181 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2182 bin2hex, not hexify.
2183 * tracepoint.c (cmd_qtstatus): Likewise.
2184
0a822afb
TT
21852014-02-12 Tom Tromey <tromey@redhat.com>
2186
2187 * remote-utils.c (monitor_output): Pass explicit length to
2188 hexify.
2189
9c3d6531
TT
21902014-02-12 Tom Tromey <tromey@redhat.com>
2191
2192 * tracepoint.c: Include rsp-low.h.
2193 * server.c: Include rsp-low.h.
2194 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2195 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2196 declare.
2197 * remote-utils.c: Include rsp-low.h.
2198 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2199 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2200 (convert_int_to_ascii, convert_ascii_to_int): Move to
2201 common/rsp-low.c.
2202 * regcache.c: Include rsp-low.h.
2203 * ax.c: Include rsp-low.h.
2204 * Makefile.in (SFILES): Add common/rsp-low.c.
2205 (OBS): Add rsp-low.o.
2206 (rsp-low.o): New target.
2207
01fd3ea5
TT
22082014-02-12 Tom Tromey <tromey@redhat.com>
2209
2210 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2211 Include print-utils.h.
2212 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2213 (plongest, thirty_two, phex_nz): Remove.
2214 * Makefile.in (SFILES): Add common/print-utils.c.
2215 (OBS): Add print-utils.o.
2216 (print-utils-ipa.o): New target.
2217 (print-utils.o): New target.
2218 (IPA_OBJS): Add print-utils-ipa.o.
2219
e99dc820
TT
22202014-02-06 Tom Tromey <tromey@redhat.com>
2221
2222 * Makefile.in (SFILES): Fix indentation.
2223
ee1e2d4f
DE
22242014-02-05 Doug Evans <dje@google.com>
2225
2226 * linux-low.c (linux_wait_for_event): Improve comment.
2227 (linux_wait_1): Keep current_inferior in sync with event_child.
2228
f5a02773
DE
22292014-01-22 Doug Evans <dje@google.com>
2230
2231 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2232
87ce2a04
DE
22332014-01-22 Doug Evans <dje@google.com>
2234
2235 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2236 * configure: Regenerate.
2237 * config.in: Regenerate.
2238 * Makefile.in (SFILES): Add debug.c.
2239 (OBS): Add debug.o.
2240 * debug.c: New file.
2241 * debug.h: New file.
2242 * linux-aarch64-low.c (*): Update all debugging printfs to use
2243 debug_printf instead of fprintf.
2244 * linux-arm-low.c (*): Ditto.
2245 * linux-cris-low.c (*): Ditto.
2246 * linux-crisv32-low.c (*): Ditto.
2247 * linux-m32r-low.c (*): Ditto.
2248 * linux-sparc-low.c (*): Ditto.
2249 * linux-x86.c (*): Ditto.
2250 * linux-low.c (*): Ditto.
2251 (linux_wait_1): Add calls to debug_enter, debug_exit.
2252 (linux_wait): Remove redundant debugging printf.
2253 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2254 (linux_resume, unstop_all_lwps): Ditto.
2255 * mem-break.c (*): Update all debugging printfs to use
2256 debug_printf instead of fprintf.
2257 * remote-utils.c (*): Ditto.
2258 * thread-db.c (*): Ditto.
2259 * server.c #include <ctype.h>, "gdb_vecs.h".
2260 (debug_threads): Moved to debug.c.
2261 (*): Update all debugging printfs to use debug_printf instead of
2262 fprintf.
2263 (start_inferior): Replace call to fflush with call to debug_flush.
2264 (monitor_show_help): Mention set debug-format.
2265 (parse_debug_format_options): New function.
2266 (handle_monitor_command): Handle "monitor set debug-format".
2267 (gdbserver_usage): Mention --debug-format.
2268 (main): Parse --debug-format.
2269 * server.h (debug_threads): Declaration moved to debug.h.
2270 #include "debug.h".
2271 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2272 trace_debug_1 that uses debug_printf.
2273 (tracepoint_look_up_symbols): Update all debugging printfs to use
2274 debug_printf instead of fprintf.
2275
e671835b
BS
22762014-01-20 Baruch Siach <baruch@tkos.co.il>
2277
2278 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2279 sys/ptrace.h.
2280
b5737fa9
PA
22812014-01-17 Pedro Alves <palves@redhat.com>
2282
ea38d2a9 2283 PR build/16445
c7faa97a
PA
2284 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2285 defined after including gdb_proc_service.h.
b5737fa9 2286
40ed484e
DE
22872014-01-16 Doug Evans <dje@google.com>
2288
2289 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2290 (match_dll): Use it.
2291
969c39fb
MM
22922014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2293
2294 * target.h (target_ops) <read_btrace>: Change parameters and
2295 return type to allow error reporting.
2296 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2297 trace reading errors on.
2298 * linux-low.c (linux_low_read_btrace): Pass trace reading
2299 errors on.
2300 (linux_low_disable_btrace): New.
2301
ab7f45ba
DE
23022014-01-15 Doug Evans <dje@google.com>
2303
2304 * inferiors.c (thread_id_to_gdb_id): Delete.
2305 * inferiors.h (thread_id_to_gdb_id): Delete.
2306
66af0f44
EZ
23072014-01-13 Eli Zaretskii <eliz@gnu.org>
2308
2309 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2310 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2311 versions.
2312
9939e131
PA
23132014-01-08 Pedro Alves <palves@redhat.com>
2314
2315 * server.c (handle_status): Don't discard previous queued stop
2316 replies or thread's pending status here.
2317 (main) <disconnection>: Do it here instead.
2318
b7ea362b
PA
23192014-01-08 Pedro Alves <palves@redhat.com>
2320
2321 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2322 * server.c (visit_actioned_threads, handle_pending_status): New
2323 function.
2324 (handle_v_cont): Factor out parts to ...
2325 (resume): ... this new function. If in all-stop, and a thread
2326 being resumed has a pending status, report it without actually
2327 resuming.
2328 (myresume): Adjust to use the new 'resume' function.
2329 (clear_pending_status_callback, set_pending_status_callback)
2330 (find_status_pending_thread_callback): New functions.
2331 (handle_status): Handle the case of multiple threads having
2332 interesting statuses to report. Report threads' real last signal
2333 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2334 with an interesting thread to report the status for, instead of
2335 always reporting the status of the first thread.
2336
28498c42
JB
23372014-01-01 Joel Brobecker <brobecker@adacore.com>
2338
2339 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2340 * gdbreplay.c (gdbreplay_version): Likewise.
2341
f45c82da
YZ
23422013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2343
2344 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2345 iov.iov_len with the real length in use.
2346
379a5e2d
JB
23472013-12-13 Joel Brobecker <brobecker@adacore.com>
2348
2349 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2350 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2351 for all targets that use win32-low.c.
2352 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2353 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2354
4210d83e
PA
23552013-12-13 Pedro Alves <palves@redhat.com>
2356
2357 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2358 if equal to TARGET_WAITKIND_LOADED.
2359 * win32-low.c (cached_status): New static global.
2360 (win32_wait): Add declaration.
2361 (do_initial_child_stuff): Flush all initial pending debug events
2362 up to the initial breakpoint.
2363 (win32_wait): If CACHED_STATUS was set, return that instead
2364 of doing a real wait. Remove the code resuming the execution
2365 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2366 during the initial phase. Also remove the code changing
2367 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2368 TARGET_WAITKIND_STOPPED.
2369
e7f0d979
YQ
23702013-12-11 Yao Qi <yao@codesourcery.com>
2371
2372 * notif.c (handle_notif_ack): Return 0 if no notification
2373 matches.
2374
ebcf782c
DE
23752013-11-20 Doug Evans <dje@google.com>
2376
2377 * linux-low.c (linux_set_resume_request): Fix comment.
2378
20ad9378
DE
23792013-11-20 Doug Evans <dje@google.com>
2380
2381 * linux-low.c (resume_status_pending_p): Tweak comment.
2382
a196ebeb
WT
23832013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2384
2385 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2386 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2387 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2388 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2389 (srv_amd64_regobj): Add amd64-mpx.o.
2390 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2391 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2392 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2393 * i387-fp.c (num_pl_bnd_register) Added constant.
2394 (num_pl_bnd_cfg_registers) Added constant.
2395 (struct i387_xsave) Added reserved area and MPX fields.
2396 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2397 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2398 function.
2399 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2400 (init_registers_amd64_mpx_linux): Declare new function.
2401 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2402 (x86_64_regmap): Add MPX registers.
2403 (x86_linux_read_description): Add MPX case.
2404 (initialize_low_arch): Initialize MPX targets.
2405
0080a2f6
TT
24062013-11-18 Tom Tromey <tromey@redhat.com>
2407
2408 * configure: Rebuild.
2409 * configure.ac: Don't check for stdlib.h.
2410 * gdbreplay.c: Unconditionally include stdlib.h.
2411
2978b111
TT
24122013-11-18 Tom Tromey <tromey@redhat.com>
2413
2414 * config.in: Rebuild.
2415 * configure: Rebuild.
2416 * configure.ac: Don't use AC_HEADER_DIRENT.
2417
a3d08894
TT
24182013-11-18 Tom Tromey <tromey@redhat.com>
2419
2420 * server.h: Don't check HAVE_STRING_H.
2421 * gdbreplay.c: Don't check HAVE_STRING_H.
2422 * configure: Rebuild.
2423
0a5dd17d
TT
24242013-11-18 Tom Tromey <tromey@redhat.com>
2425
2426 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2427 LIBGNU.
2428
1bd2f0ba
TT
24292013-11-08 Tom Tromey <tromey@redhat.com>
2430
2431 * configure, config.in: Rebuild.
2432 * configure.ac: Remove unused configury.
2433
3266f10b
TT
24342013-11-08 Tom Tromey <tromey@redhat.com>
2435
2436 * acinclude.m4: Include common.m4, codeset.m4.
2437 * configure, config.in: Rebuild.
2438 * configure.ac: Use GDB_AC_COMMON.
2439
6682d959
AA
24402013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2441
2442 * linux-s390-low.c (HWCAP_S390_TE): New define.
2443 (s390_arch_setup): Consider the TE field in the HWCAP for
2444 determining 'have_regset_tdb'.
2445
fd0a4d76
SDJ
24462013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2447
2448 PR gdb/16014
2449 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2450 call to sizeof.
2451
1a3d890b
PA
24522013-10-02 Pedro Alves <palves@redhat.com>
2453
2454 * server.c (process_serial_event): Don't output "GDBserver
2455 exiting" if GDB is connected through stdio.
2456 * target.c (mywait): Likewise, be silent if GDB is connected
2457 through stdio.
2458
97ad4581
JB
24592013-10-01 Joel Brobecker <brobecker@adacore.com>
2460
2461 * lynx-low.c (lynx_add_threads_after_attach): New function.
2462 (lynx_attach): Remove call to add_thread. Add call to
2463 lynx_add_threads_after_attach instead.
2464
5b4e221c
MF
24652013-09-28 Mike Frysinger <vapier@gentoo.org>
2466
2467 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2468 * config.in, configure: Regenerated.
2469
ee47b2f8
YQ
24702013-09-18 Yao Qi <yao@codesourcery.com>
2471
2472 PR server/15959
2473 * server.c (start_inferior): Clear 'resume_info'.
2474
d6707650 24752013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2476
d6707650
JW
2477 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2478 for each register.
2479
9243dd0e 24802013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2481
9243dd0e
JW
2482 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2483 linux-tile-low.o to srv_tgtobj.
2484
c623a6ef
WN
24852013-09-16 Will Newton <will.newton@linaro.org>
2486
2487 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2488 out regs.
2489
fb71d39e
PA
24902013-09-06 Pedro Alves <palves@redhat.com>
2491
2492 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2493 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2494 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2495 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2496 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2497 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2498
8e7e9910
PA
24992013-09-06 Pedro Alves <palves@redhat.com>
2500
2501 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2502 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2503
7c3a12ca
PA
25042013-09-06 Pedro Alves <palves@redhat.com>
2505
2506 * linux-amd64-ipa.c: Include tracepoint.h.
2507 * linux-i386-ipa.c: Include tracepoint.h.
2508
8eb3d7b6
RW
25092013-09-06 Ricard Wanderlof <ricardw@axis.com>
2510
2511 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2512 (ps_get_thread_area): New function.
2513
eddddb9d
RW
25142013-09-06 Ricard Wanderlof <ricardw@axis.com>
2515
2516 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2517 (initialize_low_arch): Call init_registers_crisv32 rather than
2518 init_register_crisv32.
2519
533b0600
PA
25202013-09-05 Pedro Alves <palves@redhat.com>
2521
2522 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2523 to ...
2524 * hostio.h: ... this new file.
2525 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2526 win32-low.c: Include hostio.h.
2527
0ce3d3b5
PA
25282013-09-05 Pedro Alves <palves@redhat.com>
2529
2530 * server.h (gdb_client_data, handler_func, callback_handler_func)
2531 (delete_file_handler, add_file_handler, append_callback_event)
2532 (delete_callback_event, start_event_loop, initialize_event_loop):
2533 Move to event-loop.h and include it.
2534 * event-loop.h: New file.
2535
799cdc37
PA
25362013-09-05 Pedro Alves <palves@redhat.com>
2537
2538 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2539 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2540 (loaded_dll, unloaded_dll): Move to ...
2541 * dll.h: ... this new file.
2542 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2543
6a6bbd9d
PA
25442013-09-05 Pedro Alves <palves@redhat.com>
2545
2546 * server.h (current_process, get_thread_process, all_processes)
2547 (add_inferior_to_list, for_each_inferior, current_inferior)
2548 (remove_inferior, add_process, remove_process, find_process_pid)
2549 (have_started_inferiors_p, have_attached_inferiors_p)
2550 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2551 (clear_inferiors, find_inferior, find_inferior_id)
2552 (inferior_target_data, set_inferior_target_data)
2553 (inferior_regcache_data, set_inferior_regcache_data): Move to
2554 inferiors.h, and include it.
2555 * inferiors.h: New file.
2556
f699aaba
PA
25572013-09-05 Pedro Alves <palves@redhat.com>
2558
2559 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2560 Move ...
2561 * ax.h: ... here.
2562
c144c7a0
PA
25632013-09-05 Pedro Alves <palves@redhat.com>
2564
2565 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2566 tracepoint.h.
2567 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2568 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2569 (handle_tracepoint_general_set, handle_tracepoint_query)
2570 (tracepoint_finished_step, tracepoint_was_hit)
2571 (release_while_stepping_state_list, current_traceframe)
2572 (in_readonly_region, traceframe_read_mem)
2573 (fetch_traceframe_registers, traceframe_read_sdata)
2574 (traceframe_read_info, struct fast_tpoint_collect_status)
2575 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2576 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2577 (supply_fast_tracepoint_registers)
2578 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2579 (ipa_tdesc, claim_trampoline_space)
2580 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2581 (agent_mem_read, agent_get_trace_state_variable_value)
2582 (agent_set_trace_state_variable_value, agent_tsv_read)
2583 (agent_mem_read_string, get_raw_reg_func_addr)
2584 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2585 * tracepoint.h: ... this new file.
2586
ff42e6ab
PA
25872013-09-05 Pedro Alves <palves@redhat.com>
2588
2589 * server.h (perror_with_name, error, fatal, warning, paddress)
2590 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2591 include it.
2592 * utils.h: New file.
2593
541af0f4
PA
25942013-09-05 Pedro Alves <palves@redhat.com>
2595
2596 * server.h (remote_debug, noack_mode, transport_is_reliable)
2597 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2598 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2599 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2600 (write_enn, initialize_async_io, enable_async_io)
2601 (disable_async_io, check_remote_input_interrupt_request)
2602 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2603 (dead_thread_notify, prepare_resume_reply)
2604 (decode_address_to_semicolon, decode_address, decode_m_packet)
2605 (decode_M_packet, decode_X_packet, decode_xfer_write)
2606 (decode_search_memory_packet, unhexify, hexify)
2607 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2608 (look_up_one_symbol, relocate_instruction)
2609 (monitor_output): Move to remote-utils.h, and include it.
2610 * remote-utils.h: New file.
2611
eebdf26b
PA
26122013-09-05 Pedro Alves <palves@redhat.com>
2613
2614 * server.h (_): Delete.
2615
3aafd2ff
PA
26162013-09-02 Pedro Alves <palves@redhat.com>
2617
2618 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2619 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2620 allocated.
2621 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2622
cee83bcb
PM
26232013-09-02 Pierre Muller <muller@sourceware.org>
2624
2625 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2626 or WriteProcessMemory complete successfully and handle
2627 ERROR_PARTIAL_COPY error.
2628
9a13b2fa
PA
26292013-09-02 Pedro Alves <palves@redhat.com>
2630
2631 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2632 error instead of EIO.
2633
602e3198
JK
26342013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2635
2636 PR server/15604
2637 * linux-low.c: Include filestuff.h.
2638 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2639 * lynx-low.c: Include filestuff.h.
2640 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2641 * server.c: Include filestuff.h.
2642 (main): Call notice_open_fds.
2643 * spu-low.c: Include filestuff.h.
2644 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2645
96d7229d
LM
26462013-08-22 Luis Machado <lgustavo@codesourcery.com>
2647
2648 * Makefile.in: Explain why ../target and ../nat are not
2649 listed as include file search paths.
2650 (linux-waitpid.o): New object file rule.
2651 * configure.srv (srv_native_linux_obj): New variable.
2652 Replace all occurrences of linux native object files with
2653 $srv_native_linux_obj.
2654 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2655 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2656 (linux_enable_event_reporting): Remove declaration.
2657 (my_waitpid): Moved to common/linux-waitpid.c.
2658 (linux_wait_for_event): Pass ptid when calling
2659 linux_enable_event_reporting.
2660 (linux_supports_tracefork_flag): Remove.
2661 (linux_enable_event_reporting): Likewise.
2662 (linux_tracefork_grandchild): Remove.
2663 (STACK_SIZE): Moved to common/linux-ptrace.c.
2664 (linux_tracefork_child): Remove.
2665 (linux_test_for_tracefork): Remove.
2666 (linux_look_up_symbols): Call linux_supports_traceclone.
2667 (initialize_low): Remove call to linux_test_for_tracefork.
2668 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2669 common/linux-ptrace.h.
2670 (PTRACE_TYPE_ARG4): Likewise.
2671 Include linux-ptrace.h.
2672
32940073
PA
26732013-08-21 Pedro Alves <palves@redhat.com>
2674
2675 * config.in: Renegerate.
2676
33b60d58 26772013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2678
33b60d58
LM
2679 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2680 (SFILES): Remove $(srcdir)/common/target-common.c and
2681 add $(srcdir)/target/waitstatus.c.
2682 (OBS): Remove target-common.o and add waitstatus.o.
2683 (server_h): Remove $(srcdir)/../common/target-common.h and
2684 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2685 and $(srcdir)/../target/waitstatus.h.
2686 (target-common.o): Remove.
2687 (waitstatus.o): New target object file.
2688 * target.h: Do not include target-common.h and
2689 include target/resume.h, target/wait.h and
2690 target/waitstatus.h.
2691
b8e1b30e
LM
26922013-08-13 Luis Machado <lgustavo@codesourcery.com>
2693
2694 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2695 to PTRACE_TYPE_ARG3.
2696 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2697 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2698 PTRACE_TYPE_ARG4.
2699 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2700 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2701
7a60ad40
YQ
27022013-07-27 Jie Zhang <jie@codesourcery.com>
2703 Daniel Jacobowitz <dan@codesourcery.com>
2704 Yao Qi <yao@codesourcery.com>
2705
2706 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2707 (mips-linux-watch.o): New rule.
2708 (mips_linux_watch_h): New variable.
2709 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2710 srv_tgtobj.
2711 * linux-mips-low.c: Include mips-linux-watch.h.
2712 (struct arch_process_info, struct arch_lwp_info): New.
2713 (update_watch_registers_callback): New function.
2714 (mips_linux_new_process, mips_linux_new_thread) New functions.
2715 (mips_linux_prepare_to_resume, mips_insert_point): New
2716 functions.
2717 (mips_remove_point, mips_stopped_by_watchpoint): New
2718 functions.
2719 (rsp_bp_type_to_target_hw_bp_type): New function.
2720 (mips_stopped_data_address): New function.
2721 (the_low_target): Add watchpoint support functions.
2722
de6f69ad
YQ
27232013-07-27 Yao Qi <yao@codesourcery.com>
2724
2725 * i386-low.c: Include break-common.h.
2726 (enum target_hw_bp_type): Remove.
2727
3360c0bf
LM
27282013-07-24 Luis Machado <lgustavo@codesourcery.com>
2729
2730 * Makefile.in (SFILES): /common/target-common.c.
2731 (OBS): Add target-common.o.
2732 (server_h): Add $(srcdir)/../common/target-common.h.
2733 (target-common.o): New target.
2734 * server.c (queue_stop_reply_callback): Free
2735 status string after use.
2736 * target.c (target_waitstatus_to_string): Remove.
2737 * target.h: Include target-common.h.
2738 (resume_kind): Likewise.
2739 (target_waitkind): Likewise.
2740 (target_waitstatus): Likewise.
2741 (TARGET_WNOHANG): Likewise.
2742
bd885420
YQ
27432013-07-04 Yao Qi <yao@codesourcery.com>
2744
2745 * Makefile.in (host_alias): Use @host_noncanonical@.
2746 (target_alias): Use @target_noncanonical@.
2747 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2748 ACX_NONCANONICAL_HOST.
2749 * configure: Regenerated.
2750
2751 Revert:
2752 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2753
2754 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2755 * configure: Rebuild.
2756 * Makefile.in (version_host, version_target): Get from configure.
2757 (version.c): Use $(version_host) and $(version_target).
2758
17ef446e
PA
27592013-07-03 Pedro Alves <palves@redhat.com>
2760
2761 * Makefile.in (config.status): Depend on development.sh.
2762 * acinclude.m4: Include libmcheck.m4.
2763 * configure: Regenerate.
2764
7a9a7487
MG
27652013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2766
2767 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2768 attribute inside the parentheses.
2769 (winapi_DebugSetProcessKillOnExit): Ditto.
2770 (winapi_DebugBreakProcess): Ditto.
2771 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2772
49b64de6
MG
27732013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2774
2775 * notif.h (notif_event): Add a dummy member to avoid compiler
2776 errors.
2777
d5749ee7
PA
27782013-07-01 Pedro Alves <palves@redhat.com>
2779
2780 * hostio.c (HOSTIO_PATH_MAX): Define.
2781 (require_filename, handle_open, handle_unlink, handle_readlink):
2782 Use it.
2783
d8d2a3ee
PA
27842013-07-01 Pedro Alves <palves@redhat.com>
2785
2786 * server.h: Include "pathmax.h".
2787 * linux-low.c: Don't include sys/param.h.
2788 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2789 MAXPATHLEN.
2790 * win32-low.c: Don't include sys/param.h.
2791 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2792
bc7dea8d
PA
27932013-07-01 Pedro Alves <palves@redhat.com>
2794
2795 * event-loop.c: Don't check HAVE_UNISTD_H before including
2796 <unistd.h>.
2797 * gdbreplay.c: Likewise.
2798 * remote-utils.c: Likewise.
2799 * server.c: Likewise.
2800 * configure.ac: Don't check for unistd.h.
2801 * configure: Regenerate.
2802
d6c2da54
TT
28032013-06-28 Tom Tromey <tromey@redhat.com>
2804
2805 * Makefile.in (version.c): Use version.in, not
2806 common/version.in.
2807
257b6bec
MG
28082013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2809
2810 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2811 * configure: Rebuild.
2812 * Makefile.in (version_host, version_target): Get from configure.
2813 (version.c): Use $(version_host) and $(version_target).
2814
86ebe149
DK
28152013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2816
2817 Fix trace-status to output user name without trailing colon.
2818 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2819
f30aa5af
DK
28202013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2821
2822 Fix trace-status to output proper start-time and stop-time.
2823 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2824 output start time and stop time in hex as gdb expects.
2825
28a93511
YQ
28262013-06-26 Pedro Alves <pedro@codesourcery.com>
2827
2828 * tracepoint.c (build_traceframe_info_xml): Output trace state
2829 variables present in the trace buffer.
2830
01208463
TT
28312013-06-24 Tom Tromey <tromey@redhat.com>
2832
2833 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2834 create-version.sh.
2835 (version.o): Remove.
2836 * gdbreplay.c: Include version.h.
2837 (version, host_name): Don't declare.
2838 * server.h: Include version.h.
2839 (version, host_name): Don't declare.
2840
760256f9
PA
28412013-06-12 Pedro Alves <palves@redhat.com>
2842
2843 * linux-x86-low.c (linux_is_elf64): Delete global.
2844 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2845 with local linux_pid_exe_is_elf_64_file use.
2846
030031ee
PA
28472013-06-11 Pedro Alves <palves@redhat.com>
2848
2849 * linux-low.c (regset_disabled, disable_regset): New functions.
2850 (regsets_fetch_inferior_registers)
2851 (regsets_store_inferior_registers): Use them.
2852 (initialize_regsets_info); Don't allocate the disabled_regsets
2853 array here.
2854 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2855 comment.
2856
5da6eb0a
PA
28572013-06-11 Pedro Alves <palves@redhat.com>
2858
2859 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2860 xmalloc.
2861
7e5aaa09
PA
28622013-06-11 Pedro Alves <palves@redhat.com>
2863
2864 * linux-x86-low.c (initialize_low_arch): Call
2865 init_registers_x32_avx_linux.
2866
d878444c
JK
28672013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2868
2869 Fix compatibility with Android Bionic.
2870 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2871 it is not empty.
2872
3aee8918
PA
28732013-06-07 Pedro Alves <palves@redhat.com>
2874
5f2b57b5 2875 PR server/14823
3aee8918
PA
2876 * Makefile.in (OBS): Add tdesc.o.
2877 (IPA_OBJS): Add tdesc-ipa.o.
2878 (tdesc-ipa.o): New rule.
2879 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2880 interface.
2881 * linux-low.c (new_inferior): Delete.
2882 (disabled_regsets, num_regsets): Delete.
2883 (linux_add_process): Adjust to set the new per-process
2884 new_inferior flag.
2885 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2886 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2887 was a stop. When calling arch_setup, switch the current inferior
2888 to the thread that got an event.
2889 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2890 (regsets_fetch_inferior_registers)
2891 (regsets_store_inferior_registers): New regsets_info parameter.
2892 Adjust to use it.
2893 (linux_register_in_regsets): New regs_info parameter. Adjust to
2894 use it.
2895 (register_addr, fetch_register, store_register): New usrregs_info
2896 parameter. Adjust to use it.
2897 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2898 parameter regs_info. Adjust to use it.
2899 (linux_fetch_registers): Get the current inferior's regs_info, and
2900 adjust to use it.
2901 (linux_store_registers): Ditto.
2902 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2903 (initialize_low): Don't initialize the target_regsets here. Call
2904 initialize_low_arch.
2905 * linux-low.h (target_regsets): Delete declaration.
2906 (struct regsets_info): New.
2907 (struct usrregs_info): New.
2908 (struct regs_info): New.
2909 (struct process_info_private) <new_inferior>: New field.
2910 (struct linux_target_ops): Delete the num_regs, regmap, and
2911 regset_bitmap fields. New field regs_info.
2912 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2913 * i387-fp.c (num_xmm_registers): Delete.
2914 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2915 calls to new interface.
2916 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2917 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2918 Infer the number of xmm registers from the regcache's target
2919 description.
2920 * i387-fp.h (num_xmm_registers): Delete.
2921 * inferiors.c (add_thread): Don't install the thread's regcache
2922 here.
2923 * proc-service.c (gregset_info): Fetch the current inferior's
2924 regs_info. Adjust to use it.
2925 * regcache.c: Include tdesc.h.
2926 (register_bytes, reg_defs, num_registers)
2927 (gdbserver_expedite_regs): Delete.
2928 (get_thread_regcache): If the thread doesn't have a regcache yet,
2929 create one, instead of aborting gdbserver.
2930 (regcache_invalidate_one): Rename to ...
2931 (regcache_invalidate_thread): ... this.
2932 (regcache_invalidate_one): New.
2933 (regcache_invalidate): Only invalidate registers of the current
2934 process.
2935 (init_register_cache): Add target_desc parameter, and use it.
2936 (new_register_cache): Ditto. Assert the target description has a
2937 non zero registers_size.
2938 (regcache_cpy): Add assertions. Adjust.
2939 (realloc_register_cache, set_register_cache): Delete.
2940 (registers_to_string, registers_from_string): Adjust.
2941 (find_register_by_name, find_regno, find_register_by_number)
2942 (register_cache_size): Add target_desc parameter, and use it.
2943 (free_register_cache_thread, free_register_cache_thread_one)
2944 (regcache_release, register_cache_size): New.
2945 (register_size): Add target_desc parameter, and use it.
2946 (register_data, supply_register, supply_register_zeroed)
2947 (supply_regblock, supply_register_by_name, collect_register)
2948 (collect_register_as_string, collect_register_by_name): Adjust.
2949 * regcache.h (struct target_desc): Forward declare.
2950 (struct regcache) <tdesc>: New field.
2951 (init_register_cache, new_register_cache): Add target_desc
2952 parameter.
2953 (regcache_invalidate_thread): Declare.
2954 (regcache_invalidate_one): Delete declaration.
2955 (regcache_release): Declare.
2956 (find_register_by_number, register_cache_size, register_size)
2957 (find_regno): Add target_desc parameter.
2958 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2959 declarations.
2960 * remote-utils.c: Include tdesc.h.
2961 (outreg, prepare_resume_reply): Adjust.
2962 * server.c: Include tdesc.h.
2963 (gdbserver_xmltarget): Delete declaration.
2964 (get_features_xml, process_serial_event): Adjust.
2965 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2966 declare.
2967 (struct process_info) <tdesc>: New field.
2968 (ipa_tdesc): Declare.
2969 * tdesc.c: New file.
2970 * tdesc.h: New file.
2971 * tracepoint.c: Include tdesc.h.
2972 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2973 (get_context_regcache): Adjust to pass ipa_tdesc down.
2974 (do_action_at_tracepoint): Adjust to get the register cache size
2975 from the context regcache's description.
2976 (traceframe_walk_blocks): Adjust to get the register cache size
2977 from the current trace frame's description.
2978 (traceframe_get_pc): Adjust to get current trace frame's
2979 description and pass it down.
2980 (gdb_collect): Adjust to get the register cache size from the
2981 IPA's description.
2982 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2983 (gdbserver_xmltarget): Delete.
2984 (initialize_low_tracepoint): Set the ipa's target description.
2985 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2986 (initialize_low_tracepoint): Set the ipa's target description.
2987 * linux-x86-low.c: Include tdesc.h.
2988 [__x86_64__] (is_64bit_tdesc): New.
2989 (ps_get_thread_area, x86_get_thread_area): Use it.
2990 (i386_cannot_store_register): Rename to ...
2991 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2992 (i386_cannot_fetch_register): Rename to ...
2993 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2994 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2995 to new interface.
2996 (target_regsets): Rename to ...
2997 (x86_regsets): ... this.
2998 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2999 interface.
3000 (x86_siginfo_fixup): Use is_64bit_tdesc.
3001 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3002 (tdesc_x32_avx_linux, tdesc_x32_linux)
3003 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3004 Declare.
3005 (x86_linux_update_xmltarget): Delete.
3006 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3007 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3008 (AMD64_LINUX_USER64_CS): New.
3009 (x86_linux_read_description): New, based on
3010 x86_linux_update_xmltarget.
3011 (same_process_callback): New.
3012 (x86_arch_setup_process_callback): New.
3013 (x86_linux_update_xmltarget): New.
3014 (x86_regsets_info): New.
3015 (amd64_linux_regs_info): New.
3016 (i386_linux_usrregs_info): New.
3017 (i386_linux_regs_info): New.
3018 (x86_linux_regs_info): New.
3019 (x86_arch_setup): Reimplement.
3020 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3021 (x86_emit_ops): Ditto.
3022 (the_low_target): Adjust. Install x86_linux_regs_info,
3023 x86_cannot_fetch_register, and x86_cannot_store_register.
3024 (initialize_low_arch): New.
3025 * linux-ia64-low.c (tdesc_ia64): Declare.
3026 (ia64_fetch_register): Adjust.
3027 (ia64_usrregs_info, regs_info): New globals.
3028 (ia64_regs_info): New function.
3029 (the_low_target): Adjust.
3030 (initialize_low_arch): New function.
3031 * linux-sparc-low.c (tdesc_sparc64): Declare.
3032 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3033 Adjust.
3034 (sparc_arch_setup): New function.
3035 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3036 (the_low_target): Adjust.
3037 (initialize_low_arch): New function.
3038 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3039 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3040 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3041 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3042 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3043 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3044 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3045 (tdesc_powerpc_isa205_vsx64l): Declare.
3046 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3047 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3048 (ppc_set_pc, ppc_get_hwcap): Adjust.
3049 (ppc_usrregs_info): Forward declare.
3050 (!__powerpc64__) ppc_regmap_adjusted: New global.
3051 (ppc_arch_setup): Adjust to the current process'es target
3052 description.
3053 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3054 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3055 (ppc_store_evrregset): Adjust.
3056 (target_regsets): Rename to ...
3057 (ppc_regsets): ... this, and make static.
3058 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3059 (ppc_regs_info): New function.
3060 (the_low_target): Adjust.
3061 (initialize_low_arch): New function.
3062 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3063 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3064 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3065 (tdesc_s390x_linux64v2): Declare.
3066 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3067 (s390_fill_gregset, s390_store_last_break): Adjust.
3068 (target_regsets): Rename to ...
3069 (s390_regsets): ... this, and make static.
3070 (s390_get_pc, s390_set_pc): Adjust.
3071 (s390_get_hwcap): New target_desc parameter, and use it.
3072 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3073 (s390_arch_setup): Adjust to set the current process'es target
3074 description. Don't adjust the regmap.
3075 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3076 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3077 (regs_info_3264): New globals.
3078 (s390_regs_info): New function.
3079 (the_low_target): Adjust.
3080 (initialize_low_arch): New function.
3081 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3082 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3083 [__mips64] (init_registers_mips_linux)
3084 (init_registers_mips_dsp_linux): Delete defines.
3085 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3086 (have_dsp): New global.
3087 (mips_read_description): New, based on mips_arch_setup.
3088 (mips_arch_setup): Reimplement.
3089 (get_usrregs_info): New function.
3090 (mips_cannot_fetch_register, mips_cannot_store_register)
3091 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3092 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3093 (target_regsets): Rename to ...
3094 (mips_regsets): ... this, and make static.
3095 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3096 (dsp_regs_info, regs_info): New globals.
3097 (mips_regs_info): New function.
3098 (the_low_target): Adjust.
3099 (initialize_low_arch): New function.
3100 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3101 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3102 Declare.
3103 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3104 (arm_read_description): New, with bits factored from
3105 arm_arch_setup.
3106 (arm_arch_setup): Reimplement.
3107 (target_regsets): Rename to ...
3108 (arm_regsets): ... this, and make static.
3109 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3110 (arm_regs_info): New function.
3111 (the_low_target): Adjust.
3112 (initialize_low_arch): New function.
3113 * linux-m68k-low.c (tdesc_m68k): Declare.
3114 (target_regsets): Rename to ...
3115 (m68k_regsets): ... this, and make static.
3116 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3117 (m68k_regs_info): New function.
3118 (m68k_arch_setup): New function.
3119 (the_low_target): Adjust.
3120 (initialize_low_arch): New function.
3121 * linux-sh-low.c (tdesc_sharch): Declare.
3122 (target_regsets): Rename to ...
3123 (sh_regsets): ... this, and make static.
3124 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3125 (sh_regs_info, sh_arch_setup): New functions.
3126 (the_low_target): Adjust.
3127 (initialize_low_arch): New function.
3128 * linux-bfin-low.c (tdesc_bfin): Declare.
3129 (bfin_arch_setup): New function.
3130 (bfin_usrregs_info, regs_info): New globals.
3131 (bfin_regs_info): New function.
3132 (the_low_target): Adjust.
3133 (initialize_low_arch): New function.
3134 * linux-cris-low.c (tdesc_cris): Declare.
3135 (cris_arch_setup): New function.
3136 (cris_usrregs_info, regs_info): New globals.
3137 (cris_regs_info): New function.
3138 (the_low_target): Adjust.
3139 (initialize_low_arch): New function.
3140 * linux-cris-low.c (tdesc_crisv32): Declare.
3141 (cris_arch_setup): New function.
3142 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3143 (cris_regs_info): New function.
3144 (the_low_target): Adjust.
3145 (initialize_low_arch): New function.
3146 * linux-m32r-low.c (tdesc_m32r): Declare.
3147 (m32r_arch_setup): New function.
3148 (m32r_usrregs_info, regs_info): New globals.
3149 (m32r_regs_info): Adjust.
3150 (initialize_low_arch): New function.
3151 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3152 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3153 (tic6x_usrregs_info): Forward declare.
3154 (tic6x_read_description): New function, based on ...
3155 (tic6x_arch_setup): ... this. Reimplement.
3156 (target_regsets): Rename to ...
3157 (tic6x_regsets): ... this, and make static.
3158 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3159 (tic6x_regs_info): New function.
3160 (the_low_target): Adjust.
3161 (initialize_low_arch): New function.
3162 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3163 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3164 (target_regsets): Rename to ...
3165 (xtensa_regsets): ... this, and make static.
3166 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3167 globals.
3168 (xtensa_arch_setup, xtensa_regs_info): New functions.
3169 (the_low_target): Adjust.
3170 (initialize_low_arch): New function.
3171 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3172 (nios2_arch_setup): Set the current process'es tdesc.
3173 (target_regsets): Rename to ...
3174 (nios2_regsets): ... this.
3175 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3176 (nios2_regs_info): New function.
3177 (the_low_target): Adjust.
3178 (initialize_low_arch): New function.
a261b8f5
PA
3179 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3180 (aarch64_arch_setup): Set the current process'es tdesc.
3181 (target_regsets): Rename to ...
3182 (aarch64_regsets): ... this.
3183 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3184 (aarch64_regs_info): New function.
3185 (the_low_target): Adjust.
3186 (initialize_low_arch): New function.
3aee8918
PA
3187 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3188 globals.
3189 (target_regsets): Rename to ...
3190 (tile_regsets): ... this.
3191 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3192 (tile_regs_info): New function.
3193 (tile_arch_setup): Set the current process'es tdesc.
3194 (the_low_target): Adjust.
3195 (initialize_low_arch): New function.
3196 * spu-low.c (tdesc_spu): Declare.
3197 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3198 * win32-arm-low.c (tdesc_arm): Declare.
3199 (arm_arch_setup): New function.
3200 (the_low_target): Install arm_arch_setup instead of
3201 init_registers_arm.
3202 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3203 (init_windows_x86): Rename to ...
3204 (i386_arch_setup): ... this. Set `win32_tdesc'.
3205 (the_low_target): Adjust.
3206 * win32-low.c (win32_tdesc): New global.
3207 (child_add_thread): Don't create the thread cache here.
3208 (do_initial_child_stuff): Set the new process'es tdesc.
3209 * win32-low.h (struct target_desc): Forward declare.
3210 (win32_tdesc): Declare.
3211 * lynx-i386-low.c (tdesc_i386): Declare global.
3212 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3213 * lynx-low.c (lynx_tdesc): New global.
3214 (lynx_add_process): Set the new process'es tdesc.
3215 * lynx-low.h (struct target_desc): Forward declare.
3216 (lynx_tdesc): Declare global.
3217 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3218 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3219 * nto-low.c (nto_tdesc): New global.
3220 (do_attach): Set the new process'es tdesc.
3221 * nto-low.h (struct target_desc): Forward declare.
3222 (nto_tdesc): Declare.
3223 * nto-x86-low.c (tdesc_i386): Declare.
3224 (nto_x86_arch_setup): Set `nto_tdesc'.
3225
b1fbec62
GB
32262013-06-04 Gary Benson <gbenson@redhat.com>
3227
3228 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3229 to qSupported response when appropriate.
3230 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3231 with nonzero-length annex.
3232 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3233 arguments supplied in annex.
3234
d1ec4ce7
DE
32352013-05-31 Doug Evans <dje@google.com>
3236
ac44adcb 3237 PR server/15594
d1ec4ce7
DE
3238 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3239 64 bits in 64-cross-32 environment.
3240
9b25f2d3
PA
32412013-05-28 Pedro Alves <palves@redhat.com>
3242
3243 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3244 (aarch64-without-fpu.c): Delete rule.
3245 * configure.srv (aarch64*-*-linux*): Remove references to
3246 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3247 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3248 declaration.
3249
6740dc9c
PA
32502013-05-24 Pedro Alves <palves@redhat.com>
3251
3252 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3253 instead of strchr/decode_address. Error if the range isn't split
3254 with a ','. Don't assume there's be a ':' in the action.
3255
c2d6af84
PA
32562013-05-23 Yao Qi <yao@codesourcery.com>
3257 Pedro Alves <palves@redhat.com>
3258
3259 * linux-low.c (lwp_in_step_range): New function.
3260 (linux_wait_1): If the thread was range stepping and stopped
3261 outside the stepping range, report the stop to GDB. Otherwise,
3262 continue stepping. Add range stepping debug output.
3263 (linux_set_resume_request): Copy the step range from the resume
3264 request to the lwp.
3265 (linux_supports_range_stepping): New.
3266 (linux_target_ops) <supports_range_stepping>: Set to
3267 linux_supports_range_stepping.
3268 * linux-low.h (struct linux_target_ops)
3269 <supports_range_stepping>: New field.
3270 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3271 * linux-x86-low.c (x86_supports_range_stepping): New.
3272 (the_low_target) <supports_range_stepping>: Set to
3273 x86_supports_range_stepping.
3274 * server.c (handle_v_cont): Handle 'r' action.
3275 (handle_v_requests): Append ";r" if the target supports range
3276 stepping.
3277 * target.h (struct thread_resume) <step_range_start,
3278 step_range_end>: New fields.
3279 (struct target_ops) <supports_range_stepping>:
3280 New field.
3281 (target_supports_range_stepping): New macro.
3282
58794e1a
JB
32832013-05-17 Joel Brobecker <brobecker@adacore.com>
3284
3285 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3286 confusion in comment.
3287
d631c5a7
JB
32882013-05-17 Joel Brobecker <brobecker@adacore.com>
3289
3290 * lynx-low.c (struct process_info_private): New type.
3291 (lynx_add_process): New function.
3292 (lynx_create_inferior, lynx_attach): Replace calls to
3293 add_process by calls to lynx_add_process.
3294 (lynx_resume): If PTID is null, then try using
3295 current_process()->private->last_wait_event_ptid.
3296 Add comments.
3297 (lynx_clear_inferiors): Delete. The contents of that function
3298 has been inlined in lynx_mourn;
3299 (lynx_wait_1): Save the ptid in the process's private data.
3300 (lynx_mourn): Free the process' private data. Replace call
3301 to lynx_clear_inferiors by call to clear_inferiors.
3302
96f7a20f
YQ
33032013-05-17 Yao Qi <yao@codesourcery.com>
3304
3305 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3306 the right place.
3307
db0dfaa0
LM
33082013-05-16 Luis Machado <lgustavo@codesourcery.com>
3309
3310 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3311 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3312 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3313 PT_TEXT_END_ADDR guards. Update comments.
3314 (linux_target_op) <read_offsets>: Conditionally define to
3315 linux_read_offsets if the target is UCLIBC and if it defines
3316 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3317
68f5f838
SL
33182013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3319 Andrew Jenner <andrew@codesourcery.com>
3320
3321 * Makefile.in (SFILES): Add linux-nios2-low.c.
3322 (clean): Add action to delete nios2-linux.c.
3323 (nios2-linux.c): New rule.
3324 * configure.srv: Add nios2*-*-linux*.
3325 * linux-nios2-low.c: New.
3326
1ebff1fd
HAQ
33272013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3328
3329 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3330
f6150862
HZ
33312013-04-25 Hui Zhu <hui@codesourcery.com>
3332
3333 PR gdb/15186
f6150862
HZ
3334 * ax.c (ax_printf): Add fflush.
3335
614c279d
TT
33362013-04-22 Tom Tromey <tromey@redhat.com>
3337
3338 * Makefile.in (SFILES): Add filestuff.c.
3339 (OBS): Add filestuff.o.
3340 (filestuff.o): New target.
3341 * config.in, configure: Rebuild.
3342 * configure.ac: Check for fdwalk, pipe2.
3343
7d4e5717
PA
33442013-04-17 Pedro Alves <palves@redhat.com>
3345
3346 * configure.ac (USE_THREAD_DB): Delete variable.
3347 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3348 Don't AC_SUBST USE_THREAD_DB.
3349 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3350 * config.in, configure: Regenerate.
3351
d5c93e41
PA
33522013-04-16 Pedro Alves <palves@redhat.com>
3353
3354 * linux-low.h (struct lwp_info) <thread_known>: Move under
3355 the USE_THREAD_DB #ifdef.
3356
04f5fe89
PA
33572013-04-16 Pedro Alves <palves@redhat.com>
3358
3359 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3360 (linux-low.o): Delete rule.
3361 * linux-low.h: Always include "gdb_thread_db.h" instead of
3362 conditionally including thread_db.h.
3363 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3364 HAVE_THREAD_DB_H.
3365
480b27bf
JK
33662013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3367
3368 * Makefile.in (install-only): Fix make install regression.
3369
43662968
JK
33702013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3371
3372 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3373 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3374 installation.
3375 * gdbserver.1: Remove.
3376
3e74e146
PA
33772013-03-22 Pedro Alves <palves@redhat.com>
3378
3379 * linux-low.c (handle_extended_wait): Don't call
3380 linux_enable_event_reporting.
3381
a8347a2a
TT
33822013-03-15 Tony Theodore <tonyt@logyst.com>
3383
3384 PR build/9098:
3385 * Makefile.in (SHELL): Use @SHELL@.
3386
eeb56fa7
SDJ
33872013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3388
3389 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3390 compiler warning.
3391
4fa7e2ff
JB
33922013-03-13 Joel Brobecker <brobecker@adacore.com>
3393
3394 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3395 Remove extraneous NULL element.
3396
8ddb1965
YQ
33972013-03-13 Yao Qi <yao@codesourcery.com>
3398
3399 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3400 'V' block in trace frame.
3401
9accd112
MM
34022013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3403
3404 * target.h (struct target_ops): Add btrace ops.
3405 (target_supports_btrace): New macro.
3406 (target_enable_btrace): New macro.
3407 (target_disable_btrace): New macro.
3408 (target_read_btrace): New macro.
3409 * gdbthread.h (struct thread_info): Add btrace field.
3410 * server.c: Include btrace-common.h.
3411 (handle_btrace_general_set): New function.
3412 (handle_btrace_enable): New function.
3413 (handle_btrace_disable): New function.
3414 (handle_general_set): Call handle_btrace_general_set.
3415 (handle_qxfer_btrace): New function.
3416 (struct qxfer qxfer_packets[]): Add btrace entry.
3417 * inferiors.c (remove_thread): Disable btrace.
3418 * linux-low: Include linux-btrace.h.
3419 (linux_low_enable_btrace): New function.
3420 (linux_low_read_btrace): New function.
3421 (linux_target_ops): Add btrace ops.
3422 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3423 Add srv_linux_btrace=yes.
3424 (x86_64-*-linux*): Add linux-btrace.o.
3425 Add srv_linux_btrace=yes.
3426 * configure.ac: Define HAVE_LINUX_BTRACE.
3427 * config.in: Regenerated.
3428 * configure: Regenerated.
3429
5cc22e4c
MM
34302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3431
3432 * server.c (handle_qxfer): Preserve error message if -3 is
3433 returned.
3434 (qxfer): Document the -3 return value.
3435
7c97f91e
MM
34362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3437
3438 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3439 (linux_btrace_h): New variable.
3440 (linux-btrace.o): New rule.
3441
be9a119c 34422013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3443 Hafiz Abid Qadeer <abidh@codesourcery.com>
3444
3445 * tracepoint.c (trace_buffer_size): New global.
3446 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3447 (init_trace_buffer): Change to one-argument function. Allocate
3448 trace buffer memory.
3449 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3450 handle QTBuffer:size packet.
3451 (cmd_bigqtbuffer_size): New function.
3452 (initialize_tracepoint): Call init_trace_buffer with
3453 DEFAULT_TRACE_BUFFER_SIZE.
3454 * server.c (handle_query): Add QTBuffer:size in the
3455 supported packets.
3456
e64f7499
YQ
34572013-03-07 Yao Qi <yao@codesourcery.com>
3458
3459 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3460 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3461 of -1.
3462 (cmd_qtsp): Adjust condition. Do post increment.
3463 Set cur_action and cur_step_action back to 0.
3464
f0ae6fc3
PA
34652013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3466
3467 PR server/15236
3468 * linux-low.c (linux_write_memory): Return early success if LEN is
3469 zero.
3470
b5b0b0af
CV
34712013-03-05 Corinna Vinschen <vinschen@redhat.de>
3472
334ad4a8 3473 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3474
589bc927
TT
34752013-02-28 Tom Tromey <tromey@redhat.com>
3476
3477 * configure.ac: Invoke AC_SYS_LARGEFILE.
3478 * configure, config.in: Rebuild.
3479
dfe07582
CV
34802013-02-28 Corinna Vinschen <vinschen@redhat.com>
3481
3482 * win32-low.c: Throughout, fix format strings and casts of
3483 printf-like functions to avoid type related warnings on all
3484 platforms.
3485 (get_child_debug_event): Print dwDebugEventCode as hex since
3486 that's how it's usually documented.
3487
736cd585
YQ
34882013-02-28 Yao Qi <yao@codesourcery.com>
3489
3490 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3491 pulongest.
3492
e1f58301
JW
34932013-02-27 Jiong Wang <jiwang@tilera.com>
3494
3495 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3496 (reg-tilegx32.c): New rule.
3497 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3498 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3499 different register info initializer according to elf class.
3500 (init_registers_tilgx32): New function. The tilegx32 register info
3501 initializer.
3502 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3503 (tile_store_gregset): Likewise.
3504
d171ca78
YQ
35052013-02-27 Yao Qi <yao@codesourcery.com>
3506
3507 * server.c (process_point_options): Print debug message when
3508 debug_threads is true.
3509
282bbdf3
YQ
35102013-02-26 Yao Qi <yao@codesourcery.com>
3511
3512 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3513
aca22551
PA
35142013-02-19 Pedro Alves <palves@redhat.com>
3515 Kai Tietz <ktietz@redhat.com>
3516
3517 PR gdb/15161
3518
3519 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3520 instead of strtoul to extract address from packet.
3521 (process_serial_event) <'z'>: Likewise.
3522
4f3cee1c
YQ
35232013-02-18 Yao Qi <yao@codesourcery.com>
3524
3525 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3526
8e1d55a3
PA
35272013-02-14 Pedro Alves <palves@redhat.com>
3528
3529 Plug memory leak.
3530
3531 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3532 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3533
458820da
PA
35342013-02-14 Pedro Alves <palves@redhat.com>
3535
3536 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3537
baea0dae
PA
35382013-02-14 Pedro Alves <palves@redhat.com>
3539
3540 * tracepoint.c (save_string): Delete.
3541 (add_tracepoint_action): Use savestring instead of save_string.
3542
0b1afbb3
PA
35432013-02-12 Pedro Alves <palves@redhat.com>
3544
3545 * linux-xtensa-low.c: Ditto.
3546 * xtensa-xtregs.c: Ditto.
3547
8a4ac37e
PA
35482013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3549
3550 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3551 thread_db.
3552
148de6bb
MS
35532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3554
3555 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3556 aarch64_num_wp_regs and aarch64_num_bp_regs to
3557 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3558
55fac6e0
MS
35592013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3560
3561 * linux-aarch64-low.c (ps_get_thread_area): Replace
3562 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3563
176eb98c
MS
35642013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3565 Marcus Shawcroft <marcus.shawcroft@arm.com>
3566 Nigel Stephens <nigel.stephens@arm.com>
3567 Yufeng Zhang <yufeng.zhang@arm.com>
3568
3569 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3570 (aarch64.c, aarch64-without-fpu.c): New targets.
3571 * configure.srv (aarch64*-*-linux*): New.
3572 * linux-aarch64-low.c: New file.
3573
56f7af9c
MS
35742013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3575
43aaf8b6 3576 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3577 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3578 (dequeue_one_deferred_signal, linux_resume_one_thread)
3579 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3580 (linux_tracefork_grandchild, linux_test_for_tracefork)
3581 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3582 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3583 where the argument is 0.
3584
60f662b0
YQ
35852013-01-25 Yao Qi <yao@codesourcery.com>
3586
3587 * event-loop.c: Include "queue.h".
3588 (gdb_event_p): New typedef.
3589 (struct gdb_event) <next_event>: Remove.
3590 (event_queue): Change to QUEUE(gdb_event_p).
3591 (async_queue_event): Remove.
3592 (gdb_event_xfree): New.
3593 (initialize_event_loop): New.
3594 (process_event): Use API from QUEUE.
3595 (wait_for_event): Likewise.
3596 * server.c (main): Call initialize_event_loop.
3597 * server.h (initialize_event_loop): Declare.
3598
5ae4861a
YQ
35992013-01-18 Yao Qi <yao@codesourcery.com>
3600
3601 * ax.h (struct eval_agent_expr_context): New.
3602 (gdb_eval_agent_expr): Update declaration.
3603 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3604 TFRAME. Add new argument CTX.
3605 * server.h (struct eval_agent_expr_context): Declare.
3606 (agent_mem_read, agent_tsv_read): Update declaration.
3607 (agent_mem_read_string): Likewise.
3608 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3609 (add_traceframe_block): Add new argument TPOINT.
3610 Increase TPOINT->traceframe_usage.
3611 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3612 eval_tracepoint_agent_expr.
3613 (condition_true_at_tracepoint): Likewise.
3614 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3615 (agent_mem_read_string, agent_tsv_read): Likewise.
3616
85e00e85
YQ
36172013-01-16 Yao Qi <yao@codesourcery.com>
3618
3619 * linux-low.c (linux_resume_one_lwp): Don't check
3620 'lwp->bp_reinsert != 0'.
3621
4039cf45
JB
36222013-01-07 Joel Brobecker <brobecker@adacore.com>
3623 Pedro Alves <palves@redhat.com>
3624
3625 * lynx-low.c (ptrace_request_to_str): Define a temporary
3626 macro and use it to simplify this function's implementation.
3627
9044dee2
JB
36282013-01-07 Joel Brobecker <brobecker@adacore.com>
3629
3630 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3631 sets errno.
3632
e6352c8f
JB
36332013-01-07 Joel Brobecker <brobecker@adacore.com>
3634
3635 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3636
50681a27
JB
36372013-01-07 Joel Brobecker <brobecker@adacore.com>
3638
3639 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3640
3f6e77ef
JB
36412013-01-07 Joel Brobecker <brobecker@adacore.com>
3642
3643 * lynx-low.c (lynx_resume): Use the resume_info parameter
3644 to determine the ptid for the lynx_ptrace call, unless
3645 it is equal to minus_one_ptid, in which case we use the
3646 ptid of the current_inferior.
3647 (lynx_wait_1): After having received a thread create/exit
3648 event, resume the inferior's execution using the signaling
3649 thread's ptid, rather than the old ptid.
3650
7fda33ae
JB
36512013-01-07 Joel Brobecker <brobecker@adacore.com>
3652
3653 * lynx-low.c (lynx_resume): Delete variable ret.
3654
b9786c74
JB
36552013-01-01 Joel Brobecker <brobecker@adacore.com>
3656
3657 * gdbreplay.c (gdbreplay_version): Update copyright year.
3658 * server.c (gdbserver_version): Likewise.
3659
8b93d60f
JB
36602012-12-17 Joel Brobecker <brobecker@adacore.com>
3661
3662 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3663 new thread.
3664
037335a7
JB
36652012-12-17 Joel Brobecker <brobecker@adacore.com>
3666
3667 * lynx-low.c (ptrace_request_to_str): Add handling for
3668 PTRACE_GETTRACESIG.
3669
52d4cbd8
JB
36702012-12-17 Joel Brobecker <brobecker@adacore.com>
3671
3672 * lynx-low.c (lynx_attach): Delete variable new_process.
3673
ab8f6ca9
JB
36742012-12-17 Joel Brobecker <brobecker@adacore.com>
3675
3676 * lynx-low.c (lynx_create_inferior): Delete variable
3677 new_process.
3678
78cbc024
JB
36792012-12-17 Joel Brobecker <brobecker@adacore.com>
3680
3681 * lynx-low.c (ptrace_request_to_str): Do not handle
3682 PTRACE_GETTHREADLIST if this macro does not exist.
3683
14a00470
YQ
36842012-12-15 Yao Qi <yao@codesourcery.com>
3685
3686 * Makefile.in (OBS): Add notif.o.
3687 * notif.c, notif.h: New.
3688 * server.c: Include "notif.h".
3689 (struct vstop_notif) <next>: Remove.
3690 <base>: New field.
3691 (queue_stop_reply): Update.
3692 (push_event, send_next_stop_reply): Remove.
3693 (discard_queued_stop_replies): Update.
3694 (notif_stop): New variable.
3695 (handle_v_stopped): Remove.
3696 (handle_v_requests): Don't call handle_v_stopped. Call
3697 handle_ack_notif instead.
3698 (queue_stop_reply_callback): Call notif_event_enque instead
3699 of queue_stop_reply.
3700 (handle_status): Don't call send_next_stop_reply, call
3701 notif_write_event instead.
3702 (kill_inferior_callback): Likewise.
3703 (detach_or_kill_inferior_callback): Likewise.
3704 (main): Call initialize_notif.
3705 (process_serial_event): Call QUEUE_is_empty.
3706 (handle_target_event): Call notif_push instead of push event.
3707 * server.h (push_event): Remove declaration.
3708
61c125b9
TT
37092012-12-10 Tom Tromey <tromey@redhat.com>
3710
3711 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3712 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3713 macros.
3714 (.c.o): Rewrite.
3715 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3716 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3717 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3718 (amd64-linux-ipa.o, ax.o): Rewrite.
3719 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3720 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3721 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3722 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3723 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3724 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3725 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3726 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3727 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3728 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3729 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3730 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3731 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3732 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3733 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3734 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3735 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3736 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3737 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3738 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3739 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3740 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3741 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3742 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3743 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3744 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3745 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3746 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3747 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3748 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3749 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3750 (reg-tilegx.o): Remove.
3751 (all_object_files): New macro.
3752 Include .deps files.
3753 * aclocal.m4, configure: Rebuild.
3754 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3755 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3756 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3757
e90e9ad9
TT
37582012-12-05 Tom Tromey <tromey@redhat.com>
3759
3760 PR gdb/14917:
3761 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3762
02d403bf 37632012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3764
3765 * configure.ac: Check for linux/perf_event.h.
3766 * config.in: Regenerated.
3767 * configure: Regenerated.
3768
0270a750
PA
37692012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3770
3771 * hostio.c (handle_readlink): Decrease buffer size
3772 parameter passed to readlink by one byte.
3773
8c29b58e
YQ
37742012-11-26 Yao Qi <yao@codesourcery.com>
3775
3776 * configure.ac (build_warnings): Append '-Wempty-body'.
3777 * configure: Regenerated.
3778 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3779 body.
3780
8bdce1ff
PM
37812012-11-15 Pierre Muller <muller@sourceware.org>
3782
3783 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3784 * config.in: Regenerate.
3785 * configure: Regenerate.
3786 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3787 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3788 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3789 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3790 header.
3791 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3792 instead of <sys/wait.h> header.
3793 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3794
02d403bf 37952012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3796
3797 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3798 (various make rules): Remove -DGDBSERVER
3799
fbd5db48
YQ
38002012-11-09 Yao Qi <yao@codesourcery.com>
3801
3802 * spu-low.c (current_ptid): Move it to ..
3803 * gdbthread.h: ... here. New.
3804 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3805 * server.c (myresume, process_serial_event): Likewise.
3806 * thread-db.c (thread_db_find_new_threads): Likewise.
3807 * tracepoint.c (run_inferior_command): Likewise.
3808
b3dc46ff
AB
38092012-10-01 Andrew Burgess <aburgess@broadcom.com>
3810
3811 * server.c (handle_search_memory_1): Include access length in
3812 warning message.
3813
07c04788
HPN
38142012-09-05 Michael Brandt <michael.brandt@axis.com>
3815
3816 * linux-crisv32-low.c: Fix compile errors.
3817
918d227b
YQ
38182012-09-04 Yao Qi <yao@codesourcery.com>
3819
3820 * tracepoint.c (cmd_qtsv): Adjust debug message.
3821 Don't check CUR_TPOINT.
3822
18c1b81a
YQ
38232012-08-28 Yao Qi <yao@codesourcery.com>
3824
3825 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3826 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3827 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3828 Remove declarations of xmalloc, xreallloc, xstrdup and
3829 freeargv.
3830 * Makefile.in (libiberty_h): New.
3831 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3832 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3833
dc82f37b
YQ
38342012-08-23 Yao Qi <yao@codesourcery.com>
3835
3836 * server.h: Remove declaration of 'xsnprintf'.
3837
406b1477
KS
38382012-08-22 Keith Seitz <keiths@redhat.com>
3839
3840 * server.h: Include build-gnulib-gbserver/config.h.
3841 * gdbreplay.c: Likewise.
3842
e6712ff1
DE
38432012-08-08 Doug Evans <dje@google.com>
3844
3845 * Makefile.in (SFILES): Add gdb_vecs.c.
3846 (OBS): Add gdb_vecs.o.
3847 (gdb_vecs_h, host_defs_h): New variables.
3848 (thread-db.o): Add $(gdb_vecs_h) dependency.
3849 (gdb_vecs.o): New rule.
3850 * thread-db.c: #include "gdb_vecs.h".
3851 (thread_db_load_search): Use a vector to iterate over path elements.
3852 Handle text appearing after "$pdir".
3853
3854 * configure.ac: Add check for strstr.
3855 * config.in: Regenerate.
3856 * configure: Regenerate.
3857
7c3270ae
UW
38582012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3859
3860 * hostio.c (handle_pread): If pread fails, fall back to attempting
3861 lseek/read.
3862 (handle_pwrite): Likewise for pwrite.
3863
b62e2b27
UW
38642012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3865
3866 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3867 between unsupported TYPE and unimplementable ADDR/LEN combination.
3868 (arm_insert_point): Act on new return value.
3869
78a99e91
PA
38702012-07-31 Pedro Alves <palves@redhat.com>
3871
3872 * server.c (process_point_options): Only skip tokens if we find
3873 one that is unrecognized. Don't treat 'X' specially while
3874 skipping unrecognized tokens.
3875
fcf303ab
UW
38762012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3877
3878 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3879 to 4-byte-align HW breakpoint addresses for Thumb.
3880
7255706c
YQ
38812012-07-27 Yao Qi <yao@codesourcery.com>
3882
3883 PR remote/14161.
3884
3885 * server.h: Declare gdb_agent_about_to_close.
3886 * target.c (kill_inferior): Include "agent.h".
3887 New. Send command 'kill'.
3888 * target.h (kill_inferior): Removed macro.
3889 * tracepoint.c (gdb_agent_about_to_close): New.
3890 (gdb_agent_helper_thread): Handle command 'close'.
3891 Wait endlessly until the inferior stops.
3892 Install gdb_agent_remove_socket to atexit hook.
3893 (agent_socket_name): New static variable.
3894 (gdb_agent_socket_init): Replace local variable 'name' with
3895 'agent_socket_name'.
3896 (gdb_agent_remove_socket): New.
3897
5a3f286f
YQ
38982012-07-27 Yao Qi <yao@codesourcery.com>
3899
3900 * server.c (process_point_options): Stop at 'X' when parsing.
3901
961bd387
ME
39022012-07-19 Michael Eager <eager@eagercon.com>
3903
a261b8f5 3904 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3905 to hw_execute.
3906 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3907 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3908 hardware breakpoint.
3909
aa7c7447
JK
39102012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3911
3912 * gdbserver/linux-low.c (initialize_low): Call
3913 linux_ptrace_init_warnings.
3914
7f216e7c
DE
39152012-07-02 Doug Evans <dje@google.com>
3916
3917 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3918 pointer to int.
3919
d3ce09f5
SS
39202012-07-02 Stan Shebs <stan@codesourcery.com>
3921
3922 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3923 (ax.o): Add it to build rule.
3924 (ax-ipa.o): Ditto.
3925 (OBS): Add format.o.
3926 (IPA_OBS): Add format.o.
3927 * server.c (handle_query): Claim support for breakpoint commands.
3928 (process_point_options): Add command case.
3929 (process_serial_event): Leave running if there are printfs in
3930 effect.
3931 * mem-break.h (any_persistent_commands): Declare.
3932 (add_breakpoint_commands): Declare.
3933 (gdb_no_commands_at_breakpoint): Declare.
3934 (run_breakpoint_commands): Declare.
3935 * mem-break.c (struct point_command_list): New struct.
3936 (struct breakpoint): New field command_list.
3937 (any_persistent_commands): New function.
3938 (add_commands_to_breakpoint): New function.
3939 (add_breakpoint_commands): New function.
3940 (gdb_no_commands_at_breakpoint): New function.
3941 (run_breakpoint_commands): New function.
3942 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3943 locally.
3944 * ax.c: Include format.h.
3945 (ax_printf): New function.
3946 (gdb_eval_agent_expr): Add printf opcode.
3947
2f8f6aed
YQ
39482012-06-13 Yao Qi <yao@codesourcery.com>
3949
3950 * server.c (start_inferior): Remove duplicated writes to fields
3951 'last_resume_kind' and 'last_status' of 'current_inferior'.
3952
0c9070b3
YQ
39532012-06-12 Yao Qi <yao@codesourcery.com>
3954 Pedro Alves <palves@redhat.com>
3955
3956 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3957 comment.
3958 * server.c (handle_v_cont): Extend comment.
3959
c52daf70
YQ
39602012-06-11 Yao Qi <yao@codesourcery.com>
3961
3962 * linux-low.c (linux_attach): Add 'static'.
3963
d38bbb0a
YQ
39642012-06-06 Yao Qi <yao@codesourcery.com>
3965
3966 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3967
89dc0afd
JK
39682012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3969
3970 Fix gcc -flto compilation warning.
3971 * server.c (main): Make variable multi_mode and attach volatile.
3972
75f62ce7
TJB
39732012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3974
3975 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3976 if the platform doesn't know about it.
3977
65f479b6
PA
39782012-05-30 Jeff Kenton <jkenton@tilera.com>
3979
3980 * Makefile.in (SFILES): Add linux-tile-low.c.
3981 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3982 * configure.srv: Handle tilegx-*-linux*.
3983 * linux-tile-low.c: New file.
3984
0c5bf5a9
JK
39852012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3986
3987 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3988
a493e3e2
PA
39892012-05-24 Pedro Alves <palves@redhat.com>
3990
3991 PR gdb/7205
3992
43aaf8b6 3993 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3994
2ea28649
PA
39952012-05-24 Pedro Alves <palves@redhat.com>
3996
3997 PR gdb/7205
3998
3999 Replace target_signal with gdb_signal throughout.
4000
8d409d16
MR
40012012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4002
4003 * linux-low.c (linux_store_registers): Avoid the copying sequence
4004 when no data has been retrieved by ptrace.
4005
23512c01
MGD
40062012-05-22 Will Deacon <will.deacon@arm.com>
4007
4008 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4009 Include asm/ptrace.h.
4010 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4011 already defined.
4012
4934b29e
MR
40132012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4014
4015 * linux-low.c (linux_store_registers): Don't re-retrieve data
4016 with ptrace that has already been obtained from /proc. Always
4017 copy any data retrieved with ptrace to the buffer supplied.
4018
bde24c0a
PA
40192012-05-11 Yao Qi <yao@codesourcery.com>
4020 Pedro Alves <palves@redhat.com>
4021
4022 * linux-low.c (enum stopping_threads_kind): New.
4023 (stopping_threads): Change type to `enum stopping_threads_kind'.
4024 (handle_extended_wait): If stopping and suspending threads, leave
4025 the new_lwp suspended too.
4026 (linux_wait_for_event): Adjust.
4027 (stop_all_lwps): Set `stopping_threads' to
4028 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4029 whether we're suspending threads or just stopping them. Assert no
4030 recursion happens.
4031
623b6bdf
YQ
40322012-04-29 Yao Qi <yao@codesourcery.com>
4033
4034 * server.h: Move some code to ...
4035 * gdbthread.h: ... here. New.
4036 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4037 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4038 (nto-low.o, win32-low.o): Likewise.
4039 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4040 * regcache.c, remote-utils.c, server.c: Likewise.
4041 * target.c, tracepoint.c, win32-low.c: Likewise.
4042
f15f9948
TJB
40432012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4044
4045 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4046 (PTRACE_ARG4_TYPE): Likewise.
4047 (PTRACE_XFER_TYPE): Likewise.
4048 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4049 ptrace to PTRACE_ARG3_TYPE.
4050 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4051 (PTRACE_ARG4_TYPE): Likewise.
4052 (PTRACE_XFER_TYPE): Likewise.
4053 (linux_detach_one_lwp): Cast fourth argument of
4054 ptrace to long then PTRACE_ARG4_TYPE.
4055 (regsets_fetch_inferior_registers): Cast third argument of
4056 ptrace to long then PTRACE_ARG3_TYPE.
4057 (regsets_store_inferior_registers): Likewise.
4058
38ea300a
PA
40592012-04-20 Pedro Alves <palves@redhat.com>
4060
4061 * configure: Regenerate.
4062
c971b7fa
PA
40632012-04-19 Pedro Alves <palves@redhat.com>
4064
43aaf8b6 4065 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4066 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4067 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4068 (all, install-only, uninstall, clean-info, all-lib, clean): No
4069 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4070 (maintainer-clean realclean distclean): Use subdir_do.
4071 (subdir_do): New.
4072 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4073 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4074 * acinclude.m4: Include acx_configure_dir.m4.
4075 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4076 calls. Call AC_PROG_RANLIB. Configure gnulib using
4077 ACX_CONFIGURE_DIR.
4078 (GNULIB): New.
4079 (GNULIB_STDINT_H): Adjust.
4080 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4081 * gdbreplay.c: Include build-gnulib/config.h.
4082 * server.h: Likewise.
4083 * aclocal.m4: Regenerate.
4084 * config.in: Regenerate.
4085 * configure: Regenerate.
c971b7fa 4086
809277f8
PA
40872012-04-19 Pedro Alves <palves@redhat.com>
4088
4089 * Makefile.in (LIBGNU, INCGNU): Adjust.
4090 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4091 (all, install-only, uninstall, clean-info, all-lib, clean)
4092 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4093 * configure.ac: Adjust AC_OUTPUT output.
4094 * aclocal.m4: Regenerate.
4095 * configure: Regenerate.
4096
fd9bb8b8
PA
40972012-04-19 Pedro Alves <palves@redhat.com>
4098
4099 * Makefile.in (generated_files): New.
4100 (server_h): Remove the explicit dependency on config.h, and depend
4101 on $generated_files.
4102
1c298c66
PA
41032012-04-19 Pedro Alves <palves@redhat.com>
4104
4105 * Makefile.in (INCGNU): Add -Ignulib.
4106
57c4b50b
PA
41072012-04-19 Pedro Alves <palves@redhat.com>
4108
4109 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4110 (INCGNU): ... this, and spell out -I here.
4111 (GNULIB_LIB): Rename to ...
4112 (LIBGNU): ... this.
4113 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4114
1030e047
PA
41152012-04-19 Pedro Alves <palves@redhat.com>
4116
4117 * config.in: Regenerate.
4118
447d4319
PA
41192012-04-19 Pedro Alves <palves@redhat.com>
4120
4121 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4122 * server.h (memmem): Remove declaration.
4123 * config.in: Regenerate.
4124 * configure: Regenerate.
4125
aad9eab9
YQ
41262012-04-19 Yao Qi <yao@codesourcery.com>
4127
4128 * Makefile.in (SFILES): Add common/vec.c.
4129 (OBS): Add vec.o.
4130 (vec.o): New rule.
4131
3e10640f
YQ
41322012-04-19 Yao Qi <yao@codesourcery.com>
4133
4134 * remote-utils.c (prepare_resume_reply): Replace with macro
4135 target_core_of_thread.
4136 * server.c (handle_qxfer_threads_proper): Likewise.
4137 * target.h (traget_core_of_thread): New macro.
4138
71622373
PA
41392012-04-18 Pedro Alves <palves@redhat.com>
4140
4141 * aclocal.m4: Regenerate.
4142 * configure: Regenerate.
4143
80d26939
YQ
41442012-04-16 Yao Qi <yao@codesourcery.com>
4145
4146 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4147 duplicated on address.
4148
42476b70
YQ
41492012-04-16 Yao Qi <yao@codesourcery.com>
4150
4151 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4152 (struct tracepoint_action_ops) <send>: New field.
4153 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4154 (agent_expr_send, x_tracepoint_action_send): New.
4155 (l_tracepoint_action_send): New.
4156 (cmd_qtdp): Download and install tracepoint
4157 according to `use_agent'.
4158 (run_inferior_command): Add one more parameter `len'.
4159 Update callers.
4160 (tracepoint_send_agent): New.
4161 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4162
7bc83639
YQ
41632012-04-16 Yao Qi <yao@codesourcery.com>
4164
4165 * tracepoint.c (download_tracepoints): Moved to ...
4166 (cmd_qtstart): ... here.
4167
5f18041e
YQ
41682012-04-14 Yao Qi <yao@codesourcery.com>
4169
4170 * tracepoint.c: Include inttypes.h.
4171 (struct collect_memory_action): Use sized types.
4172 (struct tracepoint): Likewise.
4173 (cmd_qtdp, stop_tracing): Update print specifiers.
4174 (cmd_qtp, response_tracepoint): Likewise.
4175 (collect_data_at_tracepoint): Likewise.
4176 (collect_data_at_step): Likewise.
4177
55a8c076
YQ
41782012-04-14 Yao Qi <yao@codesourcery.com>
4179
4180 Import gnulib module inttypes.
4181 * aclocal.m4, config.in, configure: Regenerated.
4182
dc750257
YQ
41832012-04-14 Yao Qi <yao@codesourcery.com>
4184
4185 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4186 Makefile and config.status at last.
4187
0ab5faf9
YQ
41882012-04-13 Yao Qi <yao@codesourcery.com>
4189
4190 * tracepoint.c: Include stdint.h unconditionally.
4191
18f5fd81
TJB
41922012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4193
4194 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4195 on BFD_HAVE_SYS_PROCFS_TYPE.
4196 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4197 * configure: Regenerate.
4198 * config.in: Likewise.
4199
4d47af5c
L
42002012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4201
4202 * Makefile.in (clean): Also remove x32.c x32-linux.c
4203 x32-avx.c x32-avx-linux.c.
4204 (x32.o): New target.
4205 (x32.c): Likewise.
4206 (x32-linux.o): Likewise.
4207 (x32-linux.c): Likewise.
4208 (x32-avx.o): Likewise.
4209 (x32-avx.c): Likewise.
4210 (x32-avx-linux.o): Likewise.
4211 (x32-avx-linux.c): Likewise.
4212
4213 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4214 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4215 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4216 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4217 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4218 i386/x32-avx-linux.xml.
4219
4220 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4221 (init_registers_x32_avx_linux): Likwise.
4222 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4223 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4224
ecedbe58
PA
42252012-04-13 Pedro Alves <palves@redhat.com>
4226
4227 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4228 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4229 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4230 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4231 the sub-make.
4232
c92b5177
L
42332012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4234
4235 * linux-x86-low.c (compat_x32_clock_t): New.
4236 (compat_x32_siginfo_t): Likewise.
4237 (compat_x32_siginfo_from_siginfo): Likewise.
4238 (siginfo_from_compat_x32_siginfo): Likewise.
4239 (linux_is_elf64): Likewise.
4240 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4241 and siginfo_from_compat_x32_siginfo for x32.
4242 (x86_arch_setup): Set linux_is_elf64.
4243
214d508e
L
42442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4245
4246 PR gdb/13969
4247 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4248 e_machine field.
4249 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4250 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4251 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4252 compatible with process.
4253
c9a1864a
YQ
42542012-04-12 Yao Qi <yao@codesourcery.com>
4255
4256 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4257 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4258 (install-only, install-info, clean): Handle sub dir gnulib.
4259 (all-lib, am--refresh): New targets.
4260 (memmem.o): Remove target.
4261 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4262 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4263 (AC_REPLACE_FUNCS): Remove memmem.
4264 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4265 (AC_OUTPUT): Generate Makefile in gnulib/.
4266 * aclocal.m4, config.in, configure: Regenerated.
4267
367ba2c2
MR
42682012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4269
4270 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4271
9d236627
PA
42722012-04-05 Pedro Alves <palves@redhat.com>
4273
4274 -Werror=strict-aliasing
4275
4276 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4277 pointer.
4278
111217b3
PA
42792012-04-04 Pedro Alves <palves@redhat.com>
4280
4281 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4282 (sparc_store_gregset_from_stack, sparc_store_gregset)
4283 (sparc_breakpoint_at): Fix formatting.
4284
8365dcf5
TJB
42852012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4286
4287 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4288 are available.
4289 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4290 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4291 * config.in: Regenerate.
4292 * configure: Likewise.
4293
689cc2ae
PA
42942012-03-29 Pedro Alves <palves@redhat.com>
4295
4296 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4297 Correct ptrace arguments.
4298
c14dfd32
PA
42992012-03-28 Pedro Alves <palves@redhat.com>
4300
4301 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4302 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4303 (IA64_FR1_REGNUM): New defines.
4304 (ia64_fetch_register): New.
4305 (the_low_target): Install it.
4306 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4307 field.
4308 * linux-low.c (linux_fetch_registers): Try the
4309 the_low_target.fetch_register hook first.
4310
4311 * linux-arm-low.c (the_low_target): Adjust.
4312 * linux-bfin-low.c (the_low_target): Adjust.
4313 * linux-cris-low.c (the_low_target): Adjust.
4314 * linux-crisv32-low.c (the_low_target): Adjust.
4315 * linux-m32r-low.c (the_low_target): Adjust.
4316 * linux-m68k-low.c (the_low_target): Adjust.
4317 * linux-mips-low.c (the_low_target): Adjust.
4318 * linux-ppc-low.c (the_low_target): Adjust.
4319 * linux-s390-low.c (the_low_target): Adjust.
4320 * linux-sh-low.c (the_low_target): Adjust.
4321 * linux-sparc-low.c (the_low_target): Adjust.
4322 * linux-tic6x-low.c (the_low_target): Adjust.
4323 * linux-x86-low.c (the_low_target): Adjust.
4324 * linux-xtensa-low.c (the_low_target): Adjust.
4325
63c88e13
PA
43262012-03-26 Pedro Alves <palves@redhat.com>
4327
4328 * server.c (handle_qxfer_libraries): Don't bail early if
4329 the_target->qxfer_libraries_svr4 is not NULL.
4330
fb723180
PA
43312012-03-26 Pedro Alves <palves@redhat.com>
4332
4333 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4334
0afae3cf
PA
43352012-03-23 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4338 "library-list-svr4" element's start tag when the the DSO list is
4339 empty.
4340
485f1ee4
PA
43412012-03-23 Pedro Alves <palves@redhat.com>
4342
4343 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4344 a variable whose type size is the same as the inferior's pointer
4345 size.
4346
a5362b9a
TS
43472012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4348
4349 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4350 struct siginfo.
4351 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4352 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4353 * linux-low.h: Include <signal.h>.
4354 (struct siginfo): Remove forward declaration.
4355 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4356 struct siginfo.
4357
d226c142
MF
43582012-03-21 Mike Frysinger <vapier@gentoo.org>
4359
4360 * .gitignore: Ignore more files.
4361
122f36ef
PA
43622012-03-19 Pedro Alves <palves@redhat.com>
4363 Jan Kratochvil <jan.kratochvil@redhat.com>
4364
4365 * server.c (cont_thread, general_thread): Add describing comments.
4366 (start_inferior): Clear `cont_thread'.
4367 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4368 of a process.
4369
fc3e5175
YQ
43702012-03-15 Yao Qi <yao@codesourcery.com>
4371
4372 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4373 handling to ...
4374 (cmd_qtdp): ... here.
4375
8d0d92cd
YQ
43762012-03-15 Yao Qi <yao@codesourcery.com>
4377
4378 * tracepoint.c (struct tracepoint_action_ops): New.
4379 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4380 (m_tracepoint_action_download): New.
4381 (r_tracepoint_action_download): New.
4382 (x_tracepoint_action_download): New.
4383 (l_tracepoint_action_download): New.
4384 (add_tracepoint_action): Install `action->ops' according type.
4385 (download_tracepoint_1): Move code `download' function pointer
4386 of various tracepoint_action_ops.
4387
87b0bb13
JK
43882012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4389
4390 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4391 linux_ptrace_attach_warnings.
4392
5f572dec
JK
43932012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4394
4395 * Makefile.in (linux-ptrace.o): New.
4396 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4397 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4398 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4399 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4400 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4401 of these targets.
4402 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4403
f4647387
YQ
44042012-03-08 Yao Qi <yao@codesourcery.com>
4405 Pedro Alves <palves@redhat.com>
4406
4407 Fix PR server/13392.
4408 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4409 offset of JMP insn.
4410 * tracepoint.c (remove_tracepoint): New.
4411 (cmd_qtdp): Call remove_tracepoint when failed to install.
4412
9b224c5e
PA
44132012-03-07 Pedro Alves <palves@redhat.com>
4414
4415 * linux-low.c (get_detach_signal): New.
4416 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4417 Pass on pending signals to PTRACE_DETACH. Check the result of the
4418 ptrace call.
4419 * server.c (program_signals, program_signals_p): New.
4420 (handle_general_set): Handle QProgramSignals.
4421 * server.h (program_signals, program_signals_p): Declare.
4422
e237a7e2
JK
44232012-03-05 Pedro Alves <palves@redhat.com>
4424 Jan Kratochvil <jan.kratochvil@redhat.com>
4425
4426 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4427 New comment why.
4428
5808517f
YQ
44292012-03-03 Yao Qi <yao@codesourcery.com>
4430
4431 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4432 agent_look_up_symbols.
4433
58b4daa5
YQ
44342012-03-03 Yao Qi <yao@codesourcery.com>
4435
4436 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4437 (linux-x86-low.o): Likewise.
4438 * server.h: Remove in_process_agent_loaded.
4439 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4440 common/agent.c.
4441 Update callers.
4442
8ffcbaaf
YQ
44432012-03-03 Yao Qi <yao@codesourcery.com>
4444
4445 * tracepoint.c (gdb_agent_capability): New global.
4446 (in_process_agent_loaded_ust): Renamed to
4447 `in_process_agent_supports_ust'.
4448 Update callers.
4449 (in_process_agent_supports_ust): Call agent_capability_check.
4450 (clear_installed_tracepoints): Assert that agent supports
4451 agent.
4452
d1feda86
YQ
44532012-03-03 Yao Qi <yao@codesourcery.com>
4454
4455 * linux-low.c (linux_supports_agent): New.
4456 (linux_target_ops): Initialize field `supports_agent' with
4457 linux_supports_agent.
4458 * target.h (struct target_ops) <supports_agent>: New.
4459 (target_supports_agent): New macro.
4460 * server.c (handle_general_set): Handle packet 'QAgent'.
4461 (handle_query): Send `QAgent+'.
4462 * Makefile.in (server.o): Depends on agent.h.
4463
2fa291ac
YQ
44642012-03-03 Yao Qi <yao@codesourcery.com>
4465
4466 * Makefile.in (OBS): Add agent.o.
4467 Add new rule for agent.o.
4468 Track dependence of tracepoint.c on agent.h.
4469 * tracepoint.c (run_inferior_command_1):
4470 (run_inferior_command): Call agent_run_command.
4471 (gdb_ust_connect_sync_socket): Deleted. Move it to
4472 common/agent.c.
4473 (resume_thread, stop_thread): Likewise.
4474 (gdb_ust_socket_init): Renamed to ...
4475 (gdb_agent_socket_init): ... New.
4476 (gdb_ust_thread): Renamed to ...
4477 (gdb_agent_helper_thread): ... New.
4478 (gdb_ust_init): Move some code to ...
4479 (gdb_agent_init): ... here. New.
4480 [HAVE_UST]: Call gdb_ust_init.
4481 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4482 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4483 * config.in, configure: Regenerated.
4484
05044653
PA
44852012-03-02 Pedro Alves <palves@redhat.com>
4486
4487 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4488 * linux-low.c (struct simple_pid_list): New.
4489 (stopped_pids): New a struct simple_pid_list pointer.
4490 (add_to_pid_list, pull_pid_from_list): New.
4491 (handle_extended_wait): Don't assume the first signal new children
4492 report is SIGSTOP. Adjust call to pull_pid_from_list.
4493 (linux_wait_for_lwp): Adjust.
4494
8d00225b
YQ
44952012-03-02 Yao Qi <yao@codesourcery.com>
4496
4497 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4498 debug log.
4499
19560ba5
YQ
45002012-03-02 Yao Qi <yao@codesourcery.com>
4501
4502 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4503 `stop_pc' and `tpoint'. Update caller.
4504
1faeff08
MR
45052012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4506
4507 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4508 * linux-low.c (use_linux_regsets): New macro.
4509 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4510 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4511 (linux_register_in_regsets): New function.
4512 (usr_fetch_inferior_registers): Skip registers covered by
4513 regsets.
4514 (usr_store_inferior_registers): Likewise.
4515 (usr_fetch_inferior_registers): New macro.
4516 (usr_store_inferior_registers): Likewise.
4517 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4518 (linux_store_registers): Likewise.
4519 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4520 prototype.
4521 (init_registers_mips64_dsp_linux): Likewise.
4522 (init_registers_mips_linux): New macro.
4523 (init_registers_mips_dsp_linux): Likewise.
4524 (mips_dsp_num_regs): Likewise.
4525 (DSP_BASE, DSP_CONTROL): New fallback macros.
4526 (mips_base_regs): New macro.
4527 (mips_regmap): Use it. Fix the size.
4528 (mips_dsp_regmap): New variable.
4529 (mips_dsp_regset_bitmap): Likewise.
4530 (mips_arch_setup): New function.
4531 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4532 than mips_regmap.
4533 (mips_cannot_store_register): Likewise.
4534 (the_low_target): Update .arch_setup, .num_regs and .regmap
4535 initializers. Add .regset_bitmap initializer.
4536 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4537 initializer.
4538 * linux-bfin-low.c (the_low_target): Likewise.
4539 * linux-cris-low.c (the_low_target): Likewise.
4540 * linux-crisv32-low.c (the_low_target): Likewise.
4541 * linux-ia64-low.c (the_low_target): Likewise.
4542 * linux-m32r-low.c (the_low_target): Likewise.
4543 * linux-m68k-low.c (the_low_target): Likewise.
4544 * linux-ppc-low.c (the_low_target): Likewise.
4545 * linux-s390-low.c (the_low_target): Likewise.
4546 * linux-sh-low.c (the_low_target): Likewise.
4547 * linux-sparc-low.c (the_low_target): Likewise.
4548 * linux-tic6x-low.c (the_low_target): Likewise.
4549 * linux-x86-low.c (the_low_target): Likewise.
4550 * linux-xtensa-low.c (the_low_target): Likewise.
4551 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4552 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4553 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4554 srv_xmlfiles.
4555 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4556 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4557
c03e6ccc
YQ
45582012-02-29 Yao Qi <yao@codesourcery.com>
4559 Pedro Alves <palves@redhat.com>
4560
4561 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4562 `step_over_finished' is true.
4563
644cebc9
PA
45642012-02-27 Pedro Alves <palves@redhat.com>
4565
4566 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4567 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4568
c14d7ab2
PA
45692012-02-27 Pedro Alves <palves@redhat.com>
4570
4571 PR server/9684
4572 * linux-low.c (pid_is_stopped): New.
4573 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4574
412c89dd
LM
45752012-02-25 Luis Machado <lgustavo@codesourcery.com>
4576
4577 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4578 of conditions.
4579
b745defe
MR
45802012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4581
4582 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4583
9f3a5c85
LM
45842012-02-24 Luis Machado <lgustavo@codesourcery>
4585
4586 * server.c (handle_query): Advertise support for target-side
4587 breakpoint condition evaluation.
4588 (process_point_options): New function.
4589 (process_serial_event): When inserting a breakpoint, check for
4590 a target-side condition that should be evaluated.
4591
4592 * mem-break.c: Include regcache.h and ax.h.
4593 (point_cond_list_t): New data structure.
4594 (breakpoint) <cond_list>: New field.
4595 (find_gdb_breakpoint_at): Make non-static.
4596 (delete_gdb_breakpoint_at): Clear any target-side
4597 conditions.
4598 (clear_gdb_breakpoint_conditions): New function.
4599 (add_condition_to_breakpoint): Likewise.
4600 (add_breakpoint_condition): Likewise.
4601 (gdb_condition_true_at_breakpoint): Likewise.
4602 (gdb_breakpoint_here): Return result directly instead
4603 of going through a local variable.
4604
4605 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4606 (clear_gdb_breakpoint_conditions): Likewise.
4607 (add_breakpoint_condition): Likewise.
4608 (gdb_condition_true_at_breakpoint): Likewise.
4609
4610 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4611 (need_step_over_p): Take target-side breakpoint condition into
4612 consideration.
4613
5e1dc496
LM
46142012-02-24 Luis Machado <lgustavo@codesourcery>
4615
4616 * server.h: Include tracepoint.h.
4617 (agent_mem_read, agent_get_trace_state_variable_value,
4618 agent_set_trace_state_variable_value,
4619 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4620 get_set_tsv_func_addr): New prototypes.
4621
4622 * ax.h: New include file.
4623 * ax.c: New source file.
4624
4625 * tracepoint.c: Include ax.h.
4626 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4627 agent_expr, eval_result_type): Move to ax.h.
4628 (parse_agent_expr): Rename to ...
4629 (gdb_parse_agent_expr): ... this, make it non-static and move
4630 to ax.h.
4631 (unparse_agent_expr) Rename to ...
4632 (gdb_unparse_agent_expr): ... this, make it non-static and move
4633 to ax.h.
4634 (eval_agent_expr): Rename to ...
4635 (eval_tracepoint_agent_expr): ... this.
4636 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4637 forward declarations.
4638 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4639 (agent_get_trace_state_variable_value): New function.
4640 (agent_set_trace_state_variable_value): New function.
4641 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4642 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4643 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4644 (condition_true_at_tracepoint): Likewise.
4645 (parse_agent_expr): Rename to ...
4646 (gdb_parse_agent_expr): ... this and move to ax.c.
4647 (unparse_agent_expr): Rename to ...
4648 (gdb_unparse_agent_expr): ... this and move to ax.c.
4649 (gdb_agent_op_name): Move to ax.c.
4650 (eval_agent_expr): Rename to ...
4651 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4652 and move to ax.c.
4653 (eval_tracepoint_agent_expr): New function.
4654 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4655 non-static.
5e1dc496
LM
4656 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4657 ax.c.
4658 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4659 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4660 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4661 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4662 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4663 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4664 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4665 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4666 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4667 (compile_bytecodes): Remove forward declaration.
4668 (is_goto_target): Move to ax.c.
4669 (compile_bytecodes): Move to ax.c and call
4670 agent_get_trace_state_variable_value (...) and
4671 agent_set_trace_state_variable_value (...).
4672
4673 * Makefile.in: Update ax.c and IPA dependencies.
4674
277e4e52
PA
46752012-02-24 Pedro Alves <palves@redhat.com>
4676
4677 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4678 (cmd_bigqtbuffer_circular): ... this. Only handle
4679 'QTBuffer:circular:'.
4680 (handle_tracepoint_general_set): Adjust.
4681
bf4c19f7
YQ
46822012-02-16 Yao Qi <yao@codesourcery.com>
4683
4684 * inferiors.c: Move code to ...
4685 * dll.c: .... here. New.
4686 * server.h: Declare clear_dlls.
4687 * Makefile.in (SFILES): Add dll.c.
4688 (OBS): Add dll.o
4689 (dll.o): New rule.
4690
d73f2619
YQ
46912012-02-11 Yao Qi <yao@codesourcery.com>
4692
4693 * server.c: (handle_monitor_command): Add a new parameter
4694 `own_buf'.
4695 (handle_query): Update caller.
4696
f8255c2a
JB
46972012-02-09 Joel Brobecker <brobecker@adacore.com>
4698
4699 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4700 * configure, config.in: Regenerate.
4701 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4702 is not defined.
4703
da84f473
PA
47042012-02-02 Pedro Alves <palves@redhat.com>
4705
4706 Try SIGKILL first, then PTRACE_KILL.
4707 * linux-low.c (linux_kill_one_lwp): New.
4708 (linux_kill_one_lwp): Rename to ...
4709 (kill_one_lwp_callback): ... this. Use the new
4710 linux_kill_one_lwp.
4711
e886a173
PA
47122012-02-02 Pedro Alves <palves@redhat.com>
4713
4714 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4715 inferior.
4716
be07f1a2
PA
47172012-01-27 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4720 (elf_64_file_p): Make static.
4721 (linux_pid_exe_is_elf_64_file): New.
4722 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4723 Delete declarations.
4724 (linux_pid_exe_is_elf_64_file): Declare.
4725 * linux-x86-low.c (x86_arch_setup): Use
4726 linux_pid_exe_is_elf_64_file.
4727
d8301ad1
JK
47282012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4729
4730 * linux-low.c (linux_wait_for_event_1): Rename to ...
4731 (linux_wait_for_event): ... here and merge it with former
4732 linux_wait_for_event - new variable wait_ptid, use it.
4733 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4734
01b17894
PA
47352012-01-23 Pedro Alves <palves@redhat.com>
4736
4737 * server.c (main): Avoid yet another case of infinite loop while
4738 detaching/killing after a longjmp.
4739
e825046f
JK
47402012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4741
4742 Code cleanup.
4743 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4744
b9e7b9c3
UW
47452012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4746
4747 * hostio.c (handle_readlink): New function.
4748 (handle_vFile): Call it to handle "vFile:readlink" packets.
4749
901f9912
UW
47502012-01-20 Pedro Alves <palves@redhat.com>
4751 Ulrich Weigand <ulrich.weigand@linaro.org>
4752
4753 * server.c (handle_v_requests): Only support vAttach and vRun to
4754 start multiple processes when in extended protocol mode.
4755
fc1ab1a0
PA
47562012-01-17 Pedro Alves <palves@redhat.com>
4757
4758 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4759 memalign plus mprotect to allocate the scratch buffer.
4760
7d5d4e98
PA
47612012-01-13 Pedro Alves <palves@redhat.com>
4762
4763 * server.c (attach_inferior): Clear `cont_thread'.
4764
f128d5e9
PA
47652012-01-13 Pedro Alves <palves@redhat.com>
4766
4767 * server.c (main): Avoid infinite loop while detaching/killing
4768 after a longjmp.
4769
06db92f0
DE
47702012-01-09 Doug Evans <dje@google.com>
4771
4772 * server.c (start_inferior): Set last_ptid in --wrapper case.
4773
32d92999
YQ
47742012-01-06 Yao Qi <yao@codesourcery.com>
4775
4776 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4777 defined.
4778 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4779
5e0a92a9
YQ
47802012-01-04 Yao Qi <yao@codesourcery.com>
4781
4782 * tracepoint.c (cmd_qtdp): Print debug message
4783 for static tracepoint.
4784
ae639e8c
YQ
47852012-01-04 Yao Qi <yao@codesourcery.com>
4786
4787 * tracepoint.c (trace_vdebug): Differentiate debug message
4788 between gdbserver and IPA.
4789
f72429c5
YQ
47902012-01-03 Yao Qi <yao@codesourcery.com>
4791
4792 * tracepoint.c (tracepoint_was_hit): Don't collect for
4793 static tracepoint.
4794
12c3e59c
JB
47952012-01-02 Joel Brobecker <brobecker@adacore.com>
4796
4797 * terminal.h: Reformat copyright header.
4798
67827812
JB
47992012-01-02 Joel Brobecker <brobecker@adacore.com>
4800
4801 * server.c (gdbserver_version): Update copyright year.
4802 * gdbreplay.c (gdbreplay_version): Likewise.
4803
3e52c33d
JK
48042011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4805
4806 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4807
4808 Revert:
4809 2011-12-18 Hui Zhu <teawater@gmail.com>
4810 * linux-low.c (linux_create_inferior): Save return value to ret.
4811
66f1260e
HZ
48122011-12-18 Hui Zhu <teawater@gmail.com>
4813
4814 * linux-low.c (linux_create_inferior): Save return value to ret.
4815
e77616d7
DE
48162011-12-16 Doug Evans <dje@google.com>
4817
e7b06c57
DE
4818 * linux-low.c (linux_create_inferior): If stdio connection,
4819 redirect stdin from /dev/null, stdout to stderr.
4820 * remote-utils.c (remote_is_stdio): New static global.
4821 (remote_connection_is_stdio): New function.
4822 (remote_prepare): Handle stdio connection.
4823 (remote_open): Ditto.
4824 (remote_close): Don't close stdin for stdio connections.
4825 (read_prim,write_prim): New functions. Replace all calls to
4826 read/write to these.
4827 * server.c (main): Watch for "-" argument. Move call to
4828 remote_prepare before start_inferior.
4829 * server.h (STDIO_CONNECTION_NAME): New macro.
4830 (remote_connection_is_stdio): Declare.
4831
e77616d7
DE
4832 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4833 in debugging output.
4834
82067193
YQ
48352011-12-15 Yao Qi <yao@codesourcery.com>
4836
4837 * tracepoint.c: Include sys/syscall.h.
4838 (gdb_ust_thread): Remove preprocessor conditional.
4839
82bfbe7e
PA
48402011-12-14 Pedro Alves <pedro@codesourcery.com>
4841
4842 * linux-low.c (linux_detach_one_lwp): Call
4843 the_low_target.prepare_to_resume before detaching.
4844
712c6575
YQ
48452011-12-14 Yao Qi <yao@codesourcery.com>
4846
4847 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4848 of write.
4849
d54d1edf
YQ
48502011-12-14 Yao Qi <yao@codesourcery.com>
4851
4852 * i386-low.c (i386_low_stopped_data_address): Initialize local
4853 variable `control'.
4854
6210a125
PA
48552011-12-13 Pedro Alves <pedro@codesourcery.com>
4856
4857 PR remote/13492
4858
4859 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4860 DR_CONTROL unless necessary. Extend comments.
4861 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4862 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4863
2ece8244
YQ
48642011-12-13 Yao Qi <yao@codesourcery.com>
4865
4866 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4867 macros.
4868 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4869
784867a5
JK
48702011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4871
4872 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4873 Print new debug message for such case.
4874
6bf36717
JK
48752011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4876
4877 Fix overlapping memcpy.
4878 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4879 the read_inferior_memory transfer.
4880 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4881 write_inferior_memory transfer.
4882 (set_fast_tracepoint_jump): New variable buf. Use it for the
4883 read_inferior_memory and write_inferior_memory transfers.
4884 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4885 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4886 Use it for the write_inferior_memory transfer.
4887 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4888 buffers.
4889
50275556
MR
48902011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4891
4892 * linux-low.c (fetch_register, store_register): Make code
4893 consistent, fix formatting.
4894
7325beb4
MR
48952011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4896
4897 * linux-low.c (usr_store_inferior_registers): Factor out code
4898 to handle individual registers into...
4899 (store_register): ... this new function.
4900
c642a434
UW
49012011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4902
4903 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4904 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4905 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4906 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4907 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4908 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4909 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4910 (srv_xmlfiles): Add new XML files.
4911
4912 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4913 and <sys/uio.h>.
4914 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4915 (init_registers_s390_linux32v1): Add prototype.
4916 (init_registers_s390_linux32v2): Likewise.
4917 (init_registers_s390_linux64v1): Likewise.
4918 (init_registers_s390_linux64v2): Likewise.
4919 (init_registers_s390x_linux64v1): Likewise.
4920 (init_registers_s390x_linux64v2): Likewise.
4921 (s390_num_regs): Increment to 52.
4922 (s390_regmap): Add orig_r2 register.
4923 (s390_num_regs_3264): Increment to 68.
4924 (s390_regmap_3264): Add orig_r2 register.
4925 (s390_collect_ptrace_register): Handle orig_r2 register.
4926 (s390_supply_ptrace_register): Likewise.
4927 (s390_fill_last_break): New function.
4928 (s390_store_last_break): Likewise.
4929 (s390_fill_system_call): New function.
4930 (s390_store_system_call): Likewise.
4931 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4932 register sets.
4933 (s390_check_regset): New function.
4934 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4935 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4936 Update target_regsets for available register sets.
4937
2268b414
JK
49382011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4939 Jan Kratochvil <jan.kratochvil@redhat.com>
4940
4941 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4942 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4943 New.
4944 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4945 * linux-low.h (struct process_info_private): New member r_debug.
4946 * server.c (handle_qxfer_libraries): Call
4947 the_target->qxfer_libraries_svr4.
4948 (handle_qxfer_libraries_svr4): New function.
4949 (qxfer_packets): New entry "libraries-svr4".
4950 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4951 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4952 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4953 PACKET_qXfer_libraries_svr4.
4954
d6db1fab
UW
49552011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4956
4957 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4958 PSW address/mask between 8-byte and 16-byte formats.
4959 (s390_supply_ptrace_register): Likewise.
4960 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4961 basic addressing mode bit.
4962
242f5f1c
SS
49632011-11-24 Stan Shebs <stan@codesourcery.com>
4964
4965 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4966
f196051f
SS
49672011-11-17 Stan Shebs <stan@codesourcery.com>
4968
4969 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4970 (tracing_start_time): New global.
4971 (tracing_stop_time): New global.
4972 (tracing_user_name): New global.
4973 (tracing_notes): New global.
4974 (tracing_stop_note): New global.
4975 (cmd_qtstart): Set traceframe_usage, start_time.
4976 (stop_tracing): Set stop_time.
4977 (cmd_qtstatus): Report additional status.
4978 (cmd_qtp): New function.
4979 (handle_tracepoint_query): Call it.
4980 (cmd_qtnotes): New function.
4981 (handle_tracepoint_general_set): Call it.
4982 (get_timestamp): Rename from tsv_get_timestamp.
4983
405f8e94
SS
49842011-11-14 Stan Shebs <stan@codesourcery.com>
4985 Kwok Cheung Yeung <kcy@codesourcery.com>
4986
4987 * linux-x86-low.c (small_jump_insn): New.
4988 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4989 trampoline and error message, build a trampoline and issue a small
4990 jump instruction to it.
4991 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4992 trampoline and error message.
4993 (x86_get_min_fast_tracepoint_insn_len): New.
4994 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4995 * linux-low.h (struct linux_target_ops): Add arguments to
4996 install_fast_tracepoint_jump_pad operation, add new operation.
4997 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4998 arguments.
4999 (linux_get_min_fast_tracepoint_insn_len): New function.
5000 (linux_target_op): Add new operation.
5001 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5002 (gdb_trampoline_buffer_end): Ditto.
5003 (gdb_trampoline_buffer_error): Ditto.
5004 (struct ipa_sym_addresses): Add fields for new IPA variables.
5005 (symbol_list): Add entries for new IPA variables.
5006 (struct tracepoint): Add fields to hold the address range of the
5007 trampoline used by the tracepoint.
5008 (trampoline_buffer_head): New static variable.
5009 (trampoline_buffer_tail): Ditto.
5010 (claim_trampoline_space): New function.
5011 (have_fast_tracepoint_trampoline_buffer): New function.
5012 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5013 structure.
5014 (install_fast_tracepoint): Ditto, also add error buffer argument.
5015 (cmd_qtminftpilen): New function.
5016 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5017 (fast_tracepoint_from_trampoline_address): New function.
5018 (fast_tracepoint_collecting): Handle trampoline as part of jump
5019 pad space.
5020 (set_trampoline_buffer_space): New function.
5021 (initialize_tracepoint): Initialize new IPA variables.
5022 * target.h (struct target_ops): Add arguments to
5023 install_fast_tracepoint_jump_pad operation, add new
5024 get_min_fast_tracepoint_insn_len operation.
5025 (target_get_min_fast_tracepoint_insn_len): New.
5026 (install_fast_tracepoint_jump_pad): Add arguments.
5027 * server.h (IPA_BUFSIZ): Define.
5028 * linux-i386-ipa.c: Include extra header files.
5029 (initialize_fast_tracepoint_trampoline_buffer): New function.
5030 (initialize_low_tracepoint): Call it.
5031 * server.h (set_trampoline_buffer_space): Declare.
5032 (claim_trampoline_space): Ditto.
5033 (have_fast_tracepoint_trampoline_buffer): Ditto.
5034
1e4d1764
YQ
50352011-11-14 Yao Qi <yao@codesourcery.com>
5036
5037 * server.c (handle_query): Handle InstallInTrace for qSupported.
5038 * tracepoint.c (add_tracepoint): Sort list.
5039 (install_tracepoint, download_tracepoint): New.
5040 (cmd_qtdp): Call them to install and download tracepoints.
5041 (sort_tracepoints): Removed.
5042 (cmd_qtstart): Update.
5043
5c73ff4e
YQ
50442011-11-14 Yao Qi <yao@codesourcery.com>
5045
5046 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5047 * mem-break.h: Declare.
5048 * tracepoint.c (cmd_qtstart): Move some code to ...
5049 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5050 New.
5051 (download_tracepoints): Move some code to ...
5052 (download_tracepoint_1): ... here. New.
5053
86a30030
YQ
50542011-11-08 Yao Qi <yao@codesourcery.com>
5055
5056 * remote-utils.c (relocate_instruction): A comment fix.
5057
8d26e50c
JB
50582011-11-07 Joel Brobecker <brobecker@adacore.com>
5059
5060 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5061 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5062 dr_status_mirror and dr_control_mirror from debug_reg_state.
5063 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5064 (i386_initial_stuff): Remove use of deleted globals.
5065 (i386_get_thread_context, i386_set_thread_context,
5066 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5067 from debug_reg_state.
5068
a59306a3
YQ
50692011-11-05 Yao Qi <yao@codesourcery.com>
5070
5071 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5072 address as TPOINT's.
5073
3065dfb6
SS
50742011-11-02 Stan Shebs <stan@codesourcery.com>
5075
5076 * tracepoint.c (agent_mem_read_string): New function.
5077 (eval_agent_expr): Call it for tracenz.
5078 * server.c (handle_query): Report support for tracenz.
5079
fd0d8c7c
YQ
50802011-11-02 Yao Qi <yao@codesourcery.com>
5081
5082 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5083
609086b1
YQ
50842011-11-02 Yao Qi <yao@codesourcery.com>
5085
5086 * target.h: Fix a typo in comment.
5087
b9fd1791
PA
50882011-10-31 Pedro Alves <pedro@codesourcery.com>
5089
5090 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5091 clobber the breakpoints' shadows with fast tracepoint jumps.
5092 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5093 * target.c (write_inferior_memory): Also pass MYADDR down to
5094 check_mem_write.
5095
03583c20
UW
50962011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5097
5098 * configure.ac: Check support for personality routine.
5099 * configure: Regenerate.
5100 * config.in: Likewise.
5101 * linux-low.c: Include <sys/personality.h>.
5102 Define ADDR_NO_RANDOMIZE if necessary.
5103 (linux_create_inferior): Disable address space randomization when
5104 forking inferior, if requested.
5105 (linux_supports_disable_randomization): New function.
5106 (linux_target_ops): Install it.
5107 * server.h (disable_randomization): Declare.
5108 * server.c (disable_randomization): New global variable.
5109 (handle_general_set): Handle QDisableRandomization.
5110 (handle_query): Likewise for qSupported.
5111 (main): Support --disable-randomization and --no-disable-randomization
5112 command line arguments.
5113 * target.h (struct target_ops): Add supports_disable_randomization.
5114 (target_supports_disable_randomization): New macro.
5115
723b724b
MF
51162011-09-29 Mike Frysinger <vapier@gentoo.org>
5117
5118 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5119 ifdef check.
5120 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5121 [!PT_GETDSBT] (target_loadmap): New definition.
5122 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5123 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5124 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5125 and PT_GETDSBT to LINUX_LOADMAP.
5126 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5127 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5128
55329a5c 51292011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5130
5131 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5132 (arm_linux_hwbp_cap): New static variable.
5133 (arm_linux_get_hwbp_cap): Replace by ...
5134 (arm_linux_init_hwbp_cap): ... this new function.
5135 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5136 (arm_linux_get_hw_watchpoint_count): Likewise.
5137 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5138 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5139 (arm_prepare_to_resume): Use perror_with_name instead of error.
5140
55329a5c 51412011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5142
5143 * linux-arm-low.c: Include <signal.h>.
5144 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5145 (struct arm_linux_hwbp_cap): New data type.
5146 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5147 (struct arm_linux_hw_breakpoint): New data type.
5148 (MAX_BPTS, MAX_WPTS): Define.
5149 (struct arch_process_info, struct arch_lwp_info): New data types.
5150 (arm_linux_get_hwbp_cap): New function.
5151 (arm_linux_get_hw_breakpoint_count): Likewise.
5152 (arm_linux_get_hw_watchpoint_count): Likewise.
5153 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5154 (arm_hwbp_control_initialize): Likewise.
5155 (arm_hwbp_control_is_enabled): Likewise.
5156 (arm_hwbp_control_is_initialized): Likewise.
5157 (arm_hwbp_control_disable): Likewise.
5158 (arm_linux_hw_breakpoint_equal): Likewise.
5159 (arm_linux_hw_point_initialize): Likewise.
5160 (struct update_registers_data): New data structure.
5161 (update_registers_callback: New function.
5162 (arm_insert_point): Likewise.
5163 (arm_remove_point): Likewise.
5164 (arm_stopped_by_watchpoint): Likewise.
5165 (arm_stopped_data_address): Likewise.
5166 (arm_new_process): Likewise.
5167 (arm_new_thread): Likewise.
5168 (arm_prepare_to_resume): Likewise.
5169 (the_low_target): Register arm_insert_point, arm_remove_point,
5170 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5171 arm_new_thread, and arm_prepare_to_resume.
5172
6b9801d4
SS
51732011-09-15 Stan Shebs <stan@codesourcery.com>
5174
5175 * server.h (struct emit_ops): Add compare-goto fields.
5176 * tracepoint.c (gdb_agent_op_sizes): New table.
5177 (emit_eq_goto): New function.
5178 (emit_ne_goto): New function.
5179 (emit_lt_goto): New function.
5180 (emit_le_goto): New function.
5181 (emit_gt_goto): New function.
5182 (emit_ge_goto): New function.
5183 (is_goto_target): New function.
5184 (compile_bytecodes): Recognize special cases of compare-goto
5185 combinations and call specialized emitters for them.
5186 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5187 (amd64_emit_ne_goto): New function.
5188 (amd64_emit_lt_goto): New function.
5189 (amd64_emit_le_goto): New function.
5190 (amd64_emit_gt_goto): New function.
5191 (amd64_emit_ge_goto): New function.
5192 (amd64_emit_ops): Add the new functions.
5193 (i386_emit_eq_goto): New function.
5194 (i386_emit_ne_goto): New function.
5195 (i386_emit_lt_goto): New function.
5196 (i386_emit_le_goto): New function.
5197 (i386_emit_gt_goto): New function.
5198 (i386_emit_ge_goto): New function.
5199 (i386_emit_ops): Add the new functions.
5200
bf15cbda
SS
52012011-09-08 Stan Shebs <stan@codesourcery.com>
5202
5203 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5204 (i386_emit_epilogue): Restore %ebx.
5205
943ca1dd
JZ
52062011-08-31 Jie Zhang <jzhang918@gmail.com>
5207
5208 * server.c (step_thread): Remove definition.
5209 (process_serial_event): Don't handle Hs.
5210 * server.h (step_thread): Remove declaration.
5211 * target.c (set_desired_inferior): Remove use of step_thread.
5212
e3deef73
LM
52132011-08-24 Luis Machado <lgustavo@codesourcery.com>
5214
5215 * linux-low.c: Include linux-procfs.h.
5216 (linux_attach_lwp_1): Update comments.
5217 (linux_attach): Scan for existing threads when attaching to a
5218 process that is the tgid.
5219 * Makefile.in: Update dependencies.
5220
13da1c97
LM
52212011-08-24 Luis Machado <lgustavo@codesourcery.com>
5222
5223 * configure.srv: Add linux-procfs.o dependencies.
5224
881127c9
YQ
52252011-08-14 Yao Qi <yao@codesourcery.com>
5226
5227 * target.h (struct target_ops): Fix indent.
5228 * win32-low.c (win32_target_ops): Fix comment.
5229
58dbd541
YQ
52302011-08-14 Andrew Jenner <andrew@codesourcery.com>
5231 Yao Qi <yao@codesourcery.com>
5232
5233 * Makefile.in (clean): Remove tic6x-*.c files.
5234 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5235 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5236 (tic6x-c64xp-linux.c): Likewise.
5237 * configure.srv: Add support for tic6x-*-uclinux.
5238 * linux-tic6x-low.c: New.
5239 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5240
78d85199
YQ
52412011-08-14 Andrew Stubbs <ams@codesourcery.com>
5242 Yao Qi <yao@codesourcery.com>
5243
5244 * target.h (struct target_ops): Add read_loadmap.
5245 * linux-low.c (struct target_loadseg): New type.
5246 (struct target_loadmap): New type.
5247 (linux_read_loadmap): New function.
5248 (linux_target_ops): Add linux_read_loadmap.
5249 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5250 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5251 to NULL.
78d85199 5252
a959a88d
EZ
52532011-08-05 Eli Zaretskii <eliz@gnu.org>
5254
5255 * win32-low.c: Include <stdint.h>.
5256
1ced966e
PA
52572011-07-22 Pedro Alves <pedro@codesourcery.com>
5258
5259 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5260 to the inferior here.
5261 (i386_remove_aligned_watchpoint): Ditto.
5262 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5263 fit part of the watchpoint in the debug registers.
5264 (i386_update_inferior_debug_regs): New.
5265 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5266 registers, and only update the inferior on success.
5267 (i386_low_remove_watchpoint): Ditto.
5268
d26e3629
KY
52692011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5270
5271 * linux-low.c (compare_ints, unique, list_threads, show_process,
5272 linux_core_of_thread): Delete.
5273 (linux_target_ops): Change linux_core_of_thread to
5274 linux_common_core_of_thread.
5275 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5276 * utils.c (malloc_failure): Change type of argument.
5277 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5278 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5279 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5280 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5281 (IPA_OBJS): Add common-utils-ipa.o.
5282 (ptid_h, linux_osdata_h): New macros.
5283 (server_h): Add common/common-utils.h, common/xml-utils.h,
5284 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5285 common/ptid.h.
5286 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5287 ptid.o, buffer.o): New rules.
5288 (linux-low.o): Add common/linux-osdata.h as a dependency.
5289 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5290 * configure.ac: Add AC_HEADER_DIRENT check.
5291 * config.in: Regenerate.
5292 * configure: Regenerate.
5293 * remote-utils.c (xml_escape_text): Delete.
5294 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5295 buffer_xml_printf): Move to common/buffer.c.
5296 * server.c (main): Remove call to initialize_inferiors.
5297 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5298 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5299 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5300 internal_error, gdb_assert, gdb_assert_fail): Delete.
5301 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5302 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5303 common/buffer.h.
5304 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5305 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5306 initialize_inferiors): Delete.
5307
2275a1a7
PA
53082011-07-20 Pedro Alves <pedro@codesourcery.com>
5309
5310 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5311 symbol error.
5312
0a5b1e09
PA
53132011-05-31 Pedro Alves <pedro@codesourcery.com>
5314
5315 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5316 assertion.
5317 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5318
6938fd34
YQ
53192011-05-26 Yao Qi <yao@codesourcery.com>
5320
5321 * Makefile.in (thread-db.o): Track dependence to
5322 common/gdb_thread_db.h.
5323 * thread-db.c: include gdb_thread_db.h from right place.
5324
b481f9e0
TT
53252011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5326
5327 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5328 __FILE__ and __LINE__ to internal_error.
5329
98a5dd13
DE
53302011-05-13 Doug Evans <dje@google.com>
5331
5332 * thread-db.c (try_thread_db_load_from_sdir): New function.
5333 (try_thread_db_load_from_dir): New function.
5334 (thread_db_load_search): Handle $sdir, ignore $pdir.
5335 Remove trying of system directories if search of
5336 libthread-db-search-path fails, that is now done via $sdir.
5337
d248b706
KY
53382011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5339
5340 * server.c (handle_query): Add EnableDisableTracepoints to the list
5341 of supported features.
43aaf8b6 5342 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5343 tracepoints.
43aaf8b6
PA
5344 (cmd_qtenable_disable): New.
5345 (cmd_qtstart): Install tracepoints even if disabled.
5346 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5347 receiving a QTEnable or QTDisable packet.
5348 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5349 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5350 tracepoints.
5351 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5352
84e578fb
DE
53532011-05-10 Doug Evans <dje@google.com>
5354
5355 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5356
71f55dd8
DE
53572011-05-04 Doug Evans <dje@google.com>
5358
5359 * linux-low.c (linux_join): Skip process lookup.
5360 * spu-low.c (spu_join): Ditto.
5361 * server.c (join_inferiors_callback): Delete.
5362 (process_serial_event): For 'D' packet (detach) call join_inferior
5363 directly.
5364
4d393d60
JM
53652011-05-04 Joseph Myers <joseph@codesourcery.com>
5366
5367 * README: Don't mention xscale*-*-linux*.
5368 * configure.srv (xscale*-*-linux*): Don't handle target.
5369
b00ad6ff
NF
53702011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5371
5372 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5373 casting pointers.
5374 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5375 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5376 (i386_emit_void_call_2): Likewise.
5377
af96c192
YQ
53782011-04-26 Yao Qi <yao@codesourcery.com>
5379
43aaf8b6
PA
5380 * linux-low.c: Move common macros to linux-ptrace.h.
5381 Include linux-ptrace.h.
af96c192
YQ
5382 * Makefile.in (linux_ptrace_h): New.
5383 (linux-low.o): Depends on linux-ptrace.h.
5384
03f2bd59
JK
53852011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5386
5387 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5388 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5389 (remote_prepare): New function with most of the TCP code from ...
5390 (remote_open): ... here. Detect PORT here unconditionally. Move also
5391 setting transport_is_reliable.
5392 * server.c (run_once): New variable.
5393 (gdbserver_usage): Document it.
5394 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5395 the first run if RUN_ONCE.
5396 * server.h (run_once, remote_prepare): New declarations.
5397
7a9dd1b2
TT
53982011-04-19 Tom Tromey <tromey@redhat.com>
5399
5400 * win32-low.c (handle_load_dll): Remove duplicate "the".
5401
81239425
PM
54022011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5403
5404 Remove support for old Cygwin 1.5 versions.
5405 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5406 function to avoid warning.
5407 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5408 warning.
5409
9e0627f1
PM
54102011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5411
5412 * gdbserver/server.h (Macro _): Define it if not available.
5413
588eebee
MS
54142011-03-14 Michael Snyder <msnyder@vmware.com>
5415
348af9f7 5416 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5417
43f70d4c
JB
54182011-03-10 Joel Brobecker <brobecker@adacore.com>
5419
5420 * Makefile.in (maintainer-clean realclean distclean): Remove
5421 "make ... subdir_do" command.
5422
348af9f7
MS
54232011-03-10 Michael Snyder <msnyder@vmware.com>
5424
5425 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5426
5427 * server.c (handle_v_run): Free alloced buffer on early return.
5428
e637a4f5
YQ
54292011-03-09 Yao Qi <yao@codesourcery.com>
5430
5431 Revert:
5432 2011-03-04 Yao Qi <yao@codesourcery.com>
5433
5434 * Makefile.in: Remove GNU make feature --directory.
5435
5436 2011-03-05 Yao Qi <yao@codesourcery.com>
5437
5438 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5439 (subdir_do): New make target. Copied from gdb/Makefile.
5440 (maintainer-clean, realclean, distclean, clean): Call corresponding
5441 make targets in common/Makefile.
5442
5443 2011-02-11 Yao Qi <yao@codesourcery.com>
5444
5445 * configure.ac: Call AC_PROG_RANLIB.
5446 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5447 * configure: Regenerate.
5448
e6edda56
JK
54492011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5450
5451 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5452
e5141119
JB
54532011-03-06 Yao Qi <yao@codesourcery.com>
5454
5455 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5456
64794aa4
JB
54572011-03-05 Yao Qi <yao@codesourcery.com>
5458
5459 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5460 (subdir_do): New make target. Copied from gdb/Makefile.
5461 (maintainer-clean, realclean, distclean, clean): Call corresponding
5462 make targets in common/Makefile.
5463
7a762829
YQ
54642011-03-04 Yao Qi <yao@codesourcery.com>
5465
5466 * Makefile.in: Remove GNU make feature --directory.
5467
348af9f7
MS
54682011-03-04 Michael Snyder <msnyder@vmware.com>
5469
5470 * server.c (queue_stop_reply): Call xmalloc not malloc.
5471
54722011-03-02 Michael Snyder <msnyder@vmware.com>
5473
5474 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5475
9f72fee2
MS
54762011-02-28 Michael Snyder <msnyder@vmware.com>
5477
588eebee
MS
5478 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5479 (cmd_qtframe): Ditto.
5480 (cmd_qtbuffer): Ditto.
5481 (cmd_bigqtbuffer): Ditto.
5482
9f72fee2
MS
5483 * utils.c (decimal2str): Initialize 'width' to nine, then
5484 don't mess with it.
5485
8040bd49
UW
54862011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5487
5488 * hostio.c (require_data): Free *data, not data.
5489
7e52cbd0
JK
54902011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5491
5492 * hostio.c (require_data): Use free, not xfree.
5493
9130f83e
MS
54942011-02-27 Michael Snyder <msnyder@vmware.com>
5495
4b812f4e
MS
5496 * server.c (handle_query): Discard unused value.
5497
9130f83e
MS
5498 * hostio.c (require_data): Free malloc memory before returning
5499 error.
5500
69d37113
MS
55012011-02-26 Michael Snyder <msnyder@vmware.com>
5502
5503 * linux-low.c (list_threads): Call closedir for dirent.
5504
35f5825a
MS
55052011-02-27 Michael Snyder <msnyder@vmware.com>
5506
2a589cef
MS
5507 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5508 a case statement falls through.
5509
0adea5f7
MS
5510 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5511
35f5825a
MS
5512 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5513 in comparison.
5514
238f1c74
MS
55152011-02-26 Michael Snyder <msnyder@vmware.com>
5516
5517 * utils.c (decimal2str): Eliminate dead code and dead param.
5518 (pulongest): Drop dead param from call to decimal2str.
5519 (plongest): Ditto.
5520
633ff500
JB
55212011-02-24 Joel Brobecker <brobecker@adacore.com>
5522
5523 Revert the following patch (not approved yet):
5524 2011-02-21 Hui Zhu <teawater@gmail.com>
5525 * tracepoint.c (tp_printf): New function.
5526 (eval_agent_expr): Handle gdb_agent_op_printf.
5527
f9c6ff72
HZ
55282011-02-21 Hui Zhu <teawater@gmail.com>
5529
5530 * tracepoint.c (tp_printf): New function.
5531 (eval_agent_expr): Handle gdb_agent_op_printf.
5532
94d5e490
TT
55332011-02-18 Tom Tromey <tromey@redhat.com>
5534
5535 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5536 (tracepoint.o): Likewise.
5537 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5538 (gdb_agent_op_names): Likewise.
5539
c7f96d2b
TT
55402011-02-18 Tom Tromey <tromey@redhat.com>
5541
5542 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5543 gdb_agent_op_rot>: New constants.
5544 (gdb_agent_op_names): Add pick and roll.
5545 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5546 cases.
5547
0feedb2c
JK
55482011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5549
5550 * aclocal.m4: Regenerated with aclocal-1.11.1.
5551
b3b9301e
PA
55522011-02-14 Pedro Alves <pedro@codesourcery.com>
5553
5554 * server.c (handle_qxfer_traceframe_info): New.
5555 (qxfer_packets): Register "traceframe-info".
5556 (handle_query): Report support for qXfer:traceframe-info:read+.
5557 * tracepoint.c (match_blocktype): New.
5558 (traceframe_find_block_type): Rename to ...
5559 (traceframe_walk_blocks): ... this. Add callback filter argument,
5560 and use it.
5561 (traceframe_find_block_type): New, reimplemented on top of
5562 traceframe_walk_blocks.
5563 (build_traceframe_info_xml): New.
5564 (traceframe_read_info): New.
5565 * server.h (traceframe_read_info): Declare.
5566
4f3e6fb7
YQ
55672011-02-11 Yao Qi <yao@codesourcery.com>
5568
5569 * configure.ac: Call AC_PROG_RANLIB.
5570 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5571 * configure: Regenerate.
5572
764880b7
PA
55732011-02-07 Pedro Alves <pedro@codesourcery.com>
5574
5575 * server.c (gdb_read_memory): Change return semantics to allow
5576 partial transfers.
5577 (handle_search_memory_1): Adjust.
5578 (process_serial_event) <'m' packet>: Handle partial transfers.
5579 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5580
1c79eb8a
PA
55812011-01-28 Pedro Alves <pedro@codesourcery.com>
5582
5583 * regcache.c (init_register_cache): Initialize
5584 regcache->register_status.
5585 (free_register_cache): Release regcache->register_status.
5586 (regcache_cpy): Copy register_status.
5587 (registers_to_string): Print 'x's for unavailable registers.
5588 (supply_register): Mark the register's status valid or
5589 unavailable, depending on whether a buffer was passed in or not.
5590 (supply_register_zeroed): New.
5591 (supply_regblock): Mark the registers' status valid or
5592 unavailable, depending on whether a buffer was passed in or not.
5593 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5594 (struct regcache): New `register_status' field.
5595 (supply_register_zeroed): Declare.
5596 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5597 supply_register_zeroed, rather than passing a NULL buffer to
5598 supply_register.
5599 * tracepoint.c (fetch_traceframe_registers): Update comment.
5600
85724a0e
PA
56012011-01-28 Pedro Alves <pedro@codesourcery.com>
5602
5603 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5604 buffer explicit.
5605
d08aafef
PA
56062011-01-25 Pedro Alves <pedro@codesourcery.com>
5607
5608 * server.h (decode_xfer_write): Change prototype.
5609 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5610 and don't extract the annex here.
5611 * server.c (decode_xfer_read): Remove `annex' parameter,
5612 and don't extract the annex here.
5613 (decode_xfer): New.
5614 (struct qxfer): New.
5615 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5616 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5617 (handle_qxfer_statictrace): New functions, abstracted out from
5618 handle_query, and made to use the struct qxfer interface.
5619 (handle_threads_qxfer_proper): Rename to ...
5620 (handle_qxfer_threads_proper): ... this.
5621 (handle_threads_qxfer): Rename to ...
5622 (handle_qxfer_threads): ... this. Adjust.
5623 (qxfer_packets): New array.
5624 (handle_qxfer): New function.
5625 (handle_query): Use handle_qxfer.
5626
493e2a69
MS
56272011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5628
5629 * gdbreplay.c: Shorten lines of >= 80 columns.
5630 * linux-low.c: Ditto.
5631 * linux-ppc-low.c: Ditto.
5632 * linux-s390-low.c: Ditto.
5633 * linux-sparc-low.c: Ditto.
5634 * linux-x86-low.c: Ditto.
5635 * linux-xtensa-low.c: Ditto.
5636 * mem-break.c: Ditto.
5637 * nto-low.c: Ditto.
5638 * regcache.h: Ditto.
5639 * remote-utils.c: Ditto.
5640 * server.c: Ditto.
5641 * server.h: Ditto.
5642 * thread-db.c: Ditto.
5643 * tracepoint.c: Ditto.
5644 * utils.c: Ditto.
5645 * win32-low.h: Ditto.
5646
44944448
JB
56472011-01-05 Joel Brobecker <brobecker@adacore.com>
5648
5649 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5650 update.
5651
71ce852c
JB
56522011-01-01 Joel Brobecker <brobecker@adacore.com>
5653
5654 * server.c (gdbserver_version): Update copyright year in version
5655 output.
5656 * gdbreplay.c (gdbreplay_version): Ditto.
5657
eb826dc6
MF
56582010-12-29 Jie Zhang <jie.zhang@analog.com>
5659
5660 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5661 * linux-bfin-low.c: New file.
5662 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5663 PT_DATA_ADDR for BFIN targets.
5664 * Makefile.in (SFILES): Add linux-bfin-low.c.
5665 (clean): Remove reg-bfin.c.
5666 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5667 * README: Mention supported Blackfin targets.
5668
39ab222a
MF
56692010-12-23 Mike Frysinger <vapier@gentoo.org>
5670
5671 * .gitignore: New file.
5672
a1f2ce7d
MF
56732010-11-16 Mike Frysinger <vapier@gentoo.org>
5674
5675 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5676
f474844c
JZ
56772010-10-22 Jie Zhang <jie@codesourcery.com>
5678
5679 * Makefile.in: Add FLAGS_TO_PASS variable.
5680 (install): Remove dependency of install-only and recursively
5681 invoke make for install-only.
5682
f1048712
DE
56832010-10-04 Doug Evans <dje@google.com>
5684
5685 * Makefile.in (uninstall): Use $(DESTDIR).
5686
b53a1623
PA
56872010-09-24 Pedro Alves <pedro@codesourcery.com>
5688
e6ee044d
PA
5689 PR gdb/11842
5690
b53a1623
PA
5691 * linux-x86-low.c (compat_siginfo_from_siginfo)
5692 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5693 si_code is < 0. Check for si_code == SI_TIMER before checking for
5694 si_code < 0.
5695
fa1bd1e4
JB
56962010-09-13 Joel Brobecker <brobecker@adacore.com>
5697
5698 * lynx-i386-low.c: New file.
5699 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5700
47fac8f8
JB
57012010-09-13 Joel Brobecker <brobecker@adacore.com>
5702
5703 * lynx-low.c (ptrace_request_to_str): Remove handling for
5704 request values that have been removed in LynxOS 5.x.
5705
1adfc54d
JB
57062010-09-13 Joel Brobecker <brobecker@adacore.com>
5707
5708 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5709 <ptrace.h>
5710
c2a66c29
NS
57112010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5712
5713 * configure.ac: Add --enable-inprocess-agent option.
5714 * configure: Rebuilt.
5715
32fcada3
YQ
57162010-09-06 Yao Qi <yao@codesourcery.com>
5717
5718 * linux-low.c (linux_kill): Remove unused variable.
5719 (linux_stabilize_threads): Likewise.
5720 * server.c (start_inferior): Likewise.
5721 (queue_stop_reply_callback): Likewise.
5722 * tracepoint.c (do_action_at_tracepoint): Likewise.
5723
0cccb683
YQ
57242010-09-06 Yao Qi <yao@codesourcery.com>
5725
5726 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5727 on return.
5728
423ec54c
JK
57292010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5730
5731 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5732
12ac6819
PA
57332010-09-06 Pedro Alves <pedro@codesourcery.com>
5734
5735 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5736 "$(IPA_DEPFILES)".
5737
8ed54b31
JB
57382010-09-01 Joel Brobecker <brobecker@adacore.com>
5739
5740 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5741 gdbserver/lynx-ppc-low.c: New files.
5742 * Makefile.in (lynx_low_h): New variable.
5743 (lynx-low.o, lynx-ppc-low.o): New rules.
5744 * configure.ac: On LynxOS, link with -lnetinet.
5745 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5746 * configure: regenerate.
5747
bb0116a4
JB
57482010-09-01 Joel Brobecker <brobecker@adacore.com>
5749
5750 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5751 * configure.ac: Add check for vasprintf and vsnprintf.
5752 * configure, config.in: Regenerate.
5753 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5754
a778ab81 57552010-09-01 Joel Brobecker <brobecker@adacore.com>
5756
5757 * gdbreplay.c: Move include of alloca.h up, next to include of
5758 malloc.h.
5759 * server.h: Add include of malloc.h.
5760 * mem-break.c: Remove include of malloc.h.
5761 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5762
8b034a19 57632010-09-01 Joel Brobecker <brobecker@adacore.com>
5764
5765 * Makefile.in (memmem.o): Build with -Wno-error.
5766
57672010-09-01 Joel Brobecker <brobecker@adacore.com>
5768
5769 * utils.c (xsnprintf): Make non-static.
5770 * server.h: Add xsnprintf declaration.
5771 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5772 replace calls to snprintf by calls to xsnprintf throughout.
5773
57742010-09-01 Joel Brobecker <brobecker@adacore.com>
5775
5776 * configure.ac: Add configure check for alloca.
5777 * configure, config.in: Regenerate.
5778 * server.h: Include alloca.h if it exists.
5779 * gdbreplay.c: Include alloca.h if it exists.
5780
1a981360
PA
57812010-08-28 Pedro Alves <pedro@codesourcery.com>
5782
5783 * linux-low.c (__SIGRTMIN): Define if not already defined.
5784 (linux_create_inferior): Check for __ANDROID__ rather than
5785 __SIGRTMIN.
5786 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5787 are already deferred.
5788 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5789 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5790 stopped and already has a pending signal to report.
5791 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5792 a pending signal to report or is moving out of a jump pad.
5793 (linux_init_signals): Check for __ANDROID__ rather than
5794 __SIGRTMIN.
5795
b4d51a55
PA
57962010-08-28 Pedro Alves <pedro@codesourcery.com>
5797
5798 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5799 debug_threads check. Avoid a linear search when not doing debug
5800 output.
5801
ec48365d
PA
58022010-08-27 Pedro Alves <pedro@codesourcery.com>
5803
5804 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5805 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5806 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5807 (process_event): Change local fd's type to gdb_fildes_t.
5808 (create_file_handler): Adjust prototype.
5809 (delete_file_handler): Adjust prototype.
5810 (handle_file_event): Adjust prototype. Use pfildes.
5811 (create_file_event): Adjsut prototype.
5812 * remote-utils.c (remote_desc, listen_desc): Change type to
5813 gdb_fildes_t.
5814 * server.h: New gdb_fildes_t typedef.
5815 [USE_WIN32API]: Include winsock2.h.
5816 (delete_file_handler, add_file_handler): Adjust prototypes.
5817 (pfildes): Declare.
5818 * utils.c (pfildes): New.
5819
854d88f0
PA
58202010-08-27 Pedro Alves <pedro@codesourcery.com>
5821
5822 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5823 * configure: Regenerate.
5824
0146f85b
PA
58252010-08-27 Pedro Alves <pedro@codesourcery.com>
5826
5827 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5828 (linux_done_accessing_memory): ... this.
5829 (linux_target_ops): Adjust.
5830 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5831 * nto-low.c (nto_target_ops): Adjust comment.
5832 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5833 * spu-low.c (spu_target_ops): Adjust comment.
5834 * target.h (target_ops): Rename unprepare_to_access_memory field
5835 to done_accessing_memory.
5836 (unprepare_to_access_memory): Rename to ...
5837 (done_accessing_memory): ... this.
5838
90d74c30
PA
58392010-08-26 Pedro Alves <pedro@codesourcery.com>
5840
5841 * linux-low.c (linux_prepare_to_access_memory): New.
5842 (linux_unprepare_to_access_memory): New.
5843 (linux_target_ops): Install them.
5844 * server.c (read_memory): Rename to ...
5845 (gdb_read_memory): ... this. Use
5846 prepare_to_access_memory/prepare_to_access_memory.
5847 (write_memory): Rename to ...
5848 (gdb_write_memory): ... this. Use
5849 prepare_to_access_memory/prepare_to_access_memory.
5850 (handle_search_memory_1): Adjust.
5851 (process_serial_event): Adjust.
5852 * target.h (struct target_ops): New fields
5853 prepare_to_access_memory and unprepare_to_access_memory.
5854 (prepare_to_access_memory, unprepare_to_access_memory): New.
5855 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5856 prepare_to_access_memory/prepare_to_access_memory.
5857 * nto-low.c (nto_target_ops): Adjust.
5858 * spu-low.c (spu_target_ops): Adjust.
5859 * win32-low.c (win32_target_ops): Adjust.
5860
fd467969
PA
58612010-08-26 Pedro Alves <pedro@codesourcery.com>
5862
5863 * Makefile.in (WARN_CFLAGS): Get it from configure.
5864 (WERROR_CFLAGS): New.
5865 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5866 * configure.ac: Introduce --enable-werror, which adds -Werror to
5867 the compiler command line. Enabled by default. Disable with
5868 --disable-werror. Add -Wdeclaration-after-statement
5869 Wpointer-arith and -Wformat-nonliteral to warning flags.
5870 * configure: Regenerate.
5871
331e2f5f
PA
58722010-08-26 Pedro Alves <pedro@codesourcery.com>
5873
5874 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5875
e581f2b4
PA
58762010-08-26 Pedro Alves <pedro@codesourcery.com>
5877
5878 * gdbreplay.c (remote_error): New.
5879 (gdbchar): New.
5880 (expect): Use gdbchar. Check for error reading from GDB.
5881 Clarify sync error output.
5882 (play): Check for errors writing to GDB.
5883 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5884 * remote-utils.c (getpkt): Check for errors writing to the remote
5885 descriptor.
5886
3c11dd79
PA
58872010-08-25 Pedro Alves <pedro@codesourcery.com>
5888
5889 * linux-low.c (linux_wait_1): Move non-debugging code out of
5890 `debug_threads' control.
5891
d20a8ad9
PA
58922010-08-25 Pedro Alves <pedro@codesourcery.com>
5893
5894 * linux-low.c (linux_wait_1): Don't set last_status here.
5895 * server.c (push_event, queue_stop_reply_callback): Assert we're
5896 not pushing a TARGET_WAITKIND_IGNORE event.
5897 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5898 (myresume, handle_target_event): Set the thread's last_resume_kind
5899 and last_status from the target returned status.
5900
964e4306
PA
59012010-08-25 Pedro Alves <pedro@codesourcery.com>
5902
5903 PR threads/10729
5904
5905 * linux-x86-low.c (update_debug_registers_callback): New.
5906 (i386_dr_low_set_addr): Use it.
5907 (i386_dr_low_get_addr): New.
5908 (i386_dr_low_set_control): Use update_debug_registers_callback.
5909 (i386_dr_low_get_control): New.
5910 (i386_dr_low_get_status): Adjust.
5911 * linux-low.c (linux_stop_lwp): New.
5912 * linux-low.h (linux_stop_lwp): Declare.
5913
5914 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5915 argument instead of a i386_debug_reg_state.
5916 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5917 a i386_debug_reg_state.
5918 (i386_insert_aligned_watchpoint): Adjust.
5919 (i386_remove_aligned_watchpoint): Adjust.
5920 (i386_low_stopped_data_address): Read the debug registers from the
5921 inferior instead of from the mirrors.
5922 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5923 (i386_dr_low_get_addr): Declare.
5924 (i386_dr_low_get_control): Declare.
5925 (i386_dr_low_get_status): Change prototype.
5926
5927 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5928 (i386_dr_low_get_addr): New.
5929 (i386_dr_low_get_control): New.
5930 (i386_dr_low_get_status): Adjust prototype. Return
5931 dr_status_mirror.
5932 (i386_initial_stuff): Clear dr_status_mirror and
5933 dr_control_mirror.
5934 (i386_get_thread_context): Adjust.
5935 (i386_set_thread_context): Adjust.
5936 (i386_thread_added): Adjust.
5937
5f21a75b
PA
59382010-08-24 Pedro Alves <pedro@codesourcery.com>
5939
5940 * linux-low.h (linux_thread_area): Delete declaration.
5941
3e4c1235
TS
59422010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5943
5944 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5945 after its termination.
5946
1971b033
PA
59472010-08-09 Pedro Alves <pedro@codesourcery.com>
5948
5949 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5950 (gdb_wants_all_stopped): Delete.
5951 (linux_wait_1): Don't call them.
5952 * server.c (handle_v_cont): Tag all threads as want-stopped.
5953 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5954 stopped as "client-wants-stopped".
5955
310444ac
PA
59562010-07-31 Pedro Alves <pedro@codesourcery.com>
5957
5958 * Makefile.in (signals_h): New.
5959 (server_h): Depend on it.
5960 (server.o): Don't depend on $(signals_def).
5961 (signals.o): Depend on $(signals_def).
5962
a19cae16
JK
59632010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5964
5965 * Makefile.in (signals_def): New.
5966 (server_h): Append include/gdb/signals.h and signals_def.
5967 (server.o): Append signals_def.
5968
30d50328
JK
59692010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5970
5971 * server.c (handle_target_event): Use target_signal_to_host for
5972 resume_info.sig initialization.
5973 * target.h (struct thread_resume) <sig>: New comment.
5974
5c3216e2
OS
59752010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5976
c6f46ca0
OS
5977 * server.c (handle_query): strcpy() the returned string from paddress()
5978 instead of sprintf().
5c3216e2
OS
5979 * utils.c (paddress): Return phex_nz().
5980
6bd31874
JB
59812010-07-07 Joel Brobecker <brobecker@adacore.com>
5982
5983 * server.c (handle_v_cont): Call mourn_inferior if process
5984 just exited.
5985 (myresume): Likewise.
5986
0fb4aa4b
PA
59872010-07-01 Pedro Alves <pedro@codesourcery.com>
5988
5989 Static tracepoints, and integration with UST.
5990
5991 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5992 * mem-break.c (uninsert_all_breakpoints)
5993 (reinsert_all_breakpoints): New.
5994 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5995 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5996 (gdb_agent_ust_loaded, helper_thread_id)
5997 (gdb_agent_helper_thread_id): New macros.
5998 (struct ipa_sym_addresses): Add addr_ust_loaded,
5999 addr_helper_thread_id, addr_cmd_buf.
6000 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6001 (in_process_agent_loaded_ust): New.
6002 (write_e_ust_not_loaded): New.
6003 (maybe_write_ipa_ust_not_loaded): New.
6004 (struct collect_static_trace_data_action): New.
6005 (enum tracepoint_type) <static_tracepoint>: New.
6006 (struct tracepoint) <handle>: Mention static tracepoints.
6007 (struct static_tracepoint_ctx): New.
6008 (CMD_BUF_SIZE): New.
6009 (add_tracepoint_action): Handle static tracepoint actions.
6010 (unprobe_marker_at): New.
6011 (clear_installed_tracepoints): Handle static tracepoints.
6012 (cmd_qtdp): Handle static tracepoints.
6013 (probe_marker_at): New.
6014 (cmd_qtstart): Handle static tracepoints.
6015 (response_tracepoint): Handle static tracepoints.
6016 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6017 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6018 (get_context_regcache): Handle static tracepoints.
6019 (do_action_at_tracepoint): Handle static tracepoint actions.
6020 (traceframe_find_block_type): Handle static trace data blocks.
6021 (traceframe_read_sdata): New.
6022 (download_tracepoints): Download static tracepoint actions.
6023 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6024 (GDB_PROBE_NAME): New.
6025 (ust_ops): New.
6026 (GET_UST_SYM): New.
6027 (USTF): New.
6028 (dlsym_ust): New.
6029 (ust_marker_to_static_tracepoint): New.
6030 (gdb_probe): New.
6031 (collect_ust_data_at_tracepoint): New.
6032 (gdb_ust_probe): New.
6033 (UNIX_PATH_MAX, SOCK_DIR): New.
6034 (gdb_ust_connect_sync_socket): New.
6035 (resume_thread, stop_thread): New.
6036 (run_inferior_command): New.
6037 (init_named_socket): New.
6038 (gdb_ust_socket_init): New.
6039 (cstr_to_hexstr): New.
6040 (next_st): New.
6041 (first_marker, next_marker): New.
6042 (response_ust_marker): New.
6043 (cmd_qtfstm, cmd_qtsstm): New.
6044 (unprobe_marker_at, probe_marker_at): New.
6045 (cmd_qtstmat, gdb_ust_thread): New.
6046 (gdb_ust_init): New.
6047 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6048 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6049 (ST_REGENTRY): New.
6050 (x86_64_st_collect_regmap): New.
6051 (X86_64_NUM_ST_COLLECT_GREGS): New.
6052 (AMD64_RIP_REGNUM): New.
6053 (supply_static_tracepoint_registers): New.
6054 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6055 (ST_REGENTRY): New.
6056 (i386_st_collect_regmap): New.
6057 (i386_NUM_ST_COLLECT_GREGS): New.
6058 (supply_static_tracepoint_registers): New.
6059 * server.c (handle_query): Handle qXfer:statictrace:read.
6060 <qSupported>: Report support for StaticTracepoints, and
6061 qXfer:statictrace:read features.
6062 * server.h (traceframe_read_sdata)
6063 (supply_static_tracepoint_registers): Declare.
6064 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6065 (unpack_varlen_hex): Include in IPA build.
6066 * Makefile.in (ustlibs, ustinc): New.
6067 (IPA_OBJS): Add remote-utils-ipa.o.
6068 ($(IPA_LIB)): Link -ldl and -lpthread.
6069 (UST_CFLAGS): New.
6070 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6071 * config.in, configure: Regenerate.
6072
9e4344e5
PA
60732010-06-20 Ian Lance Taylor <iant@google.com>
6074 Pedro Alves <pedro@codesourcery.com>
6075
6076 * linux-x86-low.c (always_true): Delete.
6077 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6078 trying to fool the compiler with always_true.
6079
c6beb2cb
PA
60802010-06-20 Pedro Alves <pedro@codesourcery.com>
6081
6082 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6083 conditions in gdbserver.
6084
d2ed6730
UW
60852010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6086
6087 * spu-low.c (spu_read_memory): Wrap around local store limit.
6088 (spu_write_memory): Likewise.
6089
4e29fb54
PA
60902010-06-15 Pedro Alves <pedro@codesourcery.com>
6091
6092 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6093 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6094 LONGEST uses.
6095 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6096 uses.
6097 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6098 uses with LONGEST uses.
6099
6a271cae
PA
61002010-06-14 Stan Shebs <stan@codesourcery.com>
6101 Pedro Alves <pedro@codesourcery.com>
6102
6103 Bytecode compiler.
6104
6105 * linux-x86-low.c: Include limits.h.
6106 (add_insns): New.
6107 (always_true): New.
6108 (EMIT_ASM): New.
6109 (EMIT_ASM32): New.
6110 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6111 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6112 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6113 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6114 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6115 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6116 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6117 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6118 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6119 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6120 (amd64_emit_void_call_2): New.
6121 (amd64_emit_ops): New.
6122 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6123 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6124 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6125 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6126 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6127 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6128 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6129 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6130 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6131 (i386_emit_stack_adjust, i386_emit_int_call_1)
6132 (i386_emit_void_call_2): New.
6133 (i386_emit_ops): New.
6134 (x86_emit_ops): New.
6135 (the_low_target): Install x86_emit_ops.
6136 * server.h (struct emit_ops): New.
6137 (get_raw_reg_func_addr): Declare.
6138 (current_insn_ptr, emit_error): Declare.
6139 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6140 (set_trace_state_variable_value): New defines.
6141 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6142 addr_get_trace_state_variable_value and
6143 addr_set_trace_state_variable_value.
6144 (symbol_list): New fields for get_raw_reg,
6145 get_trace_state_variable_value and set_trace_state_variable_value.
6146 (condfn): New typedef.
6147 (struct tracepoint): New field `compiled_cond'.
6148 (do_action_at_tracepoint): Clear compiled_cond.
6149 (get_trace_state_variable_value, set_trace_state_variable_value):
6150 Export in the IPA.
6151 (condition_true_at_tracepoint): If there's a compiled condition,
6152 run that.
6153 (current_insn_ptr, emit_error): New globals.
6154 (struct bytecode_address): New.
6155 (get_raw_reg_func_addr): New.
6156 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6157 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6158 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6159 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6160 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6161 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6162 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6163 (compile_tracepoint_condition, compile_bytecodes): New.
6164 * target.h (emit_ops): Forward declare.
6165 (struct target_ops): New field emit_ops.
6166 (target_emit_ops): New.
6167 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6168 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6169 * linux-low.c (linux_emit_ops): New.
6170 (linux_target_ops): Install it.
6171 * linux-low.h (struct linux_target_ops): New field emit_ops.
6172
92b72907
UW
61732010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6174
6175 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6176 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6177
fa593d66
PA
61782010-06-01 Pedro Alves <pedro@codesourcery.com>
6179 Stan Shebs <stan@codesourcery.com>
6180
6181 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6182 (all): Depend on $(extra_libraries).
6183 (install-only): Install the IPA.
6184 (IPA_OBJS, IPA_LIB): New.
6185 (clean): Remove the IPA lib.
6186 (IPAGENT_CFLAGS): New.
6187 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6188 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6189 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6190 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6191 * configure.ac: Check for atomic builtins support in the compiler.
6192 (IPA_DEPFILES, extra_libraries): Define.
6193 * configure.srv (ipa_obj): Add description.
6194 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6195 (i[34567]86-*-linux*): Set ipa_obj.
6196 (x86_64-*-linux*): Set ipa_obj.
6197 * linux-low.c (stabilizing_threads): New.
6198 (supports_fast_tracepoints): New.
6199 (linux_detach): Stabilize threads before detaching.
6200 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6201 the lwp is either not stabilizing, or is moving out of a jump pad.
6202 (linux_fast_tracepoint_collecting): New.
6203 (maybe_move_out_of_jump_pad): New.
6204 (enqueue_one_deferred_signal): New.
6205 (dequeue_one_deferred_signal): New.
6206 (linux_wait_for_event_1): If moving out of a jump pad, defer
6207 pending signals to later.
6208 (linux_stabilize_threads): New.
6209 (linux_wait_1): Check if threads need moving out of jump pads, and
6210 do it if so.
6211 (stuck_in_jump_pad_callback): New.
6212 (move_out_of_jump_pad_callback): New.
6213 (lwp_running): New.
6214 (linux_resume_one_lwp): Handle moving out of jump pads.
6215 (linux_set_resume_request): Dequeue deferred signals.
6216 (need_step_over_p): Also step over fast tracepoint jumps.
6217 (start_step_over): Also uninsert fast tracepoint jumps.
6218 (finish_step_over): Also reinsert fast tracepoint jumps.
6219 (linux_install_fast_tracepoint_jump): New.
6220 (linux_target_ops): Install linux_stabilize_threads and
6221 linux_install_fast_tracepoint_jump_pad.
6222 * linux-low.h (linux_target_ops) <get_thread_area,
6223 install_fast_tracepoint_jump_pad>: New fields.
6224 (struct lwp_info) <collecting_fast_tracepoint,
6225 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6226 (linux_get_thread_area): Declare.
6227 * linux-x86-low.c (jump_insn): New.
6228 (x86_get_thread_area): New.
6229 (append_insns): New.
6230 (push_opcode): New.
6231 (amd64_install_fast_tracepoint_jump_pad): New.
6232 (i386_install_fast_tracepoint_jump_pad): New.
6233 (x86_install_fast_tracepoint_jump_pad): New.
6234 (the_low_target): Install x86_get_thread_area and
6235 x86_install_fast_tracepoint_jump_pad.
6236 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6237 (struct fast_tracepoint_jump): New.
6238 (fast_tracepoint_jump_insn): New.
6239 (fast_tracepoint_jump_shadow): New.
6240 (find_fast_tracepoint_jump_at): New.
6241 (fast_tracepoint_jump_here): New.
6242 (delete_fast_tracepoint_jump): New.
6243 (set_fast_tracepoint_jump): New.
6244 (uninsert_fast_tracepoint_jumps_at): New.
6245 (reinsert_fast_tracepoint_jumps_at): New.
6246 (set_breakpoint_at): Use write_inferior_memory.
6247 (uninsert_raw_breakpoint): Use write_inferior_memory.
6248 (check_mem_read): Mask out fast tracepoint jumps.
6249 (check_mem_write): Mask out fast tracepoint jumps.
6250 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6251 (set_fast_tracepoint_jump): Declare.
6252 (delete_fast_tracepoint_jump)
6253 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6254 (reinsert_fast_tracepoint_jumps_at): Declare.
6255 * regcache.c: Don't compile many functions when building the
6256 in-process agent library.
6257 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6258 the register buffer in the heap.
6259 (free_register_cache): If the register buffer isn't owned by the
6260 regcache, don't free it.
6261 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6262 pre-existing register caches.
6263 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6264 type.
6265 (convert_ascii_to_int): : Constify `from' parameter type.
6266 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6267 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6268 the needed buffer in-place.
6269 (relocate_instruction): New.
6270 * server.c (handle_query) <qSymbols>: If the target supports
6271 tracepoints, give it a chance of looking up symbols. Report
6272 support for fast tracepoints.
6273 (handle_status): Stabilize threads.
6274 (process_serial_event): Adjust.
6275 * server.h (struct fast_tracepoint_jump): Forward declare.
6276 (struct process_info) <fast_tracepoint_jumps>: New field.
6277 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6278 (decode_X_packet, decode_M_packet): Adjust.
6279 (relocate_instruction): Declare.
6280 (in_process_agent_loaded): Declare.
6281 (tracepoint_look_up_symbols): Declare.
6282 (struct fast_tpoint_collect_status): Declare.
6283 (fast_tracepoint_collecting): Declare.
6284 (force_unlock_trace_buffer): Declare.
6285 (handle_tracepoint_bkpts): Declare.
6286 (initialize_low_tracepoint)
6287 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6288 * target.h (struct target_ops) <stabilize_threads,
6289 install_fast_tracepoint_jump_pad>: New fields.
6290 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6291 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6292 [HAVE_STDINT_H]: Include stdint.h.
6293 (trace_debug_1): Rename to ...
6294 (trace_vdebug): ... this.
6295 (trace_debug): Rename to ...
6296 (trace_debug_1): ... this. Add `level' parameter.
6297 (trace_debug): New.
6298 (ATTR_USED, ATTR_NOINLINE): New.
6299 (IP_AGENT_EXPORT): New.
6300 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6301 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6302 (about_to_request_buffer_space, trace_buffer_is_full)
6303 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6304 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6305 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6306 (traceframe_write_count, traceframes_created)
6307 (trace_state_variables)
6308 New renaming defines.
6309 (struct ipa_sym_addresses): New.
6310 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6311 (symbol_list): New.
6312 (ipa_sym_addrs): New.
6313 (all_tracepoint_symbols_looked_up): New.
6314 (in_process_agent_loaded): New.
6315 (write_e_ipa_not_loaded): New.
6316 (maybe_write_ipa_not_loaded): New.
6317 (tracepoint_look_up_symbols): New.
6318 (debug_threads) [IN_PROCESS_AGENT]: New.
6319 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6320 (UNKNOWN_SIDE_EFFECTS): New.
6321 (stop_tracing): New.
6322 (flush_trace_buffer): New.
6323 (stop_tracing_bkpt): New.
6324 (flush_trace_buffer_bkpt): New.
6325 (read_inferior_integer): New.
6326 (read_inferior_uinteger): New.
6327 (read_inferior_data_pointer): New.
6328 (write_inferior_data_pointer): New.
6329 (write_inferior_integer): New.
6330 (write_inferior_uinteger): New.
6331 (struct collect_static_trace_data_action): Delete.
6332 (enum tracepoint_type): New.
6333 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6334 <actions_str, step_actions, step_actions_str>: Only include in
6335 GDBserver.
fa593d66
PA
6336 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6337 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6338 (tracepoints): Use IP_AGENT_EXPORT.
6339 (last_tracepoint): Don't include in the IPA.
6340 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6341 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6342 (alloced_trace_state_variables): New.
6343 (trace_state_variables): Use IP_AGENT_EXPORT.
6344 (traceframe_t): Delete unused variable.
6345 (circular_trace_buffer): Don't include in the IPA.
6346 (trace_buffer_start): Delete.
6347 (struct trace_buffer_control): New.
6348 (trace_buffer_free): Delete.
6349 (struct ipa_trace_buffer_control): New.
6350 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6351 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6352 New.
6353 (trace_buffer_ctrl): New.
6354 (TRACE_BUFFER_CTRL_CURR): New.
6355 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6356 Reimplement as macros.
6357 (trace_buffer_wrap): Delete.
6358 (traceframe_write_count, traceframe_read_count)
6359 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6360 (struct tracepoint_hit_ctx) <type>: New field.
6361 (struct fast_tracepoint_ctx): New.
6362 (memory_barrier): New.
6363 (cmpxchg): New.
6364 (record_tracepoint_error): Update atomically in the IPA.
6365 (clear_inferior_trace_buffer): New.
6366 (about_to_request_buffer_space): New.
6367 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6368 updating the same buffer.
6369 (add_tracepoint): Default the tracepoint's type to trap
6370 tracepoint, and orig_size to -1.
6371 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6372 internal variables.
6373 (create_trace_state_variable): New parameter `gdb'. Handle it.
6374 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6375 (cmd_qtdp): Handle fast tracepoints.
6376 (cmd_qtdv): Adjust.
6377 (max_jump_pad_size): New.
6378 (gdb_jump_pad_head): New.
6379 (get_jump_space_head): New.
6380 (claim_jump_space): New.
6381 (sort_tracepoints): New.
6382 (MAX_JUMP_SIZE): New.
6383 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6384 IPA.
6385 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6386 support. Upload fast traceframes, and delete internal IPA
6387 breakpoints.
6388 (stop_tracing_handler): New.
6389 (flush_trace_buffer_handler): New.
6390 (cmd_qtstop): Upload fast tracepoints.
6391 (response_tracepoint): Handle fast tracepoints.
6392 (tracepoint_finished_step): Upload fast traceframes. Set the
6393 tracepoint hit context's tracepoint type.
6394 (handle_tracepoint_bkpts): New.
6395 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6396 type. Add comment about fast tracepoints.
6397 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6398 non-existing action_str field.
6399 (get_context_regcache): Handle fast tracepoints.
6400 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6401 to the regcache.
6402 (fast_tracepoint_from_jump_pad_address): New.
6403 (fast_tracepoint_from_ipa_tpoint_address): New.
6404 (collecting_t): New.
6405 (force_unlock_trace_buffer): New.
6406 (fast_tracepoint_collecting): New.
6407 (collecting): New.
6408 (gdb_collect): New.
6409 (write_inferior_data_ptr): New.
6410 (target_tp_heap): New.
6411 (target_malloc): New.
6412 (download_agent_expr): New.
6413 (UALIGN): New.
6414 (download_tracepoints): New.
6415 (download_trace_state_variables): New.
6416 (upload_fast_traceframes): New.
6417 (IPA_FIRST_TRACEFRAME): New.
6418 (IPA_NEXT_TRACEFRAME_1): New.
6419 (IPA_NEXT_TRACEFRAME): New.
6420 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6421 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6422 (gdb_jump_pad_buffer_end): New.
6423 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6424 (initialize_tracepoint): Adjust.
6425 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6426 buffer. Initialize the low module.
6427 * utils.c (PREFIX, TOOLNAME): New.
6428 (malloc_failure): Use PREFIX.
6429 (error): In the IPA, an error causes an exit.
6430 (fatal, warning): Use PREFIX.
6431 (internal_error): Use TOOLNAME.
6432 (NUMCELLS): Increase to 10.
6433 * configure, config.in: Regenerate.
6434
d149dd1d
PA
64352010-06-01 Pedro Alves <pedro@codesourcery.com>
6436
6437 * server.c (handle_query) <qSupported>: Do two passes over the
6438 qSupported string to avoid nesting strtok.
6439
f6528abd
JK
64402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6441
6442 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6443 (CDEPS): New.
6444 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6445 -Wl,--dynamic-list.
6446 * configure: Regenerate.
6447 * proc-service.list: New.
6448
ca2a87a0
JK
64492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6450
6451 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6452 New comment.
6453
363a6e9f
OS
64542010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6455
6456 * gdbreplay.c (remote_open): Check error return from socket() call by
6457 its equality to -1 not by it being negative.
6458 * remote-utils.c (remote_open): Likewise.
6459
d23b6cb1
PA
64602010-05-23 Pedro Alves <pedro@codesourcery.com>
6461
6462 * config.h: Regenerate.
6463
28d3cf85
MK
64642010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6465
6466 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6467 doesn't provide PTRACE_GET_THREAD_AREA.
6468
fea36a59
MK
64692010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6470
6471 * linux-m68k-low.c: Include <asm/ptrace.h>
6472 (ps_get_thread_area): Implement.
6473
24b066ba
DE
64742010-05-03 Doug Evans <dje@google.com>
6475
6476 * event-loop.c (struct callback_event): New struct.
6477 (callback_list): New global.
6478 (append_callback_event, delete_callback_event): New functions.
6479 (process_callback): New function.
6480 (start_event_loop): Call it.
6481 * remote-utils.c (NOT_SCHEDULED): Define.
6482 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6483 moved out of readchar.
6484 (readchar): Rewrite. Call reschedule before returning.
6485 (reset_readchar): New function.
6486 (remote_close): Call it.
6487 (process_remaining, reschedule): New functions.
6488 * server.h (callback_handler_func): New typedef.
6489 (append_callback_event, delete_callback_event): Declare.
6490
9836d6ea
PA
64912010-05-03 Pedro Alves <pedro@codesourcery.com>
6492
6493 * proc-service.c (ps_pglobal_lookup): Use
6494 thread_db_look_up_one_symbol.
6495 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6496 parameter. Use it instead of all_symbols_looked_up.
6497 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6498 field.
6499 (all_symbols_looked_up): Don't declare.
6500 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6501 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6502 field.
6503 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6504 Set all_symbols_looked_up here.
6505 (thread_db_look_up_one_symbol): New.
6506 (thread_db_get_tls_address): Adjust.
6507 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6508 thread_db object on the heap, and tentatively set it in the
6509 process structure.
6510 (thread_db_init): Don't set all_symbols_looked_up here.
6511 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6512
7984d532
PA
65132010-05-03 Pedro Alves <pedro@codesourcery.com>
6514
6515 * linux-low.c (linux_kill, linux_detach): Adjust.
6516 (status_pending_p_callback): Remove redundant statement. Check
6517 for !TARGET_WAITIKIND_IGNORE, instead of
6518 TARGET_WAITKIND_STOPPED.
6519 (handle_tracepoints): Make sure LWP is locked. Adjust.
6520 (linux_wait_for_event_1): Adjust.
6521 (linux_cancel_breakpoints): New.
6522 (unsuspend_one_lwp): New.
6523 (unsuspend_all_lwps): New.
6524 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6525 (send_sigstop_callback): Change return type to int, add new
6526 `except' parameter and handle it.
6527 (suspend_and_send_sigstop_callback): New.
6528 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6529 pass them down. If SUSPEND, also increment the lwp's suspend
6530 count.
6531 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6532 (need_step_over_p): Don't consider suspended LWPs.
6533 (start_step_over): Adjust.
6534 (proceed_one_lwp): Change return type to int, add new `except'
6535 parameter and handle it.
6536 (unsuspend_and_proceed_one_lwp): New.
6537 (proceed_all_lwps): Use find_inferior instead of
6538 for_each_inferior.
6539 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6540 also decrement the suspend count of LWPs. Pass `except' down,
6541 instead of hacking its suspend count.
6542 (linux_pause_all): Add `freeze' parameter. Adjust.
6543 (linux_unpause_all): New.
6544 (linux_target_ops): Install linux_unpause_all.
6545 * server.c (handle_status): Adjust.
6546 * target.h (struct target_ops): New fields `unpause_all' and
6547 `cancel_breakpoints'. Add new parameter to `pause_all'.
6548 (pause_all): Add new `freeze' parameter.
6549 (unpause_all): New.
6550 (cancel_breakpoints): New.
6551 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6552 cancel breakpoints.
6553 (cmd_qtstart): Pause threads.
6554 (stop_tracing): Pause threads, and cancel breakpoints.
6555 * win32-low.c (win32_target_ops): Adjust.
6556
e471f25b
PA
65572010-05-03 Pedro Alves <pedro@codesourcery.com>
6558
6559 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6560 the inferior right away from here...
6561 (linux_wait_1): ... to here, and adjust to check the thread's
6562 last_resume_kind instead of the lwp's step or stop_expected flags.
6563
1915ef4f
PA
65642010-05-02 Pedro Alves <pedro@codesourcery.com>
6565
6566 * README: Use consistent `GDB' and `GDBserver' spellings.
6567
f9e39928
PA
65682010-05-02 Pedro Alves <pedro@codesourcery.com>
6569
6570 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6571 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6572 (linux_detach_one_lwp): Assume the lwp is stopped.
6573 (any_thread_of): Delete.
6574 (linux_detach): Stop all lwps here. Don't blindly delete all
6575 breakpoints.
6576 (delete_lwp_callback): New.
6577 (linux_mourn): Delete all lwps of the process that is gone.
6578 (linux_wait_1): Don't delete the last lwp of the process here.
6579 * mem-break.h (mark_breakpoints_out): Declare.
6580 * mem-break.c (mark_breakpoints_out): New.
6581 (free_all_breakpoints): Use it.
6582 * server.c (handle_target_event): If the process is gone, mark
6583 breakpoints out.
6584 * thread-db.c (struct thread_db) <create_bp>: New field.
6585 (thread_db_enable_reporting): Fix prototype. Store a thread event
6586 breakpoint reference in the thread_db struct.
6587 (thread_db_load_search): Clear the thread_db object.
6588 (try_thread_db_load_1): Ditto.
6589 (switch_to_process): New.
6590 (disable_thread_event_reporting): Use it.
6591 (remove_thread_event_breakpoints): New.
6592 (thread_db_detach, thread_db_mourn): Use it.
6593
1e7fc18c
PA
65942010-05-01 Pedro Alves <pedro@codesourcery.com>
6595
6596 * linux-low.c (linux_enable_event_reporting): New.
6597 (linux_wait_for_event_1, handle_extended_wait): Use it.
6598
02fc4de7
PA
65992010-04-30 Pedro Alves <pedro@codesourcery.com>
6600
6601 * linux-low.c (linux_kill_one_lwp, linux_kill)
6602 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6603 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6604 SIGSTOP even if the LWP is stopped.
6605 (send_sigstop_callback): New.
6606 (stop_all_lwps): Use send_sigstop_callback instead.
6607 (linux_resume_one_thread): Adjust.
6608 (proceed_one_lwp): Still proceed an LWP that the client has
6609 requested to stop, if we haven't reported it as stopped yet. Make
6610 sure that LWPs the client want stopped, have a pending SIGSTOP.
6611
bc3b5632
DE
66122010-04-26 Doug Evans <dje@google.com>
6613
ae1ada35
DE
6614 * server.c (handle_general_set): Make static.
6615
bc3b5632
DE
6616 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6617 Print received char after testing for error/eof instead of before.
6618 (input_interrupt): Tweak comment.
6619
65730243
DE
66202010-04-23 Doug Evans <dje@google.com>
6621
6622 * server.c (start_inferior): Print inferior argv if --debug.
6623
a8ae7dc0
AR
66242010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6625
6626 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6627 * nto-x86-low.c: Include server.h
6628
1c07cc19
PM
66292010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6630
6631 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6632 be consistent with other sources of this directory.
6633 (init_registers_amd64): Correct name of source file of this function
6634 in the comment.
6635
e0a61e09
PM
66362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6637
6638 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6639 64-bit executables.
6640
54709339
PM
66412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6642
6643 * win32-i386-low.c: Add 64-bit support.
6644 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6645 (init_registers_amd64): Declare.
6646 (mappings): Add 64-bit version of array.
6647 (init_windows_x86): New function.
6648 (the_low_target): Change init_arch field to init_windows_x86.
6649
e8f0053d
PM
66502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6651
6652 * win32-low.c: Adapt to support also 64-bit architecture.
6653 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6654 (get_image_name): Use SIZE_T type for local variable `done'.
6655 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6656 (toolhelp_get_dll_name): Idem.
6657 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6658 Use uintptr_t typecast to avoid warning.
6659 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6660 (handle_exception): Use phex_nz to avoid warning.
6661 (win32_wait): Remove unused local variable `process'.
6662
c481e77e
PM
66632010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6664
6665 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6666 `amd64-avx.o'.
6667
12ea4b69
PM
66682010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6669
6670 * configure.ac: Use `ws2_32' library for srv_mingw.
6671 * configure: Regenerate.
6672 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6673 * remote-utils.c: Likewise.
6674
f6d1620c
L
66752010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6676
6677 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6678 if __x86_64__ is defined.
6679
8e642873
PM
66802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6681
6682 * configure: Regenerate.
6683
711e434b
PM
66842010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6685
6686 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6687 * target.h (target_ops): New get_tib_address field.
6688 * win32-low.h (win32_thread_info): Add thread_local_base field.
6689 * win32-low.c (child_add_thread): Add tlb argument.
6690 Set thread_local_base field to TLB.
6691 (get_child_debug_event): Adapt to child_add_thread change.
6692 (win32_get_tib_address): New function.
6693 (win32_target_ops): Set get_tib_address field to
6694 win32_get_tib_address.
6695 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6696
505106cd
PA
66972010-04-12 Pedro Alves <pedro@codesourcery.com>
6698
505106cd
PA
6699 * linux-low.c (linux_mourn): Also remove the process.
6700 * server.c (handle_target_event): Don't remove the process here.
6701 * nto-low.c (nto_mourn): New.
6702 (nto_target_ops): Install it.
6703 * spu-low.c (spu_mourn): New.
6704 (spu_target_ops): Install it.
6705 * win32-low.c (win32_mourn): New.
6706 (win32_target_ops): Install it.
6707
e8470a06
PA
67082010-04-12 Pedro Alves <pedro@codesourcery.com>
6709
6710 * server.h (buffer_xml_printf): Remove redundant `;'.
6711
45ba0d02
PA
67122010-04-12 Pedro Alves <pedro@codesourcery.com>
6713
6714 * regcache.c (set_register_cache): Invalidate regcaches before
6715 changing the register cache layout.
6716 (regcache_invalidate_one): Allow a NULL regcache.
6717 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6718 regcaches before changing the register cache layout or the target
6719 regsets.
6720
59e04013
L
67212010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6722
6723 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6724 variable warning on Linux/x86-64.
6725
8336d594
PA
67262010-04-11 Pedro Alves <pedro@codesourcery.com>
6727
6728 GDBserver disconnected tracing support.
6729
6730 * linux-low.c (linux_remove_process): Delete.
6731 (add_lwp): Don't set last_resume_kind here.
6732 (linux_kill): Use `mourn'.
6733 (linux_detach): Use `thread_db_detach', and `mourn'.
6734 (linux_mourn): New.
6735 (linux_attach_lwp_1): Adjust comment.
6736 (linux_attach): last_resume_kind moved the thread_info; adjust.
6737 (status_pending_p_callback): Adjust.
6738 (linux_wait_for_event_1): Adjust.
6739 (count_events_callback, select_singlestep_lwp_callback)
6740 (select_event_lwp_callback, cancel_breakpoints_callback)
6741 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6742 (proceed_one_lwp): Adjust.
6743 (linux_async): Add debug output.
6744 (linux_thread_stopped): New.
6745 (linux_pause_all): New.
6746 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6747 linux_pause_all.
6748 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6749 (thread_db_free): Delete declaration.
6750 (thread_db_detach, thread_db_mourn): Declare.
6751 * thread-db.c (thread_db_init): Use thread_db_mourn.
6752 (thread_db_free): Delete, split in two.
6753 (disable_thread_event_reporting): New.
6754 (thread_db_detach): New.
6755 (thread_db_mourn): New.
6756
6757 * server.h (struct thread_info) <last_resume_kind>: New field.
6758 <attached>: Add comment.
6759 <gdb_detached>: New field.
6760 (handler_func): Change return type to int.
6761 (handle_serial_event, handle_target_event): Ditto.
6762 (gdb_connected): Declare.
6763 (tracing): Delete.
6764 (disconnected_tracing): Declare.
6765 (stop_tracing): Declare.
6766
6767 * server.c (handle_query) <qSupported>: Report support for
6768 disconnected tracing.
6769 (queue_stop_reply_callback): Account for running threads.
6770 (gdb_wants_thread_stopped): New.
6771 (gdb_wants_all_threads_stopped): New.
6772 (gdb_reattached_process): New.
6773 (handle_status): Clear the `gdb_detached' flag of all processes.
6774 In all-stop, stop all threads.
6775 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6776 (process_serial_event): If the remote connection breaks, or if an
6777 exit was forced with "monitor exit", force an event loop exit.
6778 Handle disconnected tracing on detach.
6779 (handle_serial_event): Adjust.
6780 (handle_target_event): If GDB isn't connected, forward events back
6781 to the inferior, unless the last process exited, in which case,
6782 exit gdbserver. Adjust interface.
6783
6784 * remote-utils.c (remote_open): Don't block in accept. Instead
6785 register an event loop source on the listen socket file
6786 descriptor. Refactor bits into ...
6787 (listen_desc): ... this new global.
6788 (gdb_connected): ... this new function.
6789 (enable_async_notification): ... this new function.
6790 (handle_accept_event): ... this new function.
6791 (remote_close): Clear remote_desc.
6792
6793 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6794
6795 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6796 New fields.
6797 (mourn_inferior): Define.
6798 (target_process_qsupported): Avoid the dangling else problem.
6799 (thread_stopped): Define.
6800 (pause_all): Define.
6801 (target_waitstatus_to_string): Declare.
6802 * target.c (target_waitstatus_to_string): New.
6803
6804 * tracepoint.c (tracing): Make extern.
6805 (disconnected_tracing): New.
6806 (stop_tracing): Make extern. Handle tracing stops due to GDB
6807 disconnecting.
6808 (cmd_qtdisconnected): New.
6809 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6810 (handle_tracepoint_general_set): Handle QTDisconnected.
6811
6812 * event-loop.c (event_handler_func): Change return type to int.
6813 (process_event): Bail out if the event handler wants the event
6814 loop to stop.
6815 (handle_file_event): Ditto.
6816 (start_event_loop): Bail out if the event handler wants the event
6817 loop to stop.
6818
6819 * nto-low.c (nto_target_ops): Adjust.
6820 * spu-low.c (spu_wait): Don't remove the process here.
6821 (spu_target_ops): Adjust.
6822 * win32-low.c (win32_wait): Don't remove the process here.
6823 (win32_target_ops): Adjust.
6824
5d267c4c
PA
68252010-04-11 Pedro Alves <pedro@codesourcery.com>
6826
6827 * regcache.c (realloc_register_cache): Invalidate inferior's
6828 regcache before recreating it.
6829
623ccd72
PA
68302010-04-09 Pedro Alves <pedro@codesourcery.com>
6831
6832 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6833
219f2f23
PA
68342010-04-09 Stan Shebs <stan@codesourcery.com>
6835 Pedro Alves <pedro@codesourcery.com>
6836
6837 * server.h (LONGEST): New.
6838 (struct thread_info) <while_stepping>: New field.
6839 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6840 Declare.
6841 (initialize_tracepoint, handle_tracepoint_general_set)
6842 (handle_tracepoint_query, tracepoint_finished_step)
6843 (tracepoint_was_hit, release_while_stepping_state_list):
6844 (current_traceframe): Declare.
6845 * server.c (handle_general_set): Handle tracepoint packets.
6846 (read_memory): New.
6847 (write_memory): New.
6848 (handle_search_memory_1): Use read_memory.
6849 (handle_query): Report support for conditional tracepoints, trace
6850 state variables, and tracepoint sources. Handle tracepoint
6851 queries.
6852 (main): Initialize the tracepoints module.
6853 (process_serial_event): Handle traceframe reads/writes.
6854
6855 * linux-low.c (handle_tracepoints): New.
6856 (linux_wait_1): Call it.
6857 (linux_resume_one_lwp): Handle while-stepping.
6858 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6859 (linux_target_ops): Install them.
6860 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6861 New field.
6862 * linux-x86-low.c (x86_supports_tracepoints): New.
6863 (the_low_target). Install it.
6864
6865 * mem-break.h (delete_breakpoint): Declare.
6866 * mem-break.c (delete_breakpoint): Make external.
6867
6868 * target.h (struct target_ops): Add `supports_tracepoints',
6869 `read_pc', and `write_pc' fields.
6870 (target_supports_tracepoints): Define.
6871 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6872 (phex_nz): New.
6873
6874 * regcache.h (struct regcache) <registers_owned>: New field.
6875 (init_register_cache, regcache_cpy): Declare.
6876 (regcache_read_pc, regcache_write_pc): Declare.
6877 (register_cache_size): Declare.
6878 (supply_regblock): Declare.
6879 * regcache.c (init_register_cache): New.
6880 (new_register_cache): Use it.
6881 (regcache_cpy): New.
6882 (register_cache_size): New.
6883 (supply_regblock): New.
6884 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6885
219f2f23
PA
6886 * tracepoint.c: New.
6887
6888 * Makefile.in (OBS): Add tracepoint.o.
6889 (tracepoint.o): New rule.
6890
3a13a53b
L
68912010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6892
6893 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6894 (i386-mmx.o): New.
6895 (i386-mmx.c): Likewise.
6896 (i386-mmx-linux.o): Likewise.
6897 (i386-mmx-linux.c): Likewise.
6898
6899 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6900 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6901 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6902 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6903
6904 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6905 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6906 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6907
1570b33e
L
69082010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6909
6910 * Makefile.in (clean): Updated.
6911 (i386-avx.o): New.
6912 (i386-avx.c): Likewise.
6913 (i386-avx-linux.o): Likewise.
6914 (i386-avx-linux.c): Likewise.
6915 (amd64-avx.o): Likewise.
6916 (amd64-avx.c): Likewise.
6917 (amd64-avx-linux.o): Likewise.
6918 (amd64-avx-linux.c): Likewise.
6919
6920 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6921 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6922 (srv_amd64_regobj): Add amd64-avx.o.
6923 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6924 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6925 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6926 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6927 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6928 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6929 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6930
6931 * i387-fp.c: Include "i386-xstate.h".
6932 (i387_xsave): New.
6933 (i387_cache_to_xsave): Likewise.
6934 (i387_xsave_to_cache): Likewise.
6935 (x86_xcr0): Likewise.
6936
6937 * i387-fp.h (i387_cache_to_xsave): Likewise.
6938 (i387_xsave_to_cache): Likewise.
6939 (x86_xcr0): Likewise.
6940
6941 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6942 * linux-crisv32-low.c (target_regsets): Likewise.
6943 * linux-m68k-low.c (target_regsets): Likewise.
6944 * linux-mips-low.c (target_regsets): Likewise.
6945 * linux-ppc-low.c (target_regsets): Likewise.
6946 * linux-s390-low.c (target_regsets): Likewise.
6947 * linux-sh-low.c (target_regsets): Likewise.
6948 * linux-sparc-low.c (target_regsets): Likewise.
6949 * linux-xtensa-low.c (target_regsets): Likewise.
6950
6951 * linux-low.c: Include <sys/uio.h>.
6952 (regsets_fetch_inferior_registers): Support nt_type.
6953 (regsets_store_inferior_registers): Likewise.
6954 (linux_process_qsupported): New.
6955 (linux_target_ops): Add linux_process_qsupported.
6956
6957 * linux-low.h (regset_info): Add nt_type.
6958 (linux_target_ops): Add process_qsupported.
6959
6960 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6961 and <sys/uio.h>.
6962 (init_registers_i386_avx_linux): New.
6963 (init_registers_amd64_avx_linux): Likewise.
6964 (xmltarget_i386_linux_no_xml): Likewise.
6965 (xmltarget_amd64_linux_no_xml): Likewise.
6966 (PTRACE_GETREGSET): Likewise.
6967 (PTRACE_SETREGSET): Likewise.
6968 (x86_fill_xstateregset): Likewise.
6969 (x86_store_xstateregset): Likewise.
6970 (use_xml): Likewise.
6971 (x86_linux_update_xmltarget): Likewise.
6972 (x86_linux_process_qsupported): Likewise.
6973 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6974 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6975 init_registers_i386_linux here. Call
6976 x86_linux_update_xmltarget.
6977 (the_low_target): Add x86_linux_process_qsupported.
6978
6979 * server.c (handle_query): Call target_process_qsupported.
6980
6981 * target.h (target_ops): Add process_qsupported.
6982 (target_process_qsupported): New.
6983
fc7238bb
PA
69842010-04-03 Pedro Alves <pedro@codesourcery.com>
6985
6986 * inferiors.c (add_thread): Set last_status kind to
6987 TARGET_WAITKIND_IGNORE.
6988 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6989 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6990 (linux_wait_1): Move `thread' local definition to block that uses
6991 it. Don't NULL initialize `event_child'.
6992 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6993 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6994 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6995
bdabb078
PA
69962010-04-01 Pedro Alves <pedro@codesourcery.com>
6997
6998 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6999 an extended waitstatus, or by a watchpoint.
7000 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7001 thread was stepping or has been stopped by a watchpoint.
7002
d3bbe7a0
PA
70032010-04-01 Pedro Alves <pedro@codesourcery.com>
7004
7005 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7006 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7007 of another, then delete the previous, and validate all
7008 breakpoints.
7009 (validate_inserted_breakpoint): New.
7010 (delete_disabled_breakpoints): New.
7011 (validate_breakpoints): New.
7012 (check_mem_read): Validate breakpoints before trusting their
7013 shadow. Delete disabled breakpoints.
7014 (check_mem_write): Validate breakpoints before trusting they
7015 should be inserted. Delete disabled breakpoints.
7016 * mem-break.h (validate_breakpoints):
7017 * server.c (handle_query): Validate breakpoints when we see a
7018 qSymbol query.
7019
8b07ae33
PA
70202010-04-01 Pedro Alves <pedro@codesourcery.com>
7021
7022 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7023 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7024 if we could tell there's a GDB breakpoint at stop_pc.
7025 (need_step_over_p): Don't do a step over if we find a GDB
7026 breakpoint at the resume PC.
7027
7028 * mem-break.c (struct raw_breakpoint): New.
7029 (enum bkpt_type): New type `gdb_breakpoint'.
7030 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7031 fields. New field `raw'.
7032 (find_raw_breakpoint_at): New.
7033 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7034 breakpoint instead.
7035 (set_breakpoint_at): Adjust.
7036 (delete_raw_breakpoint): New.
7037 (release_breakpoint): New.
7038 (delete_breakpoint): Rename to...
7039 (delete_breakpoint_1): ... this. Add proc parameter. Use
7040 release_breakpoint. Return ENOENT.
7041 (delete_breakpoint): Reimplement.
7042 (find_breakpoint_at): Delete.
7043 (find_gdb_breakpoint_at): New.
7044 (delete_breakpoint_at): Delete.
7045 (set_gdb_breakpoint_at): New.
7046 (delete_gdb_breakpoint_at): New.
7047 (gdb_breakpoint_here): New.
7048 (set_reinsert_breakpoint): Use release_breakpoint.
7049 (uninsert_breakpoint): Rename to ...
7050 (uninsert_raw_breakpoint): ... this.
7051 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7052 (reinsert_raw_breakpoint): Change parameter type to
7053 raw_breakpoint.
7054 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7055 instead.
7056 (check_breakpoints): Adjust. Use release_breakpoint.
7057 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7058 (breakpoint_inserted_here): Ditto.
7059 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7060 Don't trust the breakpoint's shadow if it is not inserted.
7061 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7062 (delete_all_breakpoints): Adjust.
7063 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7064 use delete_breakpoint_1.
7065
7066 * mem-break.h (breakpoints_supported): Delete declaration.
7067 (set_gdb_breakpoint_at): Declare.
7068 (gdb_breakpoint_here): Declare.
7069 (delete_breakpoint_at): Delete.
7070 (delete_gdb_breakpoint_at): Declare.
7071
7072 * server.h (struct raw_breakpoint): Forward declare.
7073 (struct process_info): New field `raw_breakpoints'.
7074
7075 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7076 breakpoints.
7077
6bf5e0ba
PA
70782010-03-24 Pedro Alves <pedro@codesourcery.com>
7079
7080 * linux-low.c (status_pending_p_callback): Fix comment.
7081 (linux_wait_for_event_1): Move most of the internal breakpoint
7082 handling from here...
7083 (linux_wait_1): ... to here.
7084 (count_events_callback): New.
7085 (select_singlestep_lwp_callback): New.
7086 (select_event_lwp_callback): New.
7087 (cancel_breakpoints_callback): New.
7088 (select_event_lwp): New.
7089 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7090 priority to all LWPs that have had events that should be reported
7091 to the client. Cancel breakpoints when about to reporting the
7092 event to the client, not while stopping lwps. No longer cancel
7093 finished single-steps here.
7094 (cancel_finished_single_step): Delete.
7095 (cancel_finished_single_steps): Delete.
7096
414a389f
PA
70972010-03-24 Pedro Alves <pedro@codesourcery.com>
7098
7099 * mem-break.c (enum bkpt_type): New.
7100 (struct breakpoint): New field `type'.
7101 (set_breakpoint_at): Change return type to struct breakpoint
7102 pointer. Set type to `other_breakpoint' by default.
7103 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7104 in the breakpoint list.
7105 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7106 (reinsert_breakpoint): Rename to ...
7107 (reinsert_raw_breakpoint): ... this.
7108 (reinsert_breakpoints_at): Adjust.
7109 * mem-break.h (struct breakpoint): Declare.
7110 (set_breakpoint_at): Change return type to struct breakpoint
7111 pointer.
7112
2280c721
PA
71132010-03-24 Pedro Alves <pedro@codesourcery.com>
7114
7115 * server.c (handle_query): Assign, not compare.
7116
d50171e4
PA
71172010-03-24 Pedro Alves <pedro@codesourcery.com>
7118
7119 Teach linux gdbserver to step-over-breakpoints.
7120
7121 * linux-low.c (can_hardware_single_step): New.
7122 (supports_breakpoints): New.
7123 (handle_extended_wait): If stopping threads, read the stop pc of
7124 the new cloned LWP.
7125 (get_pc): New.
7126 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7127 low target doesn't support retrieving the PC.
7128 (add_lwp): Set last_resume_kind to resume_continue.
7129 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7130 (linux_attach): Don't clear stop_expected. Set the lwp's
7131 last_resume_kind to resume_stop.
7132 (linux_detach_one_lwp): Don't check for removed breakpoints.
7133 (check_removed_breakpoint): Delete.
7134 (status_pending_p): Rename to ...
7135 (status_pending_p_callback): ... this. Don't check for removed
7136 breakpoints. Don't consider threads that are stopped from GDB's
7137 perspective.
7138 (linux_wait_for_lwp): Always read the stop_pc here.
7139 (cancel_breakpoint): New.
7140 (step_over_bkpt): New global.
7141 (linux_wait_for_event_1): Implement stepping over breakpoints.
7142 (gdb_wants_lwp_stopped): New.
7143 (gdb_wants_all_stopped): New.
7144 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7145 single-step traps here. Store the thread's last reported target
7146 wait status.
7147 (send_sigstop): Don't clear stop_expected. Always set it,
7148 instead.
7149 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7150 (cancel_finished_single_step): New.
7151 (cancel_finished_single_steps): New.
7152 (wait_for_sigstop): Don't cancel finished single-step traps here.
7153 (linux_resume_one_lwp): Don't check for removed breakpoints.
7154 Don't set `step' on non-hardware step archs.
7155 (linux_set_resume_request): Ignore resume_stop requests if already
7156 stopping or stopped. Set the lwp's last_resume_kind.
7157 (resume_status_pending_p): Don't check for removed breakpoints.
7158 (need_step_over_p): New.
7159 (start_step_over): New.
7160 (finish_step_over): New.
7161 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7162 requests. Clear the thread's last reported target waitstatus.
7163 Don't use the `suspended' flag. Don't consider pending breakpoints.
7164 (linux_resume): Start a step-over if necessary.
7165 (proceed_one_lwp): New.
7166 (proceed_all_lwps): New.
7167 (unstop_all_lwps): New.
7168 * linux-low.h (struct lwp_info): Rewrite comment for the
7169 `suspended' flag. Add the `stop_pc' field. Delete the
7170 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7171 Add `'last_resume_kind' and `need_step_over' fields.
7172 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7173 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7174 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7175 (set_raw_breakpoint_at): New.
7176 (set_breakpoint_at): Rewrite to use it.
7177 (reinsert_breakpoint_handler): Delete.
7178 (set_reinsert_breakpoint): New.
7179 (reinsert_breakpoint_by_bp): Delete.
7180 (delete_reinsert_breakpoints): New.
7181 (uninsert_breakpoint): Rewrite.
7182 (uninsert_breakpoints_at): New.
7183 (reinsert_breakpoint): Rewrite.
7184 (reinsert_breakpoints_at): New.
7185 (check_breakpoints): Rewrite.
7186 (breakpoint_here): New.
7187 (breakpoint_inserted_here): New.
7188 (check_mem_read): Adjust.
7189 * mem-break.h (breakpoints_supported, breakpoint_here)
7190 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7191 (reinsert_breakpoint_by_bp): Delete declaration.
7192 (delete_reinsert_breakpoints): Declare.
7193 (reinsert_breakpoint): Delete declaration.
7194 (reinsert_breakpoints_at): Declare.
7195 (uninsert_breakpoint): Delete declaration.
7196 (uninsert_breakpoints_at): Declare.
7197 (check_breakpoints): Adjust prototype.
7198 * server.h: Adjust include order.
7199 (struct thread_info): Declare here. Add a `last_status' field.
7200
30ba68cb
MS
72012010-03-23 Michael Snyder <msnyder@vmware.com>
7202
7203 * server.c (crc32): New function.
7204 (handle_query): Add handling for 'qCRC:' request.
7205
b9a881c2
PA
72062010-03-23 Pedro Alves <pedro@codesourcery.com>
7207
7208 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7209 lwp had been stopped by a watchpoint.
7210
e92d13d5
PA
72112010-03-16 Pedro Alves <pedro@codesourcery.com>
7212
7213 * server.h (internal_error): Declare.
7214 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7215 * utils.c (internal_error): New function.
7216
64daa791
AS
72172010-03-15 Andreas Schwab <schwab@redhat.com>
7218
7219 * configure.srv: Fix typo setting srv_regobj.
7220
f52cd8cd
PA
72212010-03-15 Pedro Alves <pedro@codesourcery.com>
7222
7223 * linux-low.c (fetch_register): Avoid passing a non string literal
7224 format to `error'.
7225 (usr_store_inferior_registers): Ditto.
7226
93ae6fdc
PA
72272010-03-14 Pedro Alves <pedro@codesourcery.com>
7228
7229 * linux-low.c (linux_write_memory): Bail out early if peeking
7230 memory failed.
7231
c3adc08c
PA
72322010-03-14 Pedro Alves <pedro@codesourcery.com>
7233
7234 * linux-low.h (struct lwp_info): New fields
7235 `stopped_by_watchpoint' and `stopped_data_address'.
7236 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7237 here, and cache them in the lwp object.
7238 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7239 directly.
7240 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7241 field.
7242 (linux_stopped_by_watchpoint): Rewrite.
7243 (linux_stopped_data_address): Rewrite.
7244
bce522a2
PA
72452010-03-06 Simo Melenius <simo.melenius@iki.fi>
7246
7247 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7248 switching the current inferior, not before.
7249
90884b2b
L
72502010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7251
7252 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7253 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7254 i386-linux.c and amd64-linux.c.
7255 (reg-i386.o): Removed.
7256 (reg-i386.c): Likewise.
7257 (reg-i386-linux.o): Likewise.
7258 (reg-i386-linux.c): Likewise.
7259 (reg-x86-64.o): Likewise.
7260 (reg-x86-64.c): Likewise.
7261 (reg-x86-64-linux.o): Likewise.
7262 (reg-x86-64-linux.c): Likewise.
7263 (i386.o): New.
7264 (i386.c): Likewise.
7265 (i386-linux.o): Likewise.
7266 (i386-linux.c): Likewise.
7267 (amd64.o): Likewise.
7268 (amd64.c): Likewise.
7269 (amd64-linux.o): Likewise.
7270 (amd64-linux.c): Likewise.
7271
7272 * configure.srv (srv_i386_regobj): New.
7273 (srv_i386_linux_regobj): Likewise.
7274 (srv_amd64_regobj): Likewise.
7275 (srv_amd64_linux_regobj): Likewise.
7276 (srv_i386_32bit_xmlfiles): Likewise.
7277 (srv_i386_64bit_xmlfiles): Likewise.
7278 (srv_i386_xmlfiles): Likewise.
7279 (srv_amd64_xmlfiles): Likewise.
7280 (srv_i386_linux_xmlfiles): Likewise.
7281 (srv_amd64_linux_xmlfiles): Likewise.
7282 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7283 srv_xmlfiles to $srv_i386_xmlfiles.
7284 (i[34567]86-*-mingw32ce*): Likewise.
7285 (i[34567]86-*-mingw*): Likewise.
7286 (i[34567]86-*-nto*): Likewise.
7287 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7288 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7289 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7290 (x86_64-*-linux*): Likewise.
7291
7292 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7293 (init_registers_amd64_linux): New.
7294 (x86_arch_setup): Replace init_registers_x86_64_linux with
7295 init_registers_amd64_linux.
7296
193f13e6
MK
72972010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7298
7299 * configure.ac: Check for libdl. If it is not available link against
7300 static libthread_db.
7301 * configure: Regenerate.
7302
85d721b8
PA
73032010-02-22 Pedro Alves <pedro@codesourcery.com>
7304
7305 PR9605
7306
7307 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7308 handing a read watchpoint.
7309 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7310
6076632b
DE
73112010-02-12 Doug Evans <dje@google.com>
7312
7313 * linux-low.c (linux_supports_tracefork_flag): Document.
7314 (linux_look_up_symbols): Add comment.
7315
3327ccf7
L
73162010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7317
7318 * regcache.c (supply_register): Clear regcache if buf is NULL.
7319
0718675c 73202010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7321 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7322
7323 * inferiors.c (find_inferior): Add function documentation.
7324 (unloaded_dll): Handle the case where the unloaded dll has not
7325 been previously registered in the dll list.
7326
177321bd
DJ
73272010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7328
7329 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7330 (thumb2_breakpoint): New.
7331 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7332
2b009048
DJ
73332010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7334
7335 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7336 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7337 breakpoints.
7338
3be029c7
PA
73392010-01-21 Pedro Alves <pedro@codesourcery.com>
7340
7341 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7342
18f5de3b
JK
73432010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7344
7345 * linux-s390-low.c (s390_collect_ptrace_register)
7346 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7347
3743bb4f
DE
73482010-01-21 Doug Evans <dje@google.com>
7349
14ce3065
DE
7350 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7351 (PTRACE_ARG4_TYPE): New macro.
7352 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7353 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7354 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7355 (usr_store_inferior_registers): Ditto.
7356 (linux_read_memory, linux_write_memory): Ditto.
7357 (linux_test_for_tracefork): Ditto.
7358
3743bb4f
DE
7359 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7360 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7361
8b315be5
PA
73622010-01-21 Pedro Alves <pedro@codesourcery.com>
7363
7364 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7365 target.
7366
85492558
PA
73672010-01-21 Pedro Alves <pedro@codesourcery.com>
7368
7369 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7370 prototype to take a regcache. Adjust.
7371
442ea881
PA
73722010-01-20 Pedro Alves <pedro@codesourcery.com>
7373
7374 * regcache.h (struct thread_info): Forward declare.
7375 (struct regcache): New.
7376 (new_register_cache): Adjust prototype.
7377 (get_thread_regcache): Declare.
7378 (free_register_cache): Adjust prototype.
7379 (registers_to_string, registers_from_string): Ditto.
7380 (supply_register, supply_register_by_name, collect_register)
7381 (collect_register_as_string, collect_register_by_name): Ditto.
7382 * regcache.c (struct inferior_regcache_data): Delete.
7383 (get_regcache): Rename to ...
7384 (get_thread_regcache): ... this. Adjust. Switch inferior before
7385 fetching registers.
7386 (regcache_invalidate_one): Adjust.
7387 (regcache_invalidate): Fix prototype.
7388 (new_register_cache): Return the new register cache.
7389 (free_register_cache): Change prototype.
7390 (realloc_register_cache): Adjust.
7391 (registers_to_string): Change prototype to take a regcache. Adjust.
7392 (registers_from_string): Ditto.
7393 (register_data): Ditto.
7394 (supply_register): Ditto.
7395 (supply_register_by_name): Ditto.
7396 (collect_register): Ditto.
7397 (collect_register_as_string): Ditto.
7398 (collect_register_by_name): Ditto.
7399 * server.c (process_serial_event): Adjust.
7400 * linux-low.h (regset_fill_func, regset_store_func): Change
7401 prototype.
7402 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7403 Change prototype.
7404 * linux-low.c (get_stop_pc): Adjust.
7405 (check_removed_breakpoint): Adjust.
7406 (linux_wait_for_event): Adjust.
7407 (linux_resume_one_lwp): Adjust.
7408 (fetch_register): Add regcache parameter. Adjust.
7409 (usr_store_inferior_registers): Ditto.
7410 (regsets_fetch_inferior_registers): Ditto.
7411 (regsets_store_inferior_registers): Ditto.
7412 (linux_fetch_registers, linux_store_registers): Ditto.
7413 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7414 regcache. Adjust.
43aaf8b6
PA
7415 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7416 Ditto.
442ea881
PA
7417 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7418 prototype to take a regcache.
7419 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7420 * remote-utils.c (convert_ascii_to_int, outreg)
7421 (prepare_resume_reply): Change prototype to take a regcache.
7422 Adjust.
7423 * target.h (struct target_ops) <fetch_registers, store_registers>:
7424 Change prototype to take a regcache.
7425 (fetch_inferior_registers, store_inferior_registers): Change
7426 prototype to take a regcache. Adjust.
7427 * proc-service.c (ps_lgetregs): Adjust.
7428 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7429 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7430 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7431 take a regcache. Adjust.
7432 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7433 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7434 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7435 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7436 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7437 (cris_cannot_fetch_register):
7438 (cris_breakpoint_at): Change prototype to take a regcache.
7439 Adjust.
7440 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7441 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7442 to take a regcache. Adjust.
7443 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7444 Adjust.
7445 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7446 take a regcache. Adjust.
7447 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7448 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7449 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7450 * linux-mips-low.c (mips_get_pc):
7451 (mips_set_pc): Change prototype to take a regcache. Adjust.
7452 (mips_reinsert_addr): Adjust.
7453 (mips_collect_register): Change prototype to take a regcache.
7454 Adjust.
7455 (mips_supply_register):
7456 (mips_collect_register_32bit, mips_supply_register_32bit)
7457 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7458 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7459 * linux-ppc-low.c (ppc_supply_ptrace_register)
7460 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7461 (parse_spufs_run): Adjust.
7462 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7463 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7464 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7465 take a regcache. Adjust.
7466 * linux-s390-low.c (s390_collect_ptrace_register)
7467 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7468 (s390_set_pc): Change prototype to take a regcache. Adjust.
7469 (s390_arch_setup): Adjust.
7470 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7471 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7472 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7473 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7474 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7475 regcache. Adjust.
7476 (sparc_breakpoint_at): Adjust.
7477 * linux-xtensa-low.c (xtensa_fill_gregset):
7478 (xtensa_store_gregset):
7479 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7480 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7481 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7482 prototype to take a regcache. Adjust.
7483 * win32-arm-low.c (arm_fetch_inferior_register)
7484 (arm_store_inferior_register): Change prototype to take a
7485 regcache. Adjust.
7486 * win32-i386-low.c (i386_fetch_inferior_register)
7487 (i386_store_inferior_register): Change prototype to take a
7488 regcache. Adjust.
7489 * win32-low.c (child_fetch_inferior_registers)
7490 (child_store_inferior_registers): Change prototype to take a
7491 regcache. Adjust.
7492 (win32_wait): Adjust.
7493 (win32_fetch_inferior_registers): Change prototype to take a
7494 regcache. Adjust.
7495 (win32_store_inferior_registers): Adjust.
7496 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7497 store_inferior_register>: Change prototype to take a regcache.
7498
60c3d7b0
DE
74992010-01-20 Doug Evans <dje@google.com>
7500
7501 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7502 #ifdef.
7503 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7504 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7505
dc146f7c
VP
75062010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7507
7508 * linux-low.c (linux_core_of_thread): New.
7509 (compare_ints, show_process, list_threads): New.
7510 (linux_qxfer_osdata): Report threads and cores.
7511 (linux_target_op): Register linux_core_of_thread.
7512 * remote-utils.c (prepare_resume_reply): Report the core.
7513 (buffer_xml_printf): Support %d specifier.
7514 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7515 New.
7516 (handle_query): Handle qXfer:threads. Announce availability
7517 thereof.
7518 * target.h (struct target_ops): New field core_of_thread.
7519
7803799a
UW
75202010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7521
7522 * Makefile.in (clean): Remove new generated files.
7523 (reg-s390.o, reg-s390.c): Remove rules.
7524 (reg-s390x.o, reg-s390x.c): Likewise.
7525 (s390-linux32.o, s390-linux32.c): Add rules.
7526 (s390-linux64.o, s390-linux64.c): Likewise.
7527 (s390x-linux64.o, s390x-linux64.c): Likewise.
7528 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7529 * linux-s390-low.c: Include <elf.h>.
7530 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7531 (init_registers_s390): Remove prototype.
7532 (init_registers_s390x): Likewise.
7533 (init_registers_s390_linux32): Add prototype.
7534 (init_registers_s390_linux64): Likewise.
7535 (init_registers_s390x_linux64): Likewise.
7536 (s390_num_regs_3264): New define.
7537 (s390_regmap_3264): New global variable.
7538 (s390_cannot_fetch_register): Remove obsolete check.
7539 (s390_cannot_store_register): Likewise.
7540 (s390_collect_ptrace_register): Handle upper/lower register halves.
7541 (s390_supply_ptrace_register): Likewise.
7542 (s390_fill_gregset): Update to register number changes.
7543 (s390_get_hwcap): New routine.
7544 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7545 Install appropriate regmap and register set.
7546
6e7ffa39
JB
75472010-01-01 Joel Brobecker <brobecker@adacore.com>
7548
7549 * server.c (gdbserver_version): Update copyright year to 2010.
7550 * gdbreplay.c (gdbreplay_version): Likewise.
7551
957f3f49
DE
75522009-12-28 Doug Evans <dje@google.com>
7553
7554 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7555 elf/external.h. Include <elf.h> instead but only if necessary.
7556
ca5c370d
PA
75572009-12-28 Pedro Alves <pedro@codesourcery.com>
7558
7559 * linux-low.c (linux_remove_process): Remove `detaching'
7560 parameter. Don't release/detach from thread_db here.
7561 (linux_kill): Release/detach from thread_db here, ...
7562 (linux_detach): ... and here, before actually detaching.
7563 (linux_wait_1): ... and here, when a process exits.
7564 * thread-db.c (any_thread_of): New.
7565 (thread_db_free): Switch the current inferior to a thread of the
7566 passed in process.
7567
4ee62156
DE
75682009-12-21 Doug Evans <dje@google.com>
7569
d90e6a88
DE
7570 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7571
c5f62d5f
DE
7572 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7573 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7574 warning ifndef __NR_tkill. Move setting of errno there too.
7575 Delete unnecessary resetting of errno after syscall.
7576 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7577
10e86dd7
DE
7578 * configure.ac: Check for dladdr.
7579 * config.in: Regenerate.
7580 * configure: Regenerate.
7581 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7582 (try_thread_db_load): Update.
7583
4ee62156
DE
7584 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7585
00f515da
DE
75862009-12-18 Doug Evans <dje@google.com>
7587
e9464885
DE
7588 * event-loop.c: Include unistd.h if it exists.
7589
07d4f67e
DE
7590 * linux-low.c (my_waitpid): Move definition away from being in
7591 between linux_tracefork_child/linux_test_for_tracefork.
7592
00f515da
DE
7593 * gdb_proc_service.h (psaddr_t): Fix type.
7594 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7595 signature to match glibc.
7596
1de1badb
DE
75972009-12-16 Doug Evans <dje@google.com>
7598
7599 * linux-low.c (linux_read_memory): Fix argument to read.
7600
aeeb81d1
PA
76012009-11-26 Pedro Alves <pedro@codesourcery.com>
7602
7603 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7604 events, don't leave current_inferior pointing at null.
7605
10357975
PA
76062009-11-26 Pedro Alves <pedro@codesourcery.com>
7607
7608 * win32-low.c (LOG): Delete.
7609 (OUTMSG): Output to stderr.
7610 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7611 on compile time LOG macro.
7612 (win32_wait): Fix debug output.
7613
cf6e3471
PA
76142009-11-26 Pedro Alves <pedro@codesourcery.com>
7615
7616 * win32-low.c (win32_add_one_solib): If the dll name is
7617 "ntdll.dll", prepend the system directory to the dll path.
7618
0c85e18e
MK
76192009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7620
7621 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7622
9ac544ce 76232009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7624 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7625
7626 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7627 * configure.ac: Check for __mcoldfire__ and set
7628 gdb_cv_m68k_is_coldfire.
7629 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7630 reg-cf.o and reg-m68k.o.
7631 * configure: Regenerated.
7632
fd7dd3e6
PA
76332009-11-16 Pedro Alves <pedro@codesourcery.com>
7634
7635 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7636 Pass it to thread_db_free.
7637 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7638 proper `detaching' argument to linux_remove_process.
7639 * linux-low.h (thread_db_free): Add `detaching' parameter.
7640 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7641 to thread_db_free.
7642 (thread_db_free): Add `detaching' parameter. Only
7643 call td_ta_clear_event if detaching from process.
7644
75aa492e
MK
76452009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7646
7647 * thread-db.c (thread_db_free): Fix typo.
7648
21e1bee4
PP
76492009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7650
7651 PR gdb/10838
7652 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7653
8838b45e
NS
76542009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7655
7656 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7657 with an i686 compiler.
7658 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7659 needed.
7660 * configure: Rebuilt.
7661
8a35fb51
SL
76622009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7663
7664 PR gdb/10783
7665
7666 * server.c (handle_search_memory_1): Correct read_addr initialization
7667 in loop for searching subsequent chunks.
7668
96f15937
PP
76692009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7670
7671 * configure.ac: New --with-libthread-db option.
7672 * thread-db.c: Allow direct dependence on libthread_db.
7673 (thread_db_free): Adjust.
7674 * config.in: Regenerate.
7675 * configure: Likewise.
889bf7c5 7676
5f7d1694
PP
76772009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7678
7679 PR gdb/10757
7680 * thread-db.c (attach_thread): New function.
7681 (maybe_attach_thread): Return success/failure.
7682 (find_new_threads_callback): Adjust.
889bf7c5
PA
7683 (thread_db_find_new_threads): Loop until no new threads.
7684
88e3b899
PA
76852009-10-13 Pedro Alves <pedro@codesourcery.com>
7686
7687 * proc-service.c (ps_lgetregs): Formatting.
7688
cdbfd419
PP
76892009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7690
7691 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7692 * configure.ac: Adjust.
7693 * linux-low.h (struct process_info_private): Move members to struct
7694 thread_db.
7695 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7696 * linux-low.c (linux_remove_process): Adjust.
7697 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7698 * server.c (handle_query): Move code ...
7699 (handle_monitor_command): ... here. New function.
7700 * target.h (struct target_ops): New member.
7701 * thread-db.c (struct thread_db): New.
7702 (libthread_db_search_path): New variable.
7703 (thread_db_create_event, thread_db_enable_reporting)
7704 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7705 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7706 (try_thread_db_load_1, dladdr_to_soname): New functions.
7707 (try_thread_db_load, thread_db_load_search): New functions.
7708 (thread_db_init): Search for libthread_db.
7709 (thread_db_free): New function.
7710 (thread_db_handle_monitor_command): Likewise.
7711 * config.in: Regenerate.
7712 * configure: Regenerate.
889bf7c5 7713
4168d2d6
UW
77142009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7715
7716 * spu-low.c (spu_kill): Wait for inferior to terminate.
7717 Call clear_inferiors.
7718 (spu_detach): Call clear_inferiors.
7719
81ecdfbb
RW
77202009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7721
7722 * aclocal.m4: Regenerate.
7723 * config.in: Likewise.
7724 * configure: Likewise.
7725
0b9ff2c0
UW
77262009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7727
7728 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7729 (parse_spufs_run): New function.
7730 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7731 (ppc_breakpoint_at): Handle SPU breakpoints.
7732
efcbbd14
UW
77332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7734
7735 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7736 (SPUFS_MAGIC): Define.
7737 (spu_enumerate_spu_ids): New function.
7738 (linux_qxfer_spu): New function.
7739 (linux_target_ops): Install linux_qxfer_spu.
7740
f4d9bade
UW
77412009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7742
7743 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7744 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7745 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7746 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7747 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7748 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7749 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7750 (init_registers_powerpc_cell32l): Add prototype.
7751 (init_registers_powerpc_cell64l): Likewise.
7752 (ppc_arch_setup): Detect Cell/B.E. architecture.
7753
96e946ca
RW
77542009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7755
7756 * Makefile.in (datarootdir): New variable.
7757
58d6951d
DJ
77582009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7759
7760 * linux-low.c (linux_write_memory): Update debugging output.
7761 * Makefile.in (clean): Add new descriptions.
7762 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7763 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7764 * configure.srv: Add new files for arm*-*-linux*.
7765 * linux-arm-low.c: Add new declarations.
7766 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7767 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7768 (HWCAP_VFPv3D16): New.
7769 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7770 instead of __IWMMXT__.
7771 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7772 (arm_arch_setup): New.
7773 (target_regsets): Remove #ifdef. Add VFP regset.
7774 (the_low_target): Use arm_arch_setup.
7775
12b42a12
DJ
77762009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7777
7778 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7779 the main thread again.
7780
ac8c974e
AR
77812009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7782
7783 Adding Neutrino gdbserver.
7784 * configure: Regenerated.
7785 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7786 * configure.srv (i[34567]86-*-nto*): New target.
7787 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7788 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7789 (nto_comctrl) [__QNX__]: New function.
7790 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7791
4424e0c3 77922009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7793
7794 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7795 srv_tgtobj.
7796
912cf4ba
PA
77972009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7798 Pedro Alves <pedro@codesourcery.com>
7799
7800 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7801 don't support CONTEXT_EXTENDED_REGISTERS.
7802 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7803 (the_low_target): Install them.
7804 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7805 failing with ERROR_PIPE_NOT_CONNECTED.
7806
aa5ca48f
DE
78072009-06-30 Doug Evans <dje@google.com>
7808 Pierre Muller <muller@ics.u-strasbg.fr>
7809
7810 Add h/w watchpoint support to x86-linux, win32-i386.
7811 * Makefile.in (SFILES): Add i386-low.c
7812 (i386_low_h): Define.
7813 (i386-low.o): Add dependencies.
7814 (linux-x86-low.o): Add i386-low.h dependency.
7815 (win32-i386-low.o): Ditto.
7816 * i386-low.c: New file.
7817 * i386-low.h: New file.
7818 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7819 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7820 * linux-low.c (linux_add_process): Initialize arch_private.
7821 (linux_remove_process): Free arch_private.
7822 (add_lwp): Initialize arch_private.
7823 (delete_lwp): Free arch_private.
7824 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7825 provided.
7826 * linux-low.h (process_info_private): New member arch_private.
7827 (lwp_info): New member arch_private.
7828 (linux_target_ops): New members new_process, new_thread,
7829 prepare_to_resume.
7830 (ptid_of): New macro.
7831 * linux-x86-low.c: Include stddef.h, i386-low.h.
7832 (arch_process_info): New struct.
7833 (arch_lwp_info): New struct.
7834 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7835 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7836 (i386_dr_low_get_status): New function.
7837 (x86_insert_point, x86_remove_point): New functions.
7838 (x86_stopped_by_watchpoint): New function.
7839 (x86_stopped_data_address): New function.
7840 (x86_linux_new_process, x86_linux_new_thread): New functions.
7841 (x86_linux_prepare_to_resume): New function.
7842 (the_low_target): Add entries for insert_point, remove_point,
7843 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7844 prepare_to_resume.
7845 * server.c (debug_hw_points): New global.
7846 (monitor_show_help): Document set debug-hw-points.
7847 (handle_query): Process "set debug-hw-points".
7848 * server.h (debug_hw_points): Declare.
7849 (paddress): Declare.
7850 * utils.c (NUMCELLS, CELLSIZE): New macros.
7851 (get_sell, xsnprintf, paddress): New functions.
7852 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7853 remove_point, stopped_by_watchpoint, stopped_data_address.
7854 * win32-i386-low.c: Include i386-low.h.
7855 (debug_reg_state): Replaces dr.
7856 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7857 (i386_dr_low_get_status): New function.
7858 (i386_insert_point, i386_remove_point): New functions.
7859 (i386_stopped_by_watchpoint): New function.
7860 (i386_stopped_data_address): New function.
7861 (i386_initial_stuff): Update.
7862 (get_thread_context,set_thread_context,i386_thread_added): Update.
7863 (the_low_target): Add entries for insert_point,
7864 remove_point, stopped_by_watchpoint, stopped_data_address.
7865 * win32-low.c (win32_insert_watchpoint): New function.
7866 (win32_remove_watchpoint): New function.
7867 (win32_stopped_by_watchpoint): New function.
7868 (win32_stopped_data_address): New function.
7869 (win32_target_ops): Add entries for insert_watchpoint,
7870 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7871 * win32-low.h (win32_target_ops): New members insert_point,
7872 remove_point, stopped_by_watchpoint, stopped_data_address.
7873
d993e290
PA
78742009-06-25 Pedro Alves <pedro@codesourcery.com>
7875
7876 * server.c (process_serial_event): Re-return unsupported, not
7877 error, if the type isn't recognized. Re-allow supporting only
7878 insert or remove packets. Also call require_running for
7879 breakpoints. Add missing break statement to default case. Tidy.
7880 * target.h (struct target_ops): Rename insert_watchpoint to
7881 insert_point, and remove_watchpoint to remove_point.
7882
7883 * linux-low.h (struct linux_target_ops): Likewise.
7884 * linux-low.c (linux_insert_watchpoint): Rename to ...
7885 (linux_insert_point): ... this. Adjust.
7886 (linux_remove_watchpoint): Rename to ...
7887 (linux_remove_point): ... this. Adjust.
7888 (linux_target_ops): Adjust.
7889 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7890 (cris_insert_point): ... this.
7891 (cris_remove_watchpoint): Rename to ...
7892 (cris_remove_point): ... this.
7893 (the_low_target): Adjust.
7894
0f54c268
PM
78952009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7896
7897 * server.c (handle_v_kill): Pass signal_pid to
7898 kill_inferior if multi_process is zero.
7899
c6314022
AR
79002009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7901
7902 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7903 * target.h (target_ops): Comment for *_watchpoint to make it clear
7904 the functions can get types '0' and '1'.
7905
4463ce24
AR
79062009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7907
7908 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7909 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7910 * regcache.c (get_regcache): Likewise.
7911 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7912 * win32-low.c (child_fetch_inferior_registers): Remove check for
7913 regno 0.
7914
cf8fd78b
PA
79152009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7916 Pedro Alves <pedro@codesourcery.com>
7917
7918 * target.h (struct target_ops) <supports_multi_process>: New
7919 callback.
7920 (target_supports_multi_process): New.
7921 * server.c (handle_query): Even if GDB reports support, only
7922 enable multi-process if the target also supports it. Report
7923 multi-process support only if the target backend supports it.
7924 * linux-low.c (linux_supports_multi_process): New function.
7925 (linux_target_ops): Install it as target_supports_multi_process
7926 callback.
7927
47c0c975
DE
79282009-05-24 Doug Evans <dje@google.com>
7929
e09875d4
DE
7930 Global renaming of find_thread_pid to find_thread_ptid.
7931 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7932 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7933 All callers updated.
7934
e27d73f6
DE
7935 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7936 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7937 directly.
7938
47c0c975
DE
7939 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7940 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7941 (linux_resume_one_lwp): Ditto.
7942
2acc282a
DE
79432009-05-23 Doug Evans <dje@google.com>
7944
7945 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7946 from struct inferior_list_entry * to struct lwp_info *.
7947 All callers updated.
7948
9f1036c1
DE
79492009-05-13 Doug Evans <dje@google.com>
7950
7951 * linux-x86-low.c: Don't include assert.h.
7952 (x86_siginfo_fixup): Use fatal, not assert.
7953 (x86_arch_setup): Fix comment.
7954
d0722149
DE
79552009-05-12 Doug Evans <dje@google.com>
7956
7957 Biarch support for i386/amd64 gdbserver.
7958 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7959 Add linux-x86-low.c.
7960 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7961 (linux-x86-low.o): Add.
7962 * linux-x86-64-low.c: Delete.
7963 * linux-i386-low.c: Delete.
7964 * linux-x86-low.c: New file.
7965 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7966 linux-x86-low.o.
7967 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7968 linux-x86-low.o.
7969 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7970 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7971 (linux_child_pid_to_exec_file): New function.
7972 (elf_64_header_p, elf_64_file_p): New functions.
7973 (siginfo_fixup): New function.
7974 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7975 give target a chance to convert layout.
7976 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7977 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7978
fdeb2a12
DE
79792009-05-07 Doug Evans <dje@google.com>
7980
7981 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7982 (regsets_store_inferior_registers): Ditto.
7983
a6dbe5df
PA
79842009-05-06 Pedro Alves <pedro@codesourcery.com>
7985
7986 PR server/10048
7987
7988 * linux-low.c (must_set_ptrace_flags): Delete.
7989 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7990 of the global.
7991 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7992 `lwp->must_set_ptrace_flags' instead.
ba42693b 7993 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7994 (linux_wait_1): ... not here.
7995
5091eb23
DE
79962009-04-30 Doug Evans <dje@google.com>
7997
9f767825
DE
7998 * inferiors.c (started_inferior_callback): New function.
7999 (attached_inferior_callback): New function.
8000 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8001 * server.c (print_started_pid, print_attached_pid): New functions.
8002 (detach_or_kill_for_exit): New function.
8003 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8004 * server.h (have_started_inferiors_p): Declare.
8005 (have_attached_inferiors_p): Declare.
8006
5091eb23
DE
8007 * inferiors.c (remove_process): Fix memory leak, free process.
8008 * linux-low.c (linux_remove_process): New function.
8009 (linux_kill): Call it instead of remove_process.
8010 (linux_detach, linux_wait_1): Ditto.
8011
155c8968
PA
80122009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8013
8014 * configure.srv: Add x86 Windows CE target.
8015
7fe519cb
UW
80162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8017
8018 * inferiors.c (get_thread_process): Make global.
8019 * server.h (get_thread_process): Add prototype.
8020 * thread-db.c (find_one_thread): Use get_thread_process
8021 instead of current_process.
8022 (thread_db_get_tls_address): Do not crash if called when
8023 thread layer is not yet initialized.
8024
5472f405
UW
80252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8026
8027 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8028 * spu-low.c (current_tid): Rename to ...
8029 (current_ptid): ... this.
8030 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8031 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8032 ptid_get_lwp (current_ptid) instead of current_tid.
8033 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8034 instead of current_tid. Use find_process_pid to verify pid
8035 argument is valid. Pass proper argument to remove_process.
8036 (spu_thread_alive): Compare current_ptid instead of current_tid.
8037 (spu_resume): Likewise.
8038
55ac2b99
PA
80392009-04-02 Pedro Alves <pedro@codesourcery.com>
8040
8041 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8042 variable.
8043
95954743
PA
80442009-04-01 Pedro Alves <pedro@codesourcery.com>
8045
8046 Implement the multiprocess extensions, and add linux multiprocess
8047 support.
8048
8049 * server.h (ULONGEST): Declare.
8050 (struct ptid, ptid_t): New.
8051 (minus_one_ptid, null_ptid): Declare.
8052 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8053 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8054 (struct inferior_list_entry): Change `id' type from unsigned from
8055 to ptid_t.
8056 (struct sym_cache, struct breakpoint, struct
8057 process_info_private): Forward declare.
8058 (struct process_info): Declare.
8059 (current_process): Declare.
8060 (all_processes): Declare.
8061 (initialize_inferiors): Declare.
8062 (add_thread): Adjust to use ptid_t.
8063 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8064 (add_process, remove_process, find_thread_pid): Declare.
8065 (find_inferior_id): Adjust to use ptid_t.
8066 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8067 (multi_process): Declare.
8068 (push_event): Adjust to use ptid_t.
8069 (read_ptid, write_ptid): Declare.
8070 (prepare_resume_reply): Adjust to use ptid_t.
8071 (clear_symbol_cache): Declare.
8072 * inferiors.c (all_processes): New.
8073 (null_ptid, minus_one_ptid): New.
8074 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8075 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8076 (add_thread): Change unsigned long to ptid. Remove gdb_id
8077 parameter. Adjust.
8078 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8079 (gdb_id_to_thread): Rename to ...
8080 (find_thread_pid): ... this. Change unsigned long to ptid.
8081 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8082 (loaded_dll, pull_pid_from_list): Adjust.
8083 (add_process, remove_process, find_process_pid)
8084 (get_thread_process, current_process, initialize_inferiors): New.
8085 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8086 (struct target_waitstatus) <related_pid>: Ditto.
8087 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8088 return type to int.
8089 (struct target_ops) <join>: Add `pid' argument.
8090 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8091 (struct target_ops) <wait>: Add `ptid' field. Change return type
8092 to ptid.
8093 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8094 (mywait): Add `ptid' argument. Change return type to ptid_t.
8095 (target_pid_to_str): Declare.
8096 * target.c (set_desired_inferior): Adjust to use ptids.
8097 (mywait): Add new `ptid' argument. Adjust.
8098 (target_pid_to_str): New.
8099 * mem-break.h (free_all_breakpoints): Declare.
8100 * mem-break.c (breakpoints): Delelete.
8101 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8102 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8103 to use per-process breakpoint list.
8104 (free_all_breakpoints): New.
8105 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8106 (symbol_cache, all_symbols_looked_up): Delete.
8107 (hexchars): New.
8108 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8109 read_ptid): New.
8110 (prepare_resume_reply): Change ptid argument's type from unsigned
8111 long to ptid_t. Adjust. Implement W;process and X;process.
8112 (free_sym_cache, clear_symbol_cache): New.
8113 (look_up_one_symbol): Adjust to per-process symbol cache. *
8114 * server.c (cont_thread, general_thread, step_thread): Change type
8115 to ptid_t.
8116 (attached): Delete.
8117 (multi_process): New.
8118 (last_ptid): Change type to ptid_t.
8119 (struct vstop_notif) <ptid>: Change type to ptid_t.
8120 (queue_stop_reply, push_event): Change `ptid' argument's type to
8121 ptid_t.
8122 (discard_queued_stop_replies): Add `pid' argument.
8123 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8124 changes. Don't reference the `attached' global.
8125 (attach_inferior): Adjust to mywait interface changes.
8126 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8127 features. Handle and report "multiprocess+". Handle
8128 "qAttached:PID".
8129 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8130 changes.
8131 (handle_v_kill): New.
8132 (handle_v_stopped): Adjust to use target_pid_to_str.
8133 (handle_v_requests): Allow multiple attaches and runs when
8134 multiprocess extensions are in effect. Handle "vKill".
8135 (myresume): Adjust to use ptids.
8136 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8137 (handle_status): Adjust to discard_queued_stop_replies interface
8138 change.
8139 (first_thread_of, kill_inferior_callback)
8140 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8141 (main): Call initialize_inferiors. Adjust to use ptids, killing
8142 and detaching from all inferiors. Handle multiprocess packet
8143 variants.
8144 * linux-low.h: Include gdb_proc_service.h.
8145 (struct process_info_private): New.
8146 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8147 <lwpid_of>: Use ptid_get_lwp.
8148 (get_lwp_thread): Adjust.
8149 (struct lwp_info): Add `dead' member.
8150 (find_lwp_pid): Declare.
8151 * linux-low.c (thread_db_active): Delete.
8152 (new_inferior): Adjust comment.
8153 (inferior_pid): Delete.
8154 (linux_add_process): New.
8155 (handle_extended_wait): Adjust.
8156 (add_lwp): Change unsigned long to ptid.
8157 (linux_create_inferior): Add process to processes table. Adjust
8158 to use ptids. Don't set new_inferior here.
8159 (linux_attach_lwp): Rename to ...
8160 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8161 it. Adjust to use ptids.
8162 (linux_attach_lwp): New.
8163 (linux_attach): Add process to processes table. Don't set
8164 new_inferior here.
8165 (struct counter): New.
8166 (second_thread_of_pid_p, last_thread_of_process_p): New.
8167 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8168 multiple processes.
8169 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8170 processes. Remove process from process table.
8171 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8172 to multiple processes.
8173 (any_thread_of): New.
8174 (linux_detach): Add `pid' argument, and handle it. Remove process
8175 from processes table.
8176 (linux_join): Add `pid' argument. Handle it.
8177 (linux_thread_alive): Change unsighed long argument to ptid_t.
8178 Consider dead lwps as not being alive.
8179 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8180 threads we're not interested in.
8181 (same_lwp, find_lwp_pid): New.
8182 (linux_wait_for_lwp): Change `pid' argument's type from int to
8183 ptid_t. Adjust.
8184 (linux_wait_for_event): Rename to ...
8185 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8186 from int to ptid_t. Adjust.
8187 (linux_wait_for_event): New.
8188 (linux_wait_1): Add `ptid' argument. Change return type to
8189 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8190 that exit from the process table.
8191 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8192 Adjust.
8193 (mark_lwp_dead): New.
8194 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8195 stopping all threads, mark its main lwp as dead.
8196 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8197 ptids.
8198 (fetch_register, usr_store_inferior_registers)
8199 (regsets_fetch_inferior_registers)
8200 (regsets_store_inferior_registers, linux_read_memory)
8201 (linux_write_memory): Inline `inferior_pid'.
8202 (linux_look_up_symbols): Adjust to use per-process
8203 `thread_db_active'.
8204 (linux_request_interrupt): Adjust to use ptids.
8205 (linux_read_auxv): Inline `inferior_pid'.
8206 (initialize_low): Don't reference thread_db_active.
8207 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8208 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8209 (ps_getpid): Return the pid of the current inferior.
8210 * thread-db.c (proc_handle, thread_agent): Delete.
8211 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8212 per-process data.
8213 (find_one_thread): Change argument type to ptid_t. Adjust to
8214 per-process data.
8215 (maybe_attach_thread): Adjust to per-process data and ptids.
8216 (thread_db_find_new_threads): Ditto.
8217 (thread_db_init): Ditto.
8218 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8219 processes table. Adjust to use ptids.
8220 (spu_kill, spu_detach): Adjust interface. Remove process from
8221 processes table.
8222 (spu_join, spu_thread_alive): Adjust interface.
8223 (spu_wait): Adjust interface. Remove process from processes
8224 table. Adjust to use ptids.
8225 * win32-low.c (current_inferior_tid): Delete.
8226 (current_inferior_ptid): New.
8227 (debug_event_ptid): New.
8228 (thread_rec): Take a ptid. Adjust.
8229 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8230 (child_delete_thread): Ditto.
8231 (do_initial_child_stuff): Add `attached' argument. Add process to
8232 processes table.
8233 (child_fetch_inferior_registers, child_store_inferior_registers):
8234 Adjust.
8235 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8236 (win32_attach): Pass 1 to do_initial_child_stuff.
8237 (win32_kill): Adjust interface. Remove process from processes
8238 table.
8239 (win32_detach): Ditto.
8240 (win32_join): Adjust interface.
8241 (win32_thread_alive): Take a ptid.
8242 (win32_resume): Adjust to use ptids.
8243 (get_child_debug_event): Ditto.
8244 (win32_wait): Adjust interface. Remove exiting process from
8245 processes table.
8246
bd99dc85
PA
82472009-04-01 Pedro Alves <pedro@codesourcery.com>
8248
8249 Non-stop mode support.
8250
8251 * server.h (non_stop): Declare.
8252 (gdb_client_data, handler_func): Declare.
8253 (delete_file_handler, add_file_handler, start_event_loop):
8254 Declare.
8255 (handle_serial_event, handle_target_event, push_event)
8256 (putpkt_notif): Declare.
8257 * target.h (enum resume_kind): New.
8258 (struct thread_resume): Replace `step' field by `kind' field.
8259 (TARGET_WNOHANG): Define.
8260 (struct target_ops) <wait>: Add `options' argument.
8261 <supports_non_stop, async, start_non_stop>: New fields.
8262 (target_supports_non_stop, target_async): New.
8263 (start_non_stop): Declare.
8264 (mywait): Add `options' argument.
8265 * target.c (mywait): Add `options' argument. Print child exit
8266 notifications here.
8267 (start_non_stop): New.
8268 * server.c (non_stop, own_buf, mem_buf): New globals.
8269 (struct vstop_notif): New.
8270 (notif_queue): New global.
8271 (queue_stop_reply, push_event, discard_queued_stop_replies)
8272 (send_next_stop_reply): New.
8273 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8274 interface changes.
8275 (attach_inferior): In non-stop mode, don't wait for the target
8276 here.
8277 (handle_general_set): Handle QNonStop.
8278 (handle_query): When handling qC, return the current general
8279 thread, instead of the first thread of the list.
8280 (handle_query): If the backend supports non-stop mode, include
8281 QNonStop+ in the qSupported query response.
8282 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8283 and non-stop mode.
8284 (handle_v_attach, handle_v_run): Handle non-stop mode.
8285 (handle_v_stopped): New.
8286 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8287 (myresume): Adjust to use resume_kind. Handle non-stop.
8288 (queue_stop_reply_callback): New.
8289 (handle_status): Handle non-stop mode.
8290 (main): Clear non_stop flag on reconnection. Use the event-loop.
8291 Refactor serial protocol handling from here ...
8292 (process_serial_event): ... to this new function. When GDB
8293 selects any thread, select one here. In non-stop mode, wait until
8294 GDB acks all pending events before exiting.
8295 (handle_serial_event, handle_target_event): New.
8296 * remote-utils.c (remote_open): Install remote_desc in the event
8297 loop.
8298 (remote_close): Remove remote_desc from the event loop.
8299 (putpkt_binary): Rename to...
8300 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8301 (putpkt_binary): New as wrapper around putpkt_binary_1.
8302 (putpkt_notif): New.
8303 (prepare_resume_reply): In non-stop mode, don't change the
8304 general_thread.
8305 * event-loop.c: New.
8306 * Makefile.in (OBJ): Add event-loop.o.
8307 (event-loop.o): New rule.
8308
8309 * linux-low.h (pid_of): Moved here.
8310 (lwpid_of): New.
8311 (get_lwp_thread): Use lwpid_of.
8312 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8313 * linux-low.c (pid_of): Delete.
8314 (inferior_pid): Use lwpid_of.
8315 (linux_event_pipe): New.
8316 (target_is_async_p): New.
8317 (delete_lwp): New.
8318 (handle_extended_wait): Use lwpid_of.
8319 (add_lwp): Don't set lwpid field.
8320 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8321 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8322 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8323 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8324 first. Adjust to linux_wait_for_event interface changes. Use
8325 lwpid_of.
8326 (linux_detach): Don't delete the main lwp here.
8327 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8328 (status_pending_p): Don't consider explicitly suspended lwps.
8329 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8330 pointer. Add OPTIONS argument. Change return type to int. Use
8331 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8332 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8333 pointer. Add status pointer argument. Return a pid instead of a
8334 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8335 changes. In non-stop mode, don't switch to a random thread.
8336 (linux_wait): Rename to...
8337 (linux_wait_1): ... this. Add target_options argument, and handle
8338 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8339 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8340 clean exit and signal exit code. Don't stop all threads in
8341 non-stop mode. In all-stop mode, only stop all threads when
8342 reporting a stop to GDB. Handle explicit thread stop requests.
8343 (async_file_flush, async_file_mark): New.
8344 (linux_wait): New.
8345 (send_sigstop): Use lwpid_of.
8346 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8347 interface changes. In non-stop mode, don't switch to a random
8348 thread.
8349 (linux_resume_one_lwp): Use lwpid_of.
8350 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8351 (linux_resume_one_thread): ... this. Handle resume_stop. In
8352 non-stop mode, don't look for pending flag in all threads.
8353 (resume_status_pending_p): Don't consider explicitly suspended
8354 threads.
8355 (my_waitpid): Reimplement. Emulate __WALL.
8356 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8357 Use lwpid_of.
8358 (sigchld_handler, linux_supports_non_stop, linux_async)
8359 (linux_start_non_stop): New.
8360 (linux_target_ops): Register linux_supports_non_stop, linux_async
8361 and linux_start_non_stop.
8362 (initialize_low): Install SIGCHLD handler.
8363 * thread-db.c (thread_db_create_event, find_one_thread)
8364 (thread_db_get_tls_address): Use lwpid_of.
8365 * win32-low.c (win32_detach): Adjust to use resume_kind.
8366 (win32_wait): Add `options' argument.
8367 * spu-low.c (spu_resume): Adjust to use resume_kind.
8368 (spu_wait): Add `options' argument.
8369
5b1c542e
PA
83702009-04-01 Pedro Alves <pedro@codesourcery.com>
8371
8372 Decouple target code from remote protocol.
8373
8374 * target.h (enum target_waitkind): New.
8375 (struct target_waitstatus): New.
8376 (struct target_ops) <wait>: Return an unsigned long. Take a
8377 target_waitstatus pointer instead of a char pointer.
8378 (mywait): Likewise.
8379 * target.c (mywait): Change prototype to return an unsigned long.
8380 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8381 * server.h (thread_from_wait, old_thread_from_wait): Delete
8382 declarations.
8383 (prepare_resume_reply): Change prototype to take a
8384 target_waitstatus.
8385 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8386 (last_status, last_ptid): New.
8387 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8388 pid instead of a signal.
8389 (attach_inferior): Remove "status" and "signal" parameters.
8390 Adjust.
8391 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8392 not as an address.
8393 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8394 (handle_v_requests, myresume): Remove "status" and "signal"
8395 parameters. Adjust.
8396 (handle_status): New.
8397 (main): Delete local `status'. Adjust.
8398 * remote-utils.c: Include target.h.
8399 (prepare_resume_reply): Change prototype to take a
8400 target_waitstatus. Adjust.
8401
8402 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8403 interface.
8404 * spu-low.c (spu_wait): Adjust.
8405 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8406 Delete.
8407 (win32_wait): Adjust.
8408
2bd7c093
PA
84092009-04-01 Pedro Alves <pedro@codesourcery.com>
8410
8411 * target.h (struct thread_resume): Delete leave_stopped member.
8412 (struct target_ops): Add a `n' argument to the `resume' callback.
8413 * server.c (start_inferior): Adjust.
8414 (handle_v_cont, myresume): Adjust.
8415 * linux-low.c (check_removed_breakpoint): Adjust to resume
8416 interface change, and to removed leave_stopped field.
8417 (resume_ptr): Delete.
8418 (struct thread_resume_array): New.
8419 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8420 resume interface change.
8421 (linux_continue_one_thread, linux_queue_one_thread)
8422 (resume_status_pending_p): Check if the resume field is NULL
8423 instead of checking the leave_stopped member.
8424 (linux_resume): Adjust to the target resume interface change.
8425 * spu-low.c (spu_resume): Adjust to the target resume interface
8426 change.
8427 * win32-low.c (win32_detach, win32_resume): Ditto.
8428
c35fafde
PA
84292009-04-01 Pedro Alves <pedro@codesourcery.com>
8430
8431 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8432 flag.
8433 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8434 pending.
8435 (linux_continue_one_thread): Only preserve the stepping flag if
8436 there's a pending breakpoint.
8437
0a59d50b
PA
84382009-03-31 Pedro Alves <pedro@codesourcery.com>
8439
8440 * server.c (main): After the inferior having exited, call
8441 remote_close before exiting gdbserver.
8442
f04c6d38
TJB
84432009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8444
8445 Fix size of FPSCR in Power 7 processors.
8446 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8447 (PPC_FEATURE_HAS_DFP): New #define.
8448 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8449 size of the FPSCR.
8450
78e5cee6
PA
84512009-03-23 Pedro Alves <pedro@codesourcery.com>
8452
8453 * server.c (handle_query) Whitespace and formatting.
8454
1b3f6016
PA
84552009-03-22 Pedro Alves <pedro@codesourcery.com>
8456
8457 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8458 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8459 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8460 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8461 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8462 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8463 Makefile.in, configure.ac: Fix whitespace throughout.
8464 * configure: Regenerate.
8465
a07b2135
PA
84662009-03-22 Pedro Alves <pedro@codesourcery.com>
8467
8468 * inferiors.c (find_inferior): Make it safe for the callback
8469 function to delete the currently iterated inferior.
8470
67cc2626
PA
84712009-03-22 Pedro Alves <pedro@codesourcery.com>
8472
8473 * Makefile.in (linuw_low_h): Move higher.
8474 (thread-db.o): Depend on $(linux_low_h).
8475
54a0b537
PA
84762009-03-17 Pedro Alves <pedro@codesourcery.com>
8477
8478 Rename "process" to "lwp" throughout.
8479
8480 * linux-low.c (all_processes): Rename to...
8481 (all_lwps): ... this.
8482 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8483 (add_process): Rename to ...
8484 (add_lwp): ... this. Adjust.
8485 (linux_create_inferior): Adjust.
8486 (linux_attach_lwp): Adjust.
8487 (linux_attach): Adjust.
8488 (linux_kill_one_process): Rename to ...
8489 (linux_kill_one_lwp): ... this. Adjust.
8490 (linux_kill): Adjust.
8491 (linux_detach_one_process): Rename to ...
8492 (linux_detach_one_lwp): ... this. Adjust.
8493 (linux_detach): Adjust.
8494 (check_removed_breakpoint): Adjust.
8495 (status_pending_p): Adjust.
8496 (linux_wait_for_process): Rename to ...
8497 (linux_wait_for_lwp): ... this. Adjust.
8498 (linux_wait_for_event): Adjust.
8499 (send_sigstop): Adjust.
8500 (wait_for_sigstop): Adjust.
8501 (stop_all_processes): Rename to ...
8502 (stop_all_lwps): ... this.
8503 (linux_resume_one_process): Rename to ...
8504 (linux_resume_one_lwp): ... this. Adjust.
8505 (linux_set_resume_request, linux_continue_one_thread)
8506 (linux_queue_one_thread, resume_status_pending_p)
8507 (usr_store_inferior_registers, regsets_store_inferior_registers)
8508 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8509 Adjust.
8510 * linux-low.h (get_process): Rename to ...
8511 (get_lwp): ... this. Adjust.
8512 (get_thread_process): Rename to ...
8513 (get_thread_lwp): ... this. Adjust.
8514 (get_process_thread): Rename to ...
8515 (get_lwp_thread): ... this. Adjust.
8516 (struct process_info): Rename to ...
8517 (struct lwp_info): ... this.
8518 (all_processes): Rename to ...
8519 (all_lwps): ... this.
8520 * proc-service.c (ps_lgetregs): Adjust.
8521 * thread-db.c (thread_db_create_event, find_one_thread)
8522 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8523
0b16c5cf
PA
85242009-03-14 Pedro Alves <pedro@codesourcery.com>
8525
8526 * server.c (handle_query): Handle "qAttached".
8527
32de4b9d
NS
85282009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8529
8530 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8531 GPLv3, update license URL.
8532
2aecd87f
DE
85332009-03-01 Doug Evans <dje@google.com>
8534
93efd302 8535 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8536 (server_h): Add gdb_signals.h.
8537 (signals.o): Update.
8538 * server.h (target_signal_from_host,target_signal_to_host_p)
8539 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8540
86b1f9c5
PM
85412009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8542
8543 * remote-utils.c (getpkt): Also generate remote-debug
8544 information if noack_mode is set.
8545
4aa995e1
PA
85462009-02-06 Pedro Alves <pedro@codesourcery.com>
8547
8548 * server.c (handle_query): Report qXfer:siginfo:read and
8549 qXfer:siginfo:write as supported and handle them.
8550 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8551 * linux-low.c (linux_xfer_siginfo): New.
8552 (linux_target_ops): Set it.
8553
62709adf
PA
85542009-01-26 Pedro Alves <pedro@codesourcery.com>
8555
8556 * server.c (gdbserver_usage): Mention --remote-debug.
8557 (main): Accept '--remote-debug' switch.
8558
aef93bd7
DE
85592009-01-18 Doug Evans <dje@google.com>
8560
8561 * regcache.c (new_register_cache): No need to check result of xcalloc.
8562 * server.c (handle_search_memory): Back out calls to xmalloc,
8563 result is checked and error is returned to user upon failure.
8564 (handle_query): Ditto. Add more checks for result of malloc.
8565 (handle_v_cont): Check result of malloc, report error back to
8566 user upon failure.
8567 (handle_v_run): Ditto. Call freeargv.
8568 * server.h (freeargv): Declare.
8569 * utils.c (freeargv): New fn.
8570
54363045
DE
85712009-01-15 Doug Evans <dje@google.com>
8572
f626972c
DE
8573 * gdbreplay.c (perror_with_name): Make arg const char *.
8574 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8575 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8576 * utils.c (perror_with_name): Make arg const char *.
54363045 8577
18aae699
PA
85782009-01-14 Pedro Alves <pedro@codesourcery.com>
8579
8580 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8581 when handling a EXIT_PROCESS_DEBUG_EVENT.
8582
ff703abe
JB
85832009-01-06 Joel Brobecker <brobecker@adacore.com>
8584
8585 * gdbreplay.c (gdbreplay_version): Update copyright year.
8586 * server.c (gdbserver_version): Likewise.
8587
f21cc1a2 85882009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8589
8590 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8591 (handle_extended_wait): Improve comment.
0e21c1ec 8592
bca929d3
DE
85932008-12-13 Doug Evans <dje@google.com>
8594
8595 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8596 * server.h (ATTR_MALLOC): New macro.
8597 (xmalloc,xcalloc,xstrdup): Declare.
8598 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8599 * inferiors.c: Ditto.
8600 * linux-low.c: Ditto.
8601 * mem-break.c: Ditto.
8602 * regcache.c: Ditto.
8603 * remote-utils.c: Ditto.
8604 * server.c: Ditto.
8605 * target.c: Ditto.
8606 * win32-low.c: Ditto.
8607
97438e3f
DE
86082008-12-12 Doug Evans <dje@google.com>
8609
896c7fbb
DE
8610 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8611 in debugging printf.
8612
97438e3f
DE
8613 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8614
e3b886f8
DE
86152008-12-09 Doug Evans <dje@google.com>
8616
8617 * linux-low.h (struct process_info): Delete member tid, unused.
8618 * thread-db.c (find_one_thread): Update.
8619 (maybe_attach_thread): Update.
8620
07e059b5
VP
86212008-12-02 Pedro Alves <pedro@codesourcery.com>
8622
889bf7c5
PA
8623 * target.h (struct target_ops): Add qxfer_osdata member.
8624 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8625 and dirent.h.
8626 (linux_qxfer_osdata): New functions.
8627 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8628 callback.
8629 * server.c (handle_query): Handle "qXfer:osdata:read:".
8630 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8631 (buffer_xml_printf): New functions.
8632 * server.h (struct buffer): New.
8633 (buffer_grow_str, buffer_grow_str0): New macros.
8634 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8635 (buffer_xml_printf): Declare.
07e059b5 8636
4cab47ab
DE
86372008-11-24 Doug Evans <dje@google.com>
8638
8639 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8640
f142445f
DJ
86412008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8642
8643 * server.c (handle_v_run): Always use the supplied argument list.
8644
d0107bb6 86452008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8646
d0107bb6
BW
8647 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8648 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8649
2c4ad781
TJB
86502008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8651
8652 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8653 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8654 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8655 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8656 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8657 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8658 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8659 XML target descriptions.
8660 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8661 when inferior is running on an ISA 2.05 or later processor. Add
8662 special case to return offset for full 64-bit slot of FPSCR when
8663 in 32-bits.
8664
dfb64f85
DJ
86652008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8666
8667 * Makefile.in (SFILES, clean): Added sparc64 files.
8668 (reg-sparc64.o, reg-sparc64.c): New.
8669 * configure.srv (sparc*-*-linux*): New configuration.
8670 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8671 syscall arguments for SPARC.
8672 (regsets_store_inferior_registers): Likewise.
8673 * linux-sparc-low.c: New file.
8674
66b6e1dd
DE
86752008-10-21 Doug Evans <dje@google.com>
8676
8677 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8678 (READLINE_DIR,READLINE_DEP): Delete.
8679 (INTERNAL_CFLAGS): Update.
8680 (LINTFLAGS): Update.
8681
9b710a42
PA
86822008-10-10 Pedro Alves <pedro@codesourcery.com>
8683
8684 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8685 whole argv from the last run, not just argv[0].
8686
5822d809
PA
86872008-09-08 Pedro Alves <pedro@codesourcery.com>
8688
8689 * regcache.c (new_register_cache): Return NULL if the register
8690 cache size isn't known yet.
8691 (free_register_cache): Avoid dereferencing a NULL regcache.
8692
74aac56f
DJ
86932008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8694
8695 * configure.srv: Merge MIPS and MIPS64.
8696
400b20f5
MR
86972008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8698
8699 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8700
677c5bb1
LM
87012008-08-18 Luis Machado <luisgpm@br.ibm.com>
8702
8703 * Makefile.in: Add required vsx dependencies.
8704
8705 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8706 Declare init_registers_powerpc_vsx32l.
8707 Declare init_registers_powerpc_vsx64l.
8708 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8709 (ppc_arch_setup): Check for VSX in hwcap.
8710 (ppc_fill_vsxregset): New function.
8711 (ppc_store_vsxregset): New function.
8712 Add new VSX entry in regset_info target_regsets.
8713
8714 * configure.srv: Add new VSX dependencies.
8715
a6f3e723
SL
87162008-08-12 Pedro Alves <pedro@codesourcery.com>
8717
8718 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8719 (remote_open): Set or clear transport_is_reliable.
8720 (putpkt_binary): Don't expect acks in noack mode.
8721 (getpkt): Don't send ack/nac in noack mode.
8722 * server.c (handle_general_set): Handle QStartNoAckMode.
8723 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8724 qSupported.
8725 (main): Reset noack_mode on every connection.
8726 * server.h (noack_mode): Declare.
8727
a417dc56
RW
87282008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8729
8730 * Makefile.in (GDBREPLAY_OBS): New variable.
8731 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8732
3221518c
UW
87332008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8734 Daniel Jacobowitz <dan@codesourcery.com>
8735
8736 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8737 (usr_store_inferior_registers): Likewise.
8738 (regsets_store_inferior_registers): Likewise.
8739
ec56be1b
PA
87402008-07-31 Rolf Jansen <rj@surtec.com>
8741 Pedro Alves <pedro@codesourcery.com>
8742
8743 * configure.ac: Check for memmem declaration.
8744 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8745 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8746 (disable_packet_qfThreadInfo): Unconditionally compile.
8747 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8748 * configure, config.in: Regenerate.
8749
2fe5e3ff
DE
87502008-07-28 Doug Kwan <dougkwan@google.com>
8751
8752 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8753 (linux_write_memory): Remove declaration of errno.
8754
836acd6d
UW
87552008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8756
8757 * linux-low.c (handle_extended_wait): Do not use "status"
8758 variable uninitialized.
8759
aeba519e
PA
87602008-07-07 Pedro Alves <pedro@codesourcery.com>
8761
8762 * server.c (handle_v_attach): Inhibit reporting dll changes.
8763
db42f210
PA
87642008-06-27 Pedro Alves <pedro@codesourcery.com>
8765
8766 * remote-utils.c (prepare_resume_reply): If requested, don't
8767 output "thread:TID" in the T stop reply.
8768
8769 * server.c (disable_packet_vCont, disable_packet_Tthread)
8770 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8771 (handle_query): If requested, disable support for qC, qfThreadInfo
8772 and qsThreadInfo.
8773 (handle_v_requests): If requested, disable support for vCont.
8774 (gdbserver_show_disableable): New.
8775 (main): Handle --disable-packet and --disable-packet=LIST.
8776
8777 * server.h (disable_packet_vCont, disable_packet_Tthread)
8778 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8779
8e4c5421
CD
87802008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8781
8782 * server.c (gdbserver_usage): Mention --version.
8783
6e23a804
DJ
87842008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8785
8786 * Makefile.in (gdbreplay.o): New rule.
8787
90aa6a40
JM
87882008-06-06 Joseph Myers <joseph@codesourcery.com>
8789
8790 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8791 message, not gdbserver.
8792
c16158bc 87932008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8794 Nathan Sidwell <nathan@codesourcery.com>
8795 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8796
8797 * acinclude.m4: Include ../../config/acx.m4.
8798 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8799 * configure, config.in: Regenerate.
8800 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8801 * server.c (gdbserver_version): Print PKGVERSION.
8802 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8803 (main): Adjust gdbserver_usage calls.
8804 * gdbreplay.c (version, host_name): Add declarations.
8805 (gdbreplay_version, gdbreplay_usage): New.
8806 (main): Accept --version and --help options.
8807
aeb75bf5
DJ
88082008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8809
8810 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8811 (arm_breakpoint_at): Handle Thumb.
8812 (the_low_target): Add comment.
8813
76b233dd
UW
88142008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8815
8816 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8817
08388c79
DE
88182008-05-09 Doug Evans <dje@google.com>
8819
a3c83fae
DE
8820 * server.h (decode_search_memory_packet): Declare.
8821 * remote-utils.c (decode_search_memory_packet): New fn.
8822 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8823 (handle_search_memory): New fn.
8824 (handle_query): Process qSearch:memory packets.
8825
bb9c3d36
UW
88262008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8827
8828 * regcache.c (registers_length): Remove.
8829 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8830 full register packet.
8831 * regcache.h (registers_length): Remove prototype.
8832 * server.h (PBUFSIZ): Define to 16384.
8833
7284e1be
UW
88342008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8835
8836 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8837 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8838 powerpc-64l.o, and powerpc-altivec64l.o.
8839 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8840 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8841 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8842 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8843 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8844 to srv_xmlfiles.
8845
8846 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8847 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8848 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8849 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8850 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8851 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8852 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8853 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8854 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8855 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8856 (clean): Update.
8857
8858 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8859 (init_registers_powerpc_32l): ... this new prototype.
8860 (init_registers_powerpc_32): Remove, replace by ...
8861 (init_registers_powerpc_altivec32l): ... this new prototype.
8862 (init_registers_powerpc_e500): Remove, replace by ...
8863 (init_registers_powerpc_e500l): ... this new prototype.
8864 (init_registers_ppc64): Remove, replace by ...
8865 (init_registers_powerpc_64l): ... this new prototype.
8866 (init_registers_powerpc_64): Remove, replace by ...
8867 (init_registers_powerpc_altivec64l): ... this new prototype.
8868 (ppc_num_regs): Set to 73.
8869 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8870 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8871 (ppc_cannot_store_register): Handle orig_r3 and trap.
8872 (ppc_arch_setup): Update init_registers_... calls.
8873 (ppc_fill_gregset): Handle orig_r3 and trap.
8874
8875 * inferiors.c (clear_inferiors): Reset current_inferior.
8876
fdc59709
PB
88772008-04-23 Paolo Bonzini <bonzini@gnu.org>
8878
889bf7c5
PA
8879 * acinclude.m4: Add override.m4.
8880 * configure: Regenerate.
fdc59709 8881
c9b2f845
UW
88822008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8883
8884 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8885 initial call to init_register_ppc64.
8886
550512b8
UW
88872008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8888
43aaf8b6
PA
8889 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8890 single powerpc*-*-linux* case.
550512b8
UW
8891 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8892
b6430ec3
UW
88932008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8894
8895 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8896 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8897 from reg_xmlfiles.
8898 * linux-ppc-low.c: Include <elf.h>.
8899 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8900 (ppc_hwcap): New global variable.
8901 (ppc_regmap): Remove __SPE__ #ifdef sections.
8902 (ppc_regmap_e500): New global variable.
8903 (ppc_cannot_store_register): Update __SPE__ special case.
8904 (ppc_get_hwcap): New function.
8905 (ppc_arch_setup): Use it to determine whether inferior supports
8906 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8907 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8908 Do not access registers if target does not support AltiVec.
8909 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8910 Do not access registers if target does not support SPE.
8911 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8912
52fa2412
UW
89132008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8914
8915 * linux-low.c (disabled_regsets, num_regsets): New.
8916 (use_regsets_p): Delete.
8917 (linux_wait_for_process): Clear disabled_regsets.
8918 (regsets_fetch_inferior_registers): Check and set it.
8919 (regsets_store_inferior_registers): Likewise.
8920 (linux_fetch_registers, linux_store_registers): Do not use
8921 use_regsets_p.
8922 (initialize_low): Allocate disabled_regsets.
8923
e28b3332
DJ
89242008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8925
8926 * Makefile.in (LIBOBJS): New.
8927 (OBS): Use LIBOBJS.
8928 (memmem.o): New rule.
8929 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8930 * configure: Regenerated.
8931
4536995d
UW
89322008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8933
8934 * server.c (handle_query): Never return "unsupported" for
8935 qXfer:features:read queries.
8936
221c031f
UW
89372008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8938
8939 * server.c (get_features_xml): Fix inverted condition.
8940 (handle_query): Always support qXfer:feature:read.
8941
ccd213ac
DJ
89422008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8943
8944 * server.c (wrapper_argv): New.
8945 (start_inferior): Handle wrapper_argv. If set, expect an extra
8946 trap.
8947 (gdbserver_usage): Document --wrapper.
8948 (main): Parse --wrapper.
8949
6fe305f7
UW
89502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8951
8952 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8953 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8954 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8955 (ppc_set_pc): Likewise.
8956 (ppc_arch_setup): New function.
8957 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8958 of collect_register.
889bf7c5 8959 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8960
5b0a002e
UW
89612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8962
8963 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8964 instead of linux-ppc64-low.o.
8965 * linux-ppc64-low.c: Remove file.
8966 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8967 (linux-ppc64-low.o): Remove rule.
8968
8969 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8970 (init_registers_powerpc_64): Likewise.
8971 (ppc_regmap): Conditionally define depending on __powerpc64__.
8972 (ppc_cannot_store_register): Do not special-case "fpscr" when
8973 compiled on __powerpc64__.
8974 (ppc_collect_ptrace_register): New function.
8975 (ppc_supply_ptrace_register): New function.
8976 (ppc_breakpoint): Change type to "unsigned int".
8977 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8978 (the_low_target): Conditionally provide initializers for the
889bf7c5 8979 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8980 collect_ptrace_register and supply_ptrace_register members.
8981
9b4b61c8
UW
89822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8983
8984 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8985 * server.c (gdbserver_xmltarget): Define.
8986 (get_features_xml): Use it to replace "target.xml" and arch_string.
8987
8988 * configure.srv: Remove srv_xmltarget. Add XML files that were
8989 mentioned there to srv_xmlfiles instead. Remove conditional tests
8990 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8991 srv_xmlfiles and srv_regobj to include all possible choices.
8992 * configure.ac (srv_xmltarget): Remove.
8993 (srv_xmlfiles): Do not add "target.xml".
8994 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8995 checks for supplementary target information.
8996 * configure: Regenerate.
8997 * Makefile.in (XML_TARGET): Remove.
8998 (target.xml): Remove rule.
8999 (clean): Do not clean up target.xml.
9000 (.PRECIOUS): Do not mention target.xml.
9001
9002 * target.h (struct target_ops): Remove arch_string member.
9003 * linux-low.c (linux_arch_string): Remove.
9004 (linux_target_ops): Remove arch_string initializer.
9005 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9006 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9007 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9008 * spu-low.c (spu_arch_string): Remove.
9009 (spu_target_ops): Remove arch_string initializer.
9010 * win32-low.c (win32_arch_string): Remove.
9011 (win32_target_ops): Remove arch_string initializer.
9012 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9013 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9014 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9015
ee1a7ae4
UW
90162008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9017
9018 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9019 by collect_ptrace_register and supply_ptrace_register hooks.
9020 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9021 instead of checking for the_low_target.left_pad_xfer.
9022 (usr_store_inferior_registers): Use collect_ptrace_register callback
9023 instead of checking for the_low_target.left_pad_xfer.
9024
9025 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9026 (s390_supply_ptrace_register): Likewise.
9027 (s390_fill_gregset): Call s390_collect_ptrace_register.
9028 (the_low_target): Update.
9029
9030 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9031 (ppc_supply_ptrace_register): Likewise.
9032 (the_low_target): Update.
9033
9034 * linux-i386-low.c (the_low_target): Update.
9035 * linux-x86-64-low.c (the_low_target): Update.
9036
d61ddec4
UW
90372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9038
9039 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9040 reg-s390.o and reg-s390x.o.
9041
9042 * linux-low.c (new_inferior): New global variable.
9043 (linux_create_inferior, linux_attach): Set it.
9044 (linux_wait_for_process): Call the_low_target.arch_setup after the
9045 target has stopped for the first time.
9046 (initialize_low): Do not call the_low_target.arch_setup.
9047
9048 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9049 (s390_set_pc): Likewise.
9050 (s390_arch_setup): New function.
9051 (the_low_target): Use s390_arch_setup as arch_setup routine.
9052
9053 * regcache.c (realloc_register_cache): New function.
9054 (set_register_cache): Call it for each existing regcache.
9055
d05b4ac3
UW
90562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9057
9058 * server.h (init_registers): Remove prototype.
9059
9060 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9061 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9062 instead of init_registers ().
9063 * linux-arm-low.c (init_registers_arm): Add prototype.
9064 (init_registers_arm_with_iwmmxt): Likewise.
9065 (the_low_target): Add initializer for arch_setup field.
9066 * linux-cris-low.c (init_registers_cris): Add prototype.
9067 (the_low_target): Add initializer for arch_setup field.
9068 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9069 (the_low_target): Add initializer for arch_setup field.
9070 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9071 (the_low_target): Add initializer for arch_setup field.
9072 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9073 (the_low_target): Add initializer for arch_setup field.
9074 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9075 (the_low_target): Add initializer for arch_setup field.
9076 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9077 (the_low_target): Add initializer for arch_setup field.
9078 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9079 (init_registers_mips64_linux): Likewise.
9080 (the_low_target): Add initializer for arch_setup field.
9081 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9082 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9083 (the_low_target): Add initializer for arch_setup field.
9084 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9085 (init_registers_powerpc_64): Likewise.
9086 (the_low_target): Add initializer for arch_setup field.
9087 * linux-s390-low.c (init_registers_s390): Add prototype.
9088 (init_registers_s390x): Likewise.
9089 (the_low_target): Add initializer for arch_setup field.
9090 * linux-sh-low.c (init_registers_sh): Add prototype.
9091 (the_low_target): Add initializer for arch_setup field.
9092 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9093 (the_low_target): Add initializer for arch_setup field.
9094 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9095 (the_low_target): Add initializer for arch_setup field.
9096
9097 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9098 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9099 instead of init_registers ().
9100 * win32-arm-low.c (init_registers_arm): Add prototype.
9101 (the_low_target): Add initializer for arch_setup field.
9102 * win32-i386-low.c (init_registers_i386): Add prototype.
9103 (the_low_target): Add initializer for arch_setup field.
9104
9105 * spu-low.c (init_registers_spu): Add prototype.
9106 (initialize_low): Call initialie_registers_spu () instead of
9107 initialize_registers ().
9108
fd96d250
PA
91092008-02-19 Pedro Alves <pedro@codesourcery.com>
9110
9111 * server.c (handle_v_requests): When handling the vRun and vAttach
9112 packets, if already debugging a process, don't kill it. Return an
9113 error instead.
9114
d41b6bb4
DJ
91152008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9116
9117 * server.c (handle_query): Correct length check.
9118
5ac588cf
PA
91192008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9120
9121 * win32-low.c (do_initial_child_stuff): Add process handle
9122 parameter. Set current_process_handle and current_process_id from the
9123 parameters. Clear globals.
9124 (win32_create_inferior): Don't set current_process_handle and
9125 current_process_id here. Instead pass them on the call to
9126 do_initial_child_stuff.
9127 (win32_attach): Likewise.
9128 (win32_clear_inferiors): New.
9129 (win32_kill): Don't close the current process handle or the
9130 current thread handle here. Instead call win32_clear_inferiors.
9131 (win32_detach): Don't open a new handle to the process. Call
9132 win32_clear_inferiors.
9133 (win32_join): Don't rely on current_process_handle; open a new
9134 handle using the process id.
9135 (win32_wait): Call win32_clear_inferiors when the inferior process
9136 has exited.
9137
ecd7ecbc
DJ
91382008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9139
9140 * server.c (monitor_show_help): Add "exit".
9141
1525d545
MG
91422008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9143
ecd7ecbc 9144 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9145 (clean): Add reg-xtensa.c.
9146 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9147 * configure.srv (xtensa*-*-linux*) New target.
9148 * linux-xtensa-low.c: New.
9149 * xtensa-xtregs.c: New.
1525d545 9150
59a016f0
PA
91512008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9152
9153 * hostio.c: Don't include errno.h.
9154 (errno_to_fileio_errno): Move to hostio-errno.
9155 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9156 error number outputting to the target->hostio_last_error callback.
9157 (hostio_packet_error): Use FILEIO_EINVAL directly.
9158 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9159 calls to hostio_error.
9160 * hostio-errno.c: New.
9161 * server.h (hostio_last_error_from_errno): Declare.
9162 * target.h (target_ops): Add hostio_last_error member.
9163 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9164 as hostio_last_error handler.
889bf7c5 9165 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9166 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9167 (wince_hostio_last_error): New functions.
9168 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9169 as hostio_last_error handler.
9170 (win32_target_ops) [!_WIN32_WCE]: Register
9171 hostio_last_error_from_errno as hostio_last_error handler.
9172 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9173 (hostio-errno.o): New rule.
9174 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9175 * configure.srv (srv_hostio_err_objs): New variable. Default to
9176 hostio-errno.o.
9177 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9178 * configure: Regenerate.
9179
2d717e4f
DJ
91802008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9181
9182 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9183 (linux_kill, linux_detach): Clean up the process list.
9184 * remote-utils.c (remote_open): Improve port number parsing.
9185 (putpkt_binary, input_interrupt): Only send interrupts if the target
9186 is running.
9187 * server.c (extended_protocol): Make static.
9188 (attached): Define earlier.
9189 (exit_requested, response_needed, program_argv): New variables.
9190 (target_running): New.
9191 (start_inferior): Clear attached here.
9192 (attach_inferior): Set attached here.
9193 (require_running): Define.
9194 (handle_query): Use require_running and target_running. Implement
9195 "monitor exit".
9196 (handle_v_attach, handle_v_run): New.
9197 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9198 (gdbserver_usage): Update.
9199 (main): Redo argument parsing. Handle --debug and --multi. Handle
9200 --attach along with other options or after the port. Save
9201 program_argv. Support no initial program. Resynchronize
9202 communication with GDB after an error. Handle "monitor exit".
9203 Use require_running and target_running. Always allow the extended
9204 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9205 restart in extended mode.
9206 * README: Refer to the GDB manual. Update --attach usage.
9207
7407e2de
AS
92082007-12-20 Andreas Schwab <schwab@suse.de>
9209
9210 * linux-low.c (STACK_SIZE): Define.
9211 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9212 (linux_test_for_tracefork): Likewise.
9213
b65d95c5
DJ
92142007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9215
9216 * linux-low.c (linux_wait_for_event): Update messages. Do not
9217 reinsert auto-delete breakpoints.
9218 * mem-break.c (struct breakpoint): Change return type of handler to
9219 int.
9220 (set_breakpoint_at): Update handler type.
9221 (reinsert_breakpoint_handler): Return 1 instead of calling
9222 delete_breakpoint.
9223 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9224 setting a new one.
9225 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9226 * mem-break.h (set_breakpoint_at): Update handler type.
9227 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9228 * win32-low.c (auto_delete_breakpoint): New.
9229 (get_child_debug_event): Use it.
9230
4e799345
DJ
92312007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9232
9233 * configure.ac: Check for pread and pwrite.
9234 * hostio.c (handle_pread): Fall back to lseek and read.
9235 (handle_pwrite): Fall back to lseek and write.
9236 * config.in, configure: Regenerated.
9237
27524b67
DJ
92382007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9239
9240 * server.c (myresume): Add own_buf argument.
9241 (main): Update calls.
9242
a20d5e98
DJ
92432007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9244
9245 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9246 * remote-utils.c (remote_open): Do not call disable_async_io.
9247 (block_async_io): Delete.
9248 (unblock_async_io): Make static.
9249 (initialize_async_io): New.
9250 * server.c (handle_v_cont): Handle async I/O here.
9251 (myresume): Likewise. Move other common resume tasks here...
9252 (main): ... from here. Call initialize_async_io. Disable async
9253 I/O before the main loop.
9254 * server.h (initialize_async_io): Declare.
9255 (block_async_io, unblock_async_io): Delete prototypes.
9256 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9257
b79d787e
DJ
92582007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9259
9260 * remote-utils.c (readchar): Allow binary data in received messages.
9261
d97903b2
PA
92622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9263
9264 * win32-low.c (attaching): New global.
9265 (win32_create_inferior): Clear the `attaching' global.
9266 (win32_attach): Set the `attaching' global.
9267 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9268 attaching. Only set a breakpoint at the entry point if not
9269 attaching.
9270
311de423
PA
92712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9272
9273 * server.c (main): Don't report dll events on the initial
9274 connection on attaches.
9275
6c2d16d2
PA
92762007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9277
9278 * server.c (main): Relax numerical bases supported for the pid of
9279 the --attach command line argument.
9280
5ca906e6
PA
92812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9282
9283 * win32-low.c (win32_attach): Call OpenProcess before
9284 DebugActiveProcess, not after. Add last error output to error
9285 call.
9286
9c6c8194
PA
92872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9288
9289 * win32-low.c (win32_get_thread_context)
9290 (win32_set_thread_context): New functions.
9291 (thread_rec): Use win32_get_thread_context.
9292 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9293 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9294 field.
9295
4d5d1aaa
PA
92962007-12-03 Leo Zayas
9297 Pedro Alves <pedro_alves@portugalmail.pt>
9298
9299 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9300 global variables.
9301 (child_add_thread): Minor cleanup.
9302 (child_continue): Resume artificially suspended threads before
9303 calling ContinueDebugEvent.
9304 (suspend_one_thread): New.
9305 (fake_breakpoint_event): New.
9306 (get_child_debug_event): Change return type to int. Check here if
9307 gdb sent an interrupt request. If a soft interrupt was requested,
9308 fake a breakpoint event. Return 0 if there is no event to handle,
9309 and 1 otherwise.
9310 (win32_wait): Don't check here if gdb sent an interrupt request.
9311 Ensure there is a valid event to handle.
9312 (win32_request_interrupt): Add soft interruption method as last
9313 resort.
9314
c436e841
PA
93152007-12-03 Leo Zayas
9316 Pedro Alves <pedro_alves@portugalmail.pt>
9317
9318 * win32-low.h (win32_thread_info): Add descriptions to the
9319 structure members. Replace `suspend_count' counter by a
9320 `suspended' flag.
9321 * win32-low.c (thread_rec): Update condition of when to get the
9322 context from the inferior. Rely on ContextFlags being set if it
9323 has already been retrieved. Only suspend the inferior thread if
9324 we haven't already. Warn if that fails.
9325 (continue_one_thread): s/suspend_count/suspended/. Only call
9326 ResumeThread once. Warn if that fails.
9327
e7b5fa67
PA
93282007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9329
9330 * win32-low.c (win32_wait): Don't read from the inferior when it
9331 has already exited.
9332
a385171d
PA
93332007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9334
9335 * Makefile.in (win32_low_h): New variable.
9336 (win32-low.o): Add dependency on $(win32_low_h).
9337 (win32-arm-low.o, win32-i386-low.o): New rules.
9338
f80c84b3
DJ
93392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9340
9341 * hostio.c: Correct copyright year.
9342
a6b151f1
DJ
93432007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9344
9345 * Makefile.in (OBS): Add hostio.o.
9346 (hostio.o): New rule.
9347 * server.h (handle_vFile): Declare.
9348 * hostio.c: New file.
9349 * server.c (handle_v_requests): Take packet_len and new_packet_len
9350 for binary packets. Call handle_vFile.
9351 (main): Update call to handle_v_requests.
9352
f9387fc3
DJ
93532007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9354
9355 * linux-low.c: Include <sched.h>.
9356
51c2684e
DJ
93572007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9358
9359 * linux-low.c (linux_tracefork_grandchild): New.
9360 (linux_tracefork_child): Use clone.
9361 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9362
75f83163
JB
93632007-10-31 Joel Brobecker <brobecker@adacore.com>
9364
9365 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9366
da5898ce
DJ
93672007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9368
9369 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9370
24a09b5f
DJ
93712007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9372
9373 * inferiors.c (change_inferior_id): Delete.
9374 (add_pid_to_list, pull_pid_from_list): New.
9375 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9376 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9377 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9378 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9379 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9380 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9381 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9382 (using_threads): Always set to 1.
9383 (handle_extended_wait): New.
9384 (add_process): Do not set TID.
9385 (linux_create_inferior): Set must_set_ptrace_flags.
9386 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9387 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9388 (linux_thread_alive): Rename TID argument to LWPID.
9389 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9390 (linux_wait_for_event): Do not use TID or check using_threads. Update
9391 call to dead_thread_notify. Call handle_extended_wait.
9392 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9393 (send_sigstop): Delete sigstop_sent.
9394 (wait_for_sigstop): Avoid TID.
9395 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9396 (linux_test_for_tracefork): New.
9397 (linux_lookup_signals): Use thread_db_active and
9398 linux_supports_tracefork_flag.
9399 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9400 * linux-low.h (get_process_thread): Avoid TID.
9401 (struct process_ifo): Move thread_known and tid to the end. Remove
9402 sigstop_sent.
9403 (linux_attach_lwp, thread_db_init): Update prototypes.
9404 * server.h (change_inferior_id): Delete prototype.
9405 (add_pid_to_list, pull_pid_from_list): New prototypes.
9406 * thread-db.c (thread_db_use_events): New.
9407 (find_first_thread): Rename to...
9408 (find_one_thread): ...this. Update callers and messages. Do not
9409 call fatal. Check thread_db_use_events. Do not call
9410 change_inferior_id or new_thread_notify.
9411 (maybe_attach_thread): Update. Do not call new_thread_notify.
9412 (thread_db_init): Set thread_db_use_events. Check use_events.
9413 * utils.c (fatal, warning): Correct message prefix.
9414
30ed0a8f
DJ
94152007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9416
9417 * Makefile.in (clean): Remove new files.
9418 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9419 (powerpc-64.o, powerpc-64.c): New rules.
9420 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9421 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9422 with SPE.
9423 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9424 SPE targets.
9425 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9426 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9427 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9428 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9429 (target_regsets): Add AltiVec and SPE register sets.
9430 * configure.ac: Check for AltiVec and SPE.
9431 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9432 (ppc_fill_vrregset, ppc_store_vrregset): New.
9433 (target_regsets): Add AltiVec register set.
9434 * configure: Regenerated.
9435
fd462a61
DJ
94362007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9437
9438 * linux-low.c (O_LARGEFILE): Define.
9439 (linux_read_memory): Use /proc/PID/mem.
9440 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9441 * configure, config.in: Regenerated.
9442
69f223ed
DJ
94432007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9444
9445 * linux-low.c (linux_wait_for_event): Do not pass signals while
9446 single-stepping.
9447
aec18585
PA
94482007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9449
9450 * win32-low.c (create_process): New.
9451 (win32_create_inferior): Use create_process instead of
9452 CreateProcess. If create_process failed retry appending an ".exe"
9453 suffix. Store the GetLastError result immediatelly after
9454 create_process calls and use it on the call to error.
9455
34d86ddd
PA
94562007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9457
9458 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9459
5a0e3bd0
JB
94602007-08-23 Joel Brobecker <brobecker@adacore.com>
9461
9462 * configure.ac: Switch license to GPLv3.
9463
f88c79e6
MS
94642007-08-01 Michael Snyder <msnyder@access-company.com>
9465
9466 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9467
6b3d9b83
PA
94682007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9469
9470 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9471 typedef.
9472 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9473 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9474 CloseToolhelp32Snapshot.
9475 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9476 CloseToolhelp32Snapshot.
9477
c588c53c
MS
94782007-07-27 Michael Snyder <michael.snyder@access-company.com>
9479
9480 * server.c (main): Check for inferior exit before main loop.
9481
aa0403d9
PA
94822007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9483
9484 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9485 instead of on tmp_desc.
9486
255e7678
DJ
94872007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9488 Daniel Jacobowitz <dan@codesourcery.com>
9489
9490 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9491 (add_thread): Minor cleanups.
9492 (clear_inferiors): Move lower in the file. Clear the DLL
9493 list.
9494 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9495 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9496 (xml_escape_text): New.
9497 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9498 for qSupported.
9499 (handle_v_cont): Report errors.
9500 (gdbserver_version): Update.
9501 (main): Correct size of own_buf. Do not report initial DLL events.
9502 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9503 (unloaded_dll, xml_escape_text): New.
9504 * win32-low.c (enum target_waitkind): Update comments.
9505 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9506 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9507 (win32_EnumProcessModules, win32_GetModuleInformation)
9508 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9509 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9510 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9511 (win32_Module32First, win32_Module32Next, load_toolhelp)
9512 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9513 (get_child_debug_event): Handle DLL events.
9514 (win32_wait): Likewise.
9515
0d37add9
DJ
95162007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9517
9518 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9519 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9520
45e2715e
PA
95212007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9522
9523 * win32-low.c (handle_output_debug_string): Ignore event if not
9524 waiting.
9525
c5674cf1
PA
95262007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9527
9528 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9529
2bbe3cc1
DJ
95302007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9531
9532 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9533
ae13219e
DJ
95342007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9535
9536 * inferiors.c (change_inferior_id): Add comment.
9537 * linux-low.c (check_removed_breakpoint): Add an early
9538 prototype. Improve debug output.
9539 (linux_attach): Doc update.
9540 (linux_detach_one_process, linux_detach): Clean up before releasing
9541 each process.
9542 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9543 * linux-low.h (struct process_info): Doc improvement.
9544 * mem-break.c (delete_all_breakpoints): New.
9545 * mem-break.h (delete_all_breakpoints): New prototype.
9546 * thread-db.c (find_first_thread): New.
9547 (thread_db_create_event): Call it instead of
9548 thread_db_find_new_threads. Clean up unused variables.
9549 (maybe_attach_thread): Remove first thread handling.
9550 (thread_db_find_new_threads): Use find_first_thread.
9551 (thread_db_get_tls_address): Likewise.
9552
4105de34
DJ
95532007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9554
9555 * thread-db.c (thread_db_find_new_threads): Add prototype.
9556 (thread_db_create_event): Check for the main thread before adding
9557 a new thread.
9558 (maybe_attach_thread): Only enable event reporting if TID == 0.
9559 (thread_db_get_tls_address): Check for new threads.
9560
2b876972
DJ
95612007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9562
9563 * linux-low.c (linux_create_inferior): Try execv before execvp.
9564 * spu-low.c (spu_create_inferior): Likewise.
9565
7a245884
DJ
95662007-06-13 Mike Frysinger <vapier@gentoo.org>
9567
9568 * linux-low.c (linux_create_inferior): Change execv to execvp.
9569 * spu-low.c (spu_create_inferior): Likewies.
9570
117ce543
DJ
95712007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9572
9573 * Makefile.in (clean): Clean new files instead of deleted ones.
9574 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9575 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9576 rules.
9577 * configure.srv: Specify XML files and new regformats for MIPS and
9578 MIPS64 GNU/Linux.
9579 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9580 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9581 an entry for the restart register.
9582 (mips_cannot_fetch_register, mips_cannot_store_register)
9583 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9584 register names to match the XML descriptions.
9585 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9586 restart register instead of $0.
9587
0e7f50da
UW
95882007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9589 Markus Deuling <deuling@de.ibm.com>
9590
9591 * remote-utils.c (decode_xfer_write): New function.
9592 * server.h (decode_xfer_write): Add prototype.
9593 * server.c (handle_query): Add PACKET_LEN argument. Support
9594 qXfer:spu:read and qXfer:spu:write packets.
9595 (main): Pass packet_len to handle_query.
9596 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9597 * target.h (target_ops): Add qxfer_spu.
9598
374c1d38
UW
95992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9600
9601 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9602 accessing non-seekable spufs files.
9603
bb63802a
UW
96042007-05-16 Markus Deuling <deuling@de.ibm.com>
9605
889bf7c5 9606 * server.c (handle_query): Add reply for qC packet.
bb63802a 9607
7390519e
PA
96082007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9609 Leo Zayas <lerele@champenstudios@com>
9610
9611 * server.h (check_remote_input_interrupt_request): New function.
9612 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9613 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9614 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9615 (check_remote_input_interrupt_request): New function.
9616 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9617 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9618 winapi_GenerateConsoleCtrlEvent): New typedefs.
9619 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9620 to 250 ms.
9621 (win32_wait): Check for remote interrupt request
9622 with check_remote_input_interrupt_request.
9623 (win32_request_interrupt): New function.
9624 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9625
34b34921
PA
96262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9627
9628 * win32-low.c (debug_registers_changed,
9629 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9630 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9631 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9632 (thread_rec): Get context using the low target.
9633 (child_add_thread): Call thread_added on the low target,
9634 which does the same thing.
9635 (regptr): Delete.
9636 (do_initial_child_stuff): Remove debug registers references.
9637 Set context using the low target. Resume threads after
9638 setting the contexts.
9639 (child_continue): Remove dead variable. Remove debug
9640 registers references.
9641 (child_fetch_inferior_registers): Go through the low target.
9642 (do_child_store_inferior_registers): Remove.
9643 (child_store_inferior_registers): Go through the low target.
9644 (win32_resume): Remove debug registers references.
9645 Set context using the low target.
9646 (handle_exception): Change return type to void. Don't record
9647 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9648 first chance exception.
889bf7c5 9649 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9650 goto loop. Always return after waiting for debug event.
9651 (win32_wait): Convert to switch statement. Handle spurious
9652 events.
9653
9654 * win32-i386-low.c (debug_registers_changed,
9655 debug_registers_used): New.
9656 (initial_stuff): Rename to ...
9657 (i386_initial_stuff): ... this. Clear debug registers
9658 state variables.
9659 (store_debug_registers): Delete.
9660 (i386_get_thread_context): New.
9661 (load_debug_registers): Delete.
9662 (i386_set_thread_context): New.
9663 (i386_thread_added): New.
9664 (single_step): Rename to ...
9665 (i386_single_step): ... this.
9666 (do_fetch_inferior_registers): Rename to ...
9667 (i386_fetch_inferior_register): ... this.
9668 (i386_store_inferior_register): New.
9669 (the_low_target): Adapt to new interface.
9670
9671 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9672 (arm_get_thread_context): New.
9673 (arm_set_thread_context): New.
9674 (regptr): New.
9675 (do_fetch_inferior_registers): Rename to ...
9676 (arm_fetch_inferior_register): ... this.
9677 (arm_store_inferior_register): New.
9678 (arm_wince_breakpoint): Reimplement as unsigned long.
9679 (arm_wince_breakpoint_len): Define.
9680 (the_low_target): Adapt to new interface.
9681
9682 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9683 load_debug_registers. Add get_thread_context, set_thread_context,
9684 thread_added and store_inferior_register. Rename
9685 fetch_inferior_registers to fetch_inferior_register.
9686 (regptr): Remove declaration.
9687
dd6953e1
PA
96882007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9689
9690 * linux-low.c (linux_detach): Change return type to int. Return 0.
9691 * spu-low.c (spu_detach): Likewise.
9692
444d6139
PA
96932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9694
9695 * target.h (target_ops): Change return type of detach to int.
9696 Add join.
9697 (join_inferior): New.
9698 * server.c (main): Don't skip detach support on mingw32.
9699 If the inferior doesn't support detaching return error.
9700 Call join_inferior instead of using waitpid.
9701 * linux-low.c (linux_join): New.
9702 (linux_target_op): Add linux_join.
9703 * spu-low.c (spu_join): New.
9704 (spu_target_ops): Add spu_join.
9705 * win32-low.c (win32_detach): Adapt to new interface.
9706 Reopen current_process_handle before detaching. Issue a child
9707 resume before detaching.
9708 (win32_join): New.
9709 (win32_target_op): Add win32_join.
9710
1d5315fe
PA
97112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9712
9713 * win32-low.c (win32-attach): Fix return value.
9714 * target.h (target_ops): Describe ATTACH return values.
9715
bf914831
PA
97162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9717
9718 * win32-low.c (GETPROCADDRESS): Define.
9719 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9720 (winapi_DebugSetProcessKillOnExit): Likewise.
9721 (win32_create_inferior): Force usage of ansi CreateProcessA.
9722 (win32_attach): Use GETPROCADDRESS.
9723 (win32_detach): Likewise.
9724
f72f3e60
PA
97252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9726
9727 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9728
ed50f18f
PA
97292007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9730
9731 * win32-low.c: Commit leftover changes from 2007-03-29.
9732
0c2ead7e
DJ
97332007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9734
9735 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9736 fields short instead of int. Add explicit padding.
9737 (i387_cache_to_fsave): Remove unnecessary casts.
9738 (i387_fsave_to_cache): Doc fix.
9739 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9740
73725ff3
DJ
97412007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9744 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9745
d99f33d8
PA
97462007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9747
9748 * configure.srv (arm*-*-mingw32ce*): Move near the other
9749 arm targets.
9750
68070c10
PA
97512007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9752
2482afc6 9753 * configure.ac: Add errno checking.
68070c10
PA
9754 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9755 sys/file.h and malloc.h.
9756 (AC_CHECK_DECLS): Add perror.
9757 (srv_mingwce): Handle.
2482afc6 9758 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9759 win32-i386-low.o to srv_tgtobj.
9760 (i[34567]86-*-mingw*): Likewise.
9761 (arm*-*-mingw32ce*): Add case.
9762 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9763 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9764 [__MINGW32CE__] (strerror): New function.
9765 [__MINGW32CE__] (errno): Define to GetLastError.
9766 [__MINGW32CE__] (COUNTOF): New macro.
9767 (remote_open): Remove extra close call.
9768 * mem-break.c (delete_breakpoint_at): New function.
9769 * mem-break.h (delete_breakpoint_at): Declare.
9770 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9771 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9772 [USE_WIN32API] (read, write): Add char* casts.
9773 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9774 * server.h: Include wincecompat.h on Windows CE.
9775 [HAVE_ERRNO_H]: Check.
9776 (perror): Declare if not declared.
9777 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9778 (perror_with_name): Remove errno declaration.
9779 * wincecompat.h: New.
9780 * wincecompat.c: New.
9781 * win32-low.h: New.
9782 * win32-arm-low.c: New.
9783 * win32-i386-low.c: New.
9784 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9785 (OUTMSG2): Make it safe.
9786 (_T): New macro.
9787 (COUNTOF): New macro.
9788 (NUM_REGS): Get it from the low target.
9789 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9790 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9791 (thread_rec): Let low target handle debug registers.
9792 (child_add_thread): Likewise.
9793 (child_init_thread_list): Likewise.
9794 (continue_one_thread): Likewise.
9795 (regptr): New.
9796 (do_child_fetch_inferior_registers): Move to ...
9797 * win32-i386-low.c: ... here, and rename to ...
9798 (do_fetch_inferior_registers): ... this.
889bf7c5 9799 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9800 Go through the low target.
9801 (do_child_store_inferior_registers): Use regptr.
9802 (strwinerror): New function.
9803 (win32_create_inferior): Handle Windows CE.
9804 Use strwinerror instead of strerror on Windows error
9805 codes. Add program to the error output.
9806 Don't close the main thread handle on Windows CE.
9807 (win32_attach): Use coredll.dll on Windows CE.
9808 (win32_kill): Close current process and current
9809 thread handles.
9810 (win32_detach): Use coredll.dll on Windows CE.
9811 (win32_resume): Let low target handle debug registers, and
9812 step request.
9813 (handle_exception): Add/Remove initial breakpoint. Avoid
9814 non-existant WSTOPSIG on Windows CE.
9815 (win32_read_inferior_memory): Cast to remove warning.
9816 (win32_arch_string): Go through the low target.
9817 (initialize_low): Call set_breakpoint_data with the low
9818 target's breakpoint.
9819 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9820 FOP_REGNUM, mappings): Move to ...
9821 * win32-i386-low.c: ... here.
9822 * win32-low.c (win32_thread_info): Move to ...
9823 * win32-low.h: ... here.
9824 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9825 win32-arm-low.c and wincecompat.c.
9826 (all:): Add $EXEEXT.
9827 (install-only:): Likewise.
9828 (gdbserver:): Likewise.
9829 (gdbreplay:): Likewise.
9830 * config.in: Regenerate.
9831 * configure: Regenerate.
9832
41093d81
PA
98332007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9834
9835 * win32-low.c: Rename typedef thread_info to
9836 win32_thread_info throughout.
9837
544afa54
PA
98382007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9839
9840 * win32-i386-low.c: Rename to ...
9841 * win32-low.c: ... this.
9842 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9843 * Makefile.in: Likewise.
9844
bce7165d
PA
98452007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9846
9847 * remote-utils.c (monitor_output): Constify msg parameter.
9848 * server.h (monitor_output): Likewise.
9849 * win32-i386-low.c (handle_output_debug_string): New.
9850 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9851 handle_output_debug_string.
9852 (get_child_debug_event): Likewise.
9853
506c7aa0
DJ
98542007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9855
9856 * server.c (main): Correct strtoul check.
9857
42c81e2a
DJ
98582007-03-27 Jon Ringle <jon@ringle.org>
9859
9860 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9861
9453113a
DJ
98622007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9863
9864 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9865
64a69107
DJ
98662007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9867
9868 * terminal.h: Check HAVE_SGTTY_H.
9869
98702007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9871
9872 * remote-utils.c (remote_open): Print out the assigned port number.
9873
c74d0ad8
DJ
98742007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9875
9876 * remote-utils.c (monitor_output): New function.
9877 * server.c (debug_threads): Define here.
9878 (monitor_show_help): New function.
9879 (handle_query): Handle qRcmd.
9880 (main): Do not handle 'd' packet.
9881 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9882 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9883 of debug_threads.
9884
de7c3b4a
PA
98852007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9886
9887 * Makefile.in (EXEEXT): New.
9888 (clean): Use $(EXEEXT).
9889
ef57601b
PA
98902007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9891
9892 * target.h (target_ops): Rename send_signal to request_interrupt,
9893 and remove enum target_signal parameter.
9894 * linux-low.c (linux_request_interrupt): Rename from
9895 linux_send_signal, and always send SIGINT.
9896 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9897 and always send SIGINT.
9898 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9899 of send_signal.
9900 (input_interrupt): Likewise.
9901
820f2bda
PA
99022007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9903
9904 * server.c (get_features_xml): Check if target implemented
9905 arch_string.
9906 * win32-i386-low.c (win32_arch_string): New.
9907 (win32_target_ops): Add win32_arch_string as arch_string member.
9908
ab39bf24
UW
99092007-02-22 Markus Deuling <deuling@de.ibm.com>
9910
9911 * spu-low.c (spu_arch_string): New.
9912 (spu_target_ops): Add spu_arch_string.
9913
61ff6e04
DJ
99142007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9915
9916 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9917 * configure.ac: Do not check for terminal.h.
9918 * configure, config.in: Regenerated.
9919
fb1e4ffc
DJ
99202007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9921
9922 * Makefile.in (OBS): Add $(XML_BUILTIN).
9923 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9924 (clean): Update.
9925 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9926 (arm-with-iwmmxt.c): New.
9927 * config.in, configure: Regenerate.
9928 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9929 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9930 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9931 (arm*-*-linux*): Add iWMMXt and regset support.
9932 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9933 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9934 (arm_store_wmmxregset, target_regsets): New.
9935 * server.c (get_features_xml): Take annex argument. Check builtin
9936 XML documents.
9937 (handle_query): Handle multiple annexes.
9938
0f48aa01
DJ
99392007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9940
9941 * remote-utils.c [USE_WIN32API] (read, write): Define.
9942 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9943 write.
9944
23181151
DJ
99452007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9946
9947 * linux-i386-low.c (the_low_target): Set arch_string.
9948 * linux-x86-64-low.c (the_low_target): Likewise.
9949 * linux-low.c (linux_arch_string): New.
9950 (linux_target_ops): Add it.
9951 * linux-low.h (struct linux_target_ops): Add arch_string.
9952 * server.c (write_qxfer_response): Use const void * for DATA.
9953 (get_features_xml): New.
9954 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9955 * target.h (struct target_ops): Add arch_string method.
9956
9d606399
DJ
99572007-01-03 Denis Pilat <denis.pilat@st.com>
9958 Daniel Jacobowitz <dan@codesourcery.com>
9959
9960 * linux-low.c (linux_kill): Handle being called with no threads.
9961 * win32-i386-low.c (win32_kill): Likewise.
9962 (get_child_debug_event): Clear current_process_handle.
9963
99642006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9965 Daniel Jacobowitz <dan@codesourcery.com>
9966
9967 * remote-utils.c (remote_open): Check the type of specified
9968 serial port devices before opening them.
9969 * server.c (main): Kill the inferior if an error occurs during
9970 the first remote_open.
9971
a5e13d24
DJ
99722006-12-05 Markus Deuling <deuling@de.ibm.com>
9973
9974 * README: Update supported targets.
9975
186947f7
DJ
99762006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9977
9978 * Makefile.in (clean): Remove reg-mips64.c.
9979 (reg-mips64.c, reg-mips64.o): New rules.
9980 * configure.srv: Handle mips64. Include regset support for mips.
9981 * linux-mips-low.c (union mips_register): New.
9982 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9983 (mips_breakpoint, mips_breakpoint_at): Use int.
9984 (mips_collect_register, mips_supply_register)
9985 (mips_collect_register_32bit, mips_supply_register_32bit)
9986 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9987 (mips_store_fpregset, target_regsets): New.
9988 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9989
a13e2c95
UW
99902006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9991
9992 * configure.srv: Add target "spu*-*-*".
9993 * Makefile.in (clean): Remove reg-spu.c.
9994 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9995 * spu-low.c: New file.
9996
cb7283db
DJ
99972006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9998
9999 * configure.ac: Correct td_thr_tls_get_addr test.
10000 * configure: Regenerated.
10001
89be2091
DJ
100022006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10003
10004 * linux-low.c (linux_wait_for_event): Reformat. Use the
10005 pass_signals array.
10006 * remote-utils.c (decode_address_to_semicolon): New.
10007 * server.c (pass_signals, handle_general_set): New.
10008 (handle_query): Mention QPassSignals for qSupported.
10009 (main): Call handle_general_set.
10010 * server.h (pass_signals, decode_address_to_semicolon): New.
10011
000ef4f0
DJ
100122006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10013
10014 * server.c (handle_query): Correct error handling for read_auxv.
10015
b7149293
UW
100162005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10017
10018 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10019 and srv_linux_thread_db to yes.
10020 * linux-s390-low.c (s390_fill_gregset): New function.
10021 (target_regsets): Define data structure.
10022
dae5f5cf
DJ
100232006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10024
10025 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10026 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10027 * config.in, configure: Regenerated.
10028 * inferiors.c (gdb_id_to_thread): New function.
10029 (gdb_id_to_thread_id): Use it.
10030 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10031 * linux-low.h (struct process_info): Add th member.
10032 (thread_db_get_tls_address): New prototype.
10033 * remote-utils.c (decode_address): Make non-static.
10034 * server.c (handle_query): Handle qGetTLSAddr.
10035 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10036 * target.h (struct target_ops): Add get_tls_address.
10037 * thread-db.c (maybe_attach_thread): Save the thread handle.
10038 (thread_db_get_tls_address): New.
10039
32ca6d61
DJ
100402006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10041
10042 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10043 (linux_resume_one_process): Take a siginfo_t *. Update all
10044 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10045 (struct pending_signals): Add a siginfo_t.
10046 (linux_wait_for_process): Always set last_status.
10047 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10048 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10049 * linux-low.h (struct process_info): Add last_status.
10050
5ffff7c1
DJ
100512006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10052
10053 * remote-utils.c (try_rle): New function.
10054 (putpkt_binary): Use it.
10055
8695c747
DJ
100562006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10057
10058 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10059 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10060 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10061 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10062 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10063 point registers.
10064
290fadea
RS
100652006-08-08 Richard Sandiford <richard@codesourcery.com>
10066
10067 * server.c (terminal_fd): New variable.
10068 (old_foreground_pgrp): Likewise.
10069 (restore_old_foreground_pgrp): New function.
10070 (start_inferior): Record the terminal file descriptor in terminal_fd
10071 and its original foreground group in old_foreground_pgrp. Register
10072 restore_old_foreground_pgrp with atexit().
10073
9f2e1e63
DJ
100742006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10075
10076 * server.c (handle_query): Correct qPart to qXfer.
10077
b80864fb
DJ
100782006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10079
10080 * configure.ac: Check for more headers which are missing on
10081 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10082 * configure.srv: Add Cygwin and mingw32.
10083 * remote-utils.c: Don't include headers unconditionally which
10084 are missing on mingw32. Include <winsock.h> for mingw32.
10085 (remote_open): Adjust for mingw32 support. Flush
10086 standard error after writing to it.
10087 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10088 (unblock_async_io, enable_async_io, disable_async_io)
10089 (readchar, getpkt): Update for Winsock support.
10090 (prepare_resume_reply): Expect a protocol signal number.
10091 * server.c: Disable <sys/wait.h> on mingw32.
10092 (start_inferior): Adjust for mingw32 support. Flush
10093 standard error after writing to it.
10094 (attach_inferior): Likewise. Use protocol signal
10095 numbers.
10096 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10097 and names.
10098 * win32-i386-low.c: New file.
10099 * Makefile.in (XM_CLIBS): Set.
10100 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10101 (win32-i386-low.o): New dependency rule.
10102 * linux-low.c (linux_wait): Use target signal numbers.
10103 * target.h (struct target_ops): Doc fix.
10104 * server.h (target_signal_to_name): New prototype.
10105 * gdbreplay.c: Don't include headers unconditionally which
10106 are missing on mingw32. Include <winsock.h> for mingw32.
10107 (remote_close, remote_open): Adjust for Winsock support.
10108 * configure, config.in: Regenerated.
10109
0876f84a
DJ
101102006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10111
10112 * server.c (decode_xfer_read, write_qxfer_response): New.
10113 (handle_query): Take a packet length argument. Handle
10114 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10115 the qSupported response.
10116 (main): Update call to handle_query.
10117
01f9e8fa
DJ
101182006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10119
10120 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10121 (putpkt_binary): Renamed from putpkt and adjusted for binary
10122 data.
10123 (putpkt): New wrapper for putpkt_binary.
10124 (readchar): Don't mask off the high bit.
10125 (decode_X_packet): New function.
10126 * server.c (main): Call putpkt_binary if a handler sets the packet
10127 length. Save the length of the incoming packet. Handle 'X'.
10128 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10129
be2a5f71
DJ
101302006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10131
10132 * server.c (handle_query): Handle qSupported.
10133
ea025f5f
DJ
101342006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10135
10136 * remote-utils.c (all_symbols_looked_up): New variable.
10137 (look_up_one_symbol): Check it.
10138 * server.h (look_up_one_symbol): New declaration.
10139 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10140
9308fc88
DJ
101412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10144 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10145 (PTRACE_GET_THREAD_AREA): Define.
10146 (ps_get_thread_area): New function.
10147
52fb6437
NS
101482006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10149
10150 * configure.srv (m68k*-*-uclinux*): New target.
10151 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10152 (linux_resume_one_process): Remove extraneous cast.
10153 (linux_read_offsets): New.
10154 (linux_target_op): Add linux_read_offsets on mmuless systems.
10155 * server.c (handle_query): Add qOffsets logic.
10156 * target.h (struct target_ops): Add read_offsets.
10157
21b0f40c
DJ
101582006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10159
10160 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10161 (PTRACE_GET_THREAD_AREA): Define.
10162 (ps_get_thread_area): New function.
10163 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10164 (linux-x86-64-low.o): Update.
10165
0050a760
DJ
101662006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * configure.ac: Remove checks for prfpregset_t.
10169 * gdb_proc_service.h: New file.
10170 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10171 new "gdb_proc_service.h".
10172 * proc-service.c: Likewise.
10173 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10174 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10175 * Makefile.in (gdb_proc_service_h): Updated.
10176 * configure, config.in: Regenerated.
10177
b92a518e
DJ
101782006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10179
10180 * remote-utils.c (prepare_resume_reply): Move declaration
10181 of gdb_id_from_wait to the top of the block.
10182
545587ee
DJ
101832006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * linux-low.c (regsets_store_inferior_registers): Read the regset
10186 from the target before filling it.
10187
9db87ebd
DJ
101882006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10189
10190 * server.c (attach_inferior): Return SIGTRAP for a successful
10191 attach.
10192
dd24457d
DJ
101932006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * Makefile.in (OBS): Add version.o.
10196 (STAGESTUFF): Delete.
10197 (version.o): Add dependencies.
10198 (version.c): Replace rule.
10199 (clean): Remove version.c.
10200 * server.c (gdbserver_version): New.
10201 (gdbserver_usage): Use printf.
10202 (main): Handle --version and --help.
10203 * server.h (version, host_name): Add declarations.
10204
6f0f660e
EZ
102052005-12-23 Eli Zaretskii <eliz@gnu.org>
10206
889bf7c5
PA
10207 * linux-arm-low.c:
10208 * linux-arm-low.c:
10209 * inferiors.c:
10210 * i387-fp.h:
10211 * i387-fp.c:
10212 * gdbreplay.c:
10213 * regcache.c:
10214 * proc-service.c:
10215 * mem-break.h:
10216 * mem-break.c:
10217 * linux-x86-64-low.c:
10218 * linux-sh-low.c:
10219 * linux-s390-low.c:
10220 * linux-ppc64-low.c:
10221 * linux-ppc-low.c:
10222 * linux-mips-low.c:
10223 * linux-m68k-low.c:
10224 * linux-m32r-low.c:
10225 * linux-low.h:
10226 * linux-low.c:
10227 * linux-ia64-low.c:
10228 * linux-i386-low.c:
10229 * linux-crisv32-low.c:
10230 * thread-db.c:
10231 * terminal.h:
10232 * target.h:
10233 * target.c:
10234 * server.h:
10235 * server.c:
10236 * remote-utils.c:
10237 * regcache.h:
10238 * utils.c:
10239 * Makefile.in:
10240 * configure.ac:
6f0f660e
EZ
10241 * gdbserver.1: Add (C) after Copyright. Update the FSF
10242 address.
10243
9d1fb177
DJ
102442005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10245
10246 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10247 (arm_breakpoint_at): Recognize both breakpoints.
10248 (the_low_target): Use the correct breakpoint instruction.
10249
011a70c2
DJ
102502005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10251
10252 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10253 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10254 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10255 (the_low_target): Update.
10256
7fb85e41
AS
102572005-10-25 Andreas Schwab <schwab@suse.de>
10258
10259 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10260
10261 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10262 (ia64_num_regs): Reduce to 462.
10263
3db0444b
DJ
102642005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10265
10266 * acinclude.m4: Correct quoting.
10267 * aclocal.m4: Regenerated.
10268
10269 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10270 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10271 (thread_db_init): Call thread_db_err_str.
10272 * configure.ac: Check for TD_VERSION.
10273 * config.in, configure: Regenerated.
10274
bee0189a
DJ
102752005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10276
10277 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10278
e9d25b98
DJ
102792005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10280
10281 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10282 is not available. Define HAVE_PTRACE_GETREGS if it is.
10283 * config.in, configure: Regenerated.
10284 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10285 * linux-i386-low.c, linux-m68k-low.c: Update to use
10286 HAVE_PTRACE_GETREGS.
10287 * linux-low.c (regsets_fetch_inferior_registers)
10288 (regsets_store_inferior_registers): Only return 0 if we processed
10289 GENERAL_REGS.
10290 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10291 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10292
a06660f7
DJ
102932005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10294
10295 * inferiors.c (struct thread_info): Add gdb_id.
10296 (add_thread): Add gdb_id argument.
10297 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10298 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10299 calls to add_thread.
10300 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10301 * server.c (handle_query): Use thread_to_gdb_id.
10302 (handle_v_cont, main): Use gdb_id_to_thread_id.
10303 * server.h (add_thread): Update prototype.
10304 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10305 prototypes.
10306
5a1f5858
DJ
103072005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10308
10309 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10310 left-padded registers.
10311 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10312 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10313
e122f1f5
SE
103142005-07-01 Steve Ellcey <sje@cup.hp.com>
10315
10316 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10317 * configure: Regenerate.
10318 * config.in: Regenerate.
10319 * server.h (NEED_DECLARATION_STRERROR):
10320 Replace with !HAVE_DECL_STRERROR.
10321
d592fa2f
DJ
103222005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10323
10324 * linux-low.c (linux_wait, linux_send_signal): Don't test
10325 an unsigned long variable for > 0 if it could be MAX_ULONG.
10326 * server.c (myresume): Likewise.
10327 * target.c (set_desired_inferior): Likewise.
10328
ccbd4912
MK
103292005-06-13 Mark Kettenis <kettenis@gnu.org>
10330
10331 * configure.ac: Simplify and improve check for socklen_t.
10332 * configure, config.in: Regenerate.
10333
f450004a
DJ
103342005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * acconfig.h: Remove.
10337 * configure.ac: Add a test for socklen_t. Use three-argument
10338 AC_DEFINE throughout.
10339 * config.in: Regenerated using autoheader 2.59.
10340 * configure: Regenerated.
10341
10342 * gdbreplay.c (socklen_t): Provide a default.
10343 (remote_open): Use socklen_t.
10344 * remote-utils.c (socklen_t): Provide a default.
10345 (remote_open): Use socklen_t.
10346 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10347 unsigned char.
10348
10349 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10350 char for buffers.
10351 * linux-low.c (linux_read_memory, linux_write_memory)
10352 (linux_read_auxv): Likewise.
10353 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10354 (check_mem_write): Likewise.
10355 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10356 Likewise.
10357 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10358 (registers_from_string, register_data): Likewise.
10359 * server.c (handle_query, main): Likewise.
10360 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10361 (decode_M_packet): Likewise.
10362 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10363 * target.h (struct target_ops): Update read_memory, write_memory,
10364 and read_auxv.
10365 (read_inferior_memory, write_inferior_memory): Update.
10366 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10367 to unsigned char *.
10368 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10369 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10370 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10371 linux-s390-low.c, linux-sh-low.c: Update for changes in
10372 read_inferior_memory and the_low_target->breakpoint.
10373
eee84df1
DJ
103742005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10375
10376 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10377 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10378 * configure.srv: Add powerpc64-*-linux*.
10379 * linux-ppc64-low.c: New file.
10380
45b134e5
OF
103812005-05-23 Orjan Friberg <orjanf@axis.com>
10382
10383 * linux-cris-low.c: New file with support for CRIS.
10384 * linux-crisv32-low.c: Ditto for CRISv32.
10385 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10386 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10387 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10388 reg-crisv32.o, and reg-crisv32.c to make rules.
10389 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10390 recognized targets.
10391
48d93c75
UW
103922005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10393
10394 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10395 of sizeof (PTRACE_XFER_TYPE).
10396 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10397
e013ee27
OF
103982005-05-12 Orjan Friberg <orjanf@axis.com>
10399
889bf7c5 10400 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10401 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10402 pointers for hardware watchpoint support.
10403 * linux-low.h (struct linux_target_ops): Ditto.
10404 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10405 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10406 to linux_target_ops.
10407 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10408 reply packet.
10409 * server.c (main): Recognize 'Z' and 'z' packets.
10410
b0ded00b
UW
104112005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10412
10413 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10414 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10415 (the_low_target): Add new members.
10416
8643e2ad
DJ
104172005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10418
10419 * proc-service.c (ps_lgetregs): Search all_processes instead of
10420 all_threads.
10421
fc620387
DJ
104222005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10423
10424 * server.c (start_inferior): Change return type to int.
10425 (attach_inferior): Change sigptr to int *.
10426 (handle_v_cont, handle_v_requests): Change signal to int *.
10427 (main): Change signal to int.
10428
104292005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10430
10431 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10432 * configure.srv: Add m32r*-*-linux*.
10433 * linux-m32r-low.c: New file.
10434
e0e76420
DJ
104352005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10438
a1928bad
DJ
104392005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10440
10441 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10442 Take unsigned long arguments for PIDs.
10443 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10444 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10445 (wait_for_sigstop, linux_resume_one_process)
10446 (regsets_fetch_inferior_registers, linux_send_signal)
10447 (linux_read_auxv): Likewise. Update the types of variables holding
10448 PIDs. Update format string specifiers.
10449 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10450 * remote-utils.c (prepare_resume_reply): Likewise.
10451 * server.c (cont_thread, general_thread, step_thread)
10452 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10453 unsigned long.
10454 (handle_query): Update format specifiers.
10455 (handle_v_cont, main): Use strtoul for thread IDs.
10456 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10457 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10458 (general_thread, step_thread, thread_from_wait)
10459 (old_thread_from_wait): Update.
10460 * target.h (struct thread_resume): Use unsigned long for THREAD.
10461 (struct target_ops): Use unsigned long for arguments to attach and
10462 thread_alive.
10463
dcdb98d2
DJ
104642005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10465
10466 * acinclude.m4: Include bfd/bfd.m4 directly.
10467 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10468 <agriffis@toolchain.org>.
10469 * aclocal.m4, configure: Regenerated.
10470
bec39cab
AC
104712005-01-07 Andrew Cagney <cagney@gnu.org>
10472
10473 * configure.ac: Rename configure.in, require autoconf 2.59.
10474 * configure: Re-generate.
10475
434c4c77
DJ
104762004-12-08 Daniel Jacobowitz <dan@debian.org>
10477
10478 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10479 LIBS when finished.
10480 * aclocal.m4: Regenerated.
10481 * configure: Regenerated.
10482
db1d3e1b
AS
104832004-11-21 Andreas Schwab <schwab@suse.de>
10484
10485 * linux-m68k-low.c (m68k_num_gregs): Define.
10486 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10487 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10488 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10489 (m68k_breakpoint_at): New. Add to the_low_target.
10490
10491 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10492 srv_linux_thread_db to yes.
10493
43360365
JB
104942004-10-20 Joel Brobecker <brobecker@gnat.com>
10495
10496 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10497 (ARCH_SET_FS): Likewise.
10498 (ARCH_GET_FS): Likewise.
10499 (ARCH_GET_GS): Likewise.
10500
fd500816
DJ
105012004-10-16 Daniel Jacobowitz <dan@debian.org>
10502
10503 * linux-i386-low.c (ps_get_thread_area): New.
10504 * linux-x86-64-low.c (ps_get_thread_area): New.
10505 * linux-low.c: Include <sys/syscall.h>.
10506 (linux_kill_one_process): Don't kill the first thread here.
10507 (linux_kill): Kill the first thread here.
10508 (kill_lwp): New function.
10509 (send_sigstop, linux_send_signal): Use it.
10510 * proc-service.c: Clean up #ifdefs.
10511 (fpregset_info): Delete.
10512 (ps_lgetregs): Update and enable implementation.
10513 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10514 implementations.
10515 * remote-utils.c (struct sym_cache, symbol_cache): New.
10516 (input_interrupt): Print a clearer message.
10517 (async_io_enabled): New variable.
10518 (enable_async_io, disable_async_io): Use it. Update comments.
10519 (look_up_one_symbol): Use the symbol cache.
10520 * thread-db.c (thread_db_look_up_symbols): New function.
10521 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10522
f6de3c42
DJ
105232004-10-16 Daniel Jacobowitz <dan@debian.org>
10524
10525 * configure.in: Test for -rdynamic.
10526 * configure: Regenerated.
10527 * Makefile (INTERNAL_LDFLAGS): New.
10528 (gdbserver, gdbreplay): Use it.
10529
2c0fc042
AC
105302004-09-02 Andrew Cagney <cagney@gnu.org>
10531
10532 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10533
075b3282
DJ
105342004-03-23 Daniel Jacobowitz <drow@mvista.com>
10535
10536 * linux-low.c (linux_wait): Clear all_processes list also.
10537
fa6a77dc
DJ
105382004-03-12 Daniel Jacobowitz <drow@mvista.com>
10539
10540 * linux-low.c: Include <errno.h>. Remove extern declaration of
10541 errno.
10542
6d782a97
DJ
105432004-03-12 Daniel Jacobowitz <drow@mvista.com>
10544
10545 * gdbreplay.c, server.h, utils.c: Update copyright years.
10546
3a7fb99b
DJ
105472004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10548
10549 * server.c (main): Print child status or termination signal from
10550 variable 'signal', not 'sig'.
10551
c3e735a6
DJ
105522004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10553
10554 * linux-low.c (linux_read_memory): Change return type to
10555 int. Check for and return error from ptrace().
10556 * target.c (read_inferior_memory): Change return type to int. Pass
10557 back return status from the_target->read_memory().
10558 * target.h (struct target_ops): Adapt *read_memory() prototype.
10559 Update comment.
10560 (read_inferior_memory): Adapt prototype.
10561 * server.c (main): Return an error packet if
10562 read_inferior_memory() returns an error.
10563
a59d1c82
DJ
105642004-03-04 Daniel Jacobowitz <drow@mvista.com>
10565
10566 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10567 Unify with other clean targets.
10568
dc3f8883
DJ
105692004-02-29 Daniel Jacobowitz <drow@mvista.com>
10570
10571 * server.c (handle_v_cont): Call set_desired_inferior.
10572
89a208da
DJ
105732004-02-29 Daniel Jacobowitz <drow@mvista.com>
10574
10575 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10576
62ea82f5
DJ
105772004-02-29 Daniel Jacobowitz <drow@mvista.com>
10578
10579 * linux-low.c (linux_wait): Unblock async I/O.
10580 (linux_resume): Block and enable async I/O.
10581 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10582 * server.h (block_async_io, unblock_async_io): Add prototypes.
10583
6910d122
DJ
105842004-02-29 Daniel Jacobowitz <drow@mvista.com>
10585
10586 * remote-utils.c (remote_open): Print a status notice after
10587 opening a TCP port.
10588 * server.c (attach_inferior): Print a status notice after
10589 attaching.
10590
105912004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10592
10593 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10594
c89dc5d4
DJ
105952004-02-26 Daniel Jacobowitz <drow@mvista.com>
10596
10597 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10598 error packet.
10599 * server.c, target.h: Update copyright years.
10600
4b8dad4a
RM
106012004-02-25 Roland McGrath <roland@redhat.com>
10602
10603 * target.h (struct target_ops): New member `read_auxv'.
10604 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10605 * linux-low.c (linux_read_auxv): New function.
10606 (linux_target_ops): Initialize `read_auxv' member to that.
10607
d7446758
JB
106082004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10609
10610 Committed by Jim Blandy <jimb@redhat.com>.
10611
10612 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10613 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10614 instead of GPR_SIZE to distiguish s390 and s390x targets.
10615
5544ad89
DJ
106162004-01-31 Daniel Jacobowitz <drow@mvista.com>
10617
10618 * linux-low.c: Update copyright year.
10619 (check_removed_breakpoint): Clear pending_is_breakpoint.
10620 (linux_set_resume_request, linux_queue_one_thread)
10621 (resume_status_pending_p): New functions.
10622 (linux_continue_one_thread): Use process->resume.
10623 (linux_resume): Only resume threads if there are no pending events.
10624 * linux-low.h (struct process_info): Add resume request
10625 pointer.
10626
2a68b70e
DJ
106272004-01-30 Daniel Jacobowitz <drow@mvista.com>
10628
10629 * regcache.c (new_register_cache): Clear the allocated register
10630 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10631
64386c31
DJ
106322003-10-13 Daniel Jacobowitz <drow@mvista.com>
10633
10634 * linux-low.c (linux_resume): Take a struct thread_resume *
10635 argument.
10636 (linux_wait): Update call.
10637 (resume_ptr): New static variable.
10638 (linux_continue_one_thread): Renamed from
10639 linux_continue_one_process. Use resume_ptr.
10640 (linux_resume): Use linux_continue_one_thread.
10641 * server.c (handle_v_cont, handle_v_requests): New functions.
10642 (myresume): New function.
10643 (main): Handle 'v' case.
10644 * target.h (struct thread_resume): New type.
10645 (struct target_ops): Change argument of "resume" to struct
10646 thread_resume *.
10647 (myresume): Delete macro.
10648
c938e9b0
L
106492003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10650
10651 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10652 (uninstall): Support DESTDIR.
10653
7f313d07
BC
10654Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10655
10656 * configure.srv: Add xscale*linux copy of arm*linux entry.
10657
3b2fc2ea
DJ
106582003-07-24 Daniel Jacobowitz <drow@mvista.com>
10659
10660 * linux-arm-low.c (arm_reinsert_addr): New function.
10661 (the_low_target): Add arm_reinsert_addr.
10662
1c0a559e
MK
106632003-07-08 Mark Kettenis <kettenis@gnu.org>
10664
10665 * mem-break.c: Remove whitespace at end of file.
10666
43d5792c
DJ
106672003-06-28 Daniel Jacobowitz <drow@mvista.com>
10668
10669 * configure.in: Check whether we need to prototype strerror.
10670 * server.h: Optionally prototype strerror.
10671 * gdbreplay.c (perror_with_name): Use strerror.
10672 * linux-low.c (linux_attach_lwp): Use strerror.
10673 * utils.c (perror_with_name): Use strerror.
10674 * config.in, configure: Regenerated.
10675
c8a86edf
DJ
106762003-06-28 Daniel Jacobowitz <drow@mvista.com>
10677
10678 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10679 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10680
73d37363
DJ
106812003-06-20 Daniel Jacobowitz <drow@mvista.com>
10682
10683 * Makefile.in (SFILES): Update.
10684 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10685 low-sun3.c: Remove files.
10686
6ad8ae5c
DJ
106872003-06-17 Daniel Jacobowitz <drow@mvista.com>
10688
10689 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10690 (linux_detach_one_process, linux_detach): New functions.
10691 (linux_target_ops): Add linux_detach.
10692 * server.c (main): Handle 'D' packet.
10693 * target.h (struct target_ops): Add "detach" member.
10694 (detach_inferior): Define.
10695
1581182a
MK
106962003-06-13 Mark Kettenis <kettenis@gnu.org>
10697
10698 From Kelley Cook <kelleycook@wideopenwest.com>:
10699 * configure.srv: Accept i[34567]86 variants.
10700
e5379b03
DJ
107012003-06-05 Daniel Jacobowitz <drow@mvista.com>
10702
10703 * linux-low.c (linux_wait_for_event): Correct comment typos.
10704 (linux_resume_one_process): Call check_removed_breakpoint.
10705 (linux_send_signal): New function.
10706 (linux_target_ops): Add linux_send_signal.
10707 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10708 of kill.
10709 * target.h (struct target_ops): Add send_signal.
10710
2ff29de4
JB
107112003-05-29 Jim Blandy <jimb@redhat.com>
10712
10713 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10714 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10715 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10716 away part of the register's value.
10717
254787d4
DJ
107182003-03-26 Daniel Jacobowitz <drow@mvista.com>
10719
10720 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10721 (linux_wait_for_event, linux_init_signals): Likewise.
10722
94e10508
DJ
107232003-03-17 Daniel Jacobowitz <drow@mvista.com>
10724
10725 * configure.in: Check for stdlib.h.
10726 * configure: Regenerated.
10727 * config.in: Regenerated.
10728
4c0711e0
DJ
107292003-01-04 Andreas Schwab <schwab@suse.de>
10730
10731 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10732
ef66e766
AC
107332003-01-02 Andrew Cagney <ac131313@redhat.com>
10734
10735 * Makefile.in: Remove obsolete code.
10736
a1358604
DJ
107372002-11-20 Daniel Jacobowitz <drow@mvista.com>
10738
10739 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10740 defined(PT_FPR0_HI).
10741
23ce3b1c
DJ
107422002-11-17 Stuart Hughes <seh@zee2.com>
10743
10744 * linux-arm-low.c (arm_num_regs): Increase.
10745 (arm_regmap): Include status register.
10746
107472002-11-17 Daniel Jacobowitz <drow@mvista.com>
10748
10749 * linux-low.c (register_addr): Remove incorrect -1 check.
10750
a9fa9f7d
DJ
107512002-08-29 Daniel Jacobowitz <drow@mvista.com>
10752
10753 * linux-low.c (linux_create_inferior): Call setpgid. Return
10754 the new PID.
10755 (unstopped_p, linux_signal_pid): Remove.
10756 (linux_target_ops): Remove linux_signal_pid.
10757 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10758 global instead of target method.
10759 * target.h (struct target_ops): Remove signal_pid. Update comment
10760 for create_inferior.
10761 * server.c (signal_pid): New variable.
10762 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10763 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10764 (attach_inferior): Set signal_pid.
10765
17574093
DJ
107662002-08-23 Daniel Jacobowitz <drow@mvista.com>
10767
10768 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10769
107702002-08-20 Jim Blandy <jimb@redhat.com>
10771
10772 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10773 default for this.
10774
107752002-08-01 Andrew Cagney <cagney@redhat.com>
10776
10777 * Makefile.in: Make chill references obsolete.
10778
107792002-07-24 Kevin Buettner <kevinb@redhat.com>
10780
10781 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10782 * configure: Regenerate.
10783 * config.in: Regenerate.
10784
107852002-07-09 David O'Brien <obrien@FreeBSD.org>
10786
10787 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10788 (perror_with_name, remote_close, remote_open, expect, play): Static.
10789
107902002-07-04 Michal Ludvig <mludvig@suse.cz>
10791
4b8dad4a 10792 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10793 byte offsets instead of an array of indexes.
10794 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10795
107962002-06-13 Daniel Jacobowitz <drow@mvista.com>
10797
10798 * regcache.c: Add comment.
10799
108002002-06-11 Daniel Jacobowitz <drow@mvista.com>
10801
10802 * thread-db.c: New file.
10803 * proc-service.c: New file.
10804 * acinclude.m4: New file.
10805 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10806 proc-service.o, and thread-db.o.
10807 (linux-low.o): Add USE_THREAD_DB.
10808 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10809 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10810 * aclocal.m4: Regenerated.
10811 * config.in: Regenerated.
10812 * configure: Regenerated.
10813 * configure.in: Check for proc_service.h, sys/procfs.h,
10814 thread_db.h, and linux/elf.h headrs.
10815 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10816 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10817 Check for -lthread_db and thread support.
10818 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10819 PowerPC, and SuperH.
10820 * i387-fp.c: Constify arguments.
10821 * i387-fp.h: Likewise.
10822 * inferiors.c: (struct thread_info): Renamed from
10823 `struct inferior_info'. Remove PID member. Use generic inferior
10824 list header. All uses updated.
10825 (inferiors, signal_pid): Removed.
10826 (all_threads): New variable.
10827 (get_thread): Define.
10828 (add_inferior_to_list): New function.
10829 (for_each_inferior): New function.
10830 (change_inferior_id): New function.
10831 (add_inferior): Removed.
10832 (remove_inferior): New function.
10833 (add_thread): New function.
10834 (free_one_thread): New function.
10835 (remove_thread): New function.
10836 (clear_inferiors): Use for_each_inferior and free_one_thread.
10837 (find_inferior): New function.
10838 (find_inferior_id): New function.
10839 (inferior_target_data): Update argument type.
10840 (set_inferior_target_data): Likewise.
10841 (inferior_regcache_data): Likewise.
10842 (set_inferior_regcache_data): Likewise.
10843 * linux-low.c (linux_bp_reinsert): Remove.
10844 (all_processes, stopping_threads, using_thrads)
10845 (struct pending_signals, debug_threads, pid_of): New.
10846 (inferior_pid): Replace with macro.
10847 (struct inferior_linux_data): Remove.
10848 (get_stop_pc, add_process): New functions.
10849 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10850 Use add_process and add_thread.
10851 (linux_attach_lwp): New function, based on old linux_attach. Use
10852 add_process and add_thread. Set stop_expected for new threads.
10853 (linux_attach): New function.
10854 (linux_kill_one_process): New function.
10855 (linux_kill): Kill all LWPs.
10856 (linux_thread_alive): Use find_inferior_id.
10857 (check_removed_breakpoints, status_pending_p): New functions.
10858 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10859 Update. Use WNOHANG. Wait for cloned processes also. Update process
10860 struct for the found process.
10861 (linux_wait_for_event): New function.
10862 (linux_wait): Use it. Support LWPs.
10863 (send_sigstop, wait_for_sigstop, stop_all_processes)
10864 (linux_resume_one_process, linux_continue_one_process): New functions.
10865 (linux_resume): Support LWPs.
10866 (REGISTER_RAW_SIZE): Remove.
10867 (fetch_register): Use register_size instead. Call supply_register.
10868 (usr_store_inferior_registers): Likewise. Call collect_register.
10869 Fix recursive case.
10870 (regsets_fetch_inferior_registers): Improve error message.
10871 (regsets_store_inferior_registers): Add debugging.
10872 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10873 (unstopped_p, linux_signal_pid): New functions.
10874 (linux_target_ops): Add linux_signal_pid.
10875 (linux_init_signals): New function.
10876 (initialize_low): Call it. Initialize using_threads.
10877 * regcache.c (inferior_regcache_data): Add valid
10878 flag.
10879 (get_regcache): Fetch registers lazily. Add fetch argument
10880 and update all callers.
10881 (regcache_invalidate_one, regcache_invalidate): New
10882 functions.
10883 (new_register_cache): Renamed from create_register_cache.
10884 Return the new regcache.
10885 (free_register_cache): Change argument to a void *.
10886 (registers_to_string, registers_from_string): Call get_regcache
10887 with fetch flag set.
10888 (register_data): Make static. Pass fetch flag to get_regcache.
10889 (supply_register): Call get_regcache with fetch flag clear.
10890 (collect_register): Call get_regcache with fetch flag set.
10891 (collect_register_as_string): New function.
10892 * regcache.h: Update.
10893 * remote-utils.c (putpkt): Flush after debug output and use
10894 stderr.
10895 Handle input interrupts while waiting for an ACK.
10896 (input_interrupt): Use signal_pid method.
10897 (getpkt): Flush after debug output and use stderr.
10898 (outreg): Use collect_register_as_string.
10899 (new_thread_notify, dead_thread_notify): New functions.
10900 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10901 and general_thread.
10902 (look_up_one_symbol): Flush after debug output.
10903 * server.c (step_thread, server_waiting): New variables.
10904 (start_inferior): Don't use signal_pid. Update call to mywait.
10905 (attach_inferior): Update call to mywait.
10906 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10907 (main): Don't fetch/store registers explicitly. Use
10908 set_desired_inferior. Support proposed ``Hs'' packet. Update
10909 calls to mywait.
10910 * server.h: Update.
10911 (struct inferior_list, struct_inferior_list_entry): New.
10912 * target.c (set_desired_inferior): New.
10913 (write_inferior_memory): Constify.
10914 (mywait): New function.
10915 * target.h: Update.
10916 (struct target_ops): New signal_pid method.
10917 (mywait): Removed macro, added prototype.
10918
10919 * linux-low.h (regset_func): Removed.
10920 (regset_fill_func, regset_store_func): New.
10921 (enum regset_type): New.
10922 (struct regset_info): Add type field. Use new operation types.
10923 (struct linux_target_ops): stop_pc renamed to get_pc.
10924 Add decr_pc_after_break and breakpoint_at.
10925 (get_process, get_thread_proess, get_process_thread)
10926 (strut process_info, all_processes, linux_attach_lwp)
10927 (thread_db_init): New.
10928
10929 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10930 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10931 (the_low_target): Add new members.
10932 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10933 (i386_store_fpxregset): Constify.
10934 (target_regsets): Add new kind identifier.
10935 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10936 (i386_set_pc): Add debugging.
10937 (i386_breakpoint_at): New function.
10938 (the_low_target): Add new members.
10939 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10940 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10941 (mips_breakpoint_at): New.
10942 (the_low_target): Add new members.
10943 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10944 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10945 (the_low_target): Add new members.
10946 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10947 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10948 (the_low_target): Add new members.
10949 * linux-x86-64-low.c (target_regsets): Add new kind
10950 identifier.
10951
109522002-05-15 Daniel Jacobowitz <drow@mvista.com>
10953
10954 From Martin Pool <mbp@samba.org>:
10955 * server.c (gdbserver_usage): New function.
10956 (main): Call it.
10957
109582002-05-14 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10961 stop_at -> stop_pc.
10962
109632002-05-04 Andrew Cagney <ac131313@redhat.com>
10964
10965 * Makefile.in: Remove obsolete code.
10966
109672002-04-24 Michal Ludvig <mludvig@suse.cz>
10968
10969 * linux-low.c (regsets_fetch_inferior_registers),
10970 (regsets_store_inferior_registers): Removed cast to int from
10971 ptrace() calls.
10972 * regcache.h: Added declaration of struct inferior_info.
10973
109742002-04-20 Daniel Jacobowitz <drow@mvista.com>
10975
10976 * inferiors.c (struct inferior_info): Add regcache_data.
10977 (add_inferior): Call create_register_cache.
10978 (clear_inferiors): Call free_register_cache.
10979 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10980 * regcache.c (struct inferior_regcache_data): New.
10981 (registers): Remove.
10982 (get_regcache): New function.
10983 (create_register_cache, free_register_cache): New functions.
10984 (set_register_cache): Don't initialize the register cache here.
10985 (registers_to_string, registers_from_string, register_data): Call
10986 get_regcache.
10987 * regcache.h: Add prototypes.
10988 * server.h: Likewise.
10989
109902002-04-20 Daniel Jacobowitz <drow@mvista.com>
10991
10992 * mem-break.c: New file.
10993 * mem-break.h: New file.
10994 * Makefile.in: Add mem-break.o rule; update server.h
10995 dependencies.
10996 * inferiors.c (struct inferior_info): Add target_data
10997 member.
10998 (clear_inferiors): Free target_data member if set.
10999 (inferior_target_data, set_inferior_target_data): New functions.
11000 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11001 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11002 * linux-low.c (linux_bp_reinsert): New variable.
11003 (struct inferior_linux_data): New.
11004 (linux_create_inferior): Use set_inferior_target_data.
11005 (linux_attach): Likewise. Call add_inferior.
11006 (linux_wait_for_one_inferior): New function.
11007 (linux_wait): Call it.
11008 (linux_write_memory): Add const.
11009 (initialize_low): Call set_breakpoint_data.
11010 * linux-low.h (struct linux_target_ops): Add breakpoint
11011 handling members.
11012 * server.c (attach_inferior): Remove extra add_inferior
11013 call.
11014 * server.h: Include mem-break.h. Update inferior.c
11015 prototypes.
11016 * target.c (read_inferior_memory)
11017 (write_inferior_memory): New functions.
11018 * target.h (read_inferior_memory)
11019 (write_inferior_memory): Change macros to prototypes.
11020 (struct target_ops): Update comments. Add const to write_memory
11021 definition.
11022
110232002-04-11 Daniel Jacobowitz <drow@mvista.com>
11024
11025 * linux-low.c (usr_store_inferior_registers): Support
11026 registers which are allowed to fail to store.
11027 * linux-low.h (linux_target_ops): Likewise.
11028 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11029 (ppc_cannot_store_register): FPSCR may not be storable.
11030
110312002-04-09 Daniel Jacobowitz <drow@mvista.com>
11032
11033 * server.h: Include <string.h> if HAVE_STRING_H.
11034 * ChangeLog: Correct paths in last ChangeLog entry.
11035
110362002-04-09 Daniel Jacobowitz <drow@mvista.com>
11037
11038 * linux-low.h: Remove obsolete prototypes.
11039 (struct linux_target_ops): New.
11040 (extern the_low_target): New.
11041 * linux-low.c (num_regs, regmap): Remove declarations.
11042 (register_addr): Use the_low_target explicitly.
11043 (fetch_register): Likewise.
11044 (usr_fetch_inferior_registers): Likewise.
11045 (usr_store_inferior_registers): Likewise.
11046 * linux-arm-low.c (num_regs): Remove.
11047 (arm_num_regs): Define.
11048 (arm_regmap): Renamed from regmap, made static.
11049 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11050 made static.
11051 (arm_cannot_store_register): Renamed from cannot_store_register,
11052 made static.
11053 (the_low_target): New.
11054 * linux-i386-low.c (num_regs): Remove.
11055 (i386_num_regs): Define.
11056 (i386_regmap): Renamed from regmap, made static.
11057 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11058 made static.
11059 (i386_cannot_store_register): Renamed from cannot_store_register,
11060 made static.
11061 (the_low_target): New.
11062 * linux-ia64-low.c (num_regs): Remove.
11063 (ia64_num_regs): Define.
11064 (ia64_regmap): Renamed from regmap, made static.
11065 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11066 made static.
11067 (ia64_cannot_store_register): Renamed from cannot_store_register,
11068 made static.
11069 (the_low_target): New.
11070 * linux-m68k-low.c (num_regs): Remove.
11071 (m68k_num_regs): Define.
11072 (m68k_regmap): Renamed from regmap, made static.
11073 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11074 made static.
11075 (m68k_cannot_store_register): Renamed from cannot_store_register,
11076 made static.
11077 (the_low_target): New.
11078 * linux-mips-low.c (num_regs): Remove.
11079 (mips_num_regs): Define.
11080 (mips_regmap): Renamed from regmap, made static.
11081 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11082 made static.
11083 (mips_cannot_store_register): Renamed from cannot_store_register,
11084 made static.
11085 (the_low_target): New.
11086 * linux-ppc-low.c (num_regs): Remove.
11087 (ppc_num_regs): Define.
11088 (ppc_regmap): Renamed from regmap, made static.
11089 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11090 made static.
11091 (ppc_cannot_store_register): Renamed from cannot_store_register,
11092 made static.
11093 (the_low_target): New.
11094 * linux-s390-low.c (num_regs): Remove.
11095 (s390_num_regs): Define.
11096 (s390_regmap): Renamed from regmap, made static.
11097 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11098 made static.
11099 (s390_cannot_store_register): Renamed from cannot_store_register,
11100 made static.
11101 (the_low_target): New.
11102 * linux-sh-low.c (num_regs): Remove.
11103 (sh_num_regs): Define.
11104 (sh_regmap): Renamed from regmap, made static.
11105 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11106 made static.
11107 (sh_cannot_store_register): Renamed from cannot_store_register,
11108 made static.
11109 (the_low_target): New.
11110 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11111 (the_low_target): New.
11112
111132002-04-09 Daniel Jacobowitz <drow@mvista.com>
11114
11115 * Makefile.in: Add stamp-h target.
11116 * configure.in: Create stamp-h.
11117 * configure: Regenerated.
11118
111192002-04-09 Daniel Jacobowitz <drow@mvista.com>
11120
11121 * inferiors.c: New file.
11122 * target.c: New file.
11123 * target.h: New file.
11124 * Makefile.in: Add target.o and inferiors.o. Update
11125 dependencies.
11126 * linux-low.c (inferior_pid): New static variable,
11127 moved from server.c.
11128 (linux_create_inferior): Renamed from create_inferior.
11129 Call add_inferior. Return 0 on success instead of a PID.
11130 (linux_attach): Renamed from myattach.
11131 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11132 (linux_thread_alive): Renamed from mythread_alive.
11133 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11134 child dies.
11135 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11136 (regsets_store_inferior_registers): Correct error message.
11137 Add missing ``return 0''.
11138 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11139 (linux_store_registers): Renamed from store_inferior_registers.
11140 (linux_read_memory): Renamed from read_inferior_memory.
11141 (linux_write_memory): Renamed from write_inferior_memory.
11142 (linux_target_ops): New structure.
11143 (initialize_low): Call set_target_ops ().
11144 * remote-utils.c (unhexify): New function.
11145 (hexify): New function.
11146 (input_interrupt): Send signals to ``signal_pid''.
11147 * server.c (inferior_pid): Remove.
11148 (start_inferior): Update create_inferior call.
11149 (attach_inferior): Call add_inferior.
11150 (handle_query): New function.
11151 (main): Call handle_query for `q' packets.
11152 * server.h: Include "target.h". Remove obsolete prototypes.
11153 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11154
111552002-04-09 Daniel Jacobowitz <drow@mvista.com>
11156
11157 * Makefile.in: Add WARN_CFLAGS. Update configury
11158 dependencies.
11159 * configure.in: Check for <string.h>
11160 * configure: Regenerate.
11161 * config.in: Regenerate.
11162 * gdbreplay.c: Include needed system headers.
11163 (remote_open): Remove strchr prototype.
11164 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11165 * regcache.c (supply_register): Change buf argument to const void *.
11166 (supply_register_by_name): Likewise.
11167 (collect_register): Change buf argument to void *.
11168 (collect_register_by_name): Likewise.
11169 * regcache.h: Add missing prototypes.
11170 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11171 * server.c (handle_query): New function.
11172 (attached): New static variable, moved out of main.
11173 (main): Quiet longjmp clobber warnings.
11174 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11175 * utils.c (error): Remove NORETURN.
11176 (fatal): Likewise.
This page took 1.498517 seconds and 4 git commands to generate.