Clone remote breakpoints
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
ddcbc397
DB
12015-05-12 Don Breazeal <donb@codesourcery.com>
2
3 * mem-break.c (APPEND_TO_LIST): Define macro.
4 (clone_agent_expr): New function.
5 (clone_one_breakpoint): New function.
6 (clone_all_breakpoints): New function.
7 * mem-break.h: Declare new functions.
8
89245bc0
DB
92015-05-12 Don Breazeal <donb@codesourcery.com>
10
11 * linux-low.c (linux_supports_fork_events): New function.
12 (linux_supports_vfork_events): New function.
13 (linux_target_ops): Initialize new structure members.
14 (initialize_low): Call linux_check_ptrace_features.
15 * lynx-low.c (lynx_target_ops): Initialize new structure
16 members.
17 * server.c (report_fork_events, report_vfork_events):
18 New global flags.
19 (handle_query): Add new features to qSupported packet and
20 response.
21 (captured_main): Initialize new global variables.
22 * target.h (struct target_ops) <supports_fork_events>:
23 New member.
24 <supports_vfork_events>: New member.
25 (target_supports_fork_events): New macro.
26 (target_supports_vfork_events): New macro.
27 * win32-low.c (win32_target_ops): Initialize new structure
28 members.
29
835205d0
GB
302015-05-12 Gary Benson <gbenson@redhat.com>
31
32 * server.c (handle_qxfer_exec_file): Use current process
33 if annex is empty.
34
21e94bd9
SL
352015-05-08 Sandra Loosemore <sandra@codesourcery.com>
36
37 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
38 Remove HAVE_PTRACE_GETREGS conditionals.
39 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
40 instead of PTRACE_GETREGS and PTRACE_SETREGS.
41
45614f15
YQ
422015-05-08 Yao Qi <yao.qi@linaro.org>
43
44 * linux-low.c (linux_supports_conditional_breakpoints): New
45 function.
46 (linux_target_ops): Install new target method.
47 * lynx-low.c (lynx_target_ops): Install NULL hook for
48 supports_conditional_breakpoints.
49 * nto-low.c (nto_target_ops): Likewise.
50 * spu-low.c (spu_target_ops): Likewise.
51 * win32-low.c (win32_target_ops): Likewise.
52 * server.c (handle_query): Check
53 target_supports_conditional_breakpoints.
54 * target.h (struct target_ops) <supports_conditional_breakpoints>:
55 New field.
56 (target_supports_conditional_breakpoints): New macro.
57
80ad801e
PA
582015-05-06 Pedro Alves <palves@redhat.com>
59
60 PR server/18081
61 * server.c (start_inferior): If the process exits, mourn it.
62
819843c7
GB
632015-04-21 Gary Benson <gbenson@redhat.com>
64
65 * hostio.c (fileio_open_flags_to_host): Factored out to
66 fileio_to_host_openflags in common/fileio.c. Single use
67 updated.
68
a2d5a9d7
MF
692015-04-17 Max Filippov <jcmvbkbc@gmail.com>
70
71 * linux-xtensa-low.c (xtensa_fill_gregset)
72 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
73 XCHAL_HAVE_LOOP.
74
deb44829
MF
752015-04-17 Max Filippov <jcmvbkbc@gmail.com>
76
77 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
78 (regs_info): Replace usrregs pointer with NULL.
79
e57f1de3
GB
802015-04-17 Gary Benson <gbenson@redhat.com>
81
82 * target.h (struct target_ops) <pid_to_exec_file>: New field.
83 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
84 * server.c (handle_qxfer_exec_file): New function.
85 (qxfer_packets): Add exec-file entry.
86 (handle_query): Report qXfer:exec-file:read as supported packet.
87
62828379
RN
882015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
89
90 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
91
b88bb450
GB
922015-04-09 Gary Benson <gbenson@redhat.com>
93
94 * hostio-errno.c (errno_to_fileio_error): Remove function.
95 Update caller to use remote_fileio_to_fio_error.
96
c8f4bfdd
YQ
972015-04-09 Yao Qi <yao.qi@linaro.org>
98
99 * linux-low.c (linux_insert_point): Call
100 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
101 (linux_remove_point): Call remove_memory_breakpoint if type is
102 raw_bkpt_type_sw.
103 * linux-x86-low.c (x86_insert_point): Don't call
104 insert_memory_breakpoint.
105 (x86_remove_point): Don't call remove_memory_breakpoint.
106
41f98f02
PA
1072015-04-01 Pedro Alves <palves@redhat.com>
108 Cleber Rosa <crosa@redhat.com>
109
110 * server.c (gdbserver_usage): Reorganize and extend the usage
111 message.
112
2bf6fb9d
PA
1132015-03-24 Pedro Alves <palves@redhat.com>
114
115 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
116 output. Also dump TRAP_TRACE.
117 (linux_low_filter_event): In debug output, distinguish a
118 resume_stop SIGSTOP from a delayed SIGSTOP.
119
369f6daa
GB
1202015-03-24 Gary Benson <gbenson@redhat.com>
121
122 * linux-x86-low.c (x86_linux_new_thread): Moved to
123 nat/x86-linux.c.
124 (x86_linux_prepare_to_resume): Likewise.
125
8e5d4070
GB
1262015-03-24 Gary Benson <gbenson@redhat.com>
127
128 * Makefile.in (x86-linux-dregs.o): New rule.
129 * configure.srv: Add x86-linux-dregs.o to relevant targets.
130 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
131 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
132 (x86_linux_dr_get): Likewise.
133 (x86_linux_dr_set): Likewise.
134 (update_debug_registers_callback): Likewise.
135 (x86_linux_dr_set_addr): Likewise.
136 (x86_linux_dr_get_addr): Likewise.
137 (x86_linux_dr_set_control): Likewise.
138 (x86_linux_dr_get_control): Likewise.
139 (x86_linux_dr_get_status): Likewise.
140 (x86_linux_update_debug_registers): Likewise.
141
2b95d440
GB
1422015-03-24 Gary Benson <gbenson@redhat.com>
143
144 * linux-x86-low.c (x86_linux_update_debug_registers):
145 New function, factored out from...
146 (x86_linux_prepare_to_resume): ...this.
147
14b0bc68
GB
1482015-03-24 Gary Benson <gbenson@redhat.com>
149
150 * linux-x86-low.c (x86_linux_dr_get): Update comments.
151 (x86_linux_dr_set): Likewise.
152 (update_debug_registers_callback): Likewise.
153 (x86_linux_dr_set_addr): Likewise.
154 (x86_linux_dr_get_addr): Likewise.
155 (x86_linux_dr_set_control): Likewise.
156 (x86_linux_dr_get_control): Likewise.
157 (x86_linux_dr_get_status): Likewise.
158 (x86_linux_prepare_to_resume): Likewise.
159
5dfe6ca8
GB
1602015-03-24 Gary Benson <gbenson@redhat.com>
161
162 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
163 Use perror_with_name. Pass string through gettext.
164 (x86_linux_dr_set): Likewise.
165
d33472ad
GB
1662015-03-24 Gary Benson <gbenson@redhat.com>
167
168 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
169 (x86_linux_dr_set_addr): ...this.
170 (x86_dr_low_get_addr): Rename to...
171 (x86_linux_dr_get_addr): ...this.
172 (x86_dr_low_set_control): Rename to...
173 (x86_linux_dr_set_control): ...this.
174 (x86_dr_low_get_control): Rename to...
175 (x86_linux_dr_get_control): ...this.
176 (x86_dr_low_get_status): Rename to...
177 (x86_linux_dr_get_status): ...this.
178 (x86_dr_low): Update with new function names.
179
4b134ca1
GB
1802015-03-24 Gary Benson <gbenson@redhat.com>
181
182 * Makefile.in (x86-linux.o): New rule.
183 * configure.srv: Add x86-linux.o to relevant targets.
184 * linux-low.c (lwp_set_arch_private_info): New function.
185 (lwp_arch_private_info): Likewise.
186 * linux-x86-low.c: Include nat/x86-linux.h.
187 (arch_lwp_info): Removed structure.
188 (update_debug_registers_callback):
189 Use lwp_set_debug_registers_changed.
190 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
191 and lwp_set_debug_registers_changed.
192 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
193
34c703da
GB
1942015-03-24 Gary Benson <gbenson@redhat.com>
195
196 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
197 * linux-arm-low.c (arm_new_thread): Likewise.
198 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
199 * linux-mips-low.c (mips_linux_new_thread): Likewise.
200 * linux-x86-low.c (x86_linux_new_thread): Likewise.
201 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
202
cff068da
GB
2032015-03-24 Gary Benson <gbenson@redhat.com>
204
205 * linux-low.c (ptid_of_lwp): New function.
206 (lwp_is_stopped): Likewise.
207 (lwp_stop_reason): Likewise.
208 * linux-x86-low.c (update_debug_registers_callback):
209 Use lwp_is_stopped.
210 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
211 lwp_stop_reason.
212
b2f7c7e8
GB
2132015-03-24 Gary Benson <gbenson@redhat.com>
214
215 * linux-low.h (linux_stop_lwp): Remove declaration.
216
6d4ee8c6
GB
2172015-03-24 Gary Benson <gbenson@redhat.com>
218
219 * linux-low.h: Include nat/linux-nat.h.
220 * linux-low.c (iterate_over_lwps_args): New structure.
221 (iterate_over_lwps_filter): New function.
222 (iterate_over_lwps): Likewise.
223 * linux-x86-low.c (update_debug_registers_callback):
224 Update signature to what iterate_over_lwps expects.
225 Remove PID check that iterate_over_lwps now performs.
226 (x86_dr_low_set_addr): Use iterate_over_lwps.
227 (x86_dr_low_set_control): Likewise.
228
70a0bb6b
GB
2292015-03-24 Gary Benson <gbenson@redhat.com>
230
231 * linux-x86-low.c (x86_debug_reg_state): New function.
232 (x86_linux_prepare_to_resume): Use the above.
233
7b669087
GB
2342015-03-24 Gary Benson <gbenson@redhat.com>
235
236 * linux-low.c (current_lwp_ptid): New function.
237 * linux-x86-low.c: Include nat/linux-nat.h.
238 (x86_dr_low_get_addr): Use current_lwp_ptid.
239 (x86_dr_low_get_control): Likewise.
240 (x86_dr_low_get_status): Likewise.
241
eef49a3d
PA
2422015-03-20 Pedro Alves <palves@redhat.com>
243
244 * tracepoint.c (cmd_qtstatus): Make "str" const.
245
b2333d22
PA
2462015-03-20 Pedro Alves <palves@redhat.com>
247
248 * server.c (handle_general_set): Make "req_str" const.
249
23f238d3
PA
2502015-03-19 Pedro Alves <palves@redhat.com>
251
252 * linux-low.c (linux_resume_one_lwp): Rename to ...
253 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
254 instead call perror_with_name.
255 (check_ptrace_stopped_lwp_gone): New function.
256 (linux_resume_one_lwp): Reimplement as wrapper around
257 linux_resume_one_lwp_throw that swallows errors if the LWP is
258 gone.
259
91baf43f
PA
2602015-03-19 Pedro Alves <palves@redhat.com>
261
262 * linux-low.c (count_events_callback, select_event_lwp_callback):
263 No longer check whether the thread has resume_stop as last resume
264 kind.
265
8bf3b159
PA
2662015-03-19 Pedro Alves <palves@redhat.com>
267
268 * linux-low.c (count_events_callback, select_event_lwp_callback):
269 Use the lwp's status_pending_p field, not the thread's.
270
b90fc188
PA
2712015-03-19 Pedro Alves <palves@redhat.com>
272
273 * linux-low.c (select_event_lwp_callback): Update comments to
274 no longer mention SIGTRAP.
275
464b0089
GB
2762015-03-18 Gary Benson <gbenson@redhat.com>
277
278 * server.c (handle_query): Do not report vFile:fstat as supported.
279
aa9e327f
GB
2802015-03-11 Gary Benson <gbenson@redhat.com>
281
282 * hostio.c (sys/types.h): New include.
283 (sys/stat.h): Likewise.
284 (common-remote-fileio.h): Likewise.
285 (handle_fstat): New function.
286 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 287
791c0056
GB
2882015-03-11 Gary Benson <gbenson@redhat.com>
289
290 * configure.ac (AC_CHECK_MEMBERS): Add checks for
291 struct stat.st_blocks and struct stat.st_blksize.
292 * configure: Regenerate.
293 * config.in: Likewise.
294 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
295 (OBS): Add common-remote-fileio.o.
296 (common-remote-fileio.o): New rule.
297
9a9df970
PA
2982015-03-09 Pedro Alves <palves@redhat.com>
299
300 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
301 'struct sockaddr' pointer in 'accept' call.
302
9eb1356e
PA
3032015-03-09 Pedro Alves <palves@redhat.com>
304
305 Revert:
306 2015-03-07 Pedro Alves <palves@redhat.com>
307 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
308 or <winsock2.h> here. Instead include "gdb_socket.h".
309 (remote_open): Use union gdb_sockaddr_u.
310 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
311 or <winsock2.h> here. Instead include "gdb_socket.h".
312 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
313 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
314 or <sys/un.h>.
315 (init_named_socket, gdb_agent_helper_thread): Use union
316 gdb_sockaddr_u.
317
aac331e4
PA
3182015-03-07 Pedro Alves <palves@redhat.com>
319
320 * configure.ac (build_warnings): Move
321 -Wdeclaration-after-statement to the C-specific set.
322 * configure: Regenerate.
323
366c75fc
PA
3242015-03-07 Pedro Alves <palves@redhat.com>
325
326 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
327 or <winsock2.h> here. Instead include "gdb_socket.h".
328 (remote_open): Use union gdb_sockaddr_u.
329 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
330 or <winsock2.h> here. Instead include "gdb_socket.h".
331 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
332 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
333 or <sys/un.h>.
334 (init_named_socket, gdb_agent_helper_thread): Use union
335 gdb_sockaddr_u.
336
492d29ea
PA
3372015-03-07 Pedro Alves <palves@redhat.com>
338
339 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
340 instead.
341
60a191ed
YQ
3422015-03-06 Yao Qi <yao.qi@linaro.org>
343
344 * linux-aarch64-low.c (aarch64_insert_point): Use
345 show_debug_regs as a boolean.
346 (aarch64_remove_point): Likewise.
347
f5771b1d
PA
3482015-03-05 Pedro Alves <palves@redhat.com>
349
350 * lynx-low.c (lynx_target_ops): Install NULL hooks for
351 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
352 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
353 * nto-low.c (nto_target_ops): Likewise.
354 * spu-low.c (spu_target_ops): Likewise.
355 * win32-low.c (win32_target_ops): Likewise.
356
3e572f71
PA
3572015-03-04 Pedro Alves <palves@redhat.com>
358
359 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
360 Decide whether a breakpoint triggered based on the SIGTRAP's
361 siginfo.si_code.
362 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
363 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
364 (linux_low_filter_event): Check for breakpoints before checking
365 watchpoints.
366 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
367 siginfo.si_code.
368 (linux_stopped_by_sw_breakpoint)
369 (linux_supports_stopped_by_sw_breakpoint)
370 (linux_stopped_by_hw_breakpoint)
371 (linux_supports_stopped_by_hw_breakpoint): New functions.
372 (linux_target_ops): Install new target methods.
373
1ec68e26
PA
3742015-03-04 Pedro Alves <palves@redhat.com>
375
376 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
377 * server.c (swbreak_feature, hwbreak_feature): New globals.
378 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
379 (captured_main): Clear swbreak_feature and hwbreak_feature.
380 * server.h (swbreak_feature, hwbreak_feature): Declare.
381 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
382 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
383 supports_stopped_by_hw_breakpoint>: New fields.
384 (target_supports_stopped_by_sw_breakpoint)
385 (target_stopped_by_sw_breakpoint)
386 (target_supports_stopped_by_hw_breakpoint)
387 (target_stopped_by_hw_breakpoint): Declare.
388
15c66dd6
PA
3892015-03-04 Pedro Alves <palves@redhat.com>
390
391 enum lwp_stop_reason -> enum target_stop_reason
392 * linux-low.c (check_stopped_by_breakpoint): Adjust.
393 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
394 (linux_wait_1, stuck_in_jump_pad_callback)
395 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
396 (linux_stopped_by_watchpoint):
397 * linux-low.h (enum lwp_stop_reason): Delete.
398 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
399 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
400
98fc70d6
YQ
4012015-03-04 Yao Qi <yao.qi@linaro.org>
402
403 * Makefile.in (SFILES): Add linux-aarch64-low.c.
404
dd2ac174
GB
4052015-03-03 Gary Benson <gbenson@redhat.com>
406
407 * hostio.c (handle_vFile): Fix prefix lengths.
408
d68e53f4
MM
4092015-03-03 Markus Metzger <markus.t.metzger@intel.com>
410
411 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
412 ptr_bits.
413
bf2d68ab
AA
4142015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
415
416 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
417 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
418 (clean): Add "rm -f" for above C files.
419 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
420 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
421 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
422 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
423 * linux-s390-low.c (HWCAP_S390_VX): New macro.
424 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
425 (init_registers_s390x_vx_linux64)
426 (init_registers_s390x_tevx_linux64)
427 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
428 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
429 declarations.
430 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
431 (s390_store_vxrs_high): New functions.
432 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
433 NT_S390_VXRS_HIGH.
434 (s390_arch_setup): Add logic for selecting one of the new target
435 descriptions. Activate the new vector regsets if applicable.
436 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
437 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
438 and init_registers_s390x_tevx_linux64.
439
c966a859
PA
4402015-03-01 Pedro Alves <palves@redhat.com>
441
442 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
443 parameter.
444
4180215b
PA
4452015-02-27 Pedro Alves <palves@redhat.com>
446
447 * linux-x86-low.c (u_debugreg_offset): New function.
448 (x86_linux_dr_get, x86_linux_dr_set): Use it.
449
749bab01
PA
4502015-02-27 Pedro Alves <palves@redhat.com>
451
452 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
453 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
454 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
455 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
456 (ps_lsetfpregs, ps_getpid)
457 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
458 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
459 (ps_lsetxregs, ps_plog): Declare.
460
3c14e5a3
PA
4612015-02-27 Pedro Alves <palves@redhat.com>
462
463 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
464 IP_AGENT_EXPORT_FUNC.
465 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
466 IP_AGENT_EXPORT_FUNC.
467 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
468 (IP_AGENT_EXPORT): Delete.
469 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
470 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
471 (gdb_trampoline_buffer_error, collecting, gdb_collect)
472 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
473 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
474 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
475 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
476 (traceframe_read_count, traceframe_write_count)
477 (traceframes_created, trace_state_variables, get_raw_reg)
478 (get_trace_state_variable_value, set_trace_state_variable_value)
479 (ust_loaded, helper_thread_id, cmd_buf): Use
480 IPA_SYM_EXPORTED_NAME.
481 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
482 (tracepoints) Use IP_AGENT_EXPORT_VAR.
483 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
484 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
485 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
486 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
487 EXTERN_C_PUSH/EXTERN_C_POP.
488 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
489 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
490 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
491 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
492 (traceframe_write_count, traceframe_read_count)
493 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
494 (about_to_request_buffer_space, get_trace_state_variable_value)
495 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
496 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
497 EXTERN_C_PUSH/EXTERN_C_POP.
498 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
499 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
500 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
501 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
502 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
503 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
504 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
505 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
506 Define.
507 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
508 (IP_AGENT_EXPORT_VAR_DECL): Define.
509 (tracing): Declare.
510 (gdb_agent_get_raw_reg): Declare.
511
fe978cb0
PA
5122015-02-27 Tom Tromey <tromey@redhat.com>
513 Pedro Alves <palves@redhat.com>
514
515 Rename symbols whose names are reserved C++ keywords throughout.
516
3bc3d82a
PA
5172015-02-27 Pedro Alves <palves@redhat.com>
518
519 * Makefile.in (COMPILER): New, get it from autoconf.
520 (CXX): Get from autoconf instead.
521 (COMPILE.pre): Use COMPILER.
522 (CC-LD): Rename to ...
523 (CC_LD): ... this. Use COMPILER.
524 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
525 (CXX_FOR_TARGET): Default to g++ instead of gcc.
526 * acinclude.m4: Include build-with-cxx.m4.
527 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
528 Disable -Werror by default if building in C++ mode.
529 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
530 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
531 the C++ compiler. Save/restore CXXFLAGS too.
532 * configure: Regenerate.
533
07697489
PA
5342015-02-27 Pedro Alves <palves@redhat.com>
535
536 * acinclude.m4: Include libiberty.m4.
537 * configure.ac: Call libiberty_INIT.
538 * config.in, configure: Regenerate.
539
9beb7c4e
PA
5402015-02-26 Pedro Alves <palves@redhat.com>
541
542 * linux-low.c (linux_wait_1): When incrementing the PC past a
543 program breakpoint always use the_low_target.breakpoint_len as
544 increment, rather than the maximum between that and
545 the_low_target.decr_pc_after_break.
546
8090aef2
PA
5472015-02-23 Pedro Alves <palves@redhat.com>
548
549 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
550 thread was doing a step-over; always adjust the PC if
551 we stepped over a permanent breakpoint.
552 (linux_wait_1): If we stepped over breakpoint that was on top of a
553 permanent breakpoint, manually advance the PC past it.
554
bc9540e8
PA
5552015-02-23 Pedro Alves <palves@redhat.com>
556
557 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
558 modes.
559 (x86_fill_gregset, x86_store_gregset): Use it when handling
560 $orig_eax.
561
2db9a427
PA
5622015-02-20 Pedro Alves <palves@redhat.com>
563
564 * thread-db.c: Include "nat/linux-procfs.h".
565 (thread_db_init): Skip listing new threads if the kernel supports
566 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
567
afa8d396
PA
5682015-02-20 Pedro Alves <palves@redhat.com>
569
570 * linux-low.c (status_pending_p_callback): Use ptid_match.
571
c9587f88
AT
5722015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
573
574 PR breakpoints/16812
575 * linux-low.c (wstatus_maybe_breakpoint): Remove.
576 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
577 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
578
b05ec7a5
AT
5792015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
580
581 PR breakpoints/15956
582 * tracepoint.c (cmd_qtinit): Add check for current_thread.
583
d33501a5
MM
5842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
585
586 * linux-low.c (linux_low_btrace_conf): Print size.
587 * server.c (handle_btrace_conf_general_set): New.
588 (hanle_general_set): Call handle_btrace_conf_general_set.
589 (handle_query): Report Qbtrace-conf:bts:size as supported.
590
f4abbc16
MM
5912015-02-09 Markus Metzger <markus.t.metzger@intel.com>
592
593 * linux-low.c (linux_low_enable_btrace): Update parameters.
594 (linux_low_btrace_conf): New.
595 (linux_target_ops)<to_btrace_conf>: Initialize.
596 * server.c (current_btrace_conf): New.
597 (handle_btrace_enable): Rename to ...
598 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
599 to target_enable_btrace. Update comment. Update users.
600 (handle_qxfer_btrace_conf): New.
601 (qxfer_packets): Add btrace-conf entry.
602 (handle_query): Report qXfer:btrace-conf:read as supported packet.
603 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
604 (target_ops)<read_btrace_conf>: New.
605 (target_enable_btrace): Update parameters.
606 (target_read_btrace_conf): New.
607
043c3577
MM
6082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
609
610 * server.c (handle_btrace_general_set): Remove call to
611 target_supports_btrace.
612 (supported_btrace_packets): New.
613 (handle_query): Call supported_btrace_packets.
614 * target.h: include btrace-common.h.
615 (btrace_target_info): Removed.
616 (supports_btrace, target_supports_btrace): Update parameters.
617
734b0e4b
MM
6182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
619
620 * Makefile.in (SFILES): Add common/btrace-common.c.
621 (OBS): Add common/btrace-common.o.
622 (btrace-common.o): Add build rules.
623 * linux-low: Include btrace-common.h.
624 (linux_low_read_btrace): Use struct btrace_data. Call
625 btrace_data_init and btrace_data_fini.
626
d6c146e9
PA
6272015-02-06 Pedro Alves <palves@redhat.com>
628
629 * thread-db.c (find_new_threads_callback): Add debug output.
630
20ba1ce6
PA
6312015-02-04 Pedro Alves <palves@redhat.com>
632
633 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
634 (resume_stopped_resumed_lwps): New function.
635 (linux_wait_for_event_filtered): Use it.
636
8cc73a39
SDJ
6372015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
638
639 * Makefile.in (SFILES): Add linux-personality.c.
640 (linux-personality.o): New rule.
641 * configure.srv (srv_linux_obj): Add linux-personality.o to the
642 list of objects to be built.
643 * linux-low.c: Include nat/linux-personality.h.
644 (linux_create_inferior): Remove code to disable address space
645 randomization (moved to ../nat/linux-personality.c). Create
646 cleanup to disable address space randomization.
647
fb23d554
SDJ
6482015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
649
650 * Makefile.in (posix-strerror.o): New rule.
651 (mingw-strerror.o): Likewise.
652 * configure: Regenerated.
653 * configure.ac: Source file ../common/common.host. Initialize new
654 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
655
cdf43629
YQ
6562015-01-14 Yao Qi <yao@codesourcery.com>
657
658 * Makefile.in (SFILES): Add nat/ppc-linux.c.
659 (ppc-linux.o): New rule.
660 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
661 * configure.ac: AC_CHECK_FUNCS(getauxval).
662 * config.in: Re-generated.
663 * configure: Re-generated.
664 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
665 ppc64_64bit_inferior_p
666
514c5338
YQ
6672015-01-14 Yao Qi <yao@codesourcery.com>
668
669 * linux-ppc-low.c: Include "nat/ppc-linux.h".
670 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
671 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
672 (PT_ORIG_R3, PT_TRAP): Likewise.
673 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
674 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
675 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
676
3368c1e5
JB
6772015-01-10 Joel Brobecker <brobecker@adacore.com>
678
679 * i387-fp.c (i387_cache_to_xsave): In look over
680 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
681 zmmh_low_space field by use of zmmh_high_space.
682
582511be
PA
6832015-01-09 Pedro Alves <palves@redhat.com>
684
685 * linux-low.c (step_over_bkpt): Move higher up in the file.
686 (handle_extended_wait): Don't store the stop_pc here.
687 (get_stop_pc): Adjust comments and rename to ...
688 (check_stopped_by_breakpoint): ... this. Record whether the LWP
689 stopped for a software breakpoint or hardware breakpoint.
690 (thread_still_has_status_pending_p): New function.
691 (status_pending_p_callback): Use
692 thread_still_has_status_pending_p. If the event is no longer
693 interesting, resume the LWP.
694 (handle_tracepoints): Add assert.
695 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
696 (wstatus_maybe_breakpoint): New function.
697 (cancel_breakpoint): Delete function.
698 (check_stopped_by_watchpoint): New function, factored out from
699 linux_low_filter_event.
700 (lp_status_maybe_breakpoint): Delete function.
701 (linux_low_filter_event): Remove filter_ptid argument.
702 Leave thread group exits pending here. Store the LWP's stop PC.
703 Always leave events pending.
704 (linux_wait_for_event_filtered): Pull all events out of the
705 kernel, and leave them all pending.
706 (count_events_callback, select_event_lwp_callback): Consider all
707 events.
708 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
709 (select_event_lwp): Only give preference to the stepping LWP in
710 all-stop mode. Adjust comments.
711 (ignore_event): New function.
712 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
713 references to cancel_breakpoints. Adjust to renames. Also give
714 equal priority to all LWPs that have had events in non-stop mode.
715 If reporting a software breakpoint event, unadjust the LWP's PC.
716 (linux_wait): If linux_wait_1 returned an ignored event, retry.
717 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
718 Adjust.
719 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
720 (resume_status_pending_p): Use thread_still_has_status_pending_p.
721 (linux_stopped_by_watchpoint): Adjust.
722 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
723 * linux-low.h (enum lwp_stop_reason): New.
724 (struct lwp_info) <stop_pc>: Adjust comment.
725 <stopped_by_watchpoint>: Delete field.
726 <stop_reason>: New field.
727 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
728 * mem-break.c (software_breakpoint_inserted_here)
729 (hardware_breakpoint_inserted_here): New function.
730 * mem-break.h (software_breakpoint_inserted_here)
731 (hardware_breakpoint_inserted_here): Declare.
732 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
733 (cancel_breakpoints): Delete.
734 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
735 (upload_fast_traceframes): Remove references to
736 cancel_breakpoints.
737
a33e3959
PA
7382015-01-09 Pedro Alves <palves@redhat.com>
739
740 * thread-db.c (find_new_threads_callback): Ignore thread if the
741 kernel thread ID is -1.
742
8784d563
PA
7432015-01-09 Pedro Alves <palves@redhat.com>
744
745 * linux-low.c (linux_attach_fail_reason_string): Move to
746 nat/linux-ptrace.c, and rename.
747 (linux_attach_lwp): Update comment.
748 (attach_proc_task_lwp_callback): New function.
749 (linux_attach): Adjust to rename and use
750 linux_proc_attach_tgid_threads.
751 (linux_attach_fail_reason_string): Delete declaration.
752
76f2b779
JB
7532015-01-01 Joel Brobecker <brobecker@adacore.com>
754
755 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
756 * server.c (gdbserver_version): Likewise.
757
fafcc06a
SDJ
7582014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
759
760 * remote-utils.c: Include ctype.h.
761 (input_interrupt): Explicitly handle the case when the char
762 received is the NUL byte. Improve the printing of non-ASCII
763 characters.
764
beed38b8
JB
7652014-12-16 Joel Brobecker <brobecker@adacore.com>
766
767 * linux-low.c (linux_low_filter_event): Update call to
768 linux_enable_event_reporting following the addition of
769 a new parameter to that function.
770
bf330350
CU
7712014-12-16 Catalin Udma <catalin.udma@freescale.com>
772
773 PR server/17457
774 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
775 (AARCH64_FPCR_REGNO): Likewise.
776 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
777 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
778 (aarch64_store_fpregset): Likewise.
779
5227d625
JB
7802014-12-15 Joel Brobecker <brobecker@adacore.com>
781
782 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
783 Remove FIXME comment about assumption about N.
784
f93b65a0
JB
7852014-12-13 Joel Brobecker <brobecker@adacore.com>
786
787 * configure.ac: If large-file support is disabled in GDBserver,
788 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
789 * configure: Regenerate.
790
e5a9158d
AA
7912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
792
793 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
794 warning upon ENODATA from ptrace.
795 * linux-s390-low.c (s390_store_tdb): New.
796 (s390_regsets): Add regset for NT_S390_TDB.
797
feea5f36
AA
7982014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
799
800 * linux-low.c (regsets_store_inferior_registers): Skip regsets
801 without a fill_function.
802 * linux-s390-low.c (s390_fill_last_break): Remove.
803 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
804 (s390_arch_setup): Use regset's size instead of fill_function for
805 loop end condition.
806
098dbe61
AA
8072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
808
809 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
810 the regset's store function when ptrace returned an error.
811 * regcache.c (get_thread_regcache): Invalidate register cache
812 before fetching inferior's registers.
813
28eef672
AA
8142014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
815
816 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
817 while-loop as for-loop.
818 (regsets_store_inferior_registers): Likewise.
819
bdca27a2
YQ
8202014-11-28 Yao Qi <yao@codesourcery.com>
821
822 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
823 * config.in, configure: Re-generate.
824 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
825 is defined.
826
9c232dda
YQ
8272014-11-21 Yao Qi <yao@codesourcery.com>
828
829 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
830 (AC_CHECK_HEADERS): Remove malloc.h.
831 * configure: Re-generated.
832 * config.in: Re-generated.
833 * server.h: Don't include alloca.h and malloc.h.
834 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
835 Don't include malloc.h.
836
43968415
JB
8372014-11-17 Joel Brobecker <brobecker@adacore.com>
838
839 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
840 corresponding ERRNO check in same block.
841
40e91bc7
PA
8422014-11-12 Pedro Alves <palves@redhat.com>
843
844 * server.c (cont_thread): Update comment.
845 (start_inferior, attach_inferior): No longer clear cont_thread.
846 (handle_v_cont): No longer set cont_thread.
847 (captured_main): Clear cont_thread each time a GDB connects.
848
c2c118cf
PA
8492014-11-12 Pedro Alves <palves@redhat.com>
850
851 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
852 thread, and don't resume all threads if the Hc thread has exited.
853
78708b7c
PA
8542014-11-12 Pedro Alves <palves@redhat.com>
855
856 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
857 the process group instead of to a specific LWP.
858
a2abc7de
PA
8592014-10-15 Pedro Alves <palves@redhat.com>
860
861 PR server/17487
862 * win32-arm-low.c (arm_set_thread_context): Remove current_event
863 parameter.
864 (arm_set_thread_context): Delete.
865 (the_low_target): Adjust.
866 * win32-i386-low.c (debug_registers_changed)
867 (debug_registers_used): Delete.
868 (update_debug_registers_callback): New function.
869 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
870 needing to update their debug registers.
871 (win32_get_current_dr): New function.
872 (x86_dr_low_get_addr, x86_dr_low_get_control)
873 (x86_dr_low_get_status): Fetch the debug register from the thread
874 record's context.
875 (i386_initial_stuff): Adjust.
876 (i386_get_thread_context): Remove current_event parameter. Don't
877 clear debug_registers_changed nor copy DR values to
878 debug_reg_state.
879 (i386_set_thread_context): Delete.
880 (i386_prepare_to_resume): New function.
881 (i386_thread_added): Mark the thread as needing to update irs
882 debug registers.
883 (the_low_target): Remove i386_set_thread_context and install
884 i386_prepare_to_resume.
885 * win32-low.c (win32_get_thread_context): Adjust.
886 (win32_set_thread_context): Use SetThreadContext
887 directly.
888 (win32_prepare_to_resume): New function.
889 (win32_require_context): New function, factored out from ...
890 (thread_rec): ... this.
891 (continue_one_thread): Call win32_prepare_to_resume on each thread
892 we're about to continue.
893 (win32_resume): Call win32_prepare_to_resume on the event thread.
894 * win32-low.h (struct win32_thread_info)
895 <debug_registers_changed>: New field.
896 (struct win32_target_ops): Change prototype of set_thread_context,
897 delete set_thread_context and add prepare_to_resume.
898 (win32_require_context): New declaration.
899
a442d071
GB
9002014-10-08 Gary Benson <gbenson@redhat.com>
901
902 * server.h: Do not include common-exceptions.h.
903
6f1947e8
GB
9042014-10-08 Gary Benson <gbenson@redhat.com>
905
906 * server.h: Do not include cleanups.h.
907
63b434a4
JH
9082014-09-30 James Hogan <james.hogan@imgtec.com>
909
910 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
911 mips64-dsp-linux.c.
912
c4d9ceb6
YQ
9132014-09-23 Yao Qi <yao@codesourcery.com>
914
915 * linux-low.c (lp_status_maybe_breakpoint): New function.
916 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
917 (count_events_callback): Likewise.
918 (select_event_lwp_callback): Likewise.
919 (cancel_breakpoints_callback): Likewise.
920
89a5711c
DB
9212014-09-19 Don Breazeal <donb@codesourcery.com>
922
923 * linux-low.c (handle_extended_wait): Call
924 linux_ptrace_get_extended_event.
925 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
926 linux_is_extended_waitstatus.
927
bffc0964
JB
9282014-09-16 Joel Brobecker <brobecker@adacore.com>
929
930 * Makefile.in (CPPFLAGS): Define.
931 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
932 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
933
0bfdf32f
GB
9342014-09-16 Gary Benson <gbenson@redhat.com>
935
936 * inferiors.h (current_inferior): Renamed as...
937 (current_thread): New variable. All uses updated.
938 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
939 (maybe_move_out_of_jump_pad): Likewise.
940 (cancel_breakpoint): Likewise.
941 (linux_low_filter_event): Likewise.
942 (wait_for_sigstop): Likewise.
943 (linux_resume_one_lwp): Likewise.
944 (need_step_over_p): Likewise.
945 (start_step_over): Likewise.
946 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
947 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
948 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
949 and save_inferior as saved_thread.
950 * regcache.c (get_thread_regcache): Renamed saved_inferior as
951 saved_thread.
952 (regcache_invalidate_thread): Likewise.
953 * remote-utils.c (prepare_resume_reply): Likewise.
954 * thread-db.c (thread_db_get_tls_address): Likewise.
955 (disable_thread_event_reporting): Likewise.
956 (remove_thread_event_breakpoints): Likewise.
957 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
958 as saved_thread.
959 * target.h (set_desired_inferior): Renamed as...
960 (set_desired_thread): New declaration. All uses updated.
961 * server.c (myresume): Updated comment to reference thread instead
962 of inferior.
963 (handle_serial_event): Likewise.
964 (handle_target_event): Likewise.
965
361c8ade
GB
9662014-09-12 Tom Tromey <tromey@redhat.com>
967 Gary Benson <gbenson@redhat.com>
968
969 * regcache.h: Include common-regcache.h.
970 (regcache_read_pc): Don't declare.
971 * regcache.c (get_thread_regcache_for_ptid): New function.
972
bd9269f7
GB
9732014-09-11 Tom Tromey <tromey@redhat.com>
974 Gary Benson <gbenson@redhat.com>
975
976 * symbol.c: New file.
977 * Makefile.in (SFILES): Add symbol.c.
978 (OBS): Add symbol.o.
979
f8c1d06b
GB
9802014-09-11 Gary Benson <gbenson@redhat.com>
981
982 * target.c (target_stop_ptid, target_continue_ptid): New
983 functions.
984
721ec300
GB
9852014-09-11 Tom Tromey <tromey@redhat.com>
986 Gary Benson <gbenson@redhat.com>
987
988 * target.h: Include target/target.h.
989 * target.c (target_read_memory, target_read_uint32)
990 (target_write_memory): New functions.
991
c5e92cca
GB
9922014-09-11 Gary Benson <gbenson@redhat.com>
993
994 * server.h (debug_hw_points): Don't declare.
995 * server.c (debug_hw_points): Don't define. Replace all uses
996 with show_debug_regs.
997 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
998 all uses with show_debug_regs.
999
2e4bb98a
EBM
10002014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1001
1002 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1003 endianness into account.
1004 (ppc_supply_ptrace_register): Likewise.
1005
ac740bc7
JH
10062014-09-03 James Hogan <james.hogan@imgtec.com>
1007
1008 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1009 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1010
97ea6506
GB
10112014-09-03 Gary Benson <gbenson@redhat.com>
1012
1013 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1014 ALL_DEBUG_ADDRESS_REGISTERS.
1015
df7e5265
GB
10162014-09-02 Gary Benson <gbenson@redhat.com>
1017
1018 * i386-low.h: Renamed as...
1019 * x86-low.h: New file. All type, function and variable name
1020 prefixes changed from "i386_" to "x86_". All references updated.
1021 * i386-low.c: Renamed as...
1022 * x86-low.c: New file. All type, function and variable name
1023 prefixes changed from "i386_" to "x86_". All references updated.
1024
ed859da7
GB
10252014-09-02 Gary Benson <gbenson@redhat.com>
1026
1027 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1028 (x86_linux_new_thread): Likewise.
1029
860789c7
GB
10302014-08-29 Gary Benson <gbenson@redhat.com>
1031
1032 * server.h (setjmp.h): Do not include.
1033 (toplevel): Do not declare.
1034 (common-exceptions.h): Include.
1035 (cleanups.h): Likewise.
1036 * server.c (toplevel): Do not define.
1037 (exit_code): New static global.
1038 (detach_or_kill_for_exit_cleanup): New function.
1039 (main): New function. Original main renamed to...
1040 (captured_main): New function.
1041 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1042
ff55e1b5
GB
10432014-08-29 Gary Benson <gbenson@redhat.com>
1044
1045 * Makefile.in (SFILES): Add common/common-exceptions.c.
1046 (OBS): Add common-exceptions.o.
1047 (common-exceptions.o): New rule.
1048 * utils.c (prepare_to_throw_exception): New function.
1049
e9bcb658
GB
10502014-08-29 Gary Benson <gbenson@redhat.com>
1051
1052 * config.in: Regenerate.
1053 * configure: Likewise.
1054
e3180625
GB
10552014-08-29 Gary Benson <gbenson@redhat.com>
1056
1057 * Makefile.in (SFILES): Add common/cleanups.c.
1058 (OBS): cleanups.o.
1059 (cleanups.o): New rule.
1060
e3d6ba5d
GB
10612014-08-29 Gary Benson <gbenson@redhat.com>
1062
1063 * utils.c (internal_vwarning): New function.
1064
7096e886
GB
10652014-08-28 Gary Benson <gbenson@redhat.com>
1066
1067 * utils.h (fatal): Remove declaration.
1068 * utils.c (fatal): Remove function.
1069
14ce3192
GB
10702014-08-28 Gary Benson <gbenson@redhat.com>
1071
1072 * tracepoint.c (gdb_agent_init): Replace fatal with
1073 perror_with_name.
1074 (initialize_tracepoint): Likewise.
1075
50278d59
GB
10762014-08-28 Gary Benson <gbenson@redhat.com>
1077
1078 * remote-utils.c (remote_prepare): Replace fatal with error.
1079
aa96c426
GB
10802014-08-28 Gary Benson <gbenson@redhat.com>
1081
1082 * linux-low.c (linux_async): Replace fatal with warning.
1083 Tidy up and return.
1084 (linux_start_non_stop): Return -1 if linux_async failed.
1085
f7160e97
GB
10862014-08-28 Gary Benson <gbenson@redhat.com>
1087
1088 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1089 gdb_assert.
1090 (i386_dr_low_get_addr): Remove vague comment.
1091 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1092 gdb_assert.
1093
38e08fca
GB
10942014-08-28 Gary Benson <gbenson@redhat.com>
1095
1096 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1097 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1098 internal_error.
1099 (linux_resume_one_lwp): Likewise.
1100 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1101 gdb_assert.
1102 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1103 with internal_error.
1104 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1105 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1106 (find_register_by_name): Replace fatal with internal_error.
1107 (find_regno): Likewise.
1108 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1109 * thread-db.c (thread_db_create_event): Likewise.
1110 (thread_db_load_search): Likewise.
1111 (try_thread_db_load_1): Likewise.
1112 * tracepoint.c (get_jump_space_head): Replace fatal with
1113 internal_error.
1114 (claim_trampoline_space): Likewise.
1115 (have_fast_tracepoint_trampoline_buffer): Likewise.
1116 (cmd_qtstart): Likewise.
1117 (stop_tracing): Likewise.
1118 (fast_tracepoint_collecting): Likewise.
1119 (target_malloc): Likewise.
1120 (download_tracepoint): Likewise.
1121 (download_trace_state_variables): Replace check with gdb_assert.
1122 (upload_fast_traceframes): Replace fatal with internal_error.
1123
34abf635
GB
11242014-08-19 Tom Tromey <tromey@redhat.com>
1125 Gary Benson <gbenson@redhat.com>
1126
1127 * Makefile.in (SFILES): Add common/common-debug.c.
1128 (OBS): Add common-debug.o.
1129 (common-debug.o): New rule.
1130 * debug.h (debug_printf): Don't declare.
1131 * debug.c (debug_printf): Renamed and rewritten as...
1132 (debug_vprintf): New function.
1133
f6e94d78
GB
11342014-08-19 Gary Benson <gbenson@redhat.com>
1135
1136 * utils.h: Do not include print-utils.h.
1137
9239eeab
GB
11382014-08-19 Tom Tromey <tromey@redhat.com>
1139 Gary Benson <gbenson@redhat.com>
1140
1141 * server.h: Add static assertion.
1142 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1143
ef87c8bb
GB
11442014-08-19 Tom Tromey <tromey@redhat.com>
1145 Gary Benson <gbenson@redhat.com>
1146
1147 * Makefile.in (SFILES): Add common/errors.c.
1148 (OBS): Add errors.o.
1149 (IPA_OBS): Add errors-ipa.o.
1150 (errors.o): New rule.
1151 (errors-ipa.o): Likewise.
1152 * utils.h (perror_with_name, error, warning): Don't declare.
1153 * utils.c (warning): Renamed and rewritten as...
1154 (vwarning): New function.
1155 (error): Renamed and rewritten as...
1156 (verror): New function.
1157 (internal_error): Renamed and rewritten as...
1158 (internal_verror): New function.
1159
bb974a24
GB
11602014-08-07 Gary Benson <gbenson@redhat.com>
1161
1162 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1163 * configure: Regenerate.
1164 * config.in: Likewise.
1165 * server.h: Do not include errno.h.
1166 * event-loop.c: Likewise.
1167 * hostio-errno.c: Likewise.
1168 * linux-low.c: Likewise.
1169 * remote-utils.c: Likewise.
1170 * spu-low.c: Likewise.
1171 * utils.c: Likewise.
1172 * gdbreplay.c: Unconditionally include errno.h.
1173
6d3d12eb
GB
11742014-08-07 Gary Benson <gbenson@redhat.com>
1175
1176 * server.h: Do not include string.h.
1177 * event-loop.c: Likewise.
1178 * linux-low.c: Likewise.
1179 * regcache.c: Likewise.
1180 * remote-utils.c: Likewise.
1181 * spu-low.c: Likewise.
1182 * utils.c: Likewise.
1183
dccbb609
GB
11842014-08-07 Gary Benson <gbenson@redhat.com>
1185
1186 * server.h: Do not include gdb_assert.h.
1187
e76df0d0
GB
11882014-08-07 Gary Benson <gbenson@redhat.com>
1189
1190 * server.h: Do not include common-utils.h.
1191
4cb9c816
GB
11922014-08-07 Gary Benson <gbenson@redhat.com>
1193
1194 * server.h: Do not include ptid.h.
1195 * notif.h: Likewise.
1196
3995eeee
GB
11972014-08-07 Gary Benson <gbenson@redhat.com>
1198
1199 * server.h: Do not include gdb_locale.h.
1200
cb9f1a9b
GB
12012014-08-07 Gary Benson <gbenson@redhat.com>
1202
1203 * server.h: Do not include gdb/signals.h.
1204 * win32-low.c: Likewise.
1205
a5fceff8
GB
12062014-08-07 Gary Benson <gbenson@redhat.com>
1207
1208 * server.h: Do not include pathmax.h.
1209
b9391142
GB
12102014-08-07 Gary Benson <gbenson@redhat.com>
1211
1212 * server.h: Do not include libiberty.h.
1213 * linux-bfin-low.c: Likewise.
1214
0e443c87
GB
12152014-08-07 Gary Benson <gbenson@redhat.com>
1216
1217 * server.h: Do not include ansidecl.h.
1218
8ebb3f56
GB
12192014-08-07 Gary Benson <gbenson@redhat.com>
1220
1221 * linux-x86-low.c: Do not include stddef.h.
1222 * lynx-ppc-low.c: Likewise.
1223 * tracepoint.c: Likewise.
1224
8980bdf6
GB
12252014-08-07 Gary Benson <gbenson@redhat.com>
1226
1227 * server.h: Do not include stdarg.h.
1228 * nto-low.c: Likewise.
1229
d7096f71
GB
12302014-08-07 Gary Benson <gbenson@redhat.com>
1231
1232 * server.h: Do not include stdlib.h.
1233 * inferiors.c: Likewise.
1234 * linux-low.c: Likewise.
1235 * regcache.c: Likewise.
1236 * spu-low.c: Likewise.
1237 * tracepoint.c: Likewise.
1238 * utils.c: Likewise.
1239
d02f550d
GB
12402014-08-07 Gary Benson <gbenson@redhat.com>
1241
1242 * server.h: Do not include stdio.h.
1243 * linux-low.c: Likewise.
1244 * remote-utils.c: Likewise.
1245 * spu-low.c: Likewise.
1246 * utils.c: Likewise.
1247 * wincecompat.c: Likewise.
1248
87f6c4e3
GB
12492014-08-06 Gary Benson <gbenson@redhat.com>
1250
1251 * regcache.c (init_register_cache): Move conditionals inside if.
1252
7089dca4
GB
12532014-08-06 Gary Benson <gbenson@redhat.com>
1254
1255 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1256
462f517e
GB
12572014-07-31 Gary Benson <gbenson@redhat.com>
1258
1259 * ax.h: Do not include server.h.
1260 * gdbthread.h: Likewise.
1261 * lynx-low.h: Likewise.
1262 * notif.h: Likewise.
1263
976411d6
GB
12642014-07-30 Gary Benson <gbenson@redhat.com>
1265
1266 * server.h: Include common-defs.h.
1267 Do not include config.h or build-gnulib-gdbserver/config.h.
1268
d41f6d8e
GB
12692014-07-30 Gary Benson <gbenson@redhat.com>
1270
1271 * hostio-errno.c: Move server.h to top of includes list.
1272 * inferiors.c: Likewise.
1273 * linux-x86-low.c: Likewise.
1274 * notif.c: Include server.h.
1275
314c6a35
TT
12762014-07-24 Tom Tromey <tromey@redhat.com>
1277 Gary Benson <gbenson@redhat.com>
1278
1279 * server.h (CORE_ADDR): Now unsigned.
1280
69ff6be5
PA
12812014-07-16 Pedro Alves <palves@redhat.com>
1282
1283 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1284
ce9e3fe7
PA
12852014-07-15 Pedro Alves <palves@redhat.com>
1286
1287 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1288 copy.
1289
e76126e8
PA
12902014-07-11 Pedro Alves <palves@redhat.com>
1291
1292 * linux-low.c (kill_wait_lwp): New function, based on
1293 kill_one_lwp_callback, but use my_waitpid directly.
1294 (kill_one_lwp_callback, linux_kill): Use it.
1295
8e9db26e
PA
12962014-06-23 Pedro Alves <palves@redhat.com>
1297
1298 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1299 before setting DR0..DR3.
1300
698b3e08
GB
13012014-06-20 Gary Benson <gbenson@redhat.com>
1302
1303 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1304 * configure: Regenerated.
1305 * config.in: Likewise.
1306
125f8a3d
GB
13072014-06-20 Gary Benson <gbenson@redhat.com>
1308
1309 * Makefile.in (SFILES): Update locations for files moved
1310 from common to nat.
1311 (object file files): Reordered.
1312
42995dbd
GB
13132014-06-20 Gary Benson <gbenson@redhat.com>
1314
1315 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1316 (i386_dr_low_set_addr): Likewise.
1317 (i386_dr_low_get_addr): Likewise.
1318 (i386_dr_low_can_set_control): Likewise.
1319 (i386_dr_low_set_control): Likewise.
1320 (i386_dr_low_get_control): Likewise.
1321 (i386_dr_low_get_status): Likewise.
1322 (i386_get_debug_register_length): Likewise.
1323 * linux-x86-low.c (i386_dr_low_set_addr):
1324 Changed signature. Made static.
1325 (i386_dr_low_get_addr): Likewise.
1326 (i386_dr_low_set_control): Likewise.
1327 (i386_dr_low_get_control): Likewise.
1328 (i386_dr_low_get_status): Likewise.
1329 (i386_dr_low): New global variable.
1330 * win32-i386-low.c (i386_dr_low_set_addr):
1331 Changed signature. Made static.
1332 (i386_dr_low_get_addr): Likewise.
1333 (i386_dr_low_set_control): Likewise.
1334 (i386_dr_low_get_control): Likewise.
1335 (i386_dr_low_get_status): Likewise.
1336 (i386_dr_low): New global variable.
1337
e1d2394b
MS
13382014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1339
1340 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1341 * Makefile.in (AR, AR_FLAGS): Define.
1342 * configure: Regenerate.
1343
3a8ee006
GB
13442014-06-19 Gary Benson <gbenson@redhat.com>
1345
1346 * Makefile.in (i386-dregs.o): New rule.
1347 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1348 * i386-low.c (target.h): Remove include.
1349 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1350 (DR_CONTROL_SHIFT): Likewise.
1351 (DR_CONTROL_SIZE): Likewise.
1352 (DR_RW_EXECUTE): Likewise.
1353 (DR_RW_WRITE): Likewise.
1354 (DR_RW_READ): Likewise.
1355 (DR_RW_IORW): Likewise.
1356 (DR_LEN_1): Likewise.
1357 (DR_LEN_2): Likewise.
1358 (DR_LEN_4): Likewise.
1359 (DR_LEN_8): Likewise.
1360 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1361 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1362 (DR_ENABLE_SIZE): Likewise.
1363 (DR_LOCAL_SLOWDOWN): Likewise.
1364 (DR_GLOBAL_SLOWDOWN): Likewise.
1365 (DR_CONTROL_RESERVED): Likewise.
1366 (I386_DR_CONTROL_MASK): Likewise.
1367 (I386_DR_VACANT): Likewise.
1368 (I386_DR_LOCAL_ENABLE): Likewise.
1369 (I386_DR_GLOBAL_ENABLE): Likewise.
1370 (I386_DR_DISABLE): Likewise.
1371 (I386_DR_SET_RW_LEN): Likewise.
1372 (I386_DR_GET_RW_LEN): Likewise.
1373 (I386_DR_WATCH_HIT): Likewise.
1374 (i386_wp_op_t): Likewise.
1375 (i386_show_dr): Likewise.
1376 (i386_length_and_rw_bits): Likewise.
1377 (i386_insert_aligned_watchpoint): Likewise.
1378 (i386_remove_aligned_watchpoint): Likewise.
1379 (i386_handle_nonaligned_watchpoint): Likewise.
1380 i386_update_inferior_debug_regs(): 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
8f26655c
GB
13872014-06-19 Gary Benson <gbenson@redhat.com>
1388
1389 * i386-low.c (i386_dr_show): Renamed to
1390 i386_show_dr and made static. All uses updated.
1391 (i386_dr_length_and_rw_bits): Renamed to
1392 i386_length_and_rw_bits and made static.
1393 All uses updated.
1394 (i386_dr_insert_aligned_watchpoint): Renamed to
1395 i386_insert_aligned_watchpoint and made static.
1396 All uses updated.
1397 (i386_dr_remove_aligned_watchpoint): Renamed to
1398 i386_remove_aligned_watchpoint and made static.
1399 All uses updated.
1400 (i386_dr_update_inferior_debug_regs): Renamed to
1401 i386_update_inferior_debug_regs and made static.
1402 All uses updated.
1403
b9228891
GB
14042014-06-18 Gary Benson <gbenson@redhat.com>
1405
5171def3
GB
1406 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1407 (i386_dr_low_can_set_control): Likewise.
1408 (i386_get_debug_register_length): Likewise.
1409 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1410 (i386_dr_low_can_set_control): Likewise.
1411 (i386_get_debug_register_length): Likewise.
1412
14132014-06-17 Gary Benson <gbenson@redhat.com>
1414
b9228891
GB
1415 * i386-low.h (i386-dregs.h): New include.
1416 (DR_FIRSTADDR): Now in i386-dregs.h.
1417 (DR_LASTADDR): Likewise.
1418 (DR_NADDR): Likewise.
1419 (DR_STATUS): Likewise.
1420 (DR_CONTROL): Likewise.
1421 (i386_debug_reg_state): Likewise.
1422 (i386_dr_insert_watchpoint): Likewise.
1423 (i386_dr_remove_watchpoint): Likewise.
1424 (i386_dr_region_ok_for_watchpoint): Likewise.
1425 (i386_dr_stopped_data_address): Likewise.
1426 (i386_dr_stopped_by_watchpoint): Likewise.
1427 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1428
4be83cc2
GB
14292014-06-18 Gary Benson <gbenson@redhat.com>
1430
1431 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1432 i386_dr_insert_watchpoint.
1433 (i386_low_remove_watchpoint): Renamed to
1434 i386_dr_remove_watchpoint.
1435 (i386_low_region_ok_for_watchpoint): Renamed to
1436 i386_dr_region_ok_for_watchpoint.
1437 (i386_low_stopped_data_address): Renamed to
1438 i386_dr_stopped_data_address.
1439 (i386_low_stopped_by_watchpoint): Renamed to
1440 i386_dr_stopped_by_watchpoint.
1441 * i386-low.c (i386_show_dr): Renamed to
1442 i386_dr_show and made nonstatic. All uses updated.
1443 (i386_length_and_rw_bits): Renamed to
1444 i386_dr_length_and_rw_bits and made nonstatic.
1445 All uses updated.
1446 (i386_insert_aligned_watchpoint): Renamed to
1447 i386_dr_insert_aligned_watchpoint and made nonstatic.
1448 All uses updated.
1449 (i386_remove_aligned_watchpoint): Renamed to
1450 i386_dr_remove_aligned_watchpoint and made nonstatic.
1451 All uses updated.
1452 (i386_update_inferior_debug_regs): Renamed to
1453 i386_dr_update_inferior_debug_regs and made nonstatic.
1454 All uses updated.
1455 (i386_low_insert_watchpoint): Renamed to
1456 i386_dr_insert_watchpoint. All uses updated.
1457 (i386_low_remove_watchpoint): Renamed to
1458 i386_dr_remove_watchpoint. All uses updated.
1459 (i386_low_region_ok_for_watchpoint): Renamed to
1460 i386_dr_region_ok_for_watchpoint. All uses updated.
1461 (i386_low_stopped_data_address): Renamed to
1462 i386_dr_stopped_data_address. All uses updated.
1463 (i386_low_stopped_by_watchpoint): Renamed to
1464 i386_dr_stopped_by_watchpoint. All uses updated.
1465
131aa0d4
GB
14662014-06-18 Gary Benson <gbenson@redhat.com>
1467
1468 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1469 (i386_dr_low_can_set_control): Likewise.
1470 (i386_insert_aligned_watchpoint): New check.
1471
d9305f7f
GB
14722014-06-18 Gary Benson <gbenson@redhat.com>
1473
1474 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1475 Renamed to state.
1476
e927c9fc
GB
14772014-06-18 Gary Benson <gbenson@redhat.com>
1478
1479 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1480 instead of fatal and error.
1481 (i386_handle_nonaligned_watchpoint): Likewise.
1482
1b6d4134
GB
14832014-06-18 Gary Benson <gbenson@redhat.com>
1484
1485 * i386-low.c (i386_get_debug_register_length): New macro.
1486 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1487 (i386_show_dr): Use debug_printf instead of fprintf. Use
1488 phex to format values.
1489
6e62758f
GB
14902014-06-18 Gary Benson <gbenson@redhat.com>
1491
1492 * i386-low.h: Comment changes.
1493 * i386-low.c: Likewise.
1494
fc6e2f03
GB
14952014-06-18 Gary Benson <gbenson@redhat.com>
1496
1497 * i386-low.c: Whitespace changes.
1498
f9d1eeed
TT
14992014-06-12 Tom Tromey <tromey@redhat.com>
1500
1501 * utils.c (freeargv): Remove.
1502
0b04e523
TT
15032014-06-12 Tom Tromey <tromey@redhat.com>
1504
1505 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1506 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1507 (parse_debug_format_options): Likewise.
1508 (gdbserver_usage): Likewise.
1509 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1510 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1511 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1512 against libiberty.
1513 ($(LIBGNU)): Depend on libiberty.
1514 (all-lib): Recurse into all subdirs.
1515 (install-only): Invoke "install" target in subdirs.
1516 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1517 targets.
1518 * configure: Rebuild.
1519 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1520 for vasprintf, vsnprintf, or gettimeofday.
1521 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1522 srv_tgtobj.
1523
270c9937
JB
15242014-06-05 Joel Brobecker <brobecker@adacore.com>
1525
1526 * development.sh: Delete.
1527 * Makefile.in (config.status): Adjust dependency on development.sh.
1528 * configure.ac: Adjust development.sh source call.
1529 * configure: Regenerate.
1530
0a261ed8
PA
15312014-06-02 Pedro Alves <palves@redhat.com>
1532
1533 * ax.c (gdb_free_agent_expr): New function.
1534 * ax.h (gdb_free_agent_expr): New declaration.
1535 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1536 list.
1537 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1538 static.
1539 (clear_breakpoint_conditions_and_commands): New function.
1540 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1541 (clear_breakpoint_conditions_and_commands): New declaration.
1542
e9dae05e
RR
15432014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1544
1545 * linux-aarch64-low.c (asm/ptrace.h): Include.
1546
5876f503
JK
15472014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1548
1549 Fix TLS access for -static -pthread.
1550 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1551 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1552 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1553
802e8e6d
PA
15542014-05-20 Pedro Alves <palves@redhat.com>
1555
1556 * linux-aarch64-low.c (aarch64_insert_point)
1557 (aarch64_remove_point): No longer check whether the type is
1558 supported here. Adjust to new interface.
1559 (the_low_target): Install aarch64_supports_z_point_type as
1560 supports_z_point_type method.
1561 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1562 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1563 instead of a Z packet char. Adjust.
1564 (arm_supports_z_point_type): New function.
1565 (arm_insert_point, arm_remove_point): Adjust to new interface.
1566 (the_low_target): Install arm_supports_z_point_type.
1567 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1568 (cris_insert_point, cris_remove_point): Adjust to new interface.
1569 Don't check whether the type is supported here.
1570 (the_low_target): Install cris_supports_z_point_type.
1571 * linux-low.c (linux_supports_z_point_type): New function.
1572 (linux_insert_point, linux_remove_point): Adjust to new interface.
1573 * linux-low.h (struct linux_target_ops) <insert_point,
1574 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1575 raw_breakpoint pointer parameter.
1576 <supports_z_point_type>: New method.
1577 * linux-mips-low.c (mips_supports_z_point_type): New function.
1578 (mips_insert_point, mips_remove_point): Adjust to new interface.
1579 Use mips_supports_z_point_type.
1580 (the_low_target): Install mips_supports_z_point_type.
1581 * linux-ppc-low.c (the_low_target): Install NULL as
1582 supports_z_point_type method.
1583 * linux-s390-low.c (the_low_target): Install NULL as
1584 supports_z_point_type method.
1585 * linux-sparc-low.c (the_low_target): Install NULL as
1586 supports_z_point_type method.
1587 * linux-x86-low.c (x86_supports_z_point_type): New function.
1588 (x86_insert_point): Adjust to new insert_point interface. Use
1589 insert_memory_breakpoint. Adjust to new
1590 i386_low_insert_watchpoint interface.
1591 (x86_remove_point): Adjust to remove_point interface. Use
1592 remove_memory_breakpoint. Adjust to new
1593 i386_low_remove_watchpoint interface.
1594 (the_low_target): Install x86_supports_z_point_type.
1595 * lynx-low.c (lynx_target_ops): Install NULL as
1596 supports_z_point_type callback.
1597 * nto-low.c (nto_supports_z_point_type): New.
1598 (nto_insert_point, nto_remove_point): Adjust to new interface.
1599 (nto_target_ops): Install nto_supports_z_point_type.
1600 * mem-break.c: Adjust intro comment.
1601 (struct raw_breakpoint) <raw_type, size>: New fields.
1602 <inserted>: Update comment.
1603 <shlib_disabled>: Delete field.
1604 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1605 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1606 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1607 (raw_bkpt_type_to_target_hw_bp_type): New function.
1608 (find_enabled_raw_code_breakpoint_at): New function.
1609 (find_raw_breakpoint_at): New type and size parameters. Use them.
1610 (insert_memory_breakpoint): New function, based off
1611 set_raw_breakpoint_at.
1612 (remove_memory_breakpoint): New function.
1613 (set_raw_breakpoint_at): Reimplement.
1614 (set_breakpoint): New, based on set_breakpoint_at.
1615 (set_breakpoint_at): Reimplement.
1616 (delete_raw_breakpoint): Go through the_target->remove_point
1617 instead of assuming memory breakpoints.
1618 (find_gdb_breakpoint_at): Delete.
1619 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1620 (find_gdb_breakpoint): New function.
1621 (set_gdb_breakpoint_at): Delete.
1622 (z_type_supported): New function.
1623 (set_gdb_breakpoint_1): New function, loosely based off
1624 set_gdb_breakpoint_at.
1625 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1626 (delete_gdb_breakpoint_at): Delete.
1627 (delete_gdb_breakpoint_1): New function, loosely based off
1628 delete_gdb_breakpoint_at.
1629 (delete_gdb_breakpoint): New function.
1630 (clear_gdb_breakpoint_conditions): Rename to ...
1631 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1632 breakpoint.
1633 (add_condition_to_breakpoint): Make static.
1634 (add_breakpoint_condition): Take a struct breakpoint pointer
1635 instead of an address. Adjust.
1636 (gdb_condition_true_at_breakpoint): Rename to ...
1637 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1638 z_type parameter.
1639 (gdb_condition_true_at_breakpoint): Reimplement.
1640 (add_breakpoint_commands): Take a struct breakpoint pointer
1641 instead of an address. Adjust.
1642 (gdb_no_commands_at_breakpoint): Rename to ...
1643 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1644 parameter. Return true if no breakpoint was found. Change debug
1645 output.
1646 (gdb_no_commands_at_breakpoint): Reimplement.
1647 (run_breakpoint_commands): Rename to ...
1648 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1649 and change return type to boolean.
1650 (run_breakpoint_commands): New function.
1651 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1652 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1653 breakpoint. Go through the_target->remove_point instead of
1654 assuming memory breakpoint.
1655 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1656 software and hardware breakpoints.
1657 (reinsert_raw_breakpoint): Go through the_target->insert_point
1658 instead of assuming memory breakpoint.
1659 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1660 software and hardware breakpoints.
1661 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1662 Check both software and hardware breakpoints.
1663 (validate_inserted_breakpoint): Assert the breakpoint is a
1664 software breakpoint. Set the inserted flag to -1 instead of
1665 setting shlib_disabled.
1666 (delete_disabled_breakpoints): Adjust.
1667 (validate_breakpoints): Only validate software breakpoints.
1668 Adjust to inserted flag change.
1669 (check_mem_read, check_mem_write): Skip breakpoint types other
1670 than software breakpoints. Adjust to inserted flag change.
1671 * mem-break.h (enum raw_bkpt_type): New enum.
1672 (raw_breakpoint, struct process_info): Forward declare.
1673 (Z_packet_to_target_hw_bp_type): Delete declaration.
1674 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1675 (set_gdb_breakpoint, delete_gdb_breakpoint)
1676 (clear_breakpoint_conditions): New declarations.
1677 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1678 (breakpoint_inserted_here): Update comment.
1679 (add_breakpoint_condition, add_breakpoint_commands): Replace
1680 address parameter with a breakpoint pointer parameter.
1681 (gdb_breakpoint_here): Update comment.
1682 (delete_gdb_breakpoint_at): Delete.
1683 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1684 * server.c (process_point_options): Take a struct breakpoint
1685 pointer instead of an address. Adjust.
1686 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1687 delete_gdb_breakpoint.
1688 * spu-low.c (spu_target_ops): Install NULL as
1689 supports_z_point_type method.
1690 * target.h: Include mem-break.h.
1691 (struct target_ops) <prepare_to_access_memory>: Update comment.
1692 <supports_z_point_type>: New field.
1693 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1694 instead of a char. Also take a raw breakpoint pointer.
1695 * win32-arm-low.c (the_low_target): Install NULL as
1696 supports_z_point_type.
1697 * win32-i386-low.c (i386_supports_z_point_type): New function.
1698 (i386_insert_point, i386_remove_point): Adjust to new interface.
1699 (the_low_target): Install i386_supports_z_point_type.
1700 * win32-low.c (win32_supports_z_point_type): New function.
1701 (win32_insert_point, win32_remove_point): Adjust to new interface.
1702 (win32_target_ops): Install win32_supports_z_point_type.
1703 * win32-low.h (struct win32_target_ops):
1704 <supports_z_point_type>: New method.
1705 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1706 instead of a char. Also take a raw breakpoint pointer.
1707
932539e3
PA
17082014-05-20 Pedro Alves <palves@redhat.com>
1709
1710 * mem-break.h: Include break-common.h.
1711 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1712 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1713 (Z_packet_to_target_hw_bp_type): New declaration.
1714 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1715 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1716 (Z_PACKET_ACCESS_WP): Delete macros.
1717 (Z_packet_to_hw_type): Delete function.
1718 * i386-low.h: Don't include break-common.h here.
1719 (Z_packet_to_hw_type): Delete declaration.
1720 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1721 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1722 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1723 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1724 * linux-aarch64-low.c: Don't include break-common.h here.
1725 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1726 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1727 (Z_packet_to_target_hw_bp_type): Delete function.
1728 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1729 function.
1730 (mips_insert_point, mips_remove_point): Use
1731 Z_packet_to_target_hw_bp_type.
1732
4ff0d3d8
PA
17332014-05-20 Pedro Alves <palves@redhat.com>
1734
1735 * linux-aarch64-low.c: Include break-common.h.
1736 (enum target_point_type): Delete.
1737 (Z_packet_to_point_type): Rename to ...
1738 (Z_packet_to_target_hw_bp_type): ... this, and return a
1739 target_hw_bp_type instead.
1740 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1741 instead of an enum target_point_type.
1742 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1743 breakpoint type.
1744 (aarch64_dr_state_insert_one_point)
1745 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1746 (aarch64_handle_aligned_watchpoint)
1747 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1748 Take an enum target_hw_bp_type instead of an enum
1749 target_point_type.
1750 (aarch64_supports_z_point_type): New function.
1751 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1752 use Z_packet_to_target_hw_bp_type.
1753
786dc519
JB
17542014-05-20 Joel Brobecker <brobecker@adacore.com>
1755
1756 * configure.ac: Only use -Werror by default when DEVELOPMENT
1757 is true.
1758 * configure: Regenerate.
1759
9e0aa64f
JK
17602014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1761
1762 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1763 * linux-x86-low.c (X86_64_USER_REGS): New.
1764 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1765
2b577b92
YQ
17662014-04-28 Yao Qi <yao@codesourcery.com>
1767
1768 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1769 name.
1770
94611da2
PA
17712014-04-25 Pedro Alves <palves@redhat.com>
1772
1773 PR server/16255
1774 * linux-low.c (linux_attach_fail_reason_string): New function.
1775 (linux_attach_lwp): Delete.
1776 (linux_attach_lwp_1): Rename to ...
1777 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1778 argument. Remove "initial" parameter. Return int instead of
1779 void. Don't error or warn here.
1780 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1781 failure to attach to the tgid. Call warning when failing to
1782 attach to an lwp.
1783 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1784 argument. Remove "initial" parameter. Return int instead of
1785 void. Don't error or warn here.
1786 (linux_attach_fail_reason_string): New declaration.
1787 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1788 interface change. Use linux_attach_fail_reason_string.
1789
01f9f808
MS
17902014-04-24 Michael Sturm <michael.sturm@mintel.com>
1791 Walfred Tedeschi <walfred.tedeschi@intel.com>
1792
1793 * Makefile.in: Added rules to handle new files
1794 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1795 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1796 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1797 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1798 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1799 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1800 x32-avx512-linux.o.
1801 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1802 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1803 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1804 i386/x32-avx512.xml.
1805 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1806 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1807 i386/x32-avx512-linux.xml.
1808 * i387-fp.c (num_avx512_k_registers): New constant for number
1809 of K registers.
1810 (num_avx512_zmmh_low_registers): New constant for number of
1811 lower ZMM registers (0-15).
1812 (num_avx512_zmmh_high_registers): New constant for number of
1813 higher ZMM registers (16-31).
1814 (num_avx512_ymmh_registers): New contant for number of higher
1815 YMM registers (ymm16-31 added by avx521 on x86_64).
1816 (num_avx512_xmm_registers): New constant for number of higher
1817 XMM registers (xmm16-31 added by AVX512 on x86_64).
1818 (struct i387_xsave): Add space for AVX512 registers.
1819 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1820 Add code to handle AVX512 registers.
1821 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1822 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1823 prototypei from generated file.
1824 (tdesc_amd64_avx512_linux): Likewise.
1825 (init_registers_x32_avx512_linux): Likewise.
1826 (tdesc_x32_avx512_linux): Likewise.
1827 (init_registers_i386_avx512_linux): Likewise.
1828 (tdesc_i386_avx512_linux): Likewise.
1829 (x86_64_regmap): Add AVX512 registers.
1830 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1831 mask.
1832 (initialize_low_arch): Add code to initialize AVX512 registers.
1833
51aa91f9
PA
18342014-04-23 Pedro Alves <palves@redhat.com>
1835
1836 * mem-break.c (find_gdb_breakpoint_at): Make static.
1837 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1838
a4165e94
PA
18392014-04-23 Pedro Alves <palves@redhat.com>
1840
1841 * i386-low.c: Don't include break-common.h here.
1842 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1843 prototype to take target_hw_bp_type as argument instead of a Z
1844 packet char.
1845 * i386-low.h: Include break-common.h here.
1846 (Z_packet_to_hw_type): Declare.
1847 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1848 prototypes.
1849 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1850 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1851 (x86_remove_point): Convert the packet number to a
1852 target_hw_bp_type before calling i386_low_remove_watchpoint.
1853 * win32-i386-low.c (i386_insert_point): Convert the packet number
1854 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1855 (i386_remove_point): Convert the packet number to a
1856 target_hw_bp_type before calling i386_low_remove_watchpoint.
1857
b8acf843
PA
18582014-04-23 Pedro Alves <palves@redhat.com>
1859
1860 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1861
d708bcd1
PA
18622014-04-10 Pedro Alves <palves@redhat.com>
1863
1864 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1865 Check if the condition or command is NULL before checking if the
1866 breakpoint is known. On success, return true.
1867 * mem-break.h (add_breakpoint_condition): Document return.
1868 (add_breakpoint_commands): Add describing comment.
1869 * server.c (skip_to_semicolon): New function.
1870 (process_point_options): Use it.
1871
2eec7d5b
PA
18722014-04-09 Pedro Alves <palves@redhat.com>
1873
1874 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1875 to lwpid_of.
1876
fa96cb38
PA
18772014-02-27 Pedro Alves <palves@redhat.com>
1878
1879 PR 12702
1880 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1881 macros.
1882 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1883 output.
1884 (last_thread_of_process_p): Take a PID argument instead of a
1885 thread pointer.
1886 (linux_wait_for_lwp): Delete.
1887 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1888 functions.
1889 (linux_low_filter_event): New function, party factored out from
1890 linux_wait_for_event.
1891 (linux_wait_for_event): Rename to ...
1892 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1893 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1894 sigsuspend. Check for zombie leaders.
1895 (linux_wait_for_event): Reimplement as wrapper around
1896 linux_wait_for_event_filtered.
1897 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1898 a normal or signal exit is seen, it's the whole process exiting.
1899 (wait_for_sigstop): No longer a for_each_inferior callback.
1900 Rewrite on top of linux_wait_for_event_filtered.
1901 (stop_all_lwps): Call wait_for_sigstop directly.
1902 * server.c (resume, handle_target_event): Handle
1903 TARGET_WAITKIND_NO_RESUMED.
1904
d763de10
JB
19052014-02-26 Joel Brobecker <brobecker@adacore.com>
1906
1907 * win32-low.c (psapi_get_dll_name,
1908 * win32_CreateToolhelp32Snapshot): Delete.
1909 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1910 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1911 Delete.
1912 (handle_load_dll): Add function description.
1913 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1914
850a0f76
JB
19152014-02-26 Joel Brobecker <brobecker@adacore.com>
1916
1917 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1918 Add comment.
1919 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1920 base address when calling win32_add_one_solib.
1921 (handle_load_dll): Delete local variable load_addr.
1922 Remove 0x1000 offset applied to DLL base address when calling
1923 win32_add_one_solib.
1924 (handle_unload_dll): Add comment.
1925
f25b3fc3
JB
19262014-02-26 Joel Brobecker <brobecker@adacore.com>
1927
1928 * win32-low.c (win32_add_all_dlls): Renames
1929 win32_ensure_ntdll_loaded. Rewrite function documentation.
1930 Adjust implementation to always load all DLLs.
1931 Add 0x1000 offset to DLL base address when calling
1932 win32_add_one_solib.
1933 (child_initialization_done): New static global.
1934 (do_initial_child_stuff): Set child_initialization_done to
1935 zero during child initialization, and 1 after. Replace call
1936 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1937 Add comment.
1938 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1939 (handle_unload_dll): Add function documentation.
1940 (get_child_debug_event): Ignore load and unload DLL events
1941 during child initialization.
1942
d86d4aaf
DE
19432014-02-20 Doug Evans <dje@google.com>
1944
3bc32da3 1945 Remove global all_lwps.
d86d4aaf
DE
1946 * inferiors.h (ptid_of): Move here from linux-low.h.
1947 (pid_of, lwpid_of): Ditto.
1948 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1949 parameter is a struct thread_info * now.
1950 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1951 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1952 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1953 directly.
1954 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1955 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1956 * linux-arm-low.c (update_registers_callback): Update, "entry"
1957 parameter is a struct thread_info * now.
1958 Fetch lwpid from current_inferior directly.
1959 (arm_insert_point): Pass &all_threads to find_inferior instead of
1960 &all_lwps.
1961 (arm_remove_point): Ditto.
1962 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1963 (arm_prepare_to_resume): Fetch pid from thread.
1964 (arm_read_description): Fetch lwpid from current_inferior directly.
1965 * linux-low.c (all_lwps): Delete.
1966 (delete_lwp): Delete call to remove_inferior.
1967 (handle_extended_wait): Fetch lwpid from thread.
1968 (add_lwp): Don't set lwp->entry.id. Remove call to
1969 add_inferior_to_list.
1970 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1971 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1972 (kill_one_lwp_callback): Ditto.
1973 (linux_kill): Don't dereference NULL pointer.
1974 Fetch ptid,lwpid from thread.
1975 (get_detach_signal): Fetch ptid from thread.
1976 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1977 Simplify call to regcache_invalidate_thread.
1978 (delete_lwp_callback): Update, "entry" parameter is a
1979 struct thread_info * now. Fetch pid from thread.
1980 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1981 (status_pending_p_callback): Update, "entry" parameter is a
1982 struct thread_info * now. Fetch ptid from thread.
1983 (find_lwp_pid): Update, "entry" parameter is a
1984 struct thread_info * now.
1985 (linux_wait_for_lwp): Fetch pid from thread.
1986 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1987 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1988 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1989 (dequeue_one_deferred_signal): Ditto.
1990 (cancel_breakpoint): Fetch ptid from current_inferior.
1991 (linux_wait_for_event): Pass &all_threads to find_inferior,
1992 not &all_lwps. Fetch ptid, lwpid from thread.
1993 (count_events_callback): Update, "entry" parameter is a
1994 struct thread_info * now.
1995 (select_singlestep_lwp_callback): Ditto.
1996 (select_event_lwp_callback): Ditto.
1997 (cancel_breakpoints_callback): Ditto.
1998 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1999 not &all_lwps.
2000 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2001 (unsuspend_one_lwp): Update, "entry" parameter is a
2002 struct thread_info * now.
2003 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2004 not &all_lwps.
2005 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2006 Fetch lwpid from thread, not lwp.
2007 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2008 Pass &all_threads to find_inferior, not &all_lwps.
2009 (send_sigstop): Fetch lwpid from thread, not lwp.
2010 (send_sigstop_callback): Update, "entry" parameter is a
2011 struct thread_info * now.
2012 (suspend_and_send_sigstop_callback): Ditto.
2013 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2014 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2015 struct thread_info * now.
2016 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2017 from thread, lwp.
2018 (lwp_running): Update, "entry" parameter is a
2019 struct thread_info * now.
2020 (stop_all_lwps): Fetch ptid from thread.
2021 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2022 (linux_resume_one_lwp): Fetch lwpid from thread.
2023 (linux_set_resume_request): Update, "entry" parameter is a
2024 struct thread_info * now. Fetch pid, lwpid from thread.
2025 (resume_status_pending_p): Update, "entry" parameter is a
2026 struct thread_info * now.
2027 (need_step_over_p): Ditto. Fetch lwpid from thread.
2028 (start_step_over): Fetch lwpid from thread.
2029 (linux_resume_one_thread): Update, "entry" parameter is a
2030 struct thread_info * now. Fetch lwpid from thread.
2031 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2032 (proceed_one_lwp): Update, "entry" parameter is a
2033 struct thread_info * now. Fetch lwpid from thread.
2034 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2035 struct thread_info * now.
2036 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2037 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2038 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2039 directly.
2040 (regsets_store_inferior_registers): Ditto.
2041 (fetch_register, store_register): Ditto.
2042 (linux_read_memory, linux_write_memory): Ditto.
2043 (linux_request_interrupt): Ditto.
2044 (linux_read_auxv): Ditto.
2045 (linux_xfer_siginfo): Ditto.
2046 (linux_qxfer_spu): Ditto.
2047 (linux_qxfer_libraries_svr4): Ditto.
2048 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2049 moved to inferiors.h.
2050 (get_lwp): Delete.
2051 (get_thread_lwp): Update.
2052 (struct lwp_info): Delete member "entry". Simplify comment for
2053 member "thread".
2054 (all_lwps): Delete.
2055 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2056 current_inferior directly.
2057 (update_watch_registers_callback): Update, "entry" parameter is a
2058 struct thread_info * now. Fetch pid from thread.
2059 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2060 (mips_insert_point): Fetch lwpid from current_inferior.
2061 Pass &all_threads to find_inferior, not &all_lwps.
2062 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2063 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2064 directly.
2065 (mips_stopped_data_address): Ditto.
2066 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2067 directly.
2068 * linux-tile-low.c (tile_arch_setup): Ditto.
2069 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2070 (update_debug_registers_callback): Update, "entry" parameter is a
2071 struct thread_info * now. Fetch pid from thread.
2072 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2073 Pass &all_threads to find_inferior, not &all_lwps.
2074 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2075 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2076 Pass &all_threads to find_inferior, not &all_lwps.
2077 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2078 (i386_dr_low_get_status): Ditto.
2079 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2080 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2081 (x86_linux_read_description): Ditto.
2082 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2083
3b8361aa
DE
20842014-02-20 Doug Evans <dje@google.com>
2085
2086 * inferiors.c (get_first_inferior): Fix buglet.
2087
f7667f0d
DE
20882014-02-19 Doug Evans <dje@google.com>
2089
2090 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2091 * inferiors.c (add_thread): Change result type to struct thread_info *.
2092 All callers updated.
2093 (add_lwp): Call add_thread here instead of in callers.
2094 All callers updated.
2095 * linux-low.h (get_lwp_thread): Rewrite.
2096 (struct lwp_info): New member "thread".
2097
b3312d80
DE
20982014-02-19 Doug Evans <dje@google.com>
2099
2100 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2101 All callers updated.
2102
ecc6f45c
DE
21032014-02-19 Doug Evans <dje@google.com>
2104
2105 * inferiors.c (add_thread): Fix whitespace.
2106
649ebbca
DE
21072014-02-19 Doug Evans <dje@google.com>
2108
2109 * dll.c (clear_dlls): Replace accessing list implemention details
2110 with API function.
2111 * gdbthread.h (get_first_thread): Declare.
2112 * inferiors.c (for_each_inferior_with_data): New function.
2113 (get_first_thread): New function.
2114 (find_thread_ptid): Simplify.
2115 (get_first_inferior): New function.
2116 (clear_list): Delete.
2117 (one_inferior_p): New function.
2118 (clear_inferior_list): New function.
2119 (clear_inferiors): Update.
2120 * inferiors.h (for_each_inferior_with_data): Declare.
2121 (clear_inferior_list): Declare.
2122 (one_inferior_p): Declare.
2123 (get_first_inferior): Declare.
2124 * linux-low.c (linux_wait_for_event): Replace accessing list
2125 implemention details with API function.
2126 * server.c (target_running): Ditto.
2127 (accumulate_file_name_length): New function.
2128 (emit_dll_description): New function.
2129 (handle_qxfer_libraries): Replace accessing list implemention
2130 details with API function.
2131 (handle_qxfer_threads_worker): New function.
2132 (handle_qxfer_threads_proper): Replace accessing list implemention
2133 details with API function.
2134 (handle_query): Ditto.
2135 (visit_actioned_threads_callback_ftype): New typedef.
2136 (visit_actioned_threads_data): New struct.
2137 (visit_actioned_threads): Rewrite to be find_inferior callback.
2138 (resume): Call find_inferior.
2139 (handle_status): Replace accessing list implemention
2140 details with API function.
2141 (process_serial_event): Replace accessing list implemention details
2142 with API function.
2143 * target.c (set_desired_inferior): Replace accessing list implemention
2144 details with API function.
2145 * tracepoint.c (same_process_p): New function.
2146 (gdb_agent_about_to_close): Replace accessing list implemention
2147 details with API function.
2148 * win32-low.c (child_delete_thread): Replace accessing list
2149 implemention details with API function.
2150 (match_dll_by_basename): New function.
2151 (dll_is_loaded_by_basename): New function.
2152 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2153 details call to dll_is_loaded_by_basename.
2154
80894984
DE
21552014-02-19 Doug Evans <dje@google.com>
2156
2157 * dll.h (struct dll_info): Add comment.
2158 * gdbthread.h (struct thread_info): Add comment.
2159 (current_ptid): Simplify.
2160 * inferiors.c (add_process): Update.
2161 (remove_process): Update.
2162 * inferiors.h (struct process_info): Rename member "head" to "entry".
2163 * linux-low.c (delete_lwp): Update.
2164 (add_lwp): Update.
2165 (last_thread_of_process_p): Update.
2166 (kill_one_lwp_callback, linux_kill): Update.
2167 (status_pending_p_callback): Update.
2168 (wait_for_sigstop): Update. Simplify read of ptid.
2169 (start_step_over): Update.
2170 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2171 (get_lwp_thread): Update.
2172 (struct lwp_info): Rename member "head" to "entry".
2173 * regcache.h (inferior_list_entry): Delete.
2174 * server.c (kill_inferior_callback): Update.
2175 (detach_or_kill_inferior_callback): Update.
2176 (print_started_pid): Update.
2177 (print_attached_pid): Update.
2178 (process_serial_event): Simplify read of ptid.
2179 * thread-db.c (thread_db_create_event): Update.
2180 (thread_db_get_tls_address): Update.
2181 * win32-low.c (current_inferior_ptid): Simplify.
2182
46917d26
TT
21832014-02-19 Tom Tromey <tromey@redhat.com>
2184
2185 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2186 argument.
2187 (target_supports_btrace): Update.
2188
0759a81e
YQ
21892014-02-14 Yao Qi <yao@codesourcery.com>
2190
2191 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2192 (rsp-low-ipa.o): New target.
2193
a7191e8b
TT
21942014-02-12 Tom Tromey <tromey@redhat.com>
2195
2196 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2197 convert_ascii_to_int.
2198 * regcache.c (registers_to_string): Likewise.
2199 * remote-utils.c (decode_M_packet): Likewise.
2200 * server.c (process_serial_event): Likewise.
2201
ff0e980e
TT
22022014-02-12 Tom Tromey <tromey@redhat.com>
2203
2204 * server.c (handle_query, handle_v_run): Use hex2bin, not
2205 unhexify.
2206 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2207
e9371aff
TT
22082014-02-12 Tom Tromey <tromey@redhat.com>
2209
2210 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2211 convert_int_to_ascii.
2212 * regcache.c (registers_to_string, collect_register_as_string):
2213 Likewise.
2214 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2215 Likewise.
2216 * server.c (process_serial_event): Likewise.
2217 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2218 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2219
971dc0b8
TT
22202014-02-12 Tom Tromey <tromey@redhat.com>
2221
2222 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2223 bin2hex, not hexify.
2224 * tracepoint.c (cmd_qtstatus): Likewise.
2225
0a822afb
TT
22262014-02-12 Tom Tromey <tromey@redhat.com>
2227
2228 * remote-utils.c (monitor_output): Pass explicit length to
2229 hexify.
2230
9c3d6531
TT
22312014-02-12 Tom Tromey <tromey@redhat.com>
2232
2233 * tracepoint.c: Include rsp-low.h.
2234 * server.c: Include rsp-low.h.
2235 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2236 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2237 declare.
2238 * remote-utils.c: Include rsp-low.h.
2239 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2240 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2241 (convert_int_to_ascii, convert_ascii_to_int): Move to
2242 common/rsp-low.c.
2243 * regcache.c: Include rsp-low.h.
2244 * ax.c: Include rsp-low.h.
2245 * Makefile.in (SFILES): Add common/rsp-low.c.
2246 (OBS): Add rsp-low.o.
2247 (rsp-low.o): New target.
2248
01fd3ea5
TT
22492014-02-12 Tom Tromey <tromey@redhat.com>
2250
2251 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2252 Include print-utils.h.
2253 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2254 (plongest, thirty_two, phex_nz): Remove.
2255 * Makefile.in (SFILES): Add common/print-utils.c.
2256 (OBS): Add print-utils.o.
2257 (print-utils-ipa.o): New target.
2258 (print-utils.o): New target.
2259 (IPA_OBJS): Add print-utils-ipa.o.
2260
e99dc820
TT
22612014-02-06 Tom Tromey <tromey@redhat.com>
2262
2263 * Makefile.in (SFILES): Fix indentation.
2264
ee1e2d4f
DE
22652014-02-05 Doug Evans <dje@google.com>
2266
2267 * linux-low.c (linux_wait_for_event): Improve comment.
2268 (linux_wait_1): Keep current_inferior in sync with event_child.
2269
f5a02773
DE
22702014-01-22 Doug Evans <dje@google.com>
2271
2272 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2273
87ce2a04
DE
22742014-01-22 Doug Evans <dje@google.com>
2275
2276 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2277 * configure: Regenerate.
2278 * config.in: Regenerate.
2279 * Makefile.in (SFILES): Add debug.c.
2280 (OBS): Add debug.o.
2281 * debug.c: New file.
2282 * debug.h: New file.
2283 * linux-aarch64-low.c (*): Update all debugging printfs to use
2284 debug_printf instead of fprintf.
2285 * linux-arm-low.c (*): Ditto.
2286 * linux-cris-low.c (*): Ditto.
2287 * linux-crisv32-low.c (*): Ditto.
2288 * linux-m32r-low.c (*): Ditto.
2289 * linux-sparc-low.c (*): Ditto.
2290 * linux-x86.c (*): Ditto.
2291 * linux-low.c (*): Ditto.
2292 (linux_wait_1): Add calls to debug_enter, debug_exit.
2293 (linux_wait): Remove redundant debugging printf.
2294 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2295 (linux_resume, unstop_all_lwps): Ditto.
2296 * mem-break.c (*): Update all debugging printfs to use
2297 debug_printf instead of fprintf.
2298 * remote-utils.c (*): Ditto.
2299 * thread-db.c (*): Ditto.
2300 * server.c #include <ctype.h>, "gdb_vecs.h".
2301 (debug_threads): Moved to debug.c.
2302 (*): Update all debugging printfs to use debug_printf instead of
2303 fprintf.
2304 (start_inferior): Replace call to fflush with call to debug_flush.
2305 (monitor_show_help): Mention set debug-format.
2306 (parse_debug_format_options): New function.
2307 (handle_monitor_command): Handle "monitor set debug-format".
2308 (gdbserver_usage): Mention --debug-format.
2309 (main): Parse --debug-format.
2310 * server.h (debug_threads): Declaration moved to debug.h.
2311 #include "debug.h".
2312 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2313 trace_debug_1 that uses debug_printf.
2314 (tracepoint_look_up_symbols): Update all debugging printfs to use
2315 debug_printf instead of fprintf.
2316
e671835b
BS
23172014-01-20 Baruch Siach <baruch@tkos.co.il>
2318
2319 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2320 sys/ptrace.h.
2321
b5737fa9
PA
23222014-01-17 Pedro Alves <palves@redhat.com>
2323
ea38d2a9 2324 PR build/16445
c7faa97a
PA
2325 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2326 defined after including gdb_proc_service.h.
b5737fa9 2327
40ed484e
DE
23282014-01-16 Doug Evans <dje@google.com>
2329
2330 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2331 (match_dll): Use it.
2332
969c39fb
MM
23332014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2334
2335 * target.h (target_ops) <read_btrace>: Change parameters and
2336 return type to allow error reporting.
2337 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2338 trace reading errors on.
2339 * linux-low.c (linux_low_read_btrace): Pass trace reading
2340 errors on.
2341 (linux_low_disable_btrace): New.
2342
ab7f45ba
DE
23432014-01-15 Doug Evans <dje@google.com>
2344
2345 * inferiors.c (thread_id_to_gdb_id): Delete.
2346 * inferiors.h (thread_id_to_gdb_id): Delete.
2347
66af0f44
EZ
23482014-01-13 Eli Zaretskii <eliz@gnu.org>
2349
2350 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2351 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2352 versions.
2353
9939e131
PA
23542014-01-08 Pedro Alves <palves@redhat.com>
2355
2356 * server.c (handle_status): Don't discard previous queued stop
2357 replies or thread's pending status here.
2358 (main) <disconnection>: Do it here instead.
2359
b7ea362b
PA
23602014-01-08 Pedro Alves <palves@redhat.com>
2361
2362 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2363 * server.c (visit_actioned_threads, handle_pending_status): New
2364 function.
2365 (handle_v_cont): Factor out parts to ...
2366 (resume): ... this new function. If in all-stop, and a thread
2367 being resumed has a pending status, report it without actually
2368 resuming.
2369 (myresume): Adjust to use the new 'resume' function.
2370 (clear_pending_status_callback, set_pending_status_callback)
2371 (find_status_pending_thread_callback): New functions.
2372 (handle_status): Handle the case of multiple threads having
2373 interesting statuses to report. Report threads' real last signal
2374 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2375 with an interesting thread to report the status for, instead of
2376 always reporting the status of the first thread.
2377
28498c42
JB
23782014-01-01 Joel Brobecker <brobecker@adacore.com>
2379
2380 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2381 * gdbreplay.c (gdbreplay_version): Likewise.
2382
f45c82da
YZ
23832013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2384
2385 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2386 iov.iov_len with the real length in use.
2387
379a5e2d
JB
23882013-12-13 Joel Brobecker <brobecker@adacore.com>
2389
2390 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2391 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2392 for all targets that use win32-low.c.
2393 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2394 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2395
4210d83e
PA
23962013-12-13 Pedro Alves <palves@redhat.com>
2397
2398 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2399 if equal to TARGET_WAITKIND_LOADED.
2400 * win32-low.c (cached_status): New static global.
2401 (win32_wait): Add declaration.
2402 (do_initial_child_stuff): Flush all initial pending debug events
2403 up to the initial breakpoint.
2404 (win32_wait): If CACHED_STATUS was set, return that instead
2405 of doing a real wait. Remove the code resuming the execution
2406 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2407 during the initial phase. Also remove the code changing
2408 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2409 TARGET_WAITKIND_STOPPED.
2410
e7f0d979
YQ
24112013-12-11 Yao Qi <yao@codesourcery.com>
2412
2413 * notif.c (handle_notif_ack): Return 0 if no notification
2414 matches.
2415
ebcf782c
DE
24162013-11-20 Doug Evans <dje@google.com>
2417
2418 * linux-low.c (linux_set_resume_request): Fix comment.
2419
20ad9378
DE
24202013-11-20 Doug Evans <dje@google.com>
2421
2422 * linux-low.c (resume_status_pending_p): Tweak comment.
2423
a196ebeb
WT
24242013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2425
2426 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2427 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2428 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2429 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2430 (srv_amd64_regobj): Add amd64-mpx.o.
2431 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2432 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2433 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2434 * i387-fp.c (num_pl_bnd_register) Added constant.
2435 (num_pl_bnd_cfg_registers) Added constant.
2436 (struct i387_xsave) Added reserved area and MPX fields.
2437 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2438 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2439 function.
2440 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2441 (init_registers_amd64_mpx_linux): Declare new function.
2442 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2443 (x86_64_regmap): Add MPX registers.
2444 (x86_linux_read_description): Add MPX case.
2445 (initialize_low_arch): Initialize MPX targets.
2446
0080a2f6
TT
24472013-11-18 Tom Tromey <tromey@redhat.com>
2448
2449 * configure: Rebuild.
2450 * configure.ac: Don't check for stdlib.h.
2451 * gdbreplay.c: Unconditionally include stdlib.h.
2452
2978b111
TT
24532013-11-18 Tom Tromey <tromey@redhat.com>
2454
2455 * config.in: Rebuild.
2456 * configure: Rebuild.
2457 * configure.ac: Don't use AC_HEADER_DIRENT.
2458
a3d08894
TT
24592013-11-18 Tom Tromey <tromey@redhat.com>
2460
2461 * server.h: Don't check HAVE_STRING_H.
2462 * gdbreplay.c: Don't check HAVE_STRING_H.
2463 * configure: Rebuild.
2464
0a5dd17d
TT
24652013-11-18 Tom Tromey <tromey@redhat.com>
2466
2467 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2468 LIBGNU.
2469
1bd2f0ba
TT
24702013-11-08 Tom Tromey <tromey@redhat.com>
2471
2472 * configure, config.in: Rebuild.
2473 * configure.ac: Remove unused configury.
2474
3266f10b
TT
24752013-11-08 Tom Tromey <tromey@redhat.com>
2476
2477 * acinclude.m4: Include common.m4, codeset.m4.
2478 * configure, config.in: Rebuild.
2479 * configure.ac: Use GDB_AC_COMMON.
2480
6682d959
AA
24812013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2482
2483 * linux-s390-low.c (HWCAP_S390_TE): New define.
2484 (s390_arch_setup): Consider the TE field in the HWCAP for
2485 determining 'have_regset_tdb'.
2486
fd0a4d76
SDJ
24872013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2488
2489 PR gdb/16014
2490 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2491 call to sizeof.
2492
1a3d890b
PA
24932013-10-02 Pedro Alves <palves@redhat.com>
2494
2495 * server.c (process_serial_event): Don't output "GDBserver
2496 exiting" if GDB is connected through stdio.
2497 * target.c (mywait): Likewise, be silent if GDB is connected
2498 through stdio.
2499
97ad4581
JB
25002013-10-01 Joel Brobecker <brobecker@adacore.com>
2501
2502 * lynx-low.c (lynx_add_threads_after_attach): New function.
2503 (lynx_attach): Remove call to add_thread. Add call to
2504 lynx_add_threads_after_attach instead.
2505
5b4e221c
MF
25062013-09-28 Mike Frysinger <vapier@gentoo.org>
2507
2508 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2509 * config.in, configure: Regenerated.
2510
ee47b2f8
YQ
25112013-09-18 Yao Qi <yao@codesourcery.com>
2512
2513 PR server/15959
2514 * server.c (start_inferior): Clear 'resume_info'.
2515
d6707650 25162013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2517
d6707650
JW
2518 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2519 for each register.
2520
9243dd0e 25212013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2522
9243dd0e
JW
2523 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2524 linux-tile-low.o to srv_tgtobj.
2525
c623a6ef
WN
25262013-09-16 Will Newton <will.newton@linaro.org>
2527
2528 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2529 out regs.
2530
fb71d39e
PA
25312013-09-06 Pedro Alves <palves@redhat.com>
2532
2533 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2534 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2535 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2536 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2537 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2538 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2539
8e7e9910
PA
25402013-09-06 Pedro Alves <palves@redhat.com>
2541
2542 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2543 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2544
7c3a12ca
PA
25452013-09-06 Pedro Alves <palves@redhat.com>
2546
2547 * linux-amd64-ipa.c: Include tracepoint.h.
2548 * linux-i386-ipa.c: Include tracepoint.h.
2549
8eb3d7b6
RW
25502013-09-06 Ricard Wanderlof <ricardw@axis.com>
2551
2552 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2553 (ps_get_thread_area): New function.
2554
eddddb9d
RW
25552013-09-06 Ricard Wanderlof <ricardw@axis.com>
2556
2557 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2558 (initialize_low_arch): Call init_registers_crisv32 rather than
2559 init_register_crisv32.
2560
533b0600
PA
25612013-09-05 Pedro Alves <palves@redhat.com>
2562
2563 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2564 to ...
2565 * hostio.h: ... this new file.
2566 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2567 win32-low.c: Include hostio.h.
2568
0ce3d3b5
PA
25692013-09-05 Pedro Alves <palves@redhat.com>
2570
2571 * server.h (gdb_client_data, handler_func, callback_handler_func)
2572 (delete_file_handler, add_file_handler, append_callback_event)
2573 (delete_callback_event, start_event_loop, initialize_event_loop):
2574 Move to event-loop.h and include it.
2575 * event-loop.h: New file.
2576
799cdc37
PA
25772013-09-05 Pedro Alves <palves@redhat.com>
2578
2579 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2580 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2581 (loaded_dll, unloaded_dll): Move to ...
2582 * dll.h: ... this new file.
2583 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2584
6a6bbd9d
PA
25852013-09-05 Pedro Alves <palves@redhat.com>
2586
2587 * server.h (current_process, get_thread_process, all_processes)
2588 (add_inferior_to_list, for_each_inferior, current_inferior)
2589 (remove_inferior, add_process, remove_process, find_process_pid)
2590 (have_started_inferiors_p, have_attached_inferiors_p)
2591 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2592 (clear_inferiors, find_inferior, find_inferior_id)
2593 (inferior_target_data, set_inferior_target_data)
2594 (inferior_regcache_data, set_inferior_regcache_data): Move to
2595 inferiors.h, and include it.
2596 * inferiors.h: New file.
2597
f699aaba
PA
25982013-09-05 Pedro Alves <palves@redhat.com>
2599
2600 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2601 Move ...
2602 * ax.h: ... here.
2603
c144c7a0
PA
26042013-09-05 Pedro Alves <palves@redhat.com>
2605
2606 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2607 tracepoint.h.
2608 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2609 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2610 (handle_tracepoint_general_set, handle_tracepoint_query)
2611 (tracepoint_finished_step, tracepoint_was_hit)
2612 (release_while_stepping_state_list, current_traceframe)
2613 (in_readonly_region, traceframe_read_mem)
2614 (fetch_traceframe_registers, traceframe_read_sdata)
2615 (traceframe_read_info, struct fast_tpoint_collect_status)
2616 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2617 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2618 (supply_fast_tracepoint_registers)
2619 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2620 (ipa_tdesc, claim_trampoline_space)
2621 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2622 (agent_mem_read, agent_get_trace_state_variable_value)
2623 (agent_set_trace_state_variable_value, agent_tsv_read)
2624 (agent_mem_read_string, get_raw_reg_func_addr)
2625 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2626 * tracepoint.h: ... this new file.
2627
ff42e6ab
PA
26282013-09-05 Pedro Alves <palves@redhat.com>
2629
2630 * server.h (perror_with_name, error, fatal, warning, paddress)
2631 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2632 include it.
2633 * utils.h: New file.
2634
541af0f4
PA
26352013-09-05 Pedro Alves <palves@redhat.com>
2636
2637 * server.h (remote_debug, noack_mode, transport_is_reliable)
2638 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2639 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2640 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2641 (write_enn, initialize_async_io, enable_async_io)
2642 (disable_async_io, check_remote_input_interrupt_request)
2643 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2644 (dead_thread_notify, prepare_resume_reply)
2645 (decode_address_to_semicolon, decode_address, decode_m_packet)
2646 (decode_M_packet, decode_X_packet, decode_xfer_write)
2647 (decode_search_memory_packet, unhexify, hexify)
2648 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2649 (look_up_one_symbol, relocate_instruction)
2650 (monitor_output): Move to remote-utils.h, and include it.
2651 * remote-utils.h: New file.
2652
eebdf26b
PA
26532013-09-05 Pedro Alves <palves@redhat.com>
2654
2655 * server.h (_): Delete.
2656
3aafd2ff
PA
26572013-09-02 Pedro Alves <palves@redhat.com>
2658
2659 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2660 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2661 allocated.
2662 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2663
cee83bcb
PM
26642013-09-02 Pierre Muller <muller@sourceware.org>
2665
2666 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2667 or WriteProcessMemory complete successfully and handle
2668 ERROR_PARTIAL_COPY error.
2669
9a13b2fa
PA
26702013-09-02 Pedro Alves <palves@redhat.com>
2671
2672 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2673 error instead of EIO.
2674
602e3198
JK
26752013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2676
2677 PR server/15604
2678 * linux-low.c: Include filestuff.h.
2679 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2680 * lynx-low.c: Include filestuff.h.
2681 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2682 * server.c: Include filestuff.h.
2683 (main): Call notice_open_fds.
2684 * spu-low.c: Include filestuff.h.
2685 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2686
96d7229d
LM
26872013-08-22 Luis Machado <lgustavo@codesourcery.com>
2688
2689 * Makefile.in: Explain why ../target and ../nat are not
2690 listed as include file search paths.
2691 (linux-waitpid.o): New object file rule.
2692 * configure.srv (srv_native_linux_obj): New variable.
2693 Replace all occurrences of linux native object files with
2694 $srv_native_linux_obj.
2695 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2696 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2697 (linux_enable_event_reporting): Remove declaration.
2698 (my_waitpid): Moved to common/linux-waitpid.c.
2699 (linux_wait_for_event): Pass ptid when calling
2700 linux_enable_event_reporting.
2701 (linux_supports_tracefork_flag): Remove.
2702 (linux_enable_event_reporting): Likewise.
2703 (linux_tracefork_grandchild): Remove.
2704 (STACK_SIZE): Moved to common/linux-ptrace.c.
2705 (linux_tracefork_child): Remove.
2706 (linux_test_for_tracefork): Remove.
2707 (linux_look_up_symbols): Call linux_supports_traceclone.
2708 (initialize_low): Remove call to linux_test_for_tracefork.
2709 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2710 common/linux-ptrace.h.
2711 (PTRACE_TYPE_ARG4): Likewise.
2712 Include linux-ptrace.h.
2713
32940073
PA
27142013-08-21 Pedro Alves <palves@redhat.com>
2715
2716 * config.in: Renegerate.
2717
33b60d58 27182013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2719
33b60d58
LM
2720 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2721 (SFILES): Remove $(srcdir)/common/target-common.c and
2722 add $(srcdir)/target/waitstatus.c.
2723 (OBS): Remove target-common.o and add waitstatus.o.
2724 (server_h): Remove $(srcdir)/../common/target-common.h and
2725 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2726 and $(srcdir)/../target/waitstatus.h.
2727 (target-common.o): Remove.
2728 (waitstatus.o): New target object file.
2729 * target.h: Do not include target-common.h and
2730 include target/resume.h, target/wait.h and
2731 target/waitstatus.h.
2732
b8e1b30e
LM
27332013-08-13 Luis Machado <lgustavo@codesourcery.com>
2734
2735 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2736 to PTRACE_TYPE_ARG3.
2737 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2738 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2739 PTRACE_TYPE_ARG4.
2740 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2741 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2742
7a60ad40
YQ
27432013-07-27 Jie Zhang <jie@codesourcery.com>
2744 Daniel Jacobowitz <dan@codesourcery.com>
2745 Yao Qi <yao@codesourcery.com>
2746
2747 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2748 (mips-linux-watch.o): New rule.
2749 (mips_linux_watch_h): New variable.
2750 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2751 srv_tgtobj.
2752 * linux-mips-low.c: Include mips-linux-watch.h.
2753 (struct arch_process_info, struct arch_lwp_info): New.
2754 (update_watch_registers_callback): New function.
2755 (mips_linux_new_process, mips_linux_new_thread) New functions.
2756 (mips_linux_prepare_to_resume, mips_insert_point): New
2757 functions.
2758 (mips_remove_point, mips_stopped_by_watchpoint): New
2759 functions.
2760 (rsp_bp_type_to_target_hw_bp_type): New function.
2761 (mips_stopped_data_address): New function.
2762 (the_low_target): Add watchpoint support functions.
2763
de6f69ad
YQ
27642013-07-27 Yao Qi <yao@codesourcery.com>
2765
2766 * i386-low.c: Include break-common.h.
2767 (enum target_hw_bp_type): Remove.
2768
3360c0bf
LM
27692013-07-24 Luis Machado <lgustavo@codesourcery.com>
2770
2771 * Makefile.in (SFILES): /common/target-common.c.
2772 (OBS): Add target-common.o.
2773 (server_h): Add $(srcdir)/../common/target-common.h.
2774 (target-common.o): New target.
2775 * server.c (queue_stop_reply_callback): Free
2776 status string after use.
2777 * target.c (target_waitstatus_to_string): Remove.
2778 * target.h: Include target-common.h.
2779 (resume_kind): Likewise.
2780 (target_waitkind): Likewise.
2781 (target_waitstatus): Likewise.
2782 (TARGET_WNOHANG): Likewise.
2783
bd885420
YQ
27842013-07-04 Yao Qi <yao@codesourcery.com>
2785
2786 * Makefile.in (host_alias): Use @host_noncanonical@.
2787 (target_alias): Use @target_noncanonical@.
2788 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2789 ACX_NONCANONICAL_HOST.
2790 * configure: Regenerated.
2791
2792 Revert:
2793 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2794
2795 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2796 * configure: Rebuild.
2797 * Makefile.in (version_host, version_target): Get from configure.
2798 (version.c): Use $(version_host) and $(version_target).
2799
17ef446e
PA
28002013-07-03 Pedro Alves <palves@redhat.com>
2801
2802 * Makefile.in (config.status): Depend on development.sh.
2803 * acinclude.m4: Include libmcheck.m4.
2804 * configure: Regenerate.
2805
7a9a7487
MG
28062013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2807
2808 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2809 attribute inside the parentheses.
2810 (winapi_DebugSetProcessKillOnExit): Ditto.
2811 (winapi_DebugBreakProcess): Ditto.
2812 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2813
49b64de6
MG
28142013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2815
2816 * notif.h (notif_event): Add a dummy member to avoid compiler
2817 errors.
2818
d5749ee7
PA
28192013-07-01 Pedro Alves <palves@redhat.com>
2820
2821 * hostio.c (HOSTIO_PATH_MAX): Define.
2822 (require_filename, handle_open, handle_unlink, handle_readlink):
2823 Use it.
2824
d8d2a3ee
PA
28252013-07-01 Pedro Alves <palves@redhat.com>
2826
2827 * server.h: Include "pathmax.h".
2828 * linux-low.c: Don't include sys/param.h.
2829 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2830 MAXPATHLEN.
2831 * win32-low.c: Don't include sys/param.h.
2832 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2833
bc7dea8d
PA
28342013-07-01 Pedro Alves <palves@redhat.com>
2835
2836 * event-loop.c: Don't check HAVE_UNISTD_H before including
2837 <unistd.h>.
2838 * gdbreplay.c: Likewise.
2839 * remote-utils.c: Likewise.
2840 * server.c: Likewise.
2841 * configure.ac: Don't check for unistd.h.
2842 * configure: Regenerate.
2843
d6c2da54
TT
28442013-06-28 Tom Tromey <tromey@redhat.com>
2845
2846 * Makefile.in (version.c): Use version.in, not
2847 common/version.in.
2848
257b6bec
MG
28492013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2850
2851 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2852 * configure: Rebuild.
2853 * Makefile.in (version_host, version_target): Get from configure.
2854 (version.c): Use $(version_host) and $(version_target).
2855
86ebe149
DK
28562013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2857
2858 Fix trace-status to output user name without trailing colon.
2859 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2860
f30aa5af
DK
28612013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2862
2863 Fix trace-status to output proper start-time and stop-time.
2864 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2865 output start time and stop time in hex as gdb expects.
2866
28a93511
YQ
28672013-06-26 Pedro Alves <pedro@codesourcery.com>
2868
2869 * tracepoint.c (build_traceframe_info_xml): Output trace state
2870 variables present in the trace buffer.
2871
01208463
TT
28722013-06-24 Tom Tromey <tromey@redhat.com>
2873
2874 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2875 create-version.sh.
2876 (version.o): Remove.
2877 * gdbreplay.c: Include version.h.
2878 (version, host_name): Don't declare.
2879 * server.h: Include version.h.
2880 (version, host_name): Don't declare.
2881
760256f9
PA
28822013-06-12 Pedro Alves <palves@redhat.com>
2883
2884 * linux-x86-low.c (linux_is_elf64): Delete global.
2885 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2886 with local linux_pid_exe_is_elf_64_file use.
2887
030031ee
PA
28882013-06-11 Pedro Alves <palves@redhat.com>
2889
2890 * linux-low.c (regset_disabled, disable_regset): New functions.
2891 (regsets_fetch_inferior_registers)
2892 (regsets_store_inferior_registers): Use them.
2893 (initialize_regsets_info); Don't allocate the disabled_regsets
2894 array here.
2895 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2896 comment.
2897
5da6eb0a
PA
28982013-06-11 Pedro Alves <palves@redhat.com>
2899
2900 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2901 xmalloc.
2902
7e5aaa09
PA
29032013-06-11 Pedro Alves <palves@redhat.com>
2904
2905 * linux-x86-low.c (initialize_low_arch): Call
2906 init_registers_x32_avx_linux.
2907
d878444c
JK
29082013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2909
2910 Fix compatibility with Android Bionic.
2911 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2912 it is not empty.
2913
3aee8918
PA
29142013-06-07 Pedro Alves <palves@redhat.com>
2915
5f2b57b5 2916 PR server/14823
3aee8918
PA
2917 * Makefile.in (OBS): Add tdesc.o.
2918 (IPA_OBJS): Add tdesc-ipa.o.
2919 (tdesc-ipa.o): New rule.
2920 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2921 interface.
2922 * linux-low.c (new_inferior): Delete.
2923 (disabled_regsets, num_regsets): Delete.
2924 (linux_add_process): Adjust to set the new per-process
2925 new_inferior flag.
2926 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2927 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2928 was a stop. When calling arch_setup, switch the current inferior
2929 to the thread that got an event.
2930 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2931 (regsets_fetch_inferior_registers)
2932 (regsets_store_inferior_registers): New regsets_info parameter.
2933 Adjust to use it.
2934 (linux_register_in_regsets): New regs_info parameter. Adjust to
2935 use it.
2936 (register_addr, fetch_register, store_register): New usrregs_info
2937 parameter. Adjust to use it.
2938 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2939 parameter regs_info. Adjust to use it.
2940 (linux_fetch_registers): Get the current inferior's regs_info, and
2941 adjust to use it.
2942 (linux_store_registers): Ditto.
2943 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2944 (initialize_low): Don't initialize the target_regsets here. Call
2945 initialize_low_arch.
2946 * linux-low.h (target_regsets): Delete declaration.
2947 (struct regsets_info): New.
2948 (struct usrregs_info): New.
2949 (struct regs_info): New.
2950 (struct process_info_private) <new_inferior>: New field.
2951 (struct linux_target_ops): Delete the num_regs, regmap, and
2952 regset_bitmap fields. New field regs_info.
2953 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2954 * i387-fp.c (num_xmm_registers): Delete.
2955 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2956 calls to new interface.
2957 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2958 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2959 Infer the number of xmm registers from the regcache's target
2960 description.
2961 * i387-fp.h (num_xmm_registers): Delete.
2962 * inferiors.c (add_thread): Don't install the thread's regcache
2963 here.
2964 * proc-service.c (gregset_info): Fetch the current inferior's
2965 regs_info. Adjust to use it.
2966 * regcache.c: Include tdesc.h.
2967 (register_bytes, reg_defs, num_registers)
2968 (gdbserver_expedite_regs): Delete.
2969 (get_thread_regcache): If the thread doesn't have a regcache yet,
2970 create one, instead of aborting gdbserver.
2971 (regcache_invalidate_one): Rename to ...
2972 (regcache_invalidate_thread): ... this.
2973 (regcache_invalidate_one): New.
2974 (regcache_invalidate): Only invalidate registers of the current
2975 process.
2976 (init_register_cache): Add target_desc parameter, and use it.
2977 (new_register_cache): Ditto. Assert the target description has a
2978 non zero registers_size.
2979 (regcache_cpy): Add assertions. Adjust.
2980 (realloc_register_cache, set_register_cache): Delete.
2981 (registers_to_string, registers_from_string): Adjust.
2982 (find_register_by_name, find_regno, find_register_by_number)
2983 (register_cache_size): Add target_desc parameter, and use it.
2984 (free_register_cache_thread, free_register_cache_thread_one)
2985 (regcache_release, register_cache_size): New.
2986 (register_size): Add target_desc parameter, and use it.
2987 (register_data, supply_register, supply_register_zeroed)
2988 (supply_regblock, supply_register_by_name, collect_register)
2989 (collect_register_as_string, collect_register_by_name): Adjust.
2990 * regcache.h (struct target_desc): Forward declare.
2991 (struct regcache) <tdesc>: New field.
2992 (init_register_cache, new_register_cache): Add target_desc
2993 parameter.
2994 (regcache_invalidate_thread): Declare.
2995 (regcache_invalidate_one): Delete declaration.
2996 (regcache_release): Declare.
2997 (find_register_by_number, register_cache_size, register_size)
2998 (find_regno): Add target_desc parameter.
2999 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3000 declarations.
3001 * remote-utils.c: Include tdesc.h.
3002 (outreg, prepare_resume_reply): Adjust.
3003 * server.c: Include tdesc.h.
3004 (gdbserver_xmltarget): Delete declaration.
3005 (get_features_xml, process_serial_event): Adjust.
3006 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3007 declare.
3008 (struct process_info) <tdesc>: New field.
3009 (ipa_tdesc): Declare.
3010 * tdesc.c: New file.
3011 * tdesc.h: New file.
3012 * tracepoint.c: Include tdesc.h.
3013 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3014 (get_context_regcache): Adjust to pass ipa_tdesc down.
3015 (do_action_at_tracepoint): Adjust to get the register cache size
3016 from the context regcache's description.
3017 (traceframe_walk_blocks): Adjust to get the register cache size
3018 from the current trace frame's description.
3019 (traceframe_get_pc): Adjust to get current trace frame's
3020 description and pass it down.
3021 (gdb_collect): Adjust to get the register cache size from the
3022 IPA's description.
3023 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3024 (gdbserver_xmltarget): Delete.
3025 (initialize_low_tracepoint): Set the ipa's target description.
3026 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3027 (initialize_low_tracepoint): Set the ipa's target description.
3028 * linux-x86-low.c: Include tdesc.h.
3029 [__x86_64__] (is_64bit_tdesc): New.
3030 (ps_get_thread_area, x86_get_thread_area): Use it.
3031 (i386_cannot_store_register): Rename to ...
3032 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3033 (i386_cannot_fetch_register): Rename to ...
3034 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3035 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3036 to new interface.
3037 (target_regsets): Rename to ...
3038 (x86_regsets): ... this.
3039 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3040 interface.
3041 (x86_siginfo_fixup): Use is_64bit_tdesc.
3042 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3043 (tdesc_x32_avx_linux, tdesc_x32_linux)
3044 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3045 Declare.
3046 (x86_linux_update_xmltarget): Delete.
3047 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3048 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3049 (AMD64_LINUX_USER64_CS): New.
3050 (x86_linux_read_description): New, based on
3051 x86_linux_update_xmltarget.
3052 (same_process_callback): New.
3053 (x86_arch_setup_process_callback): New.
3054 (x86_linux_update_xmltarget): New.
3055 (x86_regsets_info): New.
3056 (amd64_linux_regs_info): New.
3057 (i386_linux_usrregs_info): New.
3058 (i386_linux_regs_info): New.
3059 (x86_linux_regs_info): New.
3060 (x86_arch_setup): Reimplement.
3061 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3062 (x86_emit_ops): Ditto.
3063 (the_low_target): Adjust. Install x86_linux_regs_info,
3064 x86_cannot_fetch_register, and x86_cannot_store_register.
3065 (initialize_low_arch): New.
3066 * linux-ia64-low.c (tdesc_ia64): Declare.
3067 (ia64_fetch_register): Adjust.
3068 (ia64_usrregs_info, regs_info): New globals.
3069 (ia64_regs_info): New function.
3070 (the_low_target): Adjust.
3071 (initialize_low_arch): New function.
3072 * linux-sparc-low.c (tdesc_sparc64): Declare.
3073 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3074 Adjust.
3075 (sparc_arch_setup): New function.
3076 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3077 (the_low_target): Adjust.
3078 (initialize_low_arch): New function.
3079 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3080 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3081 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3082 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3083 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3084 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3085 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3086 (tdesc_powerpc_isa205_vsx64l): Declare.
3087 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3088 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3089 (ppc_set_pc, ppc_get_hwcap): Adjust.
3090 (ppc_usrregs_info): Forward declare.
3091 (!__powerpc64__) ppc_regmap_adjusted: New global.
3092 (ppc_arch_setup): Adjust to the current process'es target
3093 description.
3094 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3095 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3096 (ppc_store_evrregset): Adjust.
3097 (target_regsets): Rename to ...
3098 (ppc_regsets): ... this, and make static.
3099 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3100 (ppc_regs_info): New function.
3101 (the_low_target): Adjust.
3102 (initialize_low_arch): New function.
3103 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3104 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3105 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3106 (tdesc_s390x_linux64v2): Declare.
3107 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3108 (s390_fill_gregset, s390_store_last_break): Adjust.
3109 (target_regsets): Rename to ...
3110 (s390_regsets): ... this, and make static.
3111 (s390_get_pc, s390_set_pc): Adjust.
3112 (s390_get_hwcap): New target_desc parameter, and use it.
3113 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3114 (s390_arch_setup): Adjust to set the current process'es target
3115 description. Don't adjust the regmap.
3116 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3117 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3118 (regs_info_3264): New globals.
3119 (s390_regs_info): New function.
3120 (the_low_target): Adjust.
3121 (initialize_low_arch): New function.
3122 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3123 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3124 [__mips64] (init_registers_mips_linux)
3125 (init_registers_mips_dsp_linux): Delete defines.
3126 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3127 (have_dsp): New global.
3128 (mips_read_description): New, based on mips_arch_setup.
3129 (mips_arch_setup): Reimplement.
3130 (get_usrregs_info): New function.
3131 (mips_cannot_fetch_register, mips_cannot_store_register)
3132 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3133 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3134 (target_regsets): Rename to ...
3135 (mips_regsets): ... this, and make static.
3136 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3137 (dsp_regs_info, regs_info): New globals.
3138 (mips_regs_info): New function.
3139 (the_low_target): Adjust.
3140 (initialize_low_arch): New function.
3141 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3142 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3143 Declare.
3144 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3145 (arm_read_description): New, with bits factored from
3146 arm_arch_setup.
3147 (arm_arch_setup): Reimplement.
3148 (target_regsets): Rename to ...
3149 (arm_regsets): ... this, and make static.
3150 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3151 (arm_regs_info): New function.
3152 (the_low_target): Adjust.
3153 (initialize_low_arch): New function.
3154 * linux-m68k-low.c (tdesc_m68k): Declare.
3155 (target_regsets): Rename to ...
3156 (m68k_regsets): ... this, and make static.
3157 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3158 (m68k_regs_info): New function.
3159 (m68k_arch_setup): New function.
3160 (the_low_target): Adjust.
3161 (initialize_low_arch): New function.
3162 * linux-sh-low.c (tdesc_sharch): Declare.
3163 (target_regsets): Rename to ...
3164 (sh_regsets): ... this, and make static.
3165 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3166 (sh_regs_info, sh_arch_setup): New functions.
3167 (the_low_target): Adjust.
3168 (initialize_low_arch): New function.
3169 * linux-bfin-low.c (tdesc_bfin): Declare.
3170 (bfin_arch_setup): New function.
3171 (bfin_usrregs_info, regs_info): New globals.
3172 (bfin_regs_info): New function.
3173 (the_low_target): Adjust.
3174 (initialize_low_arch): New function.
3175 * linux-cris-low.c (tdesc_cris): Declare.
3176 (cris_arch_setup): New function.
3177 (cris_usrregs_info, regs_info): New globals.
3178 (cris_regs_info): New function.
3179 (the_low_target): Adjust.
3180 (initialize_low_arch): New function.
3181 * linux-cris-low.c (tdesc_crisv32): Declare.
3182 (cris_arch_setup): New function.
3183 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3184 (cris_regs_info): New function.
3185 (the_low_target): Adjust.
3186 (initialize_low_arch): New function.
3187 * linux-m32r-low.c (tdesc_m32r): Declare.
3188 (m32r_arch_setup): New function.
3189 (m32r_usrregs_info, regs_info): New globals.
3190 (m32r_regs_info): Adjust.
3191 (initialize_low_arch): New function.
3192 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3193 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3194 (tic6x_usrregs_info): Forward declare.
3195 (tic6x_read_description): New function, based on ...
3196 (tic6x_arch_setup): ... this. Reimplement.
3197 (target_regsets): Rename to ...
3198 (tic6x_regsets): ... this, and make static.
3199 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3200 (tic6x_regs_info): New function.
3201 (the_low_target): Adjust.
3202 (initialize_low_arch): New function.
3203 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3204 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3205 (target_regsets): Rename to ...
3206 (xtensa_regsets): ... this, and make static.
3207 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3208 globals.
3209 (xtensa_arch_setup, xtensa_regs_info): New functions.
3210 (the_low_target): Adjust.
3211 (initialize_low_arch): New function.
3212 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3213 (nios2_arch_setup): Set the current process'es tdesc.
3214 (target_regsets): Rename to ...
3215 (nios2_regsets): ... this.
3216 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3217 (nios2_regs_info): New function.
3218 (the_low_target): Adjust.
3219 (initialize_low_arch): New function.
a261b8f5
PA
3220 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3221 (aarch64_arch_setup): Set the current process'es tdesc.
3222 (target_regsets): Rename to ...
3223 (aarch64_regsets): ... this.
3224 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3225 (aarch64_regs_info): New function.
3226 (the_low_target): Adjust.
3227 (initialize_low_arch): New function.
3aee8918
PA
3228 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3229 globals.
3230 (target_regsets): Rename to ...
3231 (tile_regsets): ... this.
3232 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3233 (tile_regs_info): New function.
3234 (tile_arch_setup): Set the current process'es tdesc.
3235 (the_low_target): Adjust.
3236 (initialize_low_arch): New function.
3237 * spu-low.c (tdesc_spu): Declare.
3238 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3239 * win32-arm-low.c (tdesc_arm): Declare.
3240 (arm_arch_setup): New function.
3241 (the_low_target): Install arm_arch_setup instead of
3242 init_registers_arm.
3243 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3244 (init_windows_x86): Rename to ...
3245 (i386_arch_setup): ... this. Set `win32_tdesc'.
3246 (the_low_target): Adjust.
3247 * win32-low.c (win32_tdesc): New global.
3248 (child_add_thread): Don't create the thread cache here.
3249 (do_initial_child_stuff): Set the new process'es tdesc.
3250 * win32-low.h (struct target_desc): Forward declare.
3251 (win32_tdesc): Declare.
3252 * lynx-i386-low.c (tdesc_i386): Declare global.
3253 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3254 * lynx-low.c (lynx_tdesc): New global.
3255 (lynx_add_process): Set the new process'es tdesc.
3256 * lynx-low.h (struct target_desc): Forward declare.
3257 (lynx_tdesc): Declare global.
3258 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3259 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3260 * nto-low.c (nto_tdesc): New global.
3261 (do_attach): Set the new process'es tdesc.
3262 * nto-low.h (struct target_desc): Forward declare.
3263 (nto_tdesc): Declare.
3264 * nto-x86-low.c (tdesc_i386): Declare.
3265 (nto_x86_arch_setup): Set `nto_tdesc'.
3266
b1fbec62
GB
32672013-06-04 Gary Benson <gbenson@redhat.com>
3268
3269 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3270 to qSupported response when appropriate.
3271 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3272 with nonzero-length annex.
3273 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3274 arguments supplied in annex.
3275
d1ec4ce7
DE
32762013-05-31 Doug Evans <dje@google.com>
3277
ac44adcb 3278 PR server/15594
d1ec4ce7
DE
3279 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3280 64 bits in 64-cross-32 environment.
3281
9b25f2d3
PA
32822013-05-28 Pedro Alves <palves@redhat.com>
3283
3284 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3285 (aarch64-without-fpu.c): Delete rule.
3286 * configure.srv (aarch64*-*-linux*): Remove references to
3287 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3288 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3289 declaration.
3290
6740dc9c
PA
32912013-05-24 Pedro Alves <palves@redhat.com>
3292
3293 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3294 instead of strchr/decode_address. Error if the range isn't split
3295 with a ','. Don't assume there's be a ':' in the action.
3296
c2d6af84
PA
32972013-05-23 Yao Qi <yao@codesourcery.com>
3298 Pedro Alves <palves@redhat.com>
3299
3300 * linux-low.c (lwp_in_step_range): New function.
3301 (linux_wait_1): If the thread was range stepping and stopped
3302 outside the stepping range, report the stop to GDB. Otherwise,
3303 continue stepping. Add range stepping debug output.
3304 (linux_set_resume_request): Copy the step range from the resume
3305 request to the lwp.
3306 (linux_supports_range_stepping): New.
3307 (linux_target_ops) <supports_range_stepping>: Set to
3308 linux_supports_range_stepping.
3309 * linux-low.h (struct linux_target_ops)
3310 <supports_range_stepping>: New field.
3311 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3312 * linux-x86-low.c (x86_supports_range_stepping): New.
3313 (the_low_target) <supports_range_stepping>: Set to
3314 x86_supports_range_stepping.
3315 * server.c (handle_v_cont): Handle 'r' action.
3316 (handle_v_requests): Append ";r" if the target supports range
3317 stepping.
3318 * target.h (struct thread_resume) <step_range_start,
3319 step_range_end>: New fields.
3320 (struct target_ops) <supports_range_stepping>:
3321 New field.
3322 (target_supports_range_stepping): New macro.
3323
58794e1a
JB
33242013-05-17 Joel Brobecker <brobecker@adacore.com>
3325
3326 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3327 confusion in comment.
3328
d631c5a7
JB
33292013-05-17 Joel Brobecker <brobecker@adacore.com>
3330
3331 * lynx-low.c (struct process_info_private): New type.
3332 (lynx_add_process): New function.
3333 (lynx_create_inferior, lynx_attach): Replace calls to
3334 add_process by calls to lynx_add_process.
3335 (lynx_resume): If PTID is null, then try using
3336 current_process()->private->last_wait_event_ptid.
3337 Add comments.
3338 (lynx_clear_inferiors): Delete. The contents of that function
3339 has been inlined in lynx_mourn;
3340 (lynx_wait_1): Save the ptid in the process's private data.
3341 (lynx_mourn): Free the process' private data. Replace call
3342 to lynx_clear_inferiors by call to clear_inferiors.
3343
96f7a20f
YQ
33442013-05-17 Yao Qi <yao@codesourcery.com>
3345
3346 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3347 the right place.
3348
db0dfaa0
LM
33492013-05-16 Luis Machado <lgustavo@codesourcery.com>
3350
3351 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3352 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3353 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3354 PT_TEXT_END_ADDR guards. Update comments.
3355 (linux_target_op) <read_offsets>: Conditionally define to
3356 linux_read_offsets if the target is UCLIBC and if it defines
3357 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3358
68f5f838
SL
33592013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3360 Andrew Jenner <andrew@codesourcery.com>
3361
3362 * Makefile.in (SFILES): Add linux-nios2-low.c.
3363 (clean): Add action to delete nios2-linux.c.
3364 (nios2-linux.c): New rule.
3365 * configure.srv: Add nios2*-*-linux*.
3366 * linux-nios2-low.c: New.
3367
1ebff1fd
HAQ
33682013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3369
3370 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3371
f6150862
HZ
33722013-04-25 Hui Zhu <hui@codesourcery.com>
3373
3374 PR gdb/15186
f6150862
HZ
3375 * ax.c (ax_printf): Add fflush.
3376
614c279d
TT
33772013-04-22 Tom Tromey <tromey@redhat.com>
3378
3379 * Makefile.in (SFILES): Add filestuff.c.
3380 (OBS): Add filestuff.o.
3381 (filestuff.o): New target.
3382 * config.in, configure: Rebuild.
3383 * configure.ac: Check for fdwalk, pipe2.
3384
7d4e5717
PA
33852013-04-17 Pedro Alves <palves@redhat.com>
3386
3387 * configure.ac (USE_THREAD_DB): Delete variable.
3388 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3389 Don't AC_SUBST USE_THREAD_DB.
3390 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3391 * config.in, configure: Regenerate.
3392
d5c93e41
PA
33932013-04-16 Pedro Alves <palves@redhat.com>
3394
3395 * linux-low.h (struct lwp_info) <thread_known>: Move under
3396 the USE_THREAD_DB #ifdef.
3397
04f5fe89
PA
33982013-04-16 Pedro Alves <palves@redhat.com>
3399
3400 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3401 (linux-low.o): Delete rule.
3402 * linux-low.h: Always include "gdb_thread_db.h" instead of
3403 conditionally including thread_db.h.
3404 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3405 HAVE_THREAD_DB_H.
3406
480b27bf
JK
34072013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3408
3409 * Makefile.in (install-only): Fix make install regression.
3410
43662968
JK
34112013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3412
3413 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3414 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3415 installation.
3416 * gdbserver.1: Remove.
3417
3e74e146
PA
34182013-03-22 Pedro Alves <palves@redhat.com>
3419
3420 * linux-low.c (handle_extended_wait): Don't call
3421 linux_enable_event_reporting.
3422
a8347a2a
TT
34232013-03-15 Tony Theodore <tonyt@logyst.com>
3424
3425 PR build/9098:
3426 * Makefile.in (SHELL): Use @SHELL@.
3427
eeb56fa7
SDJ
34282013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3429
3430 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3431 compiler warning.
3432
4fa7e2ff
JB
34332013-03-13 Joel Brobecker <brobecker@adacore.com>
3434
3435 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3436 Remove extraneous NULL element.
3437
8ddb1965
YQ
34382013-03-13 Yao Qi <yao@codesourcery.com>
3439
3440 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3441 'V' block in trace frame.
3442
9accd112
MM
34432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3444
3445 * target.h (struct target_ops): Add btrace ops.
3446 (target_supports_btrace): New macro.
3447 (target_enable_btrace): New macro.
3448 (target_disable_btrace): New macro.
3449 (target_read_btrace): New macro.
3450 * gdbthread.h (struct thread_info): Add btrace field.
3451 * server.c: Include btrace-common.h.
3452 (handle_btrace_general_set): New function.
3453 (handle_btrace_enable): New function.
3454 (handle_btrace_disable): New function.
3455 (handle_general_set): Call handle_btrace_general_set.
3456 (handle_qxfer_btrace): New function.
3457 (struct qxfer qxfer_packets[]): Add btrace entry.
3458 * inferiors.c (remove_thread): Disable btrace.
3459 * linux-low: Include linux-btrace.h.
3460 (linux_low_enable_btrace): New function.
3461 (linux_low_read_btrace): New function.
3462 (linux_target_ops): Add btrace ops.
3463 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3464 Add srv_linux_btrace=yes.
3465 (x86_64-*-linux*): Add linux-btrace.o.
3466 Add srv_linux_btrace=yes.
3467 * configure.ac: Define HAVE_LINUX_BTRACE.
3468 * config.in: Regenerated.
3469 * configure: Regenerated.
3470
5cc22e4c
MM
34712013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3472
3473 * server.c (handle_qxfer): Preserve error message if -3 is
3474 returned.
3475 (qxfer): Document the -3 return value.
3476
7c97f91e
MM
34772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3478
3479 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3480 (linux_btrace_h): New variable.
3481 (linux-btrace.o): New rule.
3482
be9a119c 34832013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3484 Hafiz Abid Qadeer <abidh@codesourcery.com>
3485
3486 * tracepoint.c (trace_buffer_size): New global.
3487 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3488 (init_trace_buffer): Change to one-argument function. Allocate
3489 trace buffer memory.
3490 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3491 handle QTBuffer:size packet.
3492 (cmd_bigqtbuffer_size): New function.
3493 (initialize_tracepoint): Call init_trace_buffer with
3494 DEFAULT_TRACE_BUFFER_SIZE.
3495 * server.c (handle_query): Add QTBuffer:size in the
3496 supported packets.
3497
e64f7499
YQ
34982013-03-07 Yao Qi <yao@codesourcery.com>
3499
3500 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3501 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3502 of -1.
3503 (cmd_qtsp): Adjust condition. Do post increment.
3504 Set cur_action and cur_step_action back to 0.
3505
f0ae6fc3
PA
35062013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3507
3508 PR server/15236
3509 * linux-low.c (linux_write_memory): Return early success if LEN is
3510 zero.
3511
b5b0b0af
CV
35122013-03-05 Corinna Vinschen <vinschen@redhat.de>
3513
334ad4a8 3514 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3515
589bc927
TT
35162013-02-28 Tom Tromey <tromey@redhat.com>
3517
3518 * configure.ac: Invoke AC_SYS_LARGEFILE.
3519 * configure, config.in: Rebuild.
3520
dfe07582
CV
35212013-02-28 Corinna Vinschen <vinschen@redhat.com>
3522
3523 * win32-low.c: Throughout, fix format strings and casts of
3524 printf-like functions to avoid type related warnings on all
3525 platforms.
3526 (get_child_debug_event): Print dwDebugEventCode as hex since
3527 that's how it's usually documented.
3528
736cd585
YQ
35292013-02-28 Yao Qi <yao@codesourcery.com>
3530
3531 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3532 pulongest.
3533
e1f58301
JW
35342013-02-27 Jiong Wang <jiwang@tilera.com>
3535
3536 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3537 (reg-tilegx32.c): New rule.
3538 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3539 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3540 different register info initializer according to elf class.
3541 (init_registers_tilgx32): New function. The tilegx32 register info
3542 initializer.
3543 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3544 (tile_store_gregset): Likewise.
3545
d171ca78
YQ
35462013-02-27 Yao Qi <yao@codesourcery.com>
3547
3548 * server.c (process_point_options): Print debug message when
3549 debug_threads is true.
3550
282bbdf3
YQ
35512013-02-26 Yao Qi <yao@codesourcery.com>
3552
3553 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3554
aca22551
PA
35552013-02-19 Pedro Alves <palves@redhat.com>
3556 Kai Tietz <ktietz@redhat.com>
3557
3558 PR gdb/15161
3559
3560 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3561 instead of strtoul to extract address from packet.
3562 (process_serial_event) <'z'>: Likewise.
3563
4f3cee1c
YQ
35642013-02-18 Yao Qi <yao@codesourcery.com>
3565
3566 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3567
8e1d55a3
PA
35682013-02-14 Pedro Alves <palves@redhat.com>
3569
3570 Plug memory leak.
3571
3572 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3573 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3574
458820da
PA
35752013-02-14 Pedro Alves <palves@redhat.com>
3576
3577 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3578
baea0dae
PA
35792013-02-14 Pedro Alves <palves@redhat.com>
3580
3581 * tracepoint.c (save_string): Delete.
3582 (add_tracepoint_action): Use savestring instead of save_string.
3583
0b1afbb3
PA
35842013-02-12 Pedro Alves <palves@redhat.com>
3585
3586 * linux-xtensa-low.c: Ditto.
3587 * xtensa-xtregs.c: Ditto.
3588
8a4ac37e
PA
35892013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3590
3591 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3592 thread_db.
3593
148de6bb
MS
35942013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3595
3596 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3597 aarch64_num_wp_regs and aarch64_num_bp_regs to
3598 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3599
55fac6e0
MS
36002013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3601
3602 * linux-aarch64-low.c (ps_get_thread_area): Replace
3603 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3604
176eb98c
MS
36052013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3606 Marcus Shawcroft <marcus.shawcroft@arm.com>
3607 Nigel Stephens <nigel.stephens@arm.com>
3608 Yufeng Zhang <yufeng.zhang@arm.com>
3609
3610 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3611 (aarch64.c, aarch64-without-fpu.c): New targets.
3612 * configure.srv (aarch64*-*-linux*): New.
3613 * linux-aarch64-low.c: New file.
3614
56f7af9c
MS
36152013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3616
43aaf8b6 3617 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3618 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3619 (dequeue_one_deferred_signal, linux_resume_one_thread)
3620 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3621 (linux_tracefork_grandchild, linux_test_for_tracefork)
3622 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3623 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3624 where the argument is 0.
3625
60f662b0
YQ
36262013-01-25 Yao Qi <yao@codesourcery.com>
3627
3628 * event-loop.c: Include "queue.h".
3629 (gdb_event_p): New typedef.
3630 (struct gdb_event) <next_event>: Remove.
3631 (event_queue): Change to QUEUE(gdb_event_p).
3632 (async_queue_event): Remove.
3633 (gdb_event_xfree): New.
3634 (initialize_event_loop): New.
3635 (process_event): Use API from QUEUE.
3636 (wait_for_event): Likewise.
3637 * server.c (main): Call initialize_event_loop.
3638 * server.h (initialize_event_loop): Declare.
3639
5ae4861a
YQ
36402013-01-18 Yao Qi <yao@codesourcery.com>
3641
3642 * ax.h (struct eval_agent_expr_context): New.
3643 (gdb_eval_agent_expr): Update declaration.
3644 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3645 TFRAME. Add new argument CTX.
3646 * server.h (struct eval_agent_expr_context): Declare.
3647 (agent_mem_read, agent_tsv_read): Update declaration.
3648 (agent_mem_read_string): Likewise.
3649 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3650 (add_traceframe_block): Add new argument TPOINT.
3651 Increase TPOINT->traceframe_usage.
3652 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3653 eval_tracepoint_agent_expr.
3654 (condition_true_at_tracepoint): Likewise.
3655 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3656 (agent_mem_read_string, agent_tsv_read): Likewise.
3657
85e00e85
YQ
36582013-01-16 Yao Qi <yao@codesourcery.com>
3659
3660 * linux-low.c (linux_resume_one_lwp): Don't check
3661 'lwp->bp_reinsert != 0'.
3662
4039cf45
JB
36632013-01-07 Joel Brobecker <brobecker@adacore.com>
3664 Pedro Alves <palves@redhat.com>
3665
3666 * lynx-low.c (ptrace_request_to_str): Define a temporary
3667 macro and use it to simplify this function's implementation.
3668
9044dee2
JB
36692013-01-07 Joel Brobecker <brobecker@adacore.com>
3670
3671 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3672 sets errno.
3673
e6352c8f
JB
36742013-01-07 Joel Brobecker <brobecker@adacore.com>
3675
3676 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3677
50681a27
JB
36782013-01-07 Joel Brobecker <brobecker@adacore.com>
3679
3680 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3681
3f6e77ef
JB
36822013-01-07 Joel Brobecker <brobecker@adacore.com>
3683
3684 * lynx-low.c (lynx_resume): Use the resume_info parameter
3685 to determine the ptid for the lynx_ptrace call, unless
3686 it is equal to minus_one_ptid, in which case we use the
3687 ptid of the current_inferior.
3688 (lynx_wait_1): After having received a thread create/exit
3689 event, resume the inferior's execution using the signaling
3690 thread's ptid, rather than the old ptid.
3691
7fda33ae
JB
36922013-01-07 Joel Brobecker <brobecker@adacore.com>
3693
3694 * lynx-low.c (lynx_resume): Delete variable ret.
3695
b9786c74
JB
36962013-01-01 Joel Brobecker <brobecker@adacore.com>
3697
3698 * gdbreplay.c (gdbreplay_version): Update copyright year.
3699 * server.c (gdbserver_version): Likewise.
3700
8b93d60f
JB
37012012-12-17 Joel Brobecker <brobecker@adacore.com>
3702
3703 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3704 new thread.
3705
037335a7
JB
37062012-12-17 Joel Brobecker <brobecker@adacore.com>
3707
3708 * lynx-low.c (ptrace_request_to_str): Add handling for
3709 PTRACE_GETTRACESIG.
3710
52d4cbd8
JB
37112012-12-17 Joel Brobecker <brobecker@adacore.com>
3712
3713 * lynx-low.c (lynx_attach): Delete variable new_process.
3714
ab8f6ca9
JB
37152012-12-17 Joel Brobecker <brobecker@adacore.com>
3716
3717 * lynx-low.c (lynx_create_inferior): Delete variable
3718 new_process.
3719
78cbc024
JB
37202012-12-17 Joel Brobecker <brobecker@adacore.com>
3721
3722 * lynx-low.c (ptrace_request_to_str): Do not handle
3723 PTRACE_GETTHREADLIST if this macro does not exist.
3724
14a00470
YQ
37252012-12-15 Yao Qi <yao@codesourcery.com>
3726
3727 * Makefile.in (OBS): Add notif.o.
3728 * notif.c, notif.h: New.
3729 * server.c: Include "notif.h".
3730 (struct vstop_notif) <next>: Remove.
3731 <base>: New field.
3732 (queue_stop_reply): Update.
3733 (push_event, send_next_stop_reply): Remove.
3734 (discard_queued_stop_replies): Update.
3735 (notif_stop): New variable.
3736 (handle_v_stopped): Remove.
3737 (handle_v_requests): Don't call handle_v_stopped. Call
3738 handle_ack_notif instead.
3739 (queue_stop_reply_callback): Call notif_event_enque instead
3740 of queue_stop_reply.
3741 (handle_status): Don't call send_next_stop_reply, call
3742 notif_write_event instead.
3743 (kill_inferior_callback): Likewise.
3744 (detach_or_kill_inferior_callback): Likewise.
3745 (main): Call initialize_notif.
3746 (process_serial_event): Call QUEUE_is_empty.
3747 (handle_target_event): Call notif_push instead of push event.
3748 * server.h (push_event): Remove declaration.
3749
61c125b9
TT
37502012-12-10 Tom Tromey <tromey@redhat.com>
3751
3752 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3753 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3754 macros.
3755 (.c.o): Rewrite.
3756 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3757 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3758 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3759 (amd64-linux-ipa.o, ax.o): Rewrite.
3760 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3761 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3762 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3763 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3764 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3765 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3766 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3767 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3768 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3769 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3770 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3771 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3772 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3773 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3774 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3775 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3776 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3777 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3778 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3779 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3780 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3781 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3782 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3783 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3784 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3785 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3786 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3787 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3788 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3789 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3790 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3791 (reg-tilegx.o): Remove.
3792 (all_object_files): New macro.
3793 Include .deps files.
3794 * aclocal.m4, configure: Rebuild.
3795 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3796 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3797 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3798
e90e9ad9
TT
37992012-12-05 Tom Tromey <tromey@redhat.com>
3800
3801 PR gdb/14917:
3802 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3803
02d403bf 38042012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3805
3806 * configure.ac: Check for linux/perf_event.h.
3807 * config.in: Regenerated.
3808 * configure: Regenerated.
3809
0270a750
PA
38102012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3811
3812 * hostio.c (handle_readlink): Decrease buffer size
3813 parameter passed to readlink by one byte.
3814
8c29b58e
YQ
38152012-11-26 Yao Qi <yao@codesourcery.com>
3816
3817 * configure.ac (build_warnings): Append '-Wempty-body'.
3818 * configure: Regenerated.
3819 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3820 body.
3821
8bdce1ff
PM
38222012-11-15 Pierre Muller <muller@sourceware.org>
3823
3824 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3825 * config.in: Regenerate.
3826 * configure: Regenerate.
3827 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3828 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3829 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3830 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3831 header.
3832 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3833 instead of <sys/wait.h> header.
3834 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3835
02d403bf 38362012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3837
3838 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3839 (various make rules): Remove -DGDBSERVER
3840
fbd5db48
YQ
38412012-11-09 Yao Qi <yao@codesourcery.com>
3842
3843 * spu-low.c (current_ptid): Move it to ..
3844 * gdbthread.h: ... here. New.
3845 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3846 * server.c (myresume, process_serial_event): Likewise.
3847 * thread-db.c (thread_db_find_new_threads): Likewise.
3848 * tracepoint.c (run_inferior_command): Likewise.
3849
b3dc46ff
AB
38502012-10-01 Andrew Burgess <aburgess@broadcom.com>
3851
3852 * server.c (handle_search_memory_1): Include access length in
3853 warning message.
3854
07c04788
HPN
38552012-09-05 Michael Brandt <michael.brandt@axis.com>
3856
3857 * linux-crisv32-low.c: Fix compile errors.
3858
918d227b
YQ
38592012-09-04 Yao Qi <yao@codesourcery.com>
3860
3861 * tracepoint.c (cmd_qtsv): Adjust debug message.
3862 Don't check CUR_TPOINT.
3863
18c1b81a
YQ
38642012-08-28 Yao Qi <yao@codesourcery.com>
3865
3866 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3867 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3868 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3869 Remove declarations of xmalloc, xreallloc, xstrdup and
3870 freeargv.
3871 * Makefile.in (libiberty_h): New.
3872 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3873 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3874
dc82f37b
YQ
38752012-08-23 Yao Qi <yao@codesourcery.com>
3876
3877 * server.h: Remove declaration of 'xsnprintf'.
3878
406b1477
KS
38792012-08-22 Keith Seitz <keiths@redhat.com>
3880
3881 * server.h: Include build-gnulib-gbserver/config.h.
3882 * gdbreplay.c: Likewise.
3883
e6712ff1
DE
38842012-08-08 Doug Evans <dje@google.com>
3885
3886 * Makefile.in (SFILES): Add gdb_vecs.c.
3887 (OBS): Add gdb_vecs.o.
3888 (gdb_vecs_h, host_defs_h): New variables.
3889 (thread-db.o): Add $(gdb_vecs_h) dependency.
3890 (gdb_vecs.o): New rule.
3891 * thread-db.c: #include "gdb_vecs.h".
3892 (thread_db_load_search): Use a vector to iterate over path elements.
3893 Handle text appearing after "$pdir".
3894
3895 * configure.ac: Add check for strstr.
3896 * config.in: Regenerate.
3897 * configure: Regenerate.
3898
7c3270ae
UW
38992012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3900
3901 * hostio.c (handle_pread): If pread fails, fall back to attempting
3902 lseek/read.
3903 (handle_pwrite): Likewise for pwrite.
3904
b62e2b27
UW
39052012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3906
3907 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3908 between unsupported TYPE and unimplementable ADDR/LEN combination.
3909 (arm_insert_point): Act on new return value.
3910
78a99e91
PA
39112012-07-31 Pedro Alves <palves@redhat.com>
3912
3913 * server.c (process_point_options): Only skip tokens if we find
3914 one that is unrecognized. Don't treat 'X' specially while
3915 skipping unrecognized tokens.
3916
fcf303ab
UW
39172012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3918
3919 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3920 to 4-byte-align HW breakpoint addresses for Thumb.
3921
7255706c
YQ
39222012-07-27 Yao Qi <yao@codesourcery.com>
3923
3924 PR remote/14161.
3925
3926 * server.h: Declare gdb_agent_about_to_close.
3927 * target.c (kill_inferior): Include "agent.h".
3928 New. Send command 'kill'.
3929 * target.h (kill_inferior): Removed macro.
3930 * tracepoint.c (gdb_agent_about_to_close): New.
3931 (gdb_agent_helper_thread): Handle command 'close'.
3932 Wait endlessly until the inferior stops.
3933 Install gdb_agent_remove_socket to atexit hook.
3934 (agent_socket_name): New static variable.
3935 (gdb_agent_socket_init): Replace local variable 'name' with
3936 'agent_socket_name'.
3937 (gdb_agent_remove_socket): New.
3938
5a3f286f
YQ
39392012-07-27 Yao Qi <yao@codesourcery.com>
3940
3941 * server.c (process_point_options): Stop at 'X' when parsing.
3942
961bd387
ME
39432012-07-19 Michael Eager <eager@eagercon.com>
3944
a261b8f5 3945 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3946 to hw_execute.
3947 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3948 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3949 hardware breakpoint.
3950
aa7c7447
JK
39512012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3952
3953 * gdbserver/linux-low.c (initialize_low): Call
3954 linux_ptrace_init_warnings.
3955
7f216e7c
DE
39562012-07-02 Doug Evans <dje@google.com>
3957
3958 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3959 pointer to int.
3960
d3ce09f5
SS
39612012-07-02 Stan Shebs <stan@codesourcery.com>
3962
3963 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3964 (ax.o): Add it to build rule.
3965 (ax-ipa.o): Ditto.
3966 (OBS): Add format.o.
3967 (IPA_OBS): Add format.o.
3968 * server.c (handle_query): Claim support for breakpoint commands.
3969 (process_point_options): Add command case.
3970 (process_serial_event): Leave running if there are printfs in
3971 effect.
3972 * mem-break.h (any_persistent_commands): Declare.
3973 (add_breakpoint_commands): Declare.
3974 (gdb_no_commands_at_breakpoint): Declare.
3975 (run_breakpoint_commands): Declare.
3976 * mem-break.c (struct point_command_list): New struct.
3977 (struct breakpoint): New field command_list.
3978 (any_persistent_commands): New function.
3979 (add_commands_to_breakpoint): New function.
3980 (add_breakpoint_commands): New function.
3981 (gdb_no_commands_at_breakpoint): New function.
3982 (run_breakpoint_commands): New function.
3983 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3984 locally.
3985 * ax.c: Include format.h.
3986 (ax_printf): New function.
3987 (gdb_eval_agent_expr): Add printf opcode.
3988
2f8f6aed
YQ
39892012-06-13 Yao Qi <yao@codesourcery.com>
3990
3991 * server.c (start_inferior): Remove duplicated writes to fields
3992 'last_resume_kind' and 'last_status' of 'current_inferior'.
3993
0c9070b3
YQ
39942012-06-12 Yao Qi <yao@codesourcery.com>
3995 Pedro Alves <palves@redhat.com>
3996
3997 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3998 comment.
3999 * server.c (handle_v_cont): Extend comment.
4000
c52daf70
YQ
40012012-06-11 Yao Qi <yao@codesourcery.com>
4002
4003 * linux-low.c (linux_attach): Add 'static'.
4004
d38bbb0a
YQ
40052012-06-06 Yao Qi <yao@codesourcery.com>
4006
4007 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4008
89dc0afd
JK
40092012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4010
4011 Fix gcc -flto compilation warning.
4012 * server.c (main): Make variable multi_mode and attach volatile.
4013
75f62ce7
TJB
40142012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4015
4016 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4017 if the platform doesn't know about it.
4018
65f479b6
PA
40192012-05-30 Jeff Kenton <jkenton@tilera.com>
4020
4021 * Makefile.in (SFILES): Add linux-tile-low.c.
4022 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4023 * configure.srv: Handle tilegx-*-linux*.
4024 * linux-tile-low.c: New file.
4025
0c5bf5a9
JK
40262012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4027
4028 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4029
a493e3e2
PA
40302012-05-24 Pedro Alves <palves@redhat.com>
4031
4032 PR gdb/7205
4033
43aaf8b6 4034 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4035
2ea28649
PA
40362012-05-24 Pedro Alves <palves@redhat.com>
4037
4038 PR gdb/7205
4039
4040 Replace target_signal with gdb_signal throughout.
4041
8d409d16
MR
40422012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4043
4044 * linux-low.c (linux_store_registers): Avoid the copying sequence
4045 when no data has been retrieved by ptrace.
4046
23512c01
MGD
40472012-05-22 Will Deacon <will.deacon@arm.com>
4048
4049 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4050 Include asm/ptrace.h.
4051 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4052 already defined.
4053
4934b29e
MR
40542012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4055
4056 * linux-low.c (linux_store_registers): Don't re-retrieve data
4057 with ptrace that has already been obtained from /proc. Always
4058 copy any data retrieved with ptrace to the buffer supplied.
4059
bde24c0a
PA
40602012-05-11 Yao Qi <yao@codesourcery.com>
4061 Pedro Alves <palves@redhat.com>
4062
4063 * linux-low.c (enum stopping_threads_kind): New.
4064 (stopping_threads): Change type to `enum stopping_threads_kind'.
4065 (handle_extended_wait): If stopping and suspending threads, leave
4066 the new_lwp suspended too.
4067 (linux_wait_for_event): Adjust.
4068 (stop_all_lwps): Set `stopping_threads' to
4069 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4070 whether we're suspending threads or just stopping them. Assert no
4071 recursion happens.
4072
623b6bdf
YQ
40732012-04-29 Yao Qi <yao@codesourcery.com>
4074
4075 * server.h: Move some code to ...
4076 * gdbthread.h: ... here. New.
4077 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4078 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4079 (nto-low.o, win32-low.o): Likewise.
4080 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4081 * regcache.c, remote-utils.c, server.c: Likewise.
4082 * target.c, tracepoint.c, win32-low.c: Likewise.
4083
f15f9948
TJB
40842012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4085
4086 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4087 (PTRACE_ARG4_TYPE): Likewise.
4088 (PTRACE_XFER_TYPE): Likewise.
4089 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4090 ptrace to PTRACE_ARG3_TYPE.
4091 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4092 (PTRACE_ARG4_TYPE): Likewise.
4093 (PTRACE_XFER_TYPE): Likewise.
4094 (linux_detach_one_lwp): Cast fourth argument of
4095 ptrace to long then PTRACE_ARG4_TYPE.
4096 (regsets_fetch_inferior_registers): Cast third argument of
4097 ptrace to long then PTRACE_ARG3_TYPE.
4098 (regsets_store_inferior_registers): Likewise.
4099
38ea300a
PA
41002012-04-20 Pedro Alves <palves@redhat.com>
4101
4102 * configure: Regenerate.
4103
c971b7fa
PA
41042012-04-19 Pedro Alves <palves@redhat.com>
4105
43aaf8b6 4106 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4107 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4108 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4109 (all, install-only, uninstall, clean-info, all-lib, clean): No
4110 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4111 (maintainer-clean realclean distclean): Use subdir_do.
4112 (subdir_do): New.
4113 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4114 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4115 * acinclude.m4: Include acx_configure_dir.m4.
4116 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4117 calls. Call AC_PROG_RANLIB. Configure gnulib using
4118 ACX_CONFIGURE_DIR.
4119 (GNULIB): New.
4120 (GNULIB_STDINT_H): Adjust.
4121 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4122 * gdbreplay.c: Include build-gnulib/config.h.
4123 * server.h: Likewise.
4124 * aclocal.m4: Regenerate.
4125 * config.in: Regenerate.
4126 * configure: Regenerate.
c971b7fa 4127
809277f8
PA
41282012-04-19 Pedro Alves <palves@redhat.com>
4129
4130 * Makefile.in (LIBGNU, INCGNU): Adjust.
4131 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4132 (all, install-only, uninstall, clean-info, all-lib, clean)
4133 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4134 * configure.ac: Adjust AC_OUTPUT output.
4135 * aclocal.m4: Regenerate.
4136 * configure: Regenerate.
4137
fd9bb8b8
PA
41382012-04-19 Pedro Alves <palves@redhat.com>
4139
4140 * Makefile.in (generated_files): New.
4141 (server_h): Remove the explicit dependency on config.h, and depend
4142 on $generated_files.
4143
1c298c66
PA
41442012-04-19 Pedro Alves <palves@redhat.com>
4145
4146 * Makefile.in (INCGNU): Add -Ignulib.
4147
57c4b50b
PA
41482012-04-19 Pedro Alves <palves@redhat.com>
4149
4150 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4151 (INCGNU): ... this, and spell out -I here.
4152 (GNULIB_LIB): Rename to ...
4153 (LIBGNU): ... this.
4154 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4155
1030e047
PA
41562012-04-19 Pedro Alves <palves@redhat.com>
4157
4158 * config.in: Regenerate.
4159
447d4319
PA
41602012-04-19 Pedro Alves <palves@redhat.com>
4161
4162 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4163 * server.h (memmem): Remove declaration.
4164 * config.in: Regenerate.
4165 * configure: Regenerate.
4166
aad9eab9
YQ
41672012-04-19 Yao Qi <yao@codesourcery.com>
4168
4169 * Makefile.in (SFILES): Add common/vec.c.
4170 (OBS): Add vec.o.
4171 (vec.o): New rule.
4172
3e10640f
YQ
41732012-04-19 Yao Qi <yao@codesourcery.com>
4174
4175 * remote-utils.c (prepare_resume_reply): Replace with macro
4176 target_core_of_thread.
4177 * server.c (handle_qxfer_threads_proper): Likewise.
4178 * target.h (traget_core_of_thread): New macro.
4179
71622373
PA
41802012-04-18 Pedro Alves <palves@redhat.com>
4181
4182 * aclocal.m4: Regenerate.
4183 * configure: Regenerate.
4184
80d26939
YQ
41852012-04-16 Yao Qi <yao@codesourcery.com>
4186
4187 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4188 duplicated on address.
4189
42476b70
YQ
41902012-04-16 Yao Qi <yao@codesourcery.com>
4191
4192 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4193 (struct tracepoint_action_ops) <send>: New field.
4194 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4195 (agent_expr_send, x_tracepoint_action_send): New.
4196 (l_tracepoint_action_send): New.
4197 (cmd_qtdp): Download and install tracepoint
4198 according to `use_agent'.
4199 (run_inferior_command): Add one more parameter `len'.
4200 Update callers.
4201 (tracepoint_send_agent): New.
4202 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4203
7bc83639
YQ
42042012-04-16 Yao Qi <yao@codesourcery.com>
4205
4206 * tracepoint.c (download_tracepoints): Moved to ...
4207 (cmd_qtstart): ... here.
4208
5f18041e
YQ
42092012-04-14 Yao Qi <yao@codesourcery.com>
4210
4211 * tracepoint.c: Include inttypes.h.
4212 (struct collect_memory_action): Use sized types.
4213 (struct tracepoint): Likewise.
4214 (cmd_qtdp, stop_tracing): Update print specifiers.
4215 (cmd_qtp, response_tracepoint): Likewise.
4216 (collect_data_at_tracepoint): Likewise.
4217 (collect_data_at_step): Likewise.
4218
55a8c076
YQ
42192012-04-14 Yao Qi <yao@codesourcery.com>
4220
4221 Import gnulib module inttypes.
4222 * aclocal.m4, config.in, configure: Regenerated.
4223
dc750257
YQ
42242012-04-14 Yao Qi <yao@codesourcery.com>
4225
4226 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4227 Makefile and config.status at last.
4228
0ab5faf9
YQ
42292012-04-13 Yao Qi <yao@codesourcery.com>
4230
4231 * tracepoint.c: Include stdint.h unconditionally.
4232
18f5fd81
TJB
42332012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4234
4235 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4236 on BFD_HAVE_SYS_PROCFS_TYPE.
4237 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4238 * configure: Regenerate.
4239 * config.in: Likewise.
4240
4d47af5c
L
42412012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4242
4243 * Makefile.in (clean): Also remove x32.c x32-linux.c
4244 x32-avx.c x32-avx-linux.c.
4245 (x32.o): New target.
4246 (x32.c): Likewise.
4247 (x32-linux.o): Likewise.
4248 (x32-linux.c): Likewise.
4249 (x32-avx.o): Likewise.
4250 (x32-avx.c): Likewise.
4251 (x32-avx-linux.o): Likewise.
4252 (x32-avx-linux.c): Likewise.
4253
4254 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4255 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4256 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4257 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4258 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4259 i386/x32-avx-linux.xml.
4260
4261 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4262 (init_registers_x32_avx_linux): Likwise.
4263 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4264 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4265
ecedbe58
PA
42662012-04-13 Pedro Alves <palves@redhat.com>
4267
4268 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4269 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4270 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4271 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4272 the sub-make.
4273
c92b5177
L
42742012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4275
4276 * linux-x86-low.c (compat_x32_clock_t): New.
4277 (compat_x32_siginfo_t): Likewise.
4278 (compat_x32_siginfo_from_siginfo): Likewise.
4279 (siginfo_from_compat_x32_siginfo): Likewise.
4280 (linux_is_elf64): Likewise.
4281 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4282 and siginfo_from_compat_x32_siginfo for x32.
4283 (x86_arch_setup): Set linux_is_elf64.
4284
214d508e
L
42852012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4286
4287 PR gdb/13969
4288 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4289 e_machine field.
4290 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4291 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4292 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4293 compatible with process.
4294
c9a1864a
YQ
42952012-04-12 Yao Qi <yao@codesourcery.com>
4296
4297 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4298 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4299 (install-only, install-info, clean): Handle sub dir gnulib.
4300 (all-lib, am--refresh): New targets.
4301 (memmem.o): Remove target.
4302 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4303 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4304 (AC_REPLACE_FUNCS): Remove memmem.
4305 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4306 (AC_OUTPUT): Generate Makefile in gnulib/.
4307 * aclocal.m4, config.in, configure: Regenerated.
4308
367ba2c2
MR
43092012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4310
4311 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4312
9d236627
PA
43132012-04-05 Pedro Alves <palves@redhat.com>
4314
4315 -Werror=strict-aliasing
4316
4317 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4318 pointer.
4319
111217b3
PA
43202012-04-04 Pedro Alves <palves@redhat.com>
4321
4322 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4323 (sparc_store_gregset_from_stack, sparc_store_gregset)
4324 (sparc_breakpoint_at): Fix formatting.
4325
8365dcf5
TJB
43262012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4327
4328 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4329 are available.
4330 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4331 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4332 * config.in: Regenerate.
4333 * configure: Likewise.
4334
689cc2ae
PA
43352012-03-29 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4338 Correct ptrace arguments.
4339
c14dfd32
PA
43402012-03-28 Pedro Alves <palves@redhat.com>
4341
4342 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4343 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4344 (IA64_FR1_REGNUM): New defines.
4345 (ia64_fetch_register): New.
4346 (the_low_target): Install it.
4347 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4348 field.
4349 * linux-low.c (linux_fetch_registers): Try the
4350 the_low_target.fetch_register hook first.
4351
4352 * linux-arm-low.c (the_low_target): Adjust.
4353 * linux-bfin-low.c (the_low_target): Adjust.
4354 * linux-cris-low.c (the_low_target): Adjust.
4355 * linux-crisv32-low.c (the_low_target): Adjust.
4356 * linux-m32r-low.c (the_low_target): Adjust.
4357 * linux-m68k-low.c (the_low_target): Adjust.
4358 * linux-mips-low.c (the_low_target): Adjust.
4359 * linux-ppc-low.c (the_low_target): Adjust.
4360 * linux-s390-low.c (the_low_target): Adjust.
4361 * linux-sh-low.c (the_low_target): Adjust.
4362 * linux-sparc-low.c (the_low_target): Adjust.
4363 * linux-tic6x-low.c (the_low_target): Adjust.
4364 * linux-x86-low.c (the_low_target): Adjust.
4365 * linux-xtensa-low.c (the_low_target): Adjust.
4366
63c88e13
PA
43672012-03-26 Pedro Alves <palves@redhat.com>
4368
4369 * server.c (handle_qxfer_libraries): Don't bail early if
4370 the_target->qxfer_libraries_svr4 is not NULL.
4371
fb723180
PA
43722012-03-26 Pedro Alves <palves@redhat.com>
4373
4374 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4375
0afae3cf
PA
43762012-03-23 Pedro Alves <palves@redhat.com>
4377
4378 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4379 "library-list-svr4" element's start tag when the the DSO list is
4380 empty.
4381
485f1ee4
PA
43822012-03-23 Pedro Alves <palves@redhat.com>
4383
4384 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4385 a variable whose type size is the same as the inferior's pointer
4386 size.
4387
a5362b9a
TS
43882012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4389
4390 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4391 struct siginfo.
4392 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4393 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4394 * linux-low.h: Include <signal.h>.
4395 (struct siginfo): Remove forward declaration.
4396 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4397 struct siginfo.
4398
d226c142
MF
43992012-03-21 Mike Frysinger <vapier@gentoo.org>
4400
4401 * .gitignore: Ignore more files.
4402
122f36ef
PA
44032012-03-19 Pedro Alves <palves@redhat.com>
4404 Jan Kratochvil <jan.kratochvil@redhat.com>
4405
4406 * server.c (cont_thread, general_thread): Add describing comments.
4407 (start_inferior): Clear `cont_thread'.
4408 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4409 of a process.
4410
fc3e5175
YQ
44112012-03-15 Yao Qi <yao@codesourcery.com>
4412
4413 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4414 handling to ...
4415 (cmd_qtdp): ... here.
4416
8d0d92cd
YQ
44172012-03-15 Yao Qi <yao@codesourcery.com>
4418
4419 * tracepoint.c (struct tracepoint_action_ops): New.
4420 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4421 (m_tracepoint_action_download): New.
4422 (r_tracepoint_action_download): New.
4423 (x_tracepoint_action_download): New.
4424 (l_tracepoint_action_download): New.
4425 (add_tracepoint_action): Install `action->ops' according type.
4426 (download_tracepoint_1): Move code `download' function pointer
4427 of various tracepoint_action_ops.
4428
87b0bb13
JK
44292012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4430
4431 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4432 linux_ptrace_attach_warnings.
4433
5f572dec
JK
44342012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4435
4436 * Makefile.in (linux-ptrace.o): New.
4437 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4438 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4439 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4440 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4441 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4442 of these targets.
4443 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4444
f4647387
YQ
44452012-03-08 Yao Qi <yao@codesourcery.com>
4446 Pedro Alves <palves@redhat.com>
4447
4448 Fix PR server/13392.
4449 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4450 offset of JMP insn.
4451 * tracepoint.c (remove_tracepoint): New.
4452 (cmd_qtdp): Call remove_tracepoint when failed to install.
4453
9b224c5e
PA
44542012-03-07 Pedro Alves <palves@redhat.com>
4455
4456 * linux-low.c (get_detach_signal): New.
4457 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4458 Pass on pending signals to PTRACE_DETACH. Check the result of the
4459 ptrace call.
4460 * server.c (program_signals, program_signals_p): New.
4461 (handle_general_set): Handle QProgramSignals.
4462 * server.h (program_signals, program_signals_p): Declare.
4463
e237a7e2
JK
44642012-03-05 Pedro Alves <palves@redhat.com>
4465 Jan Kratochvil <jan.kratochvil@redhat.com>
4466
4467 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4468 New comment why.
4469
5808517f
YQ
44702012-03-03 Yao Qi <yao@codesourcery.com>
4471
4472 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4473 agent_look_up_symbols.
4474
58b4daa5
YQ
44752012-03-03 Yao Qi <yao@codesourcery.com>
4476
4477 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4478 (linux-x86-low.o): Likewise.
4479 * server.h: Remove in_process_agent_loaded.
4480 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4481 common/agent.c.
4482 Update callers.
4483
8ffcbaaf
YQ
44842012-03-03 Yao Qi <yao@codesourcery.com>
4485
4486 * tracepoint.c (gdb_agent_capability): New global.
4487 (in_process_agent_loaded_ust): Renamed to
4488 `in_process_agent_supports_ust'.
4489 Update callers.
4490 (in_process_agent_supports_ust): Call agent_capability_check.
4491 (clear_installed_tracepoints): Assert that agent supports
4492 agent.
4493
d1feda86
YQ
44942012-03-03 Yao Qi <yao@codesourcery.com>
4495
4496 * linux-low.c (linux_supports_agent): New.
4497 (linux_target_ops): Initialize field `supports_agent' with
4498 linux_supports_agent.
4499 * target.h (struct target_ops) <supports_agent>: New.
4500 (target_supports_agent): New macro.
4501 * server.c (handle_general_set): Handle packet 'QAgent'.
4502 (handle_query): Send `QAgent+'.
4503 * Makefile.in (server.o): Depends on agent.h.
4504
2fa291ac
YQ
45052012-03-03 Yao Qi <yao@codesourcery.com>
4506
4507 * Makefile.in (OBS): Add agent.o.
4508 Add new rule for agent.o.
4509 Track dependence of tracepoint.c on agent.h.
4510 * tracepoint.c (run_inferior_command_1):
4511 (run_inferior_command): Call agent_run_command.
4512 (gdb_ust_connect_sync_socket): Deleted. Move it to
4513 common/agent.c.
4514 (resume_thread, stop_thread): Likewise.
4515 (gdb_ust_socket_init): Renamed to ...
4516 (gdb_agent_socket_init): ... New.
4517 (gdb_ust_thread): Renamed to ...
4518 (gdb_agent_helper_thread): ... New.
4519 (gdb_ust_init): Move some code to ...
4520 (gdb_agent_init): ... here. New.
4521 [HAVE_UST]: Call gdb_ust_init.
4522 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4523 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4524 * config.in, configure: Regenerated.
4525
05044653
PA
45262012-03-02 Pedro Alves <palves@redhat.com>
4527
4528 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4529 * linux-low.c (struct simple_pid_list): New.
4530 (stopped_pids): New a struct simple_pid_list pointer.
4531 (add_to_pid_list, pull_pid_from_list): New.
4532 (handle_extended_wait): Don't assume the first signal new children
4533 report is SIGSTOP. Adjust call to pull_pid_from_list.
4534 (linux_wait_for_lwp): Adjust.
4535
8d00225b
YQ
45362012-03-02 Yao Qi <yao@codesourcery.com>
4537
4538 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4539 debug log.
4540
19560ba5
YQ
45412012-03-02 Yao Qi <yao@codesourcery.com>
4542
4543 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4544 `stop_pc' and `tpoint'. Update caller.
4545
1faeff08
MR
45462012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4547
4548 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4549 * linux-low.c (use_linux_regsets): New macro.
4550 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4551 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4552 (linux_register_in_regsets): New function.
4553 (usr_fetch_inferior_registers): Skip registers covered by
4554 regsets.
4555 (usr_store_inferior_registers): Likewise.
4556 (usr_fetch_inferior_registers): New macro.
4557 (usr_store_inferior_registers): Likewise.
4558 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4559 (linux_store_registers): Likewise.
4560 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4561 prototype.
4562 (init_registers_mips64_dsp_linux): Likewise.
4563 (init_registers_mips_linux): New macro.
4564 (init_registers_mips_dsp_linux): Likewise.
4565 (mips_dsp_num_regs): Likewise.
4566 (DSP_BASE, DSP_CONTROL): New fallback macros.
4567 (mips_base_regs): New macro.
4568 (mips_regmap): Use it. Fix the size.
4569 (mips_dsp_regmap): New variable.
4570 (mips_dsp_regset_bitmap): Likewise.
4571 (mips_arch_setup): New function.
4572 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4573 than mips_regmap.
4574 (mips_cannot_store_register): Likewise.
4575 (the_low_target): Update .arch_setup, .num_regs and .regmap
4576 initializers. Add .regset_bitmap initializer.
4577 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4578 initializer.
4579 * linux-bfin-low.c (the_low_target): Likewise.
4580 * linux-cris-low.c (the_low_target): Likewise.
4581 * linux-crisv32-low.c (the_low_target): Likewise.
4582 * linux-ia64-low.c (the_low_target): Likewise.
4583 * linux-m32r-low.c (the_low_target): Likewise.
4584 * linux-m68k-low.c (the_low_target): Likewise.
4585 * linux-ppc-low.c (the_low_target): Likewise.
4586 * linux-s390-low.c (the_low_target): Likewise.
4587 * linux-sh-low.c (the_low_target): Likewise.
4588 * linux-sparc-low.c (the_low_target): Likewise.
4589 * linux-tic6x-low.c (the_low_target): Likewise.
4590 * linux-x86-low.c (the_low_target): Likewise.
4591 * linux-xtensa-low.c (the_low_target): Likewise.
4592 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4593 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4594 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4595 srv_xmlfiles.
4596 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4597 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4598
c03e6ccc
YQ
45992012-02-29 Yao Qi <yao@codesourcery.com>
4600 Pedro Alves <palves@redhat.com>
4601
4602 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4603 `step_over_finished' is true.
4604
644cebc9
PA
46052012-02-27 Pedro Alves <palves@redhat.com>
4606
4607 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4608 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4609
c14d7ab2
PA
46102012-02-27 Pedro Alves <palves@redhat.com>
4611
4612 PR server/9684
4613 * linux-low.c (pid_is_stopped): New.
4614 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4615
412c89dd
LM
46162012-02-25 Luis Machado <lgustavo@codesourcery.com>
4617
4618 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4619 of conditions.
4620
b745defe
MR
46212012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4622
4623 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4624
9f3a5c85
LM
46252012-02-24 Luis Machado <lgustavo@codesourcery>
4626
4627 * server.c (handle_query): Advertise support for target-side
4628 breakpoint condition evaluation.
4629 (process_point_options): New function.
4630 (process_serial_event): When inserting a breakpoint, check for
4631 a target-side condition that should be evaluated.
4632
4633 * mem-break.c: Include regcache.h and ax.h.
4634 (point_cond_list_t): New data structure.
4635 (breakpoint) <cond_list>: New field.
4636 (find_gdb_breakpoint_at): Make non-static.
4637 (delete_gdb_breakpoint_at): Clear any target-side
4638 conditions.
4639 (clear_gdb_breakpoint_conditions): New function.
4640 (add_condition_to_breakpoint): Likewise.
4641 (add_breakpoint_condition): Likewise.
4642 (gdb_condition_true_at_breakpoint): Likewise.
4643 (gdb_breakpoint_here): Return result directly instead
4644 of going through a local variable.
4645
4646 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4647 (clear_gdb_breakpoint_conditions): Likewise.
4648 (add_breakpoint_condition): Likewise.
4649 (gdb_condition_true_at_breakpoint): Likewise.
4650
4651 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4652 (need_step_over_p): Take target-side breakpoint condition into
4653 consideration.
4654
5e1dc496
LM
46552012-02-24 Luis Machado <lgustavo@codesourcery>
4656
4657 * server.h: Include tracepoint.h.
4658 (agent_mem_read, agent_get_trace_state_variable_value,
4659 agent_set_trace_state_variable_value,
4660 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4661 get_set_tsv_func_addr): New prototypes.
4662
4663 * ax.h: New include file.
4664 * ax.c: New source file.
4665
4666 * tracepoint.c: Include ax.h.
4667 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4668 agent_expr, eval_result_type): Move to ax.h.
4669 (parse_agent_expr): Rename to ...
4670 (gdb_parse_agent_expr): ... this, make it non-static and move
4671 to ax.h.
4672 (unparse_agent_expr) Rename to ...
4673 (gdb_unparse_agent_expr): ... this, make it non-static and move
4674 to ax.h.
4675 (eval_agent_expr): Rename to ...
4676 (eval_tracepoint_agent_expr): ... this.
4677 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4678 forward declarations.
4679 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4680 (agent_get_trace_state_variable_value): New function.
4681 (agent_set_trace_state_variable_value): New function.
4682 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4683 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4684 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4685 (condition_true_at_tracepoint): Likewise.
4686 (parse_agent_expr): Rename to ...
4687 (gdb_parse_agent_expr): ... this and move to ax.c.
4688 (unparse_agent_expr): Rename to ...
4689 (gdb_unparse_agent_expr): ... this and move to ax.c.
4690 (gdb_agent_op_name): Move to ax.c.
4691 (eval_agent_expr): Rename to ...
4692 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4693 and move to ax.c.
4694 (eval_tracepoint_agent_expr): New function.
4695 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4696 non-static.
5e1dc496
LM
4697 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4698 ax.c.
4699 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4700 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4701 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4702 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4703 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4704 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4705 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4706 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4707 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4708 (compile_bytecodes): Remove forward declaration.
4709 (is_goto_target): Move to ax.c.
4710 (compile_bytecodes): Move to ax.c and call
4711 agent_get_trace_state_variable_value (...) and
4712 agent_set_trace_state_variable_value (...).
4713
4714 * Makefile.in: Update ax.c and IPA dependencies.
4715
277e4e52
PA
47162012-02-24 Pedro Alves <palves@redhat.com>
4717
4718 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4719 (cmd_bigqtbuffer_circular): ... this. Only handle
4720 'QTBuffer:circular:'.
4721 (handle_tracepoint_general_set): Adjust.
4722
bf4c19f7
YQ
47232012-02-16 Yao Qi <yao@codesourcery.com>
4724
4725 * inferiors.c: Move code to ...
4726 * dll.c: .... here. New.
4727 * server.h: Declare clear_dlls.
4728 * Makefile.in (SFILES): Add dll.c.
4729 (OBS): Add dll.o
4730 (dll.o): New rule.
4731
d73f2619
YQ
47322012-02-11 Yao Qi <yao@codesourcery.com>
4733
4734 * server.c: (handle_monitor_command): Add a new parameter
4735 `own_buf'.
4736 (handle_query): Update caller.
4737
f8255c2a
JB
47382012-02-09 Joel Brobecker <brobecker@adacore.com>
4739
4740 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4741 * configure, config.in: Regenerate.
4742 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4743 is not defined.
4744
da84f473
PA
47452012-02-02 Pedro Alves <palves@redhat.com>
4746
4747 Try SIGKILL first, then PTRACE_KILL.
4748 * linux-low.c (linux_kill_one_lwp): New.
4749 (linux_kill_one_lwp): Rename to ...
4750 (kill_one_lwp_callback): ... this. Use the new
4751 linux_kill_one_lwp.
4752
e886a173
PA
47532012-02-02 Pedro Alves <palves@redhat.com>
4754
4755 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4756 inferior.
4757
be07f1a2
PA
47582012-01-27 Pedro Alves <palves@redhat.com>
4759
4760 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4761 (elf_64_file_p): Make static.
4762 (linux_pid_exe_is_elf_64_file): New.
4763 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4764 Delete declarations.
4765 (linux_pid_exe_is_elf_64_file): Declare.
4766 * linux-x86-low.c (x86_arch_setup): Use
4767 linux_pid_exe_is_elf_64_file.
4768
d8301ad1
JK
47692012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4770
4771 * linux-low.c (linux_wait_for_event_1): Rename to ...
4772 (linux_wait_for_event): ... here and merge it with former
4773 linux_wait_for_event - new variable wait_ptid, use it.
4774 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4775
01b17894
PA
47762012-01-23 Pedro Alves <palves@redhat.com>
4777
4778 * server.c (main): Avoid yet another case of infinite loop while
4779 detaching/killing after a longjmp.
4780
e825046f
JK
47812012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4782
4783 Code cleanup.
4784 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4785
b9e7b9c3
UW
47862012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4787
4788 * hostio.c (handle_readlink): New function.
4789 (handle_vFile): Call it to handle "vFile:readlink" packets.
4790
901f9912
UW
47912012-01-20 Pedro Alves <palves@redhat.com>
4792 Ulrich Weigand <ulrich.weigand@linaro.org>
4793
4794 * server.c (handle_v_requests): Only support vAttach and vRun to
4795 start multiple processes when in extended protocol mode.
4796
fc1ab1a0
PA
47972012-01-17 Pedro Alves <palves@redhat.com>
4798
4799 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4800 memalign plus mprotect to allocate the scratch buffer.
4801
7d5d4e98
PA
48022012-01-13 Pedro Alves <palves@redhat.com>
4803
4804 * server.c (attach_inferior): Clear `cont_thread'.
4805
f128d5e9
PA
48062012-01-13 Pedro Alves <palves@redhat.com>
4807
4808 * server.c (main): Avoid infinite loop while detaching/killing
4809 after a longjmp.
4810
06db92f0
DE
48112012-01-09 Doug Evans <dje@google.com>
4812
4813 * server.c (start_inferior): Set last_ptid in --wrapper case.
4814
32d92999
YQ
48152012-01-06 Yao Qi <yao@codesourcery.com>
4816
4817 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4818 defined.
4819 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4820
5e0a92a9
YQ
48212012-01-04 Yao Qi <yao@codesourcery.com>
4822
4823 * tracepoint.c (cmd_qtdp): Print debug message
4824 for static tracepoint.
4825
ae639e8c
YQ
48262012-01-04 Yao Qi <yao@codesourcery.com>
4827
4828 * tracepoint.c (trace_vdebug): Differentiate debug message
4829 between gdbserver and IPA.
4830
f72429c5
YQ
48312012-01-03 Yao Qi <yao@codesourcery.com>
4832
4833 * tracepoint.c (tracepoint_was_hit): Don't collect for
4834 static tracepoint.
4835
12c3e59c
JB
48362012-01-02 Joel Brobecker <brobecker@adacore.com>
4837
4838 * terminal.h: Reformat copyright header.
4839
67827812
JB
48402012-01-02 Joel Brobecker <brobecker@adacore.com>
4841
4842 * server.c (gdbserver_version): Update copyright year.
4843 * gdbreplay.c (gdbreplay_version): Likewise.
4844
3e52c33d
JK
48452011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4846
4847 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4848
4849 Revert:
4850 2011-12-18 Hui Zhu <teawater@gmail.com>
4851 * linux-low.c (linux_create_inferior): Save return value to ret.
4852
66f1260e
HZ
48532011-12-18 Hui Zhu <teawater@gmail.com>
4854
4855 * linux-low.c (linux_create_inferior): Save return value to ret.
4856
e77616d7
DE
48572011-12-16 Doug Evans <dje@google.com>
4858
e7b06c57
DE
4859 * linux-low.c (linux_create_inferior): If stdio connection,
4860 redirect stdin from /dev/null, stdout to stderr.
4861 * remote-utils.c (remote_is_stdio): New static global.
4862 (remote_connection_is_stdio): New function.
4863 (remote_prepare): Handle stdio connection.
4864 (remote_open): Ditto.
4865 (remote_close): Don't close stdin for stdio connections.
4866 (read_prim,write_prim): New functions. Replace all calls to
4867 read/write to these.
4868 * server.c (main): Watch for "-" argument. Move call to
4869 remote_prepare before start_inferior.
4870 * server.h (STDIO_CONNECTION_NAME): New macro.
4871 (remote_connection_is_stdio): Declare.
4872
e77616d7
DE
4873 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4874 in debugging output.
4875
82067193
YQ
48762011-12-15 Yao Qi <yao@codesourcery.com>
4877
4878 * tracepoint.c: Include sys/syscall.h.
4879 (gdb_ust_thread): Remove preprocessor conditional.
4880
82bfbe7e
PA
48812011-12-14 Pedro Alves <pedro@codesourcery.com>
4882
4883 * linux-low.c (linux_detach_one_lwp): Call
4884 the_low_target.prepare_to_resume before detaching.
4885
712c6575
YQ
48862011-12-14 Yao Qi <yao@codesourcery.com>
4887
4888 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4889 of write.
4890
d54d1edf
YQ
48912011-12-14 Yao Qi <yao@codesourcery.com>
4892
4893 * i386-low.c (i386_low_stopped_data_address): Initialize local
4894 variable `control'.
4895
6210a125
PA
48962011-12-13 Pedro Alves <pedro@codesourcery.com>
4897
4898 PR remote/13492
4899
4900 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4901 DR_CONTROL unless necessary. Extend comments.
4902 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4903 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4904
2ece8244
YQ
49052011-12-13 Yao Qi <yao@codesourcery.com>
4906
4907 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4908 macros.
4909 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4910
784867a5
JK
49112011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4912
4913 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4914 Print new debug message for such case.
4915
6bf36717
JK
49162011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4917
4918 Fix overlapping memcpy.
4919 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4920 the read_inferior_memory transfer.
4921 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4922 write_inferior_memory transfer.
4923 (set_fast_tracepoint_jump): New variable buf. Use it for the
4924 read_inferior_memory and write_inferior_memory transfers.
4925 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4926 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4927 Use it for the write_inferior_memory transfer.
4928 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4929 buffers.
4930
50275556
MR
49312011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4932
4933 * linux-low.c (fetch_register, store_register): Make code
4934 consistent, fix formatting.
4935
7325beb4
MR
49362011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4937
4938 * linux-low.c (usr_store_inferior_registers): Factor out code
4939 to handle individual registers into...
4940 (store_register): ... this new function.
4941
c642a434
UW
49422011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4943
4944 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4945 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4946 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4947 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4948 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4949 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4950 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4951 (srv_xmlfiles): Add new XML files.
4952
4953 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4954 and <sys/uio.h>.
4955 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4956 (init_registers_s390_linux32v1): Add prototype.
4957 (init_registers_s390_linux32v2): Likewise.
4958 (init_registers_s390_linux64v1): Likewise.
4959 (init_registers_s390_linux64v2): Likewise.
4960 (init_registers_s390x_linux64v1): Likewise.
4961 (init_registers_s390x_linux64v2): Likewise.
4962 (s390_num_regs): Increment to 52.
4963 (s390_regmap): Add orig_r2 register.
4964 (s390_num_regs_3264): Increment to 68.
4965 (s390_regmap_3264): Add orig_r2 register.
4966 (s390_collect_ptrace_register): Handle orig_r2 register.
4967 (s390_supply_ptrace_register): Likewise.
4968 (s390_fill_last_break): New function.
4969 (s390_store_last_break): Likewise.
4970 (s390_fill_system_call): New function.
4971 (s390_store_system_call): Likewise.
4972 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4973 register sets.
4974 (s390_check_regset): New function.
4975 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4976 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4977 Update target_regsets for available register sets.
4978
2268b414
JK
49792011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4980 Jan Kratochvil <jan.kratochvil@redhat.com>
4981
4982 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4983 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4984 New.
4985 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4986 * linux-low.h (struct process_info_private): New member r_debug.
4987 * server.c (handle_qxfer_libraries): Call
4988 the_target->qxfer_libraries_svr4.
4989 (handle_qxfer_libraries_svr4): New function.
4990 (qxfer_packets): New entry "libraries-svr4".
4991 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4992 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4993 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4994 PACKET_qXfer_libraries_svr4.
4995
d6db1fab
UW
49962011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4997
4998 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4999 PSW address/mask between 8-byte and 16-byte formats.
5000 (s390_supply_ptrace_register): Likewise.
5001 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5002 basic addressing mode bit.
5003
242f5f1c
SS
50042011-11-24 Stan Shebs <stan@codesourcery.com>
5005
5006 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5007
f196051f
SS
50082011-11-17 Stan Shebs <stan@codesourcery.com>
5009
5010 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5011 (tracing_start_time): New global.
5012 (tracing_stop_time): New global.
5013 (tracing_user_name): New global.
5014 (tracing_notes): New global.
5015 (tracing_stop_note): New global.
5016 (cmd_qtstart): Set traceframe_usage, start_time.
5017 (stop_tracing): Set stop_time.
5018 (cmd_qtstatus): Report additional status.
5019 (cmd_qtp): New function.
5020 (handle_tracepoint_query): Call it.
5021 (cmd_qtnotes): New function.
5022 (handle_tracepoint_general_set): Call it.
5023 (get_timestamp): Rename from tsv_get_timestamp.
5024
405f8e94
SS
50252011-11-14 Stan Shebs <stan@codesourcery.com>
5026 Kwok Cheung Yeung <kcy@codesourcery.com>
5027
5028 * linux-x86-low.c (small_jump_insn): New.
5029 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5030 trampoline and error message, build a trampoline and issue a small
5031 jump instruction to it.
5032 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5033 trampoline and error message.
5034 (x86_get_min_fast_tracepoint_insn_len): New.
5035 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5036 * linux-low.h (struct linux_target_ops): Add arguments to
5037 install_fast_tracepoint_jump_pad operation, add new operation.
5038 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5039 arguments.
5040 (linux_get_min_fast_tracepoint_insn_len): New function.
5041 (linux_target_op): Add new operation.
5042 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5043 (gdb_trampoline_buffer_end): Ditto.
5044 (gdb_trampoline_buffer_error): Ditto.
5045 (struct ipa_sym_addresses): Add fields for new IPA variables.
5046 (symbol_list): Add entries for new IPA variables.
5047 (struct tracepoint): Add fields to hold the address range of the
5048 trampoline used by the tracepoint.
5049 (trampoline_buffer_head): New static variable.
5050 (trampoline_buffer_tail): Ditto.
5051 (claim_trampoline_space): New function.
5052 (have_fast_tracepoint_trampoline_buffer): New function.
5053 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5054 structure.
5055 (install_fast_tracepoint): Ditto, also add error buffer argument.
5056 (cmd_qtminftpilen): New function.
5057 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5058 (fast_tracepoint_from_trampoline_address): New function.
5059 (fast_tracepoint_collecting): Handle trampoline as part of jump
5060 pad space.
5061 (set_trampoline_buffer_space): New function.
5062 (initialize_tracepoint): Initialize new IPA variables.
5063 * target.h (struct target_ops): Add arguments to
5064 install_fast_tracepoint_jump_pad operation, add new
5065 get_min_fast_tracepoint_insn_len operation.
5066 (target_get_min_fast_tracepoint_insn_len): New.
5067 (install_fast_tracepoint_jump_pad): Add arguments.
5068 * server.h (IPA_BUFSIZ): Define.
5069 * linux-i386-ipa.c: Include extra header files.
5070 (initialize_fast_tracepoint_trampoline_buffer): New function.
5071 (initialize_low_tracepoint): Call it.
5072 * server.h (set_trampoline_buffer_space): Declare.
5073 (claim_trampoline_space): Ditto.
5074 (have_fast_tracepoint_trampoline_buffer): Ditto.
5075
1e4d1764
YQ
50762011-11-14 Yao Qi <yao@codesourcery.com>
5077
5078 * server.c (handle_query): Handle InstallInTrace for qSupported.
5079 * tracepoint.c (add_tracepoint): Sort list.
5080 (install_tracepoint, download_tracepoint): New.
5081 (cmd_qtdp): Call them to install and download tracepoints.
5082 (sort_tracepoints): Removed.
5083 (cmd_qtstart): Update.
5084
5c73ff4e
YQ
50852011-11-14 Yao Qi <yao@codesourcery.com>
5086
5087 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5088 * mem-break.h: Declare.
5089 * tracepoint.c (cmd_qtstart): Move some code to ...
5090 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5091 New.
5092 (download_tracepoints): Move some code to ...
5093 (download_tracepoint_1): ... here. New.
5094
86a30030
YQ
50952011-11-08 Yao Qi <yao@codesourcery.com>
5096
5097 * remote-utils.c (relocate_instruction): A comment fix.
5098
8d26e50c
JB
50992011-11-07 Joel Brobecker <brobecker@adacore.com>
5100
5101 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5102 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5103 dr_status_mirror and dr_control_mirror from debug_reg_state.
5104 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5105 (i386_initial_stuff): Remove use of deleted globals.
5106 (i386_get_thread_context, i386_set_thread_context,
5107 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5108 from debug_reg_state.
5109
a59306a3
YQ
51102011-11-05 Yao Qi <yao@codesourcery.com>
5111
5112 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5113 address as TPOINT's.
5114
3065dfb6
SS
51152011-11-02 Stan Shebs <stan@codesourcery.com>
5116
5117 * tracepoint.c (agent_mem_read_string): New function.
5118 (eval_agent_expr): Call it for tracenz.
5119 * server.c (handle_query): Report support for tracenz.
5120
fd0d8c7c
YQ
51212011-11-02 Yao Qi <yao@codesourcery.com>
5122
5123 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5124
609086b1
YQ
51252011-11-02 Yao Qi <yao@codesourcery.com>
5126
5127 * target.h: Fix a typo in comment.
5128
b9fd1791
PA
51292011-10-31 Pedro Alves <pedro@codesourcery.com>
5130
5131 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5132 clobber the breakpoints' shadows with fast tracepoint jumps.
5133 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5134 * target.c (write_inferior_memory): Also pass MYADDR down to
5135 check_mem_write.
5136
03583c20
UW
51372011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5138
5139 * configure.ac: Check support for personality routine.
5140 * configure: Regenerate.
5141 * config.in: Likewise.
5142 * linux-low.c: Include <sys/personality.h>.
5143 Define ADDR_NO_RANDOMIZE if necessary.
5144 (linux_create_inferior): Disable address space randomization when
5145 forking inferior, if requested.
5146 (linux_supports_disable_randomization): New function.
5147 (linux_target_ops): Install it.
5148 * server.h (disable_randomization): Declare.
5149 * server.c (disable_randomization): New global variable.
5150 (handle_general_set): Handle QDisableRandomization.
5151 (handle_query): Likewise for qSupported.
5152 (main): Support --disable-randomization and --no-disable-randomization
5153 command line arguments.
5154 * target.h (struct target_ops): Add supports_disable_randomization.
5155 (target_supports_disable_randomization): New macro.
5156
723b724b
MF
51572011-09-29 Mike Frysinger <vapier@gentoo.org>
5158
5159 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5160 ifdef check.
5161 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5162 [!PT_GETDSBT] (target_loadmap): New definition.
5163 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5164 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5165 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5166 and PT_GETDSBT to LINUX_LOADMAP.
5167 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5168 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5169
55329a5c 51702011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5171
5172 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5173 (arm_linux_hwbp_cap): New static variable.
5174 (arm_linux_get_hwbp_cap): Replace by ...
5175 (arm_linux_init_hwbp_cap): ... this new function.
5176 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5177 (arm_linux_get_hw_watchpoint_count): Likewise.
5178 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5179 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5180 (arm_prepare_to_resume): Use perror_with_name instead of error.
5181
55329a5c 51822011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5183
5184 * linux-arm-low.c: Include <signal.h>.
5185 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5186 (struct arm_linux_hwbp_cap): New data type.
5187 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5188 (struct arm_linux_hw_breakpoint): New data type.
5189 (MAX_BPTS, MAX_WPTS): Define.
5190 (struct arch_process_info, struct arch_lwp_info): New data types.
5191 (arm_linux_get_hwbp_cap): New function.
5192 (arm_linux_get_hw_breakpoint_count): Likewise.
5193 (arm_linux_get_hw_watchpoint_count): Likewise.
5194 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5195 (arm_hwbp_control_initialize): Likewise.
5196 (arm_hwbp_control_is_enabled): Likewise.
5197 (arm_hwbp_control_is_initialized): Likewise.
5198 (arm_hwbp_control_disable): Likewise.
5199 (arm_linux_hw_breakpoint_equal): Likewise.
5200 (arm_linux_hw_point_initialize): Likewise.
5201 (struct update_registers_data): New data structure.
5202 (update_registers_callback: New function.
5203 (arm_insert_point): Likewise.
5204 (arm_remove_point): Likewise.
5205 (arm_stopped_by_watchpoint): Likewise.
5206 (arm_stopped_data_address): Likewise.
5207 (arm_new_process): Likewise.
5208 (arm_new_thread): Likewise.
5209 (arm_prepare_to_resume): Likewise.
5210 (the_low_target): Register arm_insert_point, arm_remove_point,
5211 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5212 arm_new_thread, and arm_prepare_to_resume.
5213
6b9801d4
SS
52142011-09-15 Stan Shebs <stan@codesourcery.com>
5215
5216 * server.h (struct emit_ops): Add compare-goto fields.
5217 * tracepoint.c (gdb_agent_op_sizes): New table.
5218 (emit_eq_goto): New function.
5219 (emit_ne_goto): New function.
5220 (emit_lt_goto): New function.
5221 (emit_le_goto): New function.
5222 (emit_gt_goto): New function.
5223 (emit_ge_goto): New function.
5224 (is_goto_target): New function.
5225 (compile_bytecodes): Recognize special cases of compare-goto
5226 combinations and call specialized emitters for them.
5227 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5228 (amd64_emit_ne_goto): New function.
5229 (amd64_emit_lt_goto): New function.
5230 (amd64_emit_le_goto): New function.
5231 (amd64_emit_gt_goto): New function.
5232 (amd64_emit_ge_goto): New function.
5233 (amd64_emit_ops): Add the new functions.
5234 (i386_emit_eq_goto): New function.
5235 (i386_emit_ne_goto): New function.
5236 (i386_emit_lt_goto): New function.
5237 (i386_emit_le_goto): New function.
5238 (i386_emit_gt_goto): New function.
5239 (i386_emit_ge_goto): New function.
5240 (i386_emit_ops): Add the new functions.
5241
bf15cbda
SS
52422011-09-08 Stan Shebs <stan@codesourcery.com>
5243
5244 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5245 (i386_emit_epilogue): Restore %ebx.
5246
943ca1dd
JZ
52472011-08-31 Jie Zhang <jzhang918@gmail.com>
5248
5249 * server.c (step_thread): Remove definition.
5250 (process_serial_event): Don't handle Hs.
5251 * server.h (step_thread): Remove declaration.
5252 * target.c (set_desired_inferior): Remove use of step_thread.
5253
e3deef73
LM
52542011-08-24 Luis Machado <lgustavo@codesourcery.com>
5255
5256 * linux-low.c: Include linux-procfs.h.
5257 (linux_attach_lwp_1): Update comments.
5258 (linux_attach): Scan for existing threads when attaching to a
5259 process that is the tgid.
5260 * Makefile.in: Update dependencies.
5261
13da1c97
LM
52622011-08-24 Luis Machado <lgustavo@codesourcery.com>
5263
5264 * configure.srv: Add linux-procfs.o dependencies.
5265
881127c9
YQ
52662011-08-14 Yao Qi <yao@codesourcery.com>
5267
5268 * target.h (struct target_ops): Fix indent.
5269 * win32-low.c (win32_target_ops): Fix comment.
5270
58dbd541
YQ
52712011-08-14 Andrew Jenner <andrew@codesourcery.com>
5272 Yao Qi <yao@codesourcery.com>
5273
5274 * Makefile.in (clean): Remove tic6x-*.c files.
5275 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5276 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5277 (tic6x-c64xp-linux.c): Likewise.
5278 * configure.srv: Add support for tic6x-*-uclinux.
5279 * linux-tic6x-low.c: New.
5280 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5281
78d85199
YQ
52822011-08-14 Andrew Stubbs <ams@codesourcery.com>
5283 Yao Qi <yao@codesourcery.com>
5284
5285 * target.h (struct target_ops): Add read_loadmap.
5286 * linux-low.c (struct target_loadseg): New type.
5287 (struct target_loadmap): New type.
5288 (linux_read_loadmap): New function.
5289 (linux_target_ops): Add linux_read_loadmap.
5290 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5291 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5292 to NULL.
78d85199 5293
a959a88d
EZ
52942011-08-05 Eli Zaretskii <eliz@gnu.org>
5295
5296 * win32-low.c: Include <stdint.h>.
5297
1ced966e
PA
52982011-07-22 Pedro Alves <pedro@codesourcery.com>
5299
5300 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5301 to the inferior here.
5302 (i386_remove_aligned_watchpoint): Ditto.
5303 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5304 fit part of the watchpoint in the debug registers.
5305 (i386_update_inferior_debug_regs): New.
5306 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5307 registers, and only update the inferior on success.
5308 (i386_low_remove_watchpoint): Ditto.
5309
d26e3629
KY
53102011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5311
5312 * linux-low.c (compare_ints, unique, list_threads, show_process,
5313 linux_core_of_thread): Delete.
5314 (linux_target_ops): Change linux_core_of_thread to
5315 linux_common_core_of_thread.
5316 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5317 * utils.c (malloc_failure): Change type of argument.
5318 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5319 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5320 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5321 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5322 (IPA_OBJS): Add common-utils-ipa.o.
5323 (ptid_h, linux_osdata_h): New macros.
5324 (server_h): Add common/common-utils.h, common/xml-utils.h,
5325 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5326 common/ptid.h.
5327 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5328 ptid.o, buffer.o): New rules.
5329 (linux-low.o): Add common/linux-osdata.h as a dependency.
5330 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5331 * configure.ac: Add AC_HEADER_DIRENT check.
5332 * config.in: Regenerate.
5333 * configure: Regenerate.
5334 * remote-utils.c (xml_escape_text): Delete.
5335 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5336 buffer_xml_printf): Move to common/buffer.c.
5337 * server.c (main): Remove call to initialize_inferiors.
5338 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5339 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5340 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5341 internal_error, gdb_assert, gdb_assert_fail): Delete.
5342 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5343 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5344 common/buffer.h.
5345 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5346 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5347 initialize_inferiors): Delete.
5348
2275a1a7
PA
53492011-07-20 Pedro Alves <pedro@codesourcery.com>
5350
5351 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5352 symbol error.
5353
0a5b1e09
PA
53542011-05-31 Pedro Alves <pedro@codesourcery.com>
5355
5356 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5357 assertion.
5358 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5359
6938fd34
YQ
53602011-05-26 Yao Qi <yao@codesourcery.com>
5361
5362 * Makefile.in (thread-db.o): Track dependence to
5363 common/gdb_thread_db.h.
5364 * thread-db.c: include gdb_thread_db.h from right place.
5365
b481f9e0
TT
53662011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5367
5368 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5369 __FILE__ and __LINE__ to internal_error.
5370
98a5dd13
DE
53712011-05-13 Doug Evans <dje@google.com>
5372
5373 * thread-db.c (try_thread_db_load_from_sdir): New function.
5374 (try_thread_db_load_from_dir): New function.
5375 (thread_db_load_search): Handle $sdir, ignore $pdir.
5376 Remove trying of system directories if search of
5377 libthread-db-search-path fails, that is now done via $sdir.
5378
d248b706
KY
53792011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5380
5381 * server.c (handle_query): Add EnableDisableTracepoints to the list
5382 of supported features.
43aaf8b6 5383 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5384 tracepoints.
43aaf8b6
PA
5385 (cmd_qtenable_disable): New.
5386 (cmd_qtstart): Install tracepoints even if disabled.
5387 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5388 receiving a QTEnable or QTDisable packet.
5389 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5390 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5391 tracepoints.
5392 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5393
84e578fb
DE
53942011-05-10 Doug Evans <dje@google.com>
5395
5396 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5397
71f55dd8
DE
53982011-05-04 Doug Evans <dje@google.com>
5399
5400 * linux-low.c (linux_join): Skip process lookup.
5401 * spu-low.c (spu_join): Ditto.
5402 * server.c (join_inferiors_callback): Delete.
5403 (process_serial_event): For 'D' packet (detach) call join_inferior
5404 directly.
5405
4d393d60
JM
54062011-05-04 Joseph Myers <joseph@codesourcery.com>
5407
5408 * README: Don't mention xscale*-*-linux*.
5409 * configure.srv (xscale*-*-linux*): Don't handle target.
5410
b00ad6ff
NF
54112011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5412
5413 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5414 casting pointers.
5415 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5416 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5417 (i386_emit_void_call_2): Likewise.
5418
af96c192
YQ
54192011-04-26 Yao Qi <yao@codesourcery.com>
5420
43aaf8b6
PA
5421 * linux-low.c: Move common macros to linux-ptrace.h.
5422 Include linux-ptrace.h.
af96c192
YQ
5423 * Makefile.in (linux_ptrace_h): New.
5424 (linux-low.o): Depends on linux-ptrace.h.
5425
03f2bd59
JK
54262011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5427
5428 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5429 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5430 (remote_prepare): New function with most of the TCP code from ...
5431 (remote_open): ... here. Detect PORT here unconditionally. Move also
5432 setting transport_is_reliable.
5433 * server.c (run_once): New variable.
5434 (gdbserver_usage): Document it.
5435 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5436 the first run if RUN_ONCE.
5437 * server.h (run_once, remote_prepare): New declarations.
5438
7a9dd1b2
TT
54392011-04-19 Tom Tromey <tromey@redhat.com>
5440
5441 * win32-low.c (handle_load_dll): Remove duplicate "the".
5442
81239425
PM
54432011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5444
5445 Remove support for old Cygwin 1.5 versions.
5446 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5447 function to avoid warning.
5448 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5449 warning.
5450
9e0627f1
PM
54512011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5452
5453 * gdbserver/server.h (Macro _): Define it if not available.
5454
588eebee
MS
54552011-03-14 Michael Snyder <msnyder@vmware.com>
5456
348af9f7 5457 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5458
43f70d4c
JB
54592011-03-10 Joel Brobecker <brobecker@adacore.com>
5460
5461 * Makefile.in (maintainer-clean realclean distclean): Remove
5462 "make ... subdir_do" command.
5463
348af9f7
MS
54642011-03-10 Michael Snyder <msnyder@vmware.com>
5465
5466 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5467
5468 * server.c (handle_v_run): Free alloced buffer on early return.
5469
e637a4f5
YQ
54702011-03-09 Yao Qi <yao@codesourcery.com>
5471
5472 Revert:
5473 2011-03-04 Yao Qi <yao@codesourcery.com>
5474
5475 * Makefile.in: Remove GNU make feature --directory.
5476
5477 2011-03-05 Yao Qi <yao@codesourcery.com>
5478
5479 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5480 (subdir_do): New make target. Copied from gdb/Makefile.
5481 (maintainer-clean, realclean, distclean, clean): Call corresponding
5482 make targets in common/Makefile.
5483
5484 2011-02-11 Yao Qi <yao@codesourcery.com>
5485
5486 * configure.ac: Call AC_PROG_RANLIB.
5487 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5488 * configure: Regenerate.
5489
e6edda56
JK
54902011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5491
5492 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5493
e5141119
JB
54942011-03-06 Yao Qi <yao@codesourcery.com>
5495
5496 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5497
64794aa4
JB
54982011-03-05 Yao Qi <yao@codesourcery.com>
5499
5500 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5501 (subdir_do): New make target. Copied from gdb/Makefile.
5502 (maintainer-clean, realclean, distclean, clean): Call corresponding
5503 make targets in common/Makefile.
5504
7a762829
YQ
55052011-03-04 Yao Qi <yao@codesourcery.com>
5506
5507 * Makefile.in: Remove GNU make feature --directory.
5508
348af9f7
MS
55092011-03-04 Michael Snyder <msnyder@vmware.com>
5510
5511 * server.c (queue_stop_reply): Call xmalloc not malloc.
5512
55132011-03-02 Michael Snyder <msnyder@vmware.com>
5514
5515 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5516
9f72fee2
MS
55172011-02-28 Michael Snyder <msnyder@vmware.com>
5518
588eebee
MS
5519 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5520 (cmd_qtframe): Ditto.
5521 (cmd_qtbuffer): Ditto.
5522 (cmd_bigqtbuffer): Ditto.
5523
9f72fee2
MS
5524 * utils.c (decimal2str): Initialize 'width' to nine, then
5525 don't mess with it.
5526
8040bd49
UW
55272011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5528
5529 * hostio.c (require_data): Free *data, not data.
5530
7e52cbd0
JK
55312011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5532
5533 * hostio.c (require_data): Use free, not xfree.
5534
9130f83e
MS
55352011-02-27 Michael Snyder <msnyder@vmware.com>
5536
4b812f4e
MS
5537 * server.c (handle_query): Discard unused value.
5538
9130f83e
MS
5539 * hostio.c (require_data): Free malloc memory before returning
5540 error.
5541
69d37113
MS
55422011-02-26 Michael Snyder <msnyder@vmware.com>
5543
5544 * linux-low.c (list_threads): Call closedir for dirent.
5545
35f5825a
MS
55462011-02-27 Michael Snyder <msnyder@vmware.com>
5547
2a589cef
MS
5548 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5549 a case statement falls through.
5550
0adea5f7
MS
5551 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5552
35f5825a
MS
5553 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5554 in comparison.
5555
238f1c74
MS
55562011-02-26 Michael Snyder <msnyder@vmware.com>
5557
5558 * utils.c (decimal2str): Eliminate dead code and dead param.
5559 (pulongest): Drop dead param from call to decimal2str.
5560 (plongest): Ditto.
5561
633ff500
JB
55622011-02-24 Joel Brobecker <brobecker@adacore.com>
5563
5564 Revert the following patch (not approved yet):
5565 2011-02-21 Hui Zhu <teawater@gmail.com>
5566 * tracepoint.c (tp_printf): New function.
5567 (eval_agent_expr): Handle gdb_agent_op_printf.
5568
f9c6ff72
HZ
55692011-02-21 Hui Zhu <teawater@gmail.com>
5570
5571 * tracepoint.c (tp_printf): New function.
5572 (eval_agent_expr): Handle gdb_agent_op_printf.
5573
94d5e490
TT
55742011-02-18 Tom Tromey <tromey@redhat.com>
5575
5576 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5577 (tracepoint.o): Likewise.
5578 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5579 (gdb_agent_op_names): Likewise.
5580
c7f96d2b
TT
55812011-02-18 Tom Tromey <tromey@redhat.com>
5582
5583 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5584 gdb_agent_op_rot>: New constants.
5585 (gdb_agent_op_names): Add pick and roll.
5586 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5587 cases.
5588
0feedb2c
JK
55892011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5590
5591 * aclocal.m4: Regenerated with aclocal-1.11.1.
5592
b3b9301e
PA
55932011-02-14 Pedro Alves <pedro@codesourcery.com>
5594
5595 * server.c (handle_qxfer_traceframe_info): New.
5596 (qxfer_packets): Register "traceframe-info".
5597 (handle_query): Report support for qXfer:traceframe-info:read+.
5598 * tracepoint.c (match_blocktype): New.
5599 (traceframe_find_block_type): Rename to ...
5600 (traceframe_walk_blocks): ... this. Add callback filter argument,
5601 and use it.
5602 (traceframe_find_block_type): New, reimplemented on top of
5603 traceframe_walk_blocks.
5604 (build_traceframe_info_xml): New.
5605 (traceframe_read_info): New.
5606 * server.h (traceframe_read_info): Declare.
5607
4f3e6fb7
YQ
56082011-02-11 Yao Qi <yao@codesourcery.com>
5609
5610 * configure.ac: Call AC_PROG_RANLIB.
5611 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5612 * configure: Regenerate.
5613
764880b7
PA
56142011-02-07 Pedro Alves <pedro@codesourcery.com>
5615
5616 * server.c (gdb_read_memory): Change return semantics to allow
5617 partial transfers.
5618 (handle_search_memory_1): Adjust.
5619 (process_serial_event) <'m' packet>: Handle partial transfers.
5620 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5621
1c79eb8a
PA
56222011-01-28 Pedro Alves <pedro@codesourcery.com>
5623
5624 * regcache.c (init_register_cache): Initialize
5625 regcache->register_status.
5626 (free_register_cache): Release regcache->register_status.
5627 (regcache_cpy): Copy register_status.
5628 (registers_to_string): Print 'x's for unavailable registers.
5629 (supply_register): Mark the register's status valid or
5630 unavailable, depending on whether a buffer was passed in or not.
5631 (supply_register_zeroed): New.
5632 (supply_regblock): Mark the registers' status valid or
5633 unavailable, depending on whether a buffer was passed in or not.
5634 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5635 (struct regcache): New `register_status' field.
5636 (supply_register_zeroed): Declare.
5637 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5638 supply_register_zeroed, rather than passing a NULL buffer to
5639 supply_register.
5640 * tracepoint.c (fetch_traceframe_registers): Update comment.
5641
85724a0e
PA
56422011-01-28 Pedro Alves <pedro@codesourcery.com>
5643
5644 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5645 buffer explicit.
5646
d08aafef
PA
56472011-01-25 Pedro Alves <pedro@codesourcery.com>
5648
5649 * server.h (decode_xfer_write): Change prototype.
5650 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5651 and don't extract the annex here.
5652 * server.c (decode_xfer_read): Remove `annex' parameter,
5653 and don't extract the annex here.
5654 (decode_xfer): New.
5655 (struct qxfer): New.
5656 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5657 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5658 (handle_qxfer_statictrace): New functions, abstracted out from
5659 handle_query, and made to use the struct qxfer interface.
5660 (handle_threads_qxfer_proper): Rename to ...
5661 (handle_qxfer_threads_proper): ... this.
5662 (handle_threads_qxfer): Rename to ...
5663 (handle_qxfer_threads): ... this. Adjust.
5664 (qxfer_packets): New array.
5665 (handle_qxfer): New function.
5666 (handle_query): Use handle_qxfer.
5667
493e2a69
MS
56682011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5669
5670 * gdbreplay.c: Shorten lines of >= 80 columns.
5671 * linux-low.c: Ditto.
5672 * linux-ppc-low.c: Ditto.
5673 * linux-s390-low.c: Ditto.
5674 * linux-sparc-low.c: Ditto.
5675 * linux-x86-low.c: Ditto.
5676 * linux-xtensa-low.c: Ditto.
5677 * mem-break.c: Ditto.
5678 * nto-low.c: Ditto.
5679 * regcache.h: Ditto.
5680 * remote-utils.c: Ditto.
5681 * server.c: Ditto.
5682 * server.h: Ditto.
5683 * thread-db.c: Ditto.
5684 * tracepoint.c: Ditto.
5685 * utils.c: Ditto.
5686 * win32-low.h: Ditto.
5687
44944448
JB
56882011-01-05 Joel Brobecker <brobecker@adacore.com>
5689
5690 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5691 update.
5692
71ce852c
JB
56932011-01-01 Joel Brobecker <brobecker@adacore.com>
5694
5695 * server.c (gdbserver_version): Update copyright year in version
5696 output.
5697 * gdbreplay.c (gdbreplay_version): Ditto.
5698
eb826dc6
MF
56992010-12-29 Jie Zhang <jie.zhang@analog.com>
5700
5701 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5702 * linux-bfin-low.c: New file.
5703 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5704 PT_DATA_ADDR for BFIN targets.
5705 * Makefile.in (SFILES): Add linux-bfin-low.c.
5706 (clean): Remove reg-bfin.c.
5707 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5708 * README: Mention supported Blackfin targets.
5709
39ab222a
MF
57102010-12-23 Mike Frysinger <vapier@gentoo.org>
5711
5712 * .gitignore: New file.
5713
a1f2ce7d
MF
57142010-11-16 Mike Frysinger <vapier@gentoo.org>
5715
5716 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5717
f474844c
JZ
57182010-10-22 Jie Zhang <jie@codesourcery.com>
5719
5720 * Makefile.in: Add FLAGS_TO_PASS variable.
5721 (install): Remove dependency of install-only and recursively
5722 invoke make for install-only.
5723
f1048712
DE
57242010-10-04 Doug Evans <dje@google.com>
5725
5726 * Makefile.in (uninstall): Use $(DESTDIR).
5727
b53a1623
PA
57282010-09-24 Pedro Alves <pedro@codesourcery.com>
5729
e6ee044d
PA
5730 PR gdb/11842
5731
b53a1623
PA
5732 * linux-x86-low.c (compat_siginfo_from_siginfo)
5733 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5734 si_code is < 0. Check for si_code == SI_TIMER before checking for
5735 si_code < 0.
5736
fa1bd1e4
JB
57372010-09-13 Joel Brobecker <brobecker@adacore.com>
5738
5739 * lynx-i386-low.c: New file.
5740 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5741
47fac8f8
JB
57422010-09-13 Joel Brobecker <brobecker@adacore.com>
5743
5744 * lynx-low.c (ptrace_request_to_str): Remove handling for
5745 request values that have been removed in LynxOS 5.x.
5746
1adfc54d
JB
57472010-09-13 Joel Brobecker <brobecker@adacore.com>
5748
5749 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5750 <ptrace.h>
5751
c2a66c29
NS
57522010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5753
5754 * configure.ac: Add --enable-inprocess-agent option.
5755 * configure: Rebuilt.
5756
32fcada3
YQ
57572010-09-06 Yao Qi <yao@codesourcery.com>
5758
5759 * linux-low.c (linux_kill): Remove unused variable.
5760 (linux_stabilize_threads): Likewise.
5761 * server.c (start_inferior): Likewise.
5762 (queue_stop_reply_callback): Likewise.
5763 * tracepoint.c (do_action_at_tracepoint): Likewise.
5764
0cccb683
YQ
57652010-09-06 Yao Qi <yao@codesourcery.com>
5766
5767 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5768 on return.
5769
423ec54c
JK
57702010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5771
5772 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5773
12ac6819
PA
57742010-09-06 Pedro Alves <pedro@codesourcery.com>
5775
5776 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5777 "$(IPA_DEPFILES)".
5778
8ed54b31
JB
57792010-09-01 Joel Brobecker <brobecker@adacore.com>
5780
5781 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5782 gdbserver/lynx-ppc-low.c: New files.
5783 * Makefile.in (lynx_low_h): New variable.
5784 (lynx-low.o, lynx-ppc-low.o): New rules.
5785 * configure.ac: On LynxOS, link with -lnetinet.
5786 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5787 * configure: regenerate.
5788
bb0116a4
JB
57892010-09-01 Joel Brobecker <brobecker@adacore.com>
5790
5791 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5792 * configure.ac: Add check for vasprintf and vsnprintf.
5793 * configure, config.in: Regenerate.
5794 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5795
a778ab81 57962010-09-01 Joel Brobecker <brobecker@adacore.com>
5797
5798 * gdbreplay.c: Move include of alloca.h up, next to include of
5799 malloc.h.
5800 * server.h: Add include of malloc.h.
5801 * mem-break.c: Remove include of malloc.h.
5802 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5803
8b034a19 58042010-09-01 Joel Brobecker <brobecker@adacore.com>
5805
5806 * Makefile.in (memmem.o): Build with -Wno-error.
5807
58082010-09-01 Joel Brobecker <brobecker@adacore.com>
5809
5810 * utils.c (xsnprintf): Make non-static.
5811 * server.h: Add xsnprintf declaration.
5812 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5813 replace calls to snprintf by calls to xsnprintf throughout.
5814
58152010-09-01 Joel Brobecker <brobecker@adacore.com>
5816
5817 * configure.ac: Add configure check for alloca.
5818 * configure, config.in: Regenerate.
5819 * server.h: Include alloca.h if it exists.
5820 * gdbreplay.c: Include alloca.h if it exists.
5821
1a981360
PA
58222010-08-28 Pedro Alves <pedro@codesourcery.com>
5823
5824 * linux-low.c (__SIGRTMIN): Define if not already defined.
5825 (linux_create_inferior): Check for __ANDROID__ rather than
5826 __SIGRTMIN.
5827 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5828 are already deferred.
5829 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5830 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5831 stopped and already has a pending signal to report.
5832 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5833 a pending signal to report or is moving out of a jump pad.
5834 (linux_init_signals): Check for __ANDROID__ rather than
5835 __SIGRTMIN.
5836
b4d51a55
PA
58372010-08-28 Pedro Alves <pedro@codesourcery.com>
5838
5839 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5840 debug_threads check. Avoid a linear search when not doing debug
5841 output.
5842
ec48365d
PA
58432010-08-27 Pedro Alves <pedro@codesourcery.com>
5844
5845 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5846 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5847 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5848 (process_event): Change local fd's type to gdb_fildes_t.
5849 (create_file_handler): Adjust prototype.
5850 (delete_file_handler): Adjust prototype.
5851 (handle_file_event): Adjust prototype. Use pfildes.
5852 (create_file_event): Adjsut prototype.
5853 * remote-utils.c (remote_desc, listen_desc): Change type to
5854 gdb_fildes_t.
5855 * server.h: New gdb_fildes_t typedef.
5856 [USE_WIN32API]: Include winsock2.h.
5857 (delete_file_handler, add_file_handler): Adjust prototypes.
5858 (pfildes): Declare.
5859 * utils.c (pfildes): New.
5860
854d88f0
PA
58612010-08-27 Pedro Alves <pedro@codesourcery.com>
5862
5863 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5864 * configure: Regenerate.
5865
0146f85b
PA
58662010-08-27 Pedro Alves <pedro@codesourcery.com>
5867
5868 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5869 (linux_done_accessing_memory): ... this.
5870 (linux_target_ops): Adjust.
5871 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5872 * nto-low.c (nto_target_ops): Adjust comment.
5873 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5874 * spu-low.c (spu_target_ops): Adjust comment.
5875 * target.h (target_ops): Rename unprepare_to_access_memory field
5876 to done_accessing_memory.
5877 (unprepare_to_access_memory): Rename to ...
5878 (done_accessing_memory): ... this.
5879
90d74c30
PA
58802010-08-26 Pedro Alves <pedro@codesourcery.com>
5881
5882 * linux-low.c (linux_prepare_to_access_memory): New.
5883 (linux_unprepare_to_access_memory): New.
5884 (linux_target_ops): Install them.
5885 * server.c (read_memory): Rename to ...
5886 (gdb_read_memory): ... this. Use
5887 prepare_to_access_memory/prepare_to_access_memory.
5888 (write_memory): Rename to ...
5889 (gdb_write_memory): ... this. Use
5890 prepare_to_access_memory/prepare_to_access_memory.
5891 (handle_search_memory_1): Adjust.
5892 (process_serial_event): Adjust.
5893 * target.h (struct target_ops): New fields
5894 prepare_to_access_memory and unprepare_to_access_memory.
5895 (prepare_to_access_memory, unprepare_to_access_memory): New.
5896 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5897 prepare_to_access_memory/prepare_to_access_memory.
5898 * nto-low.c (nto_target_ops): Adjust.
5899 * spu-low.c (spu_target_ops): Adjust.
5900 * win32-low.c (win32_target_ops): Adjust.
5901
fd467969
PA
59022010-08-26 Pedro Alves <pedro@codesourcery.com>
5903
5904 * Makefile.in (WARN_CFLAGS): Get it from configure.
5905 (WERROR_CFLAGS): New.
5906 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5907 * configure.ac: Introduce --enable-werror, which adds -Werror to
5908 the compiler command line. Enabled by default. Disable with
5909 --disable-werror. Add -Wdeclaration-after-statement
5910 Wpointer-arith and -Wformat-nonliteral to warning flags.
5911 * configure: Regenerate.
5912
331e2f5f
PA
59132010-08-26 Pedro Alves <pedro@codesourcery.com>
5914
5915 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5916
e581f2b4
PA
59172010-08-26 Pedro Alves <pedro@codesourcery.com>
5918
5919 * gdbreplay.c (remote_error): New.
5920 (gdbchar): New.
5921 (expect): Use gdbchar. Check for error reading from GDB.
5922 Clarify sync error output.
5923 (play): Check for errors writing to GDB.
5924 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5925 * remote-utils.c (getpkt): Check for errors writing to the remote
5926 descriptor.
5927
3c11dd79
PA
59282010-08-25 Pedro Alves <pedro@codesourcery.com>
5929
5930 * linux-low.c (linux_wait_1): Move non-debugging code out of
5931 `debug_threads' control.
5932
d20a8ad9
PA
59332010-08-25 Pedro Alves <pedro@codesourcery.com>
5934
5935 * linux-low.c (linux_wait_1): Don't set last_status here.
5936 * server.c (push_event, queue_stop_reply_callback): Assert we're
5937 not pushing a TARGET_WAITKIND_IGNORE event.
5938 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5939 (myresume, handle_target_event): Set the thread's last_resume_kind
5940 and last_status from the target returned status.
5941
964e4306
PA
59422010-08-25 Pedro Alves <pedro@codesourcery.com>
5943
5944 PR threads/10729
5945
5946 * linux-x86-low.c (update_debug_registers_callback): New.
5947 (i386_dr_low_set_addr): Use it.
5948 (i386_dr_low_get_addr): New.
5949 (i386_dr_low_set_control): Use update_debug_registers_callback.
5950 (i386_dr_low_get_control): New.
5951 (i386_dr_low_get_status): Adjust.
5952 * linux-low.c (linux_stop_lwp): New.
5953 * linux-low.h (linux_stop_lwp): Declare.
5954
5955 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5956 argument instead of a i386_debug_reg_state.
5957 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5958 a i386_debug_reg_state.
5959 (i386_insert_aligned_watchpoint): Adjust.
5960 (i386_remove_aligned_watchpoint): Adjust.
5961 (i386_low_stopped_data_address): Read the debug registers from the
5962 inferior instead of from the mirrors.
5963 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5964 (i386_dr_low_get_addr): Declare.
5965 (i386_dr_low_get_control): Declare.
5966 (i386_dr_low_get_status): Change prototype.
5967
5968 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5969 (i386_dr_low_get_addr): New.
5970 (i386_dr_low_get_control): New.
5971 (i386_dr_low_get_status): Adjust prototype. Return
5972 dr_status_mirror.
5973 (i386_initial_stuff): Clear dr_status_mirror and
5974 dr_control_mirror.
5975 (i386_get_thread_context): Adjust.
5976 (i386_set_thread_context): Adjust.
5977 (i386_thread_added): Adjust.
5978
5f21a75b
PA
59792010-08-24 Pedro Alves <pedro@codesourcery.com>
5980
5981 * linux-low.h (linux_thread_area): Delete declaration.
5982
3e4c1235
TS
59832010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5984
5985 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5986 after its termination.
5987
1971b033
PA
59882010-08-09 Pedro Alves <pedro@codesourcery.com>
5989
5990 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5991 (gdb_wants_all_stopped): Delete.
5992 (linux_wait_1): Don't call them.
5993 * server.c (handle_v_cont): Tag all threads as want-stopped.
5994 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5995 stopped as "client-wants-stopped".
5996
310444ac
PA
59972010-07-31 Pedro Alves <pedro@codesourcery.com>
5998
5999 * Makefile.in (signals_h): New.
6000 (server_h): Depend on it.
6001 (server.o): Don't depend on $(signals_def).
6002 (signals.o): Depend on $(signals_def).
6003
a19cae16
JK
60042010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6005
6006 * Makefile.in (signals_def): New.
6007 (server_h): Append include/gdb/signals.h and signals_def.
6008 (server.o): Append signals_def.
6009
30d50328
JK
60102010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6011
6012 * server.c (handle_target_event): Use target_signal_to_host for
6013 resume_info.sig initialization.
6014 * target.h (struct thread_resume) <sig>: New comment.
6015
5c3216e2
OS
60162010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6017
c6f46ca0
OS
6018 * server.c (handle_query): strcpy() the returned string from paddress()
6019 instead of sprintf().
5c3216e2
OS
6020 * utils.c (paddress): Return phex_nz().
6021
6bd31874
JB
60222010-07-07 Joel Brobecker <brobecker@adacore.com>
6023
6024 * server.c (handle_v_cont): Call mourn_inferior if process
6025 just exited.
6026 (myresume): Likewise.
6027
0fb4aa4b
PA
60282010-07-01 Pedro Alves <pedro@codesourcery.com>
6029
6030 Static tracepoints, and integration with UST.
6031
6032 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6033 * mem-break.c (uninsert_all_breakpoints)
6034 (reinsert_all_breakpoints): New.
6035 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6036 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6037 (gdb_agent_ust_loaded, helper_thread_id)
6038 (gdb_agent_helper_thread_id): New macros.
6039 (struct ipa_sym_addresses): Add addr_ust_loaded,
6040 addr_helper_thread_id, addr_cmd_buf.
6041 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6042 (in_process_agent_loaded_ust): New.
6043 (write_e_ust_not_loaded): New.
6044 (maybe_write_ipa_ust_not_loaded): New.
6045 (struct collect_static_trace_data_action): New.
6046 (enum tracepoint_type) <static_tracepoint>: New.
6047 (struct tracepoint) <handle>: Mention static tracepoints.
6048 (struct static_tracepoint_ctx): New.
6049 (CMD_BUF_SIZE): New.
6050 (add_tracepoint_action): Handle static tracepoint actions.
6051 (unprobe_marker_at): New.
6052 (clear_installed_tracepoints): Handle static tracepoints.
6053 (cmd_qtdp): Handle static tracepoints.
6054 (probe_marker_at): New.
6055 (cmd_qtstart): Handle static tracepoints.
6056 (response_tracepoint): Handle static tracepoints.
6057 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6058 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6059 (get_context_regcache): Handle static tracepoints.
6060 (do_action_at_tracepoint): Handle static tracepoint actions.
6061 (traceframe_find_block_type): Handle static trace data blocks.
6062 (traceframe_read_sdata): New.
6063 (download_tracepoints): Download static tracepoint actions.
6064 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6065 (GDB_PROBE_NAME): New.
6066 (ust_ops): New.
6067 (GET_UST_SYM): New.
6068 (USTF): New.
6069 (dlsym_ust): New.
6070 (ust_marker_to_static_tracepoint): New.
6071 (gdb_probe): New.
6072 (collect_ust_data_at_tracepoint): New.
6073 (gdb_ust_probe): New.
6074 (UNIX_PATH_MAX, SOCK_DIR): New.
6075 (gdb_ust_connect_sync_socket): New.
6076 (resume_thread, stop_thread): New.
6077 (run_inferior_command): New.
6078 (init_named_socket): New.
6079 (gdb_ust_socket_init): New.
6080 (cstr_to_hexstr): New.
6081 (next_st): New.
6082 (first_marker, next_marker): New.
6083 (response_ust_marker): New.
6084 (cmd_qtfstm, cmd_qtsstm): New.
6085 (unprobe_marker_at, probe_marker_at): New.
6086 (cmd_qtstmat, gdb_ust_thread): New.
6087 (gdb_ust_init): New.
6088 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6089 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6090 (ST_REGENTRY): New.
6091 (x86_64_st_collect_regmap): New.
6092 (X86_64_NUM_ST_COLLECT_GREGS): New.
6093 (AMD64_RIP_REGNUM): New.
6094 (supply_static_tracepoint_registers): New.
6095 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6096 (ST_REGENTRY): New.
6097 (i386_st_collect_regmap): New.
6098 (i386_NUM_ST_COLLECT_GREGS): New.
6099 (supply_static_tracepoint_registers): New.
6100 * server.c (handle_query): Handle qXfer:statictrace:read.
6101 <qSupported>: Report support for StaticTracepoints, and
6102 qXfer:statictrace:read features.
6103 * server.h (traceframe_read_sdata)
6104 (supply_static_tracepoint_registers): Declare.
6105 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6106 (unpack_varlen_hex): Include in IPA build.
6107 * Makefile.in (ustlibs, ustinc): New.
6108 (IPA_OBJS): Add remote-utils-ipa.o.
6109 ($(IPA_LIB)): Link -ldl and -lpthread.
6110 (UST_CFLAGS): New.
6111 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6112 * config.in, configure: Regenerate.
6113
9e4344e5
PA
61142010-06-20 Ian Lance Taylor <iant@google.com>
6115 Pedro Alves <pedro@codesourcery.com>
6116
6117 * linux-x86-low.c (always_true): Delete.
6118 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6119 trying to fool the compiler with always_true.
6120
c6beb2cb
PA
61212010-06-20 Pedro Alves <pedro@codesourcery.com>
6122
6123 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6124 conditions in gdbserver.
6125
d2ed6730
UW
61262010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6127
6128 * spu-low.c (spu_read_memory): Wrap around local store limit.
6129 (spu_write_memory): Likewise.
6130
4e29fb54
PA
61312010-06-15 Pedro Alves <pedro@codesourcery.com>
6132
6133 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6134 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6135 LONGEST uses.
6136 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6137 uses.
6138 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6139 uses with LONGEST uses.
6140
6a271cae
PA
61412010-06-14 Stan Shebs <stan@codesourcery.com>
6142 Pedro Alves <pedro@codesourcery.com>
6143
6144 Bytecode compiler.
6145
6146 * linux-x86-low.c: Include limits.h.
6147 (add_insns): New.
6148 (always_true): New.
6149 (EMIT_ASM): New.
6150 (EMIT_ASM32): New.
6151 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6152 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6153 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6154 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6155 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6156 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6157 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6158 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6159 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6160 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6161 (amd64_emit_void_call_2): New.
6162 (amd64_emit_ops): New.
6163 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6164 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6165 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6166 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6167 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6168 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6169 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6170 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6171 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6172 (i386_emit_stack_adjust, i386_emit_int_call_1)
6173 (i386_emit_void_call_2): New.
6174 (i386_emit_ops): New.
6175 (x86_emit_ops): New.
6176 (the_low_target): Install x86_emit_ops.
6177 * server.h (struct emit_ops): New.
6178 (get_raw_reg_func_addr): Declare.
6179 (current_insn_ptr, emit_error): Declare.
6180 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6181 (set_trace_state_variable_value): New defines.
6182 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6183 addr_get_trace_state_variable_value and
6184 addr_set_trace_state_variable_value.
6185 (symbol_list): New fields for get_raw_reg,
6186 get_trace_state_variable_value and set_trace_state_variable_value.
6187 (condfn): New typedef.
6188 (struct tracepoint): New field `compiled_cond'.
6189 (do_action_at_tracepoint): Clear compiled_cond.
6190 (get_trace_state_variable_value, set_trace_state_variable_value):
6191 Export in the IPA.
6192 (condition_true_at_tracepoint): If there's a compiled condition,
6193 run that.
6194 (current_insn_ptr, emit_error): New globals.
6195 (struct bytecode_address): New.
6196 (get_raw_reg_func_addr): New.
6197 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6198 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6199 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6200 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6201 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6202 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6203 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6204 (compile_tracepoint_condition, compile_bytecodes): New.
6205 * target.h (emit_ops): Forward declare.
6206 (struct target_ops): New field emit_ops.
6207 (target_emit_ops): New.
6208 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6209 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6210 * linux-low.c (linux_emit_ops): New.
6211 (linux_target_ops): Install it.
6212 * linux-low.h (struct linux_target_ops): New field emit_ops.
6213
92b72907
UW
62142010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6215
6216 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6217 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6218
fa593d66
PA
62192010-06-01 Pedro Alves <pedro@codesourcery.com>
6220 Stan Shebs <stan@codesourcery.com>
6221
6222 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6223 (all): Depend on $(extra_libraries).
6224 (install-only): Install the IPA.
6225 (IPA_OBJS, IPA_LIB): New.
6226 (clean): Remove the IPA lib.
6227 (IPAGENT_CFLAGS): New.
6228 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6229 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6230 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6231 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6232 * configure.ac: Check for atomic builtins support in the compiler.
6233 (IPA_DEPFILES, extra_libraries): Define.
6234 * configure.srv (ipa_obj): Add description.
6235 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6236 (i[34567]86-*-linux*): Set ipa_obj.
6237 (x86_64-*-linux*): Set ipa_obj.
6238 * linux-low.c (stabilizing_threads): New.
6239 (supports_fast_tracepoints): New.
6240 (linux_detach): Stabilize threads before detaching.
6241 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6242 the lwp is either not stabilizing, or is moving out of a jump pad.
6243 (linux_fast_tracepoint_collecting): New.
6244 (maybe_move_out_of_jump_pad): New.
6245 (enqueue_one_deferred_signal): New.
6246 (dequeue_one_deferred_signal): New.
6247 (linux_wait_for_event_1): If moving out of a jump pad, defer
6248 pending signals to later.
6249 (linux_stabilize_threads): New.
6250 (linux_wait_1): Check if threads need moving out of jump pads, and
6251 do it if so.
6252 (stuck_in_jump_pad_callback): New.
6253 (move_out_of_jump_pad_callback): New.
6254 (lwp_running): New.
6255 (linux_resume_one_lwp): Handle moving out of jump pads.
6256 (linux_set_resume_request): Dequeue deferred signals.
6257 (need_step_over_p): Also step over fast tracepoint jumps.
6258 (start_step_over): Also uninsert fast tracepoint jumps.
6259 (finish_step_over): Also reinsert fast tracepoint jumps.
6260 (linux_install_fast_tracepoint_jump): New.
6261 (linux_target_ops): Install linux_stabilize_threads and
6262 linux_install_fast_tracepoint_jump_pad.
6263 * linux-low.h (linux_target_ops) <get_thread_area,
6264 install_fast_tracepoint_jump_pad>: New fields.
6265 (struct lwp_info) <collecting_fast_tracepoint,
6266 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6267 (linux_get_thread_area): Declare.
6268 * linux-x86-low.c (jump_insn): New.
6269 (x86_get_thread_area): New.
6270 (append_insns): New.
6271 (push_opcode): New.
6272 (amd64_install_fast_tracepoint_jump_pad): New.
6273 (i386_install_fast_tracepoint_jump_pad): New.
6274 (x86_install_fast_tracepoint_jump_pad): New.
6275 (the_low_target): Install x86_get_thread_area and
6276 x86_install_fast_tracepoint_jump_pad.
6277 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6278 (struct fast_tracepoint_jump): New.
6279 (fast_tracepoint_jump_insn): New.
6280 (fast_tracepoint_jump_shadow): New.
6281 (find_fast_tracepoint_jump_at): New.
6282 (fast_tracepoint_jump_here): New.
6283 (delete_fast_tracepoint_jump): New.
6284 (set_fast_tracepoint_jump): New.
6285 (uninsert_fast_tracepoint_jumps_at): New.
6286 (reinsert_fast_tracepoint_jumps_at): New.
6287 (set_breakpoint_at): Use write_inferior_memory.
6288 (uninsert_raw_breakpoint): Use write_inferior_memory.
6289 (check_mem_read): Mask out fast tracepoint jumps.
6290 (check_mem_write): Mask out fast tracepoint jumps.
6291 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6292 (set_fast_tracepoint_jump): Declare.
6293 (delete_fast_tracepoint_jump)
6294 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6295 (reinsert_fast_tracepoint_jumps_at): Declare.
6296 * regcache.c: Don't compile many functions when building the
6297 in-process agent library.
6298 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6299 the register buffer in the heap.
6300 (free_register_cache): If the register buffer isn't owned by the
6301 regcache, don't free it.
6302 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6303 pre-existing register caches.
6304 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6305 type.
6306 (convert_ascii_to_int): : Constify `from' parameter type.
6307 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6308 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6309 the needed buffer in-place.
6310 (relocate_instruction): New.
6311 * server.c (handle_query) <qSymbols>: If the target supports
6312 tracepoints, give it a chance of looking up symbols. Report
6313 support for fast tracepoints.
6314 (handle_status): Stabilize threads.
6315 (process_serial_event): Adjust.
6316 * server.h (struct fast_tracepoint_jump): Forward declare.
6317 (struct process_info) <fast_tracepoint_jumps>: New field.
6318 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6319 (decode_X_packet, decode_M_packet): Adjust.
6320 (relocate_instruction): Declare.
6321 (in_process_agent_loaded): Declare.
6322 (tracepoint_look_up_symbols): Declare.
6323 (struct fast_tpoint_collect_status): Declare.
6324 (fast_tracepoint_collecting): Declare.
6325 (force_unlock_trace_buffer): Declare.
6326 (handle_tracepoint_bkpts): Declare.
6327 (initialize_low_tracepoint)
6328 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6329 * target.h (struct target_ops) <stabilize_threads,
6330 install_fast_tracepoint_jump_pad>: New fields.
6331 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6332 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6333 [HAVE_STDINT_H]: Include stdint.h.
6334 (trace_debug_1): Rename to ...
6335 (trace_vdebug): ... this.
6336 (trace_debug): Rename to ...
6337 (trace_debug_1): ... this. Add `level' parameter.
6338 (trace_debug): New.
6339 (ATTR_USED, ATTR_NOINLINE): New.
6340 (IP_AGENT_EXPORT): New.
6341 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6342 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6343 (about_to_request_buffer_space, trace_buffer_is_full)
6344 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6345 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6346 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6347 (traceframe_write_count, traceframes_created)
6348 (trace_state_variables)
6349 New renaming defines.
6350 (struct ipa_sym_addresses): New.
6351 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6352 (symbol_list): New.
6353 (ipa_sym_addrs): New.
6354 (all_tracepoint_symbols_looked_up): New.
6355 (in_process_agent_loaded): New.
6356 (write_e_ipa_not_loaded): New.
6357 (maybe_write_ipa_not_loaded): New.
6358 (tracepoint_look_up_symbols): New.
6359 (debug_threads) [IN_PROCESS_AGENT]: New.
6360 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6361 (UNKNOWN_SIDE_EFFECTS): New.
6362 (stop_tracing): New.
6363 (flush_trace_buffer): New.
6364 (stop_tracing_bkpt): New.
6365 (flush_trace_buffer_bkpt): New.
6366 (read_inferior_integer): New.
6367 (read_inferior_uinteger): New.
6368 (read_inferior_data_pointer): New.
6369 (write_inferior_data_pointer): New.
6370 (write_inferior_integer): New.
6371 (write_inferior_uinteger): New.
6372 (struct collect_static_trace_data_action): Delete.
6373 (enum tracepoint_type): New.
6374 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6375 <actions_str, step_actions, step_actions_str>: Only include in
6376 GDBserver.
fa593d66
PA
6377 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6378 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6379 (tracepoints): Use IP_AGENT_EXPORT.
6380 (last_tracepoint): Don't include in the IPA.
6381 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6382 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6383 (alloced_trace_state_variables): New.
6384 (trace_state_variables): Use IP_AGENT_EXPORT.
6385 (traceframe_t): Delete unused variable.
6386 (circular_trace_buffer): Don't include in the IPA.
6387 (trace_buffer_start): Delete.
6388 (struct trace_buffer_control): New.
6389 (trace_buffer_free): Delete.
6390 (struct ipa_trace_buffer_control): New.
6391 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6392 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6393 New.
6394 (trace_buffer_ctrl): New.
6395 (TRACE_BUFFER_CTRL_CURR): New.
6396 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6397 Reimplement as macros.
6398 (trace_buffer_wrap): Delete.
6399 (traceframe_write_count, traceframe_read_count)
6400 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6401 (struct tracepoint_hit_ctx) <type>: New field.
6402 (struct fast_tracepoint_ctx): New.
6403 (memory_barrier): New.
6404 (cmpxchg): New.
6405 (record_tracepoint_error): Update atomically in the IPA.
6406 (clear_inferior_trace_buffer): New.
6407 (about_to_request_buffer_space): New.
6408 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6409 updating the same buffer.
6410 (add_tracepoint): Default the tracepoint's type to trap
6411 tracepoint, and orig_size to -1.
6412 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6413 internal variables.
6414 (create_trace_state_variable): New parameter `gdb'. Handle it.
6415 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6416 (cmd_qtdp): Handle fast tracepoints.
6417 (cmd_qtdv): Adjust.
6418 (max_jump_pad_size): New.
6419 (gdb_jump_pad_head): New.
6420 (get_jump_space_head): New.
6421 (claim_jump_space): New.
6422 (sort_tracepoints): New.
6423 (MAX_JUMP_SIZE): New.
6424 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6425 IPA.
6426 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6427 support. Upload fast traceframes, and delete internal IPA
6428 breakpoints.
6429 (stop_tracing_handler): New.
6430 (flush_trace_buffer_handler): New.
6431 (cmd_qtstop): Upload fast tracepoints.
6432 (response_tracepoint): Handle fast tracepoints.
6433 (tracepoint_finished_step): Upload fast traceframes. Set the
6434 tracepoint hit context's tracepoint type.
6435 (handle_tracepoint_bkpts): New.
6436 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6437 type. Add comment about fast tracepoints.
6438 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6439 non-existing action_str field.
6440 (get_context_regcache): Handle fast tracepoints.
6441 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6442 to the regcache.
6443 (fast_tracepoint_from_jump_pad_address): New.
6444 (fast_tracepoint_from_ipa_tpoint_address): New.
6445 (collecting_t): New.
6446 (force_unlock_trace_buffer): New.
6447 (fast_tracepoint_collecting): New.
6448 (collecting): New.
6449 (gdb_collect): New.
6450 (write_inferior_data_ptr): New.
6451 (target_tp_heap): New.
6452 (target_malloc): New.
6453 (download_agent_expr): New.
6454 (UALIGN): New.
6455 (download_tracepoints): New.
6456 (download_trace_state_variables): New.
6457 (upload_fast_traceframes): New.
6458 (IPA_FIRST_TRACEFRAME): New.
6459 (IPA_NEXT_TRACEFRAME_1): New.
6460 (IPA_NEXT_TRACEFRAME): New.
6461 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6462 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6463 (gdb_jump_pad_buffer_end): New.
6464 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6465 (initialize_tracepoint): Adjust.
6466 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6467 buffer. Initialize the low module.
6468 * utils.c (PREFIX, TOOLNAME): New.
6469 (malloc_failure): Use PREFIX.
6470 (error): In the IPA, an error causes an exit.
6471 (fatal, warning): Use PREFIX.
6472 (internal_error): Use TOOLNAME.
6473 (NUMCELLS): Increase to 10.
6474 * configure, config.in: Regenerate.
6475
d149dd1d
PA
64762010-06-01 Pedro Alves <pedro@codesourcery.com>
6477
6478 * server.c (handle_query) <qSupported>: Do two passes over the
6479 qSupported string to avoid nesting strtok.
6480
f6528abd
JK
64812010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6482
6483 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6484 (CDEPS): New.
6485 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6486 -Wl,--dynamic-list.
6487 * configure: Regenerate.
6488 * proc-service.list: New.
6489
ca2a87a0
JK
64902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6491
6492 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6493 New comment.
6494
363a6e9f
OS
64952010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6496
6497 * gdbreplay.c (remote_open): Check error return from socket() call by
6498 its equality to -1 not by it being negative.
6499 * remote-utils.c (remote_open): Likewise.
6500
d23b6cb1
PA
65012010-05-23 Pedro Alves <pedro@codesourcery.com>
6502
6503 * config.h: Regenerate.
6504
28d3cf85
MK
65052010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6506
6507 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6508 doesn't provide PTRACE_GET_THREAD_AREA.
6509
fea36a59
MK
65102010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6511
6512 * linux-m68k-low.c: Include <asm/ptrace.h>
6513 (ps_get_thread_area): Implement.
6514
24b066ba
DE
65152010-05-03 Doug Evans <dje@google.com>
6516
6517 * event-loop.c (struct callback_event): New struct.
6518 (callback_list): New global.
6519 (append_callback_event, delete_callback_event): New functions.
6520 (process_callback): New function.
6521 (start_event_loop): Call it.
6522 * remote-utils.c (NOT_SCHEDULED): Define.
6523 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6524 moved out of readchar.
6525 (readchar): Rewrite. Call reschedule before returning.
6526 (reset_readchar): New function.
6527 (remote_close): Call it.
6528 (process_remaining, reschedule): New functions.
6529 * server.h (callback_handler_func): New typedef.
6530 (append_callback_event, delete_callback_event): Declare.
6531
9836d6ea
PA
65322010-05-03 Pedro Alves <pedro@codesourcery.com>
6533
6534 * proc-service.c (ps_pglobal_lookup): Use
6535 thread_db_look_up_one_symbol.
6536 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6537 parameter. Use it instead of all_symbols_looked_up.
6538 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6539 field.
6540 (all_symbols_looked_up): Don't declare.
6541 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6542 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6543 field.
6544 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6545 Set all_symbols_looked_up here.
6546 (thread_db_look_up_one_symbol): New.
6547 (thread_db_get_tls_address): Adjust.
6548 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6549 thread_db object on the heap, and tentatively set it in the
6550 process structure.
6551 (thread_db_init): Don't set all_symbols_looked_up here.
6552 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6553
7984d532
PA
65542010-05-03 Pedro Alves <pedro@codesourcery.com>
6555
6556 * linux-low.c (linux_kill, linux_detach): Adjust.
6557 (status_pending_p_callback): Remove redundant statement. Check
6558 for !TARGET_WAITIKIND_IGNORE, instead of
6559 TARGET_WAITKIND_STOPPED.
6560 (handle_tracepoints): Make sure LWP is locked. Adjust.
6561 (linux_wait_for_event_1): Adjust.
6562 (linux_cancel_breakpoints): New.
6563 (unsuspend_one_lwp): New.
6564 (unsuspend_all_lwps): New.
6565 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6566 (send_sigstop_callback): Change return type to int, add new
6567 `except' parameter and handle it.
6568 (suspend_and_send_sigstop_callback): New.
6569 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6570 pass them down. If SUSPEND, also increment the lwp's suspend
6571 count.
6572 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6573 (need_step_over_p): Don't consider suspended LWPs.
6574 (start_step_over): Adjust.
6575 (proceed_one_lwp): Change return type to int, add new `except'
6576 parameter and handle it.
6577 (unsuspend_and_proceed_one_lwp): New.
6578 (proceed_all_lwps): Use find_inferior instead of
6579 for_each_inferior.
6580 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6581 also decrement the suspend count of LWPs. Pass `except' down,
6582 instead of hacking its suspend count.
6583 (linux_pause_all): Add `freeze' parameter. Adjust.
6584 (linux_unpause_all): New.
6585 (linux_target_ops): Install linux_unpause_all.
6586 * server.c (handle_status): Adjust.
6587 * target.h (struct target_ops): New fields `unpause_all' and
6588 `cancel_breakpoints'. Add new parameter to `pause_all'.
6589 (pause_all): Add new `freeze' parameter.
6590 (unpause_all): New.
6591 (cancel_breakpoints): New.
6592 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6593 cancel breakpoints.
6594 (cmd_qtstart): Pause threads.
6595 (stop_tracing): Pause threads, and cancel breakpoints.
6596 * win32-low.c (win32_target_ops): Adjust.
6597
e471f25b
PA
65982010-05-03 Pedro Alves <pedro@codesourcery.com>
6599
6600 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6601 the inferior right away from here...
6602 (linux_wait_1): ... to here, and adjust to check the thread's
6603 last_resume_kind instead of the lwp's step or stop_expected flags.
6604
1915ef4f
PA
66052010-05-02 Pedro Alves <pedro@codesourcery.com>
6606
6607 * README: Use consistent `GDB' and `GDBserver' spellings.
6608
f9e39928
PA
66092010-05-02 Pedro Alves <pedro@codesourcery.com>
6610
6611 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6612 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6613 (linux_detach_one_lwp): Assume the lwp is stopped.
6614 (any_thread_of): Delete.
6615 (linux_detach): Stop all lwps here. Don't blindly delete all
6616 breakpoints.
6617 (delete_lwp_callback): New.
6618 (linux_mourn): Delete all lwps of the process that is gone.
6619 (linux_wait_1): Don't delete the last lwp of the process here.
6620 * mem-break.h (mark_breakpoints_out): Declare.
6621 * mem-break.c (mark_breakpoints_out): New.
6622 (free_all_breakpoints): Use it.
6623 * server.c (handle_target_event): If the process is gone, mark
6624 breakpoints out.
6625 * thread-db.c (struct thread_db) <create_bp>: New field.
6626 (thread_db_enable_reporting): Fix prototype. Store a thread event
6627 breakpoint reference in the thread_db struct.
6628 (thread_db_load_search): Clear the thread_db object.
6629 (try_thread_db_load_1): Ditto.
6630 (switch_to_process): New.
6631 (disable_thread_event_reporting): Use it.
6632 (remove_thread_event_breakpoints): New.
6633 (thread_db_detach, thread_db_mourn): Use it.
6634
1e7fc18c
PA
66352010-05-01 Pedro Alves <pedro@codesourcery.com>
6636
6637 * linux-low.c (linux_enable_event_reporting): New.
6638 (linux_wait_for_event_1, handle_extended_wait): Use it.
6639
02fc4de7
PA
66402010-04-30 Pedro Alves <pedro@codesourcery.com>
6641
6642 * linux-low.c (linux_kill_one_lwp, linux_kill)
6643 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6644 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6645 SIGSTOP even if the LWP is stopped.
6646 (send_sigstop_callback): New.
6647 (stop_all_lwps): Use send_sigstop_callback instead.
6648 (linux_resume_one_thread): Adjust.
6649 (proceed_one_lwp): Still proceed an LWP that the client has
6650 requested to stop, if we haven't reported it as stopped yet. Make
6651 sure that LWPs the client want stopped, have a pending SIGSTOP.
6652
bc3b5632
DE
66532010-04-26 Doug Evans <dje@google.com>
6654
ae1ada35
DE
6655 * server.c (handle_general_set): Make static.
6656
bc3b5632
DE
6657 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6658 Print received char after testing for error/eof instead of before.
6659 (input_interrupt): Tweak comment.
6660
65730243
DE
66612010-04-23 Doug Evans <dje@google.com>
6662
6663 * server.c (start_inferior): Print inferior argv if --debug.
6664
a8ae7dc0
AR
66652010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6666
6667 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6668 * nto-x86-low.c: Include server.h
6669
1c07cc19
PM
66702010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6671
6672 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6673 be consistent with other sources of this directory.
6674 (init_registers_amd64): Correct name of source file of this function
6675 in the comment.
6676
e0a61e09
PM
66772010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6678
6679 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6680 64-bit executables.
6681
54709339
PM
66822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6683
6684 * win32-i386-low.c: Add 64-bit support.
6685 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6686 (init_registers_amd64): Declare.
6687 (mappings): Add 64-bit version of array.
6688 (init_windows_x86): New function.
6689 (the_low_target): Change init_arch field to init_windows_x86.
6690
e8f0053d
PM
66912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6692
6693 * win32-low.c: Adapt to support also 64-bit architecture.
6694 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6695 (get_image_name): Use SIZE_T type for local variable `done'.
6696 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6697 (toolhelp_get_dll_name): Idem.
6698 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6699 Use uintptr_t typecast to avoid warning.
6700 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6701 (handle_exception): Use phex_nz to avoid warning.
6702 (win32_wait): Remove unused local variable `process'.
6703
c481e77e
PM
67042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6705
6706 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6707 `amd64-avx.o'.
6708
12ea4b69
PM
67092010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6710
6711 * configure.ac: Use `ws2_32' library for srv_mingw.
6712 * configure: Regenerate.
6713 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6714 * remote-utils.c: Likewise.
6715
f6d1620c
L
67162010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6717
6718 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6719 if __x86_64__ is defined.
6720
8e642873
PM
67212010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6722
6723 * configure: Regenerate.
6724
711e434b
PM
67252010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6726
6727 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6728 * target.h (target_ops): New get_tib_address field.
6729 * win32-low.h (win32_thread_info): Add thread_local_base field.
6730 * win32-low.c (child_add_thread): Add tlb argument.
6731 Set thread_local_base field to TLB.
6732 (get_child_debug_event): Adapt to child_add_thread change.
6733 (win32_get_tib_address): New function.
6734 (win32_target_ops): Set get_tib_address field to
6735 win32_get_tib_address.
6736 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6737
505106cd
PA
67382010-04-12 Pedro Alves <pedro@codesourcery.com>
6739
505106cd
PA
6740 * linux-low.c (linux_mourn): Also remove the process.
6741 * server.c (handle_target_event): Don't remove the process here.
6742 * nto-low.c (nto_mourn): New.
6743 (nto_target_ops): Install it.
6744 * spu-low.c (spu_mourn): New.
6745 (spu_target_ops): Install it.
6746 * win32-low.c (win32_mourn): New.
6747 (win32_target_ops): Install it.
6748
e8470a06
PA
67492010-04-12 Pedro Alves <pedro@codesourcery.com>
6750
6751 * server.h (buffer_xml_printf): Remove redundant `;'.
6752
45ba0d02
PA
67532010-04-12 Pedro Alves <pedro@codesourcery.com>
6754
6755 * regcache.c (set_register_cache): Invalidate regcaches before
6756 changing the register cache layout.
6757 (regcache_invalidate_one): Allow a NULL regcache.
6758 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6759 regcaches before changing the register cache layout or the target
6760 regsets.
6761
59e04013
L
67622010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6763
6764 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6765 variable warning on Linux/x86-64.
6766
8336d594
PA
67672010-04-11 Pedro Alves <pedro@codesourcery.com>
6768
6769 GDBserver disconnected tracing support.
6770
6771 * linux-low.c (linux_remove_process): Delete.
6772 (add_lwp): Don't set last_resume_kind here.
6773 (linux_kill): Use `mourn'.
6774 (linux_detach): Use `thread_db_detach', and `mourn'.
6775 (linux_mourn): New.
6776 (linux_attach_lwp_1): Adjust comment.
6777 (linux_attach): last_resume_kind moved the thread_info; adjust.
6778 (status_pending_p_callback): Adjust.
6779 (linux_wait_for_event_1): Adjust.
6780 (count_events_callback, select_singlestep_lwp_callback)
6781 (select_event_lwp_callback, cancel_breakpoints_callback)
6782 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6783 (proceed_one_lwp): Adjust.
6784 (linux_async): Add debug output.
6785 (linux_thread_stopped): New.
6786 (linux_pause_all): New.
6787 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6788 linux_pause_all.
6789 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6790 (thread_db_free): Delete declaration.
6791 (thread_db_detach, thread_db_mourn): Declare.
6792 * thread-db.c (thread_db_init): Use thread_db_mourn.
6793 (thread_db_free): Delete, split in two.
6794 (disable_thread_event_reporting): New.
6795 (thread_db_detach): New.
6796 (thread_db_mourn): New.
6797
6798 * server.h (struct thread_info) <last_resume_kind>: New field.
6799 <attached>: Add comment.
6800 <gdb_detached>: New field.
6801 (handler_func): Change return type to int.
6802 (handle_serial_event, handle_target_event): Ditto.
6803 (gdb_connected): Declare.
6804 (tracing): Delete.
6805 (disconnected_tracing): Declare.
6806 (stop_tracing): Declare.
6807
6808 * server.c (handle_query) <qSupported>: Report support for
6809 disconnected tracing.
6810 (queue_stop_reply_callback): Account for running threads.
6811 (gdb_wants_thread_stopped): New.
6812 (gdb_wants_all_threads_stopped): New.
6813 (gdb_reattached_process): New.
6814 (handle_status): Clear the `gdb_detached' flag of all processes.
6815 In all-stop, stop all threads.
6816 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6817 (process_serial_event): If the remote connection breaks, or if an
6818 exit was forced with "monitor exit", force an event loop exit.
6819 Handle disconnected tracing on detach.
6820 (handle_serial_event): Adjust.
6821 (handle_target_event): If GDB isn't connected, forward events back
6822 to the inferior, unless the last process exited, in which case,
6823 exit gdbserver. Adjust interface.
6824
6825 * remote-utils.c (remote_open): Don't block in accept. Instead
6826 register an event loop source on the listen socket file
6827 descriptor. Refactor bits into ...
6828 (listen_desc): ... this new global.
6829 (gdb_connected): ... this new function.
6830 (enable_async_notification): ... this new function.
6831 (handle_accept_event): ... this new function.
6832 (remote_close): Clear remote_desc.
6833
6834 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6835
6836 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6837 New fields.
6838 (mourn_inferior): Define.
6839 (target_process_qsupported): Avoid the dangling else problem.
6840 (thread_stopped): Define.
6841 (pause_all): Define.
6842 (target_waitstatus_to_string): Declare.
6843 * target.c (target_waitstatus_to_string): New.
6844
6845 * tracepoint.c (tracing): Make extern.
6846 (disconnected_tracing): New.
6847 (stop_tracing): Make extern. Handle tracing stops due to GDB
6848 disconnecting.
6849 (cmd_qtdisconnected): New.
6850 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6851 (handle_tracepoint_general_set): Handle QTDisconnected.
6852
6853 * event-loop.c (event_handler_func): Change return type to int.
6854 (process_event): Bail out if the event handler wants the event
6855 loop to stop.
6856 (handle_file_event): Ditto.
6857 (start_event_loop): Bail out if the event handler wants the event
6858 loop to stop.
6859
6860 * nto-low.c (nto_target_ops): Adjust.
6861 * spu-low.c (spu_wait): Don't remove the process here.
6862 (spu_target_ops): Adjust.
6863 * win32-low.c (win32_wait): Don't remove the process here.
6864 (win32_target_ops): Adjust.
6865
5d267c4c
PA
68662010-04-11 Pedro Alves <pedro@codesourcery.com>
6867
6868 * regcache.c (realloc_register_cache): Invalidate inferior's
6869 regcache before recreating it.
6870
623ccd72
PA
68712010-04-09 Pedro Alves <pedro@codesourcery.com>
6872
6873 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6874
219f2f23
PA
68752010-04-09 Stan Shebs <stan@codesourcery.com>
6876 Pedro Alves <pedro@codesourcery.com>
6877
6878 * server.h (LONGEST): New.
6879 (struct thread_info) <while_stepping>: New field.
6880 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6881 Declare.
6882 (initialize_tracepoint, handle_tracepoint_general_set)
6883 (handle_tracepoint_query, tracepoint_finished_step)
6884 (tracepoint_was_hit, release_while_stepping_state_list):
6885 (current_traceframe): Declare.
6886 * server.c (handle_general_set): Handle tracepoint packets.
6887 (read_memory): New.
6888 (write_memory): New.
6889 (handle_search_memory_1): Use read_memory.
6890 (handle_query): Report support for conditional tracepoints, trace
6891 state variables, and tracepoint sources. Handle tracepoint
6892 queries.
6893 (main): Initialize the tracepoints module.
6894 (process_serial_event): Handle traceframe reads/writes.
6895
6896 * linux-low.c (handle_tracepoints): New.
6897 (linux_wait_1): Call it.
6898 (linux_resume_one_lwp): Handle while-stepping.
6899 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6900 (linux_target_ops): Install them.
6901 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6902 New field.
6903 * linux-x86-low.c (x86_supports_tracepoints): New.
6904 (the_low_target). Install it.
6905
6906 * mem-break.h (delete_breakpoint): Declare.
6907 * mem-break.c (delete_breakpoint): Make external.
6908
6909 * target.h (struct target_ops): Add `supports_tracepoints',
6910 `read_pc', and `write_pc' fields.
6911 (target_supports_tracepoints): Define.
6912 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6913 (phex_nz): New.
6914
6915 * regcache.h (struct regcache) <registers_owned>: New field.
6916 (init_register_cache, regcache_cpy): Declare.
6917 (regcache_read_pc, regcache_write_pc): Declare.
6918 (register_cache_size): Declare.
6919 (supply_regblock): Declare.
6920 * regcache.c (init_register_cache): New.
6921 (new_register_cache): Use it.
6922 (regcache_cpy): New.
6923 (register_cache_size): New.
6924 (supply_regblock): New.
6925 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6926
219f2f23
PA
6927 * tracepoint.c: New.
6928
6929 * Makefile.in (OBS): Add tracepoint.o.
6930 (tracepoint.o): New rule.
6931
3a13a53b
L
69322010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6933
6934 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6935 (i386-mmx.o): New.
6936 (i386-mmx.c): Likewise.
6937 (i386-mmx-linux.o): Likewise.
6938 (i386-mmx-linux.c): Likewise.
6939
6940 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6941 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6942 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6943 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6944
6945 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6946 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6947 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6948
1570b33e
L
69492010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6950
6951 * Makefile.in (clean): Updated.
6952 (i386-avx.o): New.
6953 (i386-avx.c): Likewise.
6954 (i386-avx-linux.o): Likewise.
6955 (i386-avx-linux.c): Likewise.
6956 (amd64-avx.o): Likewise.
6957 (amd64-avx.c): Likewise.
6958 (amd64-avx-linux.o): Likewise.
6959 (amd64-avx-linux.c): Likewise.
6960
6961 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6962 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6963 (srv_amd64_regobj): Add amd64-avx.o.
6964 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6965 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6966 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6967 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6968 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6969 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6970 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6971
6972 * i387-fp.c: Include "i386-xstate.h".
6973 (i387_xsave): New.
6974 (i387_cache_to_xsave): Likewise.
6975 (i387_xsave_to_cache): Likewise.
6976 (x86_xcr0): Likewise.
6977
6978 * i387-fp.h (i387_cache_to_xsave): Likewise.
6979 (i387_xsave_to_cache): Likewise.
6980 (x86_xcr0): Likewise.
6981
6982 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6983 * linux-crisv32-low.c (target_regsets): Likewise.
6984 * linux-m68k-low.c (target_regsets): Likewise.
6985 * linux-mips-low.c (target_regsets): Likewise.
6986 * linux-ppc-low.c (target_regsets): Likewise.
6987 * linux-s390-low.c (target_regsets): Likewise.
6988 * linux-sh-low.c (target_regsets): Likewise.
6989 * linux-sparc-low.c (target_regsets): Likewise.
6990 * linux-xtensa-low.c (target_regsets): Likewise.
6991
6992 * linux-low.c: Include <sys/uio.h>.
6993 (regsets_fetch_inferior_registers): Support nt_type.
6994 (regsets_store_inferior_registers): Likewise.
6995 (linux_process_qsupported): New.
6996 (linux_target_ops): Add linux_process_qsupported.
6997
6998 * linux-low.h (regset_info): Add nt_type.
6999 (linux_target_ops): Add process_qsupported.
7000
7001 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7002 and <sys/uio.h>.
7003 (init_registers_i386_avx_linux): New.
7004 (init_registers_amd64_avx_linux): Likewise.
7005 (xmltarget_i386_linux_no_xml): Likewise.
7006 (xmltarget_amd64_linux_no_xml): Likewise.
7007 (PTRACE_GETREGSET): Likewise.
7008 (PTRACE_SETREGSET): Likewise.
7009 (x86_fill_xstateregset): Likewise.
7010 (x86_store_xstateregset): Likewise.
7011 (use_xml): Likewise.
7012 (x86_linux_update_xmltarget): Likewise.
7013 (x86_linux_process_qsupported): Likewise.
7014 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7015 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7016 init_registers_i386_linux here. Call
7017 x86_linux_update_xmltarget.
7018 (the_low_target): Add x86_linux_process_qsupported.
7019
7020 * server.c (handle_query): Call target_process_qsupported.
7021
7022 * target.h (target_ops): Add process_qsupported.
7023 (target_process_qsupported): New.
7024
fc7238bb
PA
70252010-04-03 Pedro Alves <pedro@codesourcery.com>
7026
7027 * inferiors.c (add_thread): Set last_status kind to
7028 TARGET_WAITKIND_IGNORE.
7029 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7030 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7031 (linux_wait_1): Move `thread' local definition to block that uses
7032 it. Don't NULL initialize `event_child'.
7033 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7034 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7035 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7036
bdabb078
PA
70372010-04-01 Pedro Alves <pedro@codesourcery.com>
7038
7039 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7040 an extended waitstatus, or by a watchpoint.
7041 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7042 thread was stepping or has been stopped by a watchpoint.
7043
d3bbe7a0
PA
70442010-04-01 Pedro Alves <pedro@codesourcery.com>
7045
7046 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7047 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7048 of another, then delete the previous, and validate all
7049 breakpoints.
7050 (validate_inserted_breakpoint): New.
7051 (delete_disabled_breakpoints): New.
7052 (validate_breakpoints): New.
7053 (check_mem_read): Validate breakpoints before trusting their
7054 shadow. Delete disabled breakpoints.
7055 (check_mem_write): Validate breakpoints before trusting they
7056 should be inserted. Delete disabled breakpoints.
7057 * mem-break.h (validate_breakpoints):
7058 * server.c (handle_query): Validate breakpoints when we see a
7059 qSymbol query.
7060
8b07ae33
PA
70612010-04-01 Pedro Alves <pedro@codesourcery.com>
7062
7063 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7064 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7065 if we could tell there's a GDB breakpoint at stop_pc.
7066 (need_step_over_p): Don't do a step over if we find a GDB
7067 breakpoint at the resume PC.
7068
7069 * mem-break.c (struct raw_breakpoint): New.
7070 (enum bkpt_type): New type `gdb_breakpoint'.
7071 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7072 fields. New field `raw'.
7073 (find_raw_breakpoint_at): New.
7074 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7075 breakpoint instead.
7076 (set_breakpoint_at): Adjust.
7077 (delete_raw_breakpoint): New.
7078 (release_breakpoint): New.
7079 (delete_breakpoint): Rename to...
7080 (delete_breakpoint_1): ... this. Add proc parameter. Use
7081 release_breakpoint. Return ENOENT.
7082 (delete_breakpoint): Reimplement.
7083 (find_breakpoint_at): Delete.
7084 (find_gdb_breakpoint_at): New.
7085 (delete_breakpoint_at): Delete.
7086 (set_gdb_breakpoint_at): New.
7087 (delete_gdb_breakpoint_at): New.
7088 (gdb_breakpoint_here): New.
7089 (set_reinsert_breakpoint): Use release_breakpoint.
7090 (uninsert_breakpoint): Rename to ...
7091 (uninsert_raw_breakpoint): ... this.
7092 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7093 (reinsert_raw_breakpoint): Change parameter type to
7094 raw_breakpoint.
7095 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7096 instead.
7097 (check_breakpoints): Adjust. Use release_breakpoint.
7098 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7099 (breakpoint_inserted_here): Ditto.
7100 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7101 Don't trust the breakpoint's shadow if it is not inserted.
7102 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7103 (delete_all_breakpoints): Adjust.
7104 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7105 use delete_breakpoint_1.
7106
7107 * mem-break.h (breakpoints_supported): Delete declaration.
7108 (set_gdb_breakpoint_at): Declare.
7109 (gdb_breakpoint_here): Declare.
7110 (delete_breakpoint_at): Delete.
7111 (delete_gdb_breakpoint_at): Declare.
7112
7113 * server.h (struct raw_breakpoint): Forward declare.
7114 (struct process_info): New field `raw_breakpoints'.
7115
7116 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7117 breakpoints.
7118
6bf5e0ba
PA
71192010-03-24 Pedro Alves <pedro@codesourcery.com>
7120
7121 * linux-low.c (status_pending_p_callback): Fix comment.
7122 (linux_wait_for_event_1): Move most of the internal breakpoint
7123 handling from here...
7124 (linux_wait_1): ... to here.
7125 (count_events_callback): New.
7126 (select_singlestep_lwp_callback): New.
7127 (select_event_lwp_callback): New.
7128 (cancel_breakpoints_callback): New.
7129 (select_event_lwp): New.
7130 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7131 priority to all LWPs that have had events that should be reported
7132 to the client. Cancel breakpoints when about to reporting the
7133 event to the client, not while stopping lwps. No longer cancel
7134 finished single-steps here.
7135 (cancel_finished_single_step): Delete.
7136 (cancel_finished_single_steps): Delete.
7137
414a389f
PA
71382010-03-24 Pedro Alves <pedro@codesourcery.com>
7139
7140 * mem-break.c (enum bkpt_type): New.
7141 (struct breakpoint): New field `type'.
7142 (set_breakpoint_at): Change return type to struct breakpoint
7143 pointer. Set type to `other_breakpoint' by default.
7144 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7145 in the breakpoint list.
7146 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7147 (reinsert_breakpoint): Rename to ...
7148 (reinsert_raw_breakpoint): ... this.
7149 (reinsert_breakpoints_at): Adjust.
7150 * mem-break.h (struct breakpoint): Declare.
7151 (set_breakpoint_at): Change return type to struct breakpoint
7152 pointer.
7153
2280c721
PA
71542010-03-24 Pedro Alves <pedro@codesourcery.com>
7155
7156 * server.c (handle_query): Assign, not compare.
7157
d50171e4
PA
71582010-03-24 Pedro Alves <pedro@codesourcery.com>
7159
7160 Teach linux gdbserver to step-over-breakpoints.
7161
7162 * linux-low.c (can_hardware_single_step): New.
7163 (supports_breakpoints): New.
7164 (handle_extended_wait): If stopping threads, read the stop pc of
7165 the new cloned LWP.
7166 (get_pc): New.
7167 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7168 low target doesn't support retrieving the PC.
7169 (add_lwp): Set last_resume_kind to resume_continue.
7170 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7171 (linux_attach): Don't clear stop_expected. Set the lwp's
7172 last_resume_kind to resume_stop.
7173 (linux_detach_one_lwp): Don't check for removed breakpoints.
7174 (check_removed_breakpoint): Delete.
7175 (status_pending_p): Rename to ...
7176 (status_pending_p_callback): ... this. Don't check for removed
7177 breakpoints. Don't consider threads that are stopped from GDB's
7178 perspective.
7179 (linux_wait_for_lwp): Always read the stop_pc here.
7180 (cancel_breakpoint): New.
7181 (step_over_bkpt): New global.
7182 (linux_wait_for_event_1): Implement stepping over breakpoints.
7183 (gdb_wants_lwp_stopped): New.
7184 (gdb_wants_all_stopped): New.
7185 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7186 single-step traps here. Store the thread's last reported target
7187 wait status.
7188 (send_sigstop): Don't clear stop_expected. Always set it,
7189 instead.
7190 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7191 (cancel_finished_single_step): New.
7192 (cancel_finished_single_steps): New.
7193 (wait_for_sigstop): Don't cancel finished single-step traps here.
7194 (linux_resume_one_lwp): Don't check for removed breakpoints.
7195 Don't set `step' on non-hardware step archs.
7196 (linux_set_resume_request): Ignore resume_stop requests if already
7197 stopping or stopped. Set the lwp's last_resume_kind.
7198 (resume_status_pending_p): Don't check for removed breakpoints.
7199 (need_step_over_p): New.
7200 (start_step_over): New.
7201 (finish_step_over): New.
7202 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7203 requests. Clear the thread's last reported target waitstatus.
7204 Don't use the `suspended' flag. Don't consider pending breakpoints.
7205 (linux_resume): Start a step-over if necessary.
7206 (proceed_one_lwp): New.
7207 (proceed_all_lwps): New.
7208 (unstop_all_lwps): New.
7209 * linux-low.h (struct lwp_info): Rewrite comment for the
7210 `suspended' flag. Add the `stop_pc' field. Delete the
7211 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7212 Add `'last_resume_kind' and `need_step_over' fields.
7213 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7214 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7215 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7216 (set_raw_breakpoint_at): New.
7217 (set_breakpoint_at): Rewrite to use it.
7218 (reinsert_breakpoint_handler): Delete.
7219 (set_reinsert_breakpoint): New.
7220 (reinsert_breakpoint_by_bp): Delete.
7221 (delete_reinsert_breakpoints): New.
7222 (uninsert_breakpoint): Rewrite.
7223 (uninsert_breakpoints_at): New.
7224 (reinsert_breakpoint): Rewrite.
7225 (reinsert_breakpoints_at): New.
7226 (check_breakpoints): Rewrite.
7227 (breakpoint_here): New.
7228 (breakpoint_inserted_here): New.
7229 (check_mem_read): Adjust.
7230 * mem-break.h (breakpoints_supported, breakpoint_here)
7231 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7232 (reinsert_breakpoint_by_bp): Delete declaration.
7233 (delete_reinsert_breakpoints): Declare.
7234 (reinsert_breakpoint): Delete declaration.
7235 (reinsert_breakpoints_at): Declare.
7236 (uninsert_breakpoint): Delete declaration.
7237 (uninsert_breakpoints_at): Declare.
7238 (check_breakpoints): Adjust prototype.
7239 * server.h: Adjust include order.
7240 (struct thread_info): Declare here. Add a `last_status' field.
7241
30ba68cb
MS
72422010-03-23 Michael Snyder <msnyder@vmware.com>
7243
7244 * server.c (crc32): New function.
7245 (handle_query): Add handling for 'qCRC:' request.
7246
b9a881c2
PA
72472010-03-23 Pedro Alves <pedro@codesourcery.com>
7248
7249 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7250 lwp had been stopped by a watchpoint.
7251
e92d13d5
PA
72522010-03-16 Pedro Alves <pedro@codesourcery.com>
7253
7254 * server.h (internal_error): Declare.
7255 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7256 * utils.c (internal_error): New function.
7257
64daa791
AS
72582010-03-15 Andreas Schwab <schwab@redhat.com>
7259
7260 * configure.srv: Fix typo setting srv_regobj.
7261
f52cd8cd
PA
72622010-03-15 Pedro Alves <pedro@codesourcery.com>
7263
7264 * linux-low.c (fetch_register): Avoid passing a non string literal
7265 format to `error'.
7266 (usr_store_inferior_registers): Ditto.
7267
93ae6fdc
PA
72682010-03-14 Pedro Alves <pedro@codesourcery.com>
7269
7270 * linux-low.c (linux_write_memory): Bail out early if peeking
7271 memory failed.
7272
c3adc08c
PA
72732010-03-14 Pedro Alves <pedro@codesourcery.com>
7274
7275 * linux-low.h (struct lwp_info): New fields
7276 `stopped_by_watchpoint' and `stopped_data_address'.
7277 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7278 here, and cache them in the lwp object.
7279 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7280 directly.
7281 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7282 field.
7283 (linux_stopped_by_watchpoint): Rewrite.
7284 (linux_stopped_data_address): Rewrite.
7285
bce522a2
PA
72862010-03-06 Simo Melenius <simo.melenius@iki.fi>
7287
7288 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7289 switching the current inferior, not before.
7290
90884b2b
L
72912010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7292
7293 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7294 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7295 i386-linux.c and amd64-linux.c.
7296 (reg-i386.o): Removed.
7297 (reg-i386.c): Likewise.
7298 (reg-i386-linux.o): Likewise.
7299 (reg-i386-linux.c): Likewise.
7300 (reg-x86-64.o): Likewise.
7301 (reg-x86-64.c): Likewise.
7302 (reg-x86-64-linux.o): Likewise.
7303 (reg-x86-64-linux.c): Likewise.
7304 (i386.o): New.
7305 (i386.c): Likewise.
7306 (i386-linux.o): Likewise.
7307 (i386-linux.c): Likewise.
7308 (amd64.o): Likewise.
7309 (amd64.c): Likewise.
7310 (amd64-linux.o): Likewise.
7311 (amd64-linux.c): Likewise.
7312
7313 * configure.srv (srv_i386_regobj): New.
7314 (srv_i386_linux_regobj): Likewise.
7315 (srv_amd64_regobj): Likewise.
7316 (srv_amd64_linux_regobj): Likewise.
7317 (srv_i386_32bit_xmlfiles): Likewise.
7318 (srv_i386_64bit_xmlfiles): Likewise.
7319 (srv_i386_xmlfiles): Likewise.
7320 (srv_amd64_xmlfiles): Likewise.
7321 (srv_i386_linux_xmlfiles): Likewise.
7322 (srv_amd64_linux_xmlfiles): Likewise.
7323 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7324 srv_xmlfiles to $srv_i386_xmlfiles.
7325 (i[34567]86-*-mingw32ce*): Likewise.
7326 (i[34567]86-*-mingw*): Likewise.
7327 (i[34567]86-*-nto*): Likewise.
7328 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7329 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7330 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7331 (x86_64-*-linux*): Likewise.
7332
7333 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7334 (init_registers_amd64_linux): New.
7335 (x86_arch_setup): Replace init_registers_x86_64_linux with
7336 init_registers_amd64_linux.
7337
193f13e6
MK
73382010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7339
7340 * configure.ac: Check for libdl. If it is not available link against
7341 static libthread_db.
7342 * configure: Regenerate.
7343
85d721b8
PA
73442010-02-22 Pedro Alves <pedro@codesourcery.com>
7345
7346 PR9605
7347
7348 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7349 handing a read watchpoint.
7350 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7351
6076632b
DE
73522010-02-12 Doug Evans <dje@google.com>
7353
7354 * linux-low.c (linux_supports_tracefork_flag): Document.
7355 (linux_look_up_symbols): Add comment.
7356
3327ccf7
L
73572010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7358
7359 * regcache.c (supply_register): Clear regcache if buf is NULL.
7360
0718675c 73612010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7362 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7363
7364 * inferiors.c (find_inferior): Add function documentation.
7365 (unloaded_dll): Handle the case where the unloaded dll has not
7366 been previously registered in the dll list.
7367
177321bd
DJ
73682010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7369
7370 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7371 (thumb2_breakpoint): New.
7372 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7373
2b009048
DJ
73742010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7375
7376 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7377 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7378 breakpoints.
7379
3be029c7
PA
73802010-01-21 Pedro Alves <pedro@codesourcery.com>
7381
7382 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7383
18f5de3b
JK
73842010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7385
7386 * linux-s390-low.c (s390_collect_ptrace_register)
7387 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7388
3743bb4f
DE
73892010-01-21 Doug Evans <dje@google.com>
7390
14ce3065
DE
7391 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7392 (PTRACE_ARG4_TYPE): New macro.
7393 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7394 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7395 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7396 (usr_store_inferior_registers): Ditto.
7397 (linux_read_memory, linux_write_memory): Ditto.
7398 (linux_test_for_tracefork): Ditto.
7399
3743bb4f
DE
7400 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7401 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7402
8b315be5
PA
74032010-01-21 Pedro Alves <pedro@codesourcery.com>
7404
7405 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7406 target.
7407
85492558
PA
74082010-01-21 Pedro Alves <pedro@codesourcery.com>
7409
7410 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7411 prototype to take a regcache. Adjust.
7412
442ea881
PA
74132010-01-20 Pedro Alves <pedro@codesourcery.com>
7414
7415 * regcache.h (struct thread_info): Forward declare.
7416 (struct regcache): New.
7417 (new_register_cache): Adjust prototype.
7418 (get_thread_regcache): Declare.
7419 (free_register_cache): Adjust prototype.
7420 (registers_to_string, registers_from_string): Ditto.
7421 (supply_register, supply_register_by_name, collect_register)
7422 (collect_register_as_string, collect_register_by_name): Ditto.
7423 * regcache.c (struct inferior_regcache_data): Delete.
7424 (get_regcache): Rename to ...
7425 (get_thread_regcache): ... this. Adjust. Switch inferior before
7426 fetching registers.
7427 (regcache_invalidate_one): Adjust.
7428 (regcache_invalidate): Fix prototype.
7429 (new_register_cache): Return the new register cache.
7430 (free_register_cache): Change prototype.
7431 (realloc_register_cache): Adjust.
7432 (registers_to_string): Change prototype to take a regcache. Adjust.
7433 (registers_from_string): Ditto.
7434 (register_data): Ditto.
7435 (supply_register): Ditto.
7436 (supply_register_by_name): Ditto.
7437 (collect_register): Ditto.
7438 (collect_register_as_string): Ditto.
7439 (collect_register_by_name): Ditto.
7440 * server.c (process_serial_event): Adjust.
7441 * linux-low.h (regset_fill_func, regset_store_func): Change
7442 prototype.
7443 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7444 Change prototype.
7445 * linux-low.c (get_stop_pc): Adjust.
7446 (check_removed_breakpoint): Adjust.
7447 (linux_wait_for_event): Adjust.
7448 (linux_resume_one_lwp): Adjust.
7449 (fetch_register): Add regcache parameter. Adjust.
7450 (usr_store_inferior_registers): Ditto.
7451 (regsets_fetch_inferior_registers): Ditto.
7452 (regsets_store_inferior_registers): Ditto.
7453 (linux_fetch_registers, linux_store_registers): Ditto.
7454 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7455 regcache. Adjust.
43aaf8b6
PA
7456 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7457 Ditto.
442ea881
PA
7458 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7459 prototype to take a regcache.
7460 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7461 * remote-utils.c (convert_ascii_to_int, outreg)
7462 (prepare_resume_reply): Change prototype to take a regcache.
7463 Adjust.
7464 * target.h (struct target_ops) <fetch_registers, store_registers>:
7465 Change prototype to take a regcache.
7466 (fetch_inferior_registers, store_inferior_registers): Change
7467 prototype to take a regcache. Adjust.
7468 * proc-service.c (ps_lgetregs): Adjust.
7469 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7470 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7471 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7472 take a regcache. Adjust.
7473 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7474 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7475 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7476 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7477 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7478 (cris_cannot_fetch_register):
7479 (cris_breakpoint_at): Change prototype to take a regcache.
7480 Adjust.
7481 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7482 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7483 to take a regcache. Adjust.
7484 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7485 Adjust.
7486 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7487 take a regcache. Adjust.
7488 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7489 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7490 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7491 * linux-mips-low.c (mips_get_pc):
7492 (mips_set_pc): Change prototype to take a regcache. Adjust.
7493 (mips_reinsert_addr): Adjust.
7494 (mips_collect_register): Change prototype to take a regcache.
7495 Adjust.
7496 (mips_supply_register):
7497 (mips_collect_register_32bit, mips_supply_register_32bit)
7498 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7499 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7500 * linux-ppc-low.c (ppc_supply_ptrace_register)
7501 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7502 (parse_spufs_run): Adjust.
7503 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7504 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7505 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7506 take a regcache. Adjust.
7507 * linux-s390-low.c (s390_collect_ptrace_register)
7508 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7509 (s390_set_pc): Change prototype to take a regcache. Adjust.
7510 (s390_arch_setup): Adjust.
7511 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7512 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7513 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7514 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7515 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7516 regcache. Adjust.
7517 (sparc_breakpoint_at): Adjust.
7518 * linux-xtensa-low.c (xtensa_fill_gregset):
7519 (xtensa_store_gregset):
7520 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7521 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7522 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7523 prototype to take a regcache. Adjust.
7524 * win32-arm-low.c (arm_fetch_inferior_register)
7525 (arm_store_inferior_register): Change prototype to take a
7526 regcache. Adjust.
7527 * win32-i386-low.c (i386_fetch_inferior_register)
7528 (i386_store_inferior_register): Change prototype to take a
7529 regcache. Adjust.
7530 * win32-low.c (child_fetch_inferior_registers)
7531 (child_store_inferior_registers): Change prototype to take a
7532 regcache. Adjust.
7533 (win32_wait): Adjust.
7534 (win32_fetch_inferior_registers): Change prototype to take a
7535 regcache. Adjust.
7536 (win32_store_inferior_registers): Adjust.
7537 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7538 store_inferior_register>: Change prototype to take a regcache.
7539
60c3d7b0
DE
75402010-01-20 Doug Evans <dje@google.com>
7541
7542 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7543 #ifdef.
7544 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7545 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7546
dc146f7c
VP
75472010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7548
7549 * linux-low.c (linux_core_of_thread): New.
7550 (compare_ints, show_process, list_threads): New.
7551 (linux_qxfer_osdata): Report threads and cores.
7552 (linux_target_op): Register linux_core_of_thread.
7553 * remote-utils.c (prepare_resume_reply): Report the core.
7554 (buffer_xml_printf): Support %d specifier.
7555 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7556 New.
7557 (handle_query): Handle qXfer:threads. Announce availability
7558 thereof.
7559 * target.h (struct target_ops): New field core_of_thread.
7560
7803799a
UW
75612010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7562
7563 * Makefile.in (clean): Remove new generated files.
7564 (reg-s390.o, reg-s390.c): Remove rules.
7565 (reg-s390x.o, reg-s390x.c): Likewise.
7566 (s390-linux32.o, s390-linux32.c): Add rules.
7567 (s390-linux64.o, s390-linux64.c): Likewise.
7568 (s390x-linux64.o, s390x-linux64.c): Likewise.
7569 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7570 * linux-s390-low.c: Include <elf.h>.
7571 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7572 (init_registers_s390): Remove prototype.
7573 (init_registers_s390x): Likewise.
7574 (init_registers_s390_linux32): Add prototype.
7575 (init_registers_s390_linux64): Likewise.
7576 (init_registers_s390x_linux64): Likewise.
7577 (s390_num_regs_3264): New define.
7578 (s390_regmap_3264): New global variable.
7579 (s390_cannot_fetch_register): Remove obsolete check.
7580 (s390_cannot_store_register): Likewise.
7581 (s390_collect_ptrace_register): Handle upper/lower register halves.
7582 (s390_supply_ptrace_register): Likewise.
7583 (s390_fill_gregset): Update to register number changes.
7584 (s390_get_hwcap): New routine.
7585 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7586 Install appropriate regmap and register set.
7587
6e7ffa39
JB
75882010-01-01 Joel Brobecker <brobecker@adacore.com>
7589
7590 * server.c (gdbserver_version): Update copyright year to 2010.
7591 * gdbreplay.c (gdbreplay_version): Likewise.
7592
957f3f49
DE
75932009-12-28 Doug Evans <dje@google.com>
7594
7595 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7596 elf/external.h. Include <elf.h> instead but only if necessary.
7597
ca5c370d
PA
75982009-12-28 Pedro Alves <pedro@codesourcery.com>
7599
7600 * linux-low.c (linux_remove_process): Remove `detaching'
7601 parameter. Don't release/detach from thread_db here.
7602 (linux_kill): Release/detach from thread_db here, ...
7603 (linux_detach): ... and here, before actually detaching.
7604 (linux_wait_1): ... and here, when a process exits.
7605 * thread-db.c (any_thread_of): New.
7606 (thread_db_free): Switch the current inferior to a thread of the
7607 passed in process.
7608
4ee62156
DE
76092009-12-21 Doug Evans <dje@google.com>
7610
d90e6a88
DE
7611 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7612
c5f62d5f
DE
7613 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7614 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7615 warning ifndef __NR_tkill. Move setting of errno there too.
7616 Delete unnecessary resetting of errno after syscall.
7617 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7618
10e86dd7
DE
7619 * configure.ac: Check for dladdr.
7620 * config.in: Regenerate.
7621 * configure: Regenerate.
7622 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7623 (try_thread_db_load): Update.
7624
4ee62156
DE
7625 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7626
00f515da
DE
76272009-12-18 Doug Evans <dje@google.com>
7628
e9464885
DE
7629 * event-loop.c: Include unistd.h if it exists.
7630
07d4f67e
DE
7631 * linux-low.c (my_waitpid): Move definition away from being in
7632 between linux_tracefork_child/linux_test_for_tracefork.
7633
00f515da
DE
7634 * gdb_proc_service.h (psaddr_t): Fix type.
7635 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7636 signature to match glibc.
7637
1de1badb
DE
76382009-12-16 Doug Evans <dje@google.com>
7639
7640 * linux-low.c (linux_read_memory): Fix argument to read.
7641
aeeb81d1
PA
76422009-11-26 Pedro Alves <pedro@codesourcery.com>
7643
7644 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7645 events, don't leave current_inferior pointing at null.
7646
10357975
PA
76472009-11-26 Pedro Alves <pedro@codesourcery.com>
7648
7649 * win32-low.c (LOG): Delete.
7650 (OUTMSG): Output to stderr.
7651 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7652 on compile time LOG macro.
7653 (win32_wait): Fix debug output.
7654
cf6e3471
PA
76552009-11-26 Pedro Alves <pedro@codesourcery.com>
7656
7657 * win32-low.c (win32_add_one_solib): If the dll name is
7658 "ntdll.dll", prepend the system directory to the dll path.
7659
0c85e18e
MK
76602009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7661
7662 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7663
9ac544ce 76642009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7665 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7666
7667 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7668 * configure.ac: Check for __mcoldfire__ and set
7669 gdb_cv_m68k_is_coldfire.
7670 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7671 reg-cf.o and reg-m68k.o.
7672 * configure: Regenerated.
7673
fd7dd3e6
PA
76742009-11-16 Pedro Alves <pedro@codesourcery.com>
7675
7676 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7677 Pass it to thread_db_free.
7678 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7679 proper `detaching' argument to linux_remove_process.
7680 * linux-low.h (thread_db_free): Add `detaching' parameter.
7681 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7682 to thread_db_free.
7683 (thread_db_free): Add `detaching' parameter. Only
7684 call td_ta_clear_event if detaching from process.
7685
75aa492e
MK
76862009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7687
7688 * thread-db.c (thread_db_free): Fix typo.
7689
21e1bee4
PP
76902009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7691
7692 PR gdb/10838
7693 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7694
8838b45e
NS
76952009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7696
7697 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7698 with an i686 compiler.
7699 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7700 needed.
7701 * configure: Rebuilt.
7702
8a35fb51
SL
77032009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7704
7705 PR gdb/10783
7706
7707 * server.c (handle_search_memory_1): Correct read_addr initialization
7708 in loop for searching subsequent chunks.
7709
96f15937
PP
77102009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7711
7712 * configure.ac: New --with-libthread-db option.
7713 * thread-db.c: Allow direct dependence on libthread_db.
7714 (thread_db_free): Adjust.
7715 * config.in: Regenerate.
7716 * configure: Likewise.
889bf7c5 7717
5f7d1694
PP
77182009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7719
7720 PR gdb/10757
7721 * thread-db.c (attach_thread): New function.
7722 (maybe_attach_thread): Return success/failure.
7723 (find_new_threads_callback): Adjust.
889bf7c5
PA
7724 (thread_db_find_new_threads): Loop until no new threads.
7725
88e3b899
PA
77262009-10-13 Pedro Alves <pedro@codesourcery.com>
7727
7728 * proc-service.c (ps_lgetregs): Formatting.
7729
cdbfd419
PP
77302009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7731
7732 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7733 * configure.ac: Adjust.
7734 * linux-low.h (struct process_info_private): Move members to struct
7735 thread_db.
7736 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7737 * linux-low.c (linux_remove_process): Adjust.
7738 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7739 * server.c (handle_query): Move code ...
7740 (handle_monitor_command): ... here. New function.
7741 * target.h (struct target_ops): New member.
7742 * thread-db.c (struct thread_db): New.
7743 (libthread_db_search_path): New variable.
7744 (thread_db_create_event, thread_db_enable_reporting)
7745 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7746 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7747 (try_thread_db_load_1, dladdr_to_soname): New functions.
7748 (try_thread_db_load, thread_db_load_search): New functions.
7749 (thread_db_init): Search for libthread_db.
7750 (thread_db_free): New function.
7751 (thread_db_handle_monitor_command): Likewise.
7752 * config.in: Regenerate.
7753 * configure: Regenerate.
889bf7c5 7754
4168d2d6
UW
77552009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7756
7757 * spu-low.c (spu_kill): Wait for inferior to terminate.
7758 Call clear_inferiors.
7759 (spu_detach): Call clear_inferiors.
7760
81ecdfbb
RW
77612009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7762
7763 * aclocal.m4: Regenerate.
7764 * config.in: Likewise.
7765 * configure: Likewise.
7766
0b9ff2c0
UW
77672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7768
7769 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7770 (parse_spufs_run): New function.
7771 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7772 (ppc_breakpoint_at): Handle SPU breakpoints.
7773
efcbbd14
UW
77742009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7775
7776 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7777 (SPUFS_MAGIC): Define.
7778 (spu_enumerate_spu_ids): New function.
7779 (linux_qxfer_spu): New function.
7780 (linux_target_ops): Install linux_qxfer_spu.
7781
f4d9bade
UW
77822009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7783
7784 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7785 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7786 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7787 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7788 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7789 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7790 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7791 (init_registers_powerpc_cell32l): Add prototype.
7792 (init_registers_powerpc_cell64l): Likewise.
7793 (ppc_arch_setup): Detect Cell/B.E. architecture.
7794
96e946ca
RW
77952009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7796
7797 * Makefile.in (datarootdir): New variable.
7798
58d6951d
DJ
77992009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7800
7801 * linux-low.c (linux_write_memory): Update debugging output.
7802 * Makefile.in (clean): Add new descriptions.
7803 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7804 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7805 * configure.srv: Add new files for arm*-*-linux*.
7806 * linux-arm-low.c: Add new declarations.
7807 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7808 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7809 (HWCAP_VFPv3D16): New.
7810 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7811 instead of __IWMMXT__.
7812 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7813 (arm_arch_setup): New.
7814 (target_regsets): Remove #ifdef. Add VFP regset.
7815 (the_low_target): Use arm_arch_setup.
7816
12b42a12
DJ
78172009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7818
7819 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7820 the main thread again.
7821
ac8c974e
AR
78222009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7823
7824 Adding Neutrino gdbserver.
7825 * configure: Regenerated.
7826 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7827 * configure.srv (i[34567]86-*-nto*): New target.
7828 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7829 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7830 (nto_comctrl) [__QNX__]: New function.
7831 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7832
4424e0c3 78332009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7834
7835 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7836 srv_tgtobj.
7837
912cf4ba
PA
78382009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7839 Pedro Alves <pedro@codesourcery.com>
7840
7841 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7842 don't support CONTEXT_EXTENDED_REGISTERS.
7843 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7844 (the_low_target): Install them.
7845 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7846 failing with ERROR_PIPE_NOT_CONNECTED.
7847
aa5ca48f
DE
78482009-06-30 Doug Evans <dje@google.com>
7849 Pierre Muller <muller@ics.u-strasbg.fr>
7850
7851 Add h/w watchpoint support to x86-linux, win32-i386.
7852 * Makefile.in (SFILES): Add i386-low.c
7853 (i386_low_h): Define.
7854 (i386-low.o): Add dependencies.
7855 (linux-x86-low.o): Add i386-low.h dependency.
7856 (win32-i386-low.o): Ditto.
7857 * i386-low.c: New file.
7858 * i386-low.h: New file.
7859 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7860 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7861 * linux-low.c (linux_add_process): Initialize arch_private.
7862 (linux_remove_process): Free arch_private.
7863 (add_lwp): Initialize arch_private.
7864 (delete_lwp): Free arch_private.
7865 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7866 provided.
7867 * linux-low.h (process_info_private): New member arch_private.
7868 (lwp_info): New member arch_private.
7869 (linux_target_ops): New members new_process, new_thread,
7870 prepare_to_resume.
7871 (ptid_of): New macro.
7872 * linux-x86-low.c: Include stddef.h, i386-low.h.
7873 (arch_process_info): New struct.
7874 (arch_lwp_info): New struct.
7875 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7876 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7877 (i386_dr_low_get_status): New function.
7878 (x86_insert_point, x86_remove_point): New functions.
7879 (x86_stopped_by_watchpoint): New function.
7880 (x86_stopped_data_address): New function.
7881 (x86_linux_new_process, x86_linux_new_thread): New functions.
7882 (x86_linux_prepare_to_resume): New function.
7883 (the_low_target): Add entries for insert_point, remove_point,
7884 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7885 prepare_to_resume.
7886 * server.c (debug_hw_points): New global.
7887 (monitor_show_help): Document set debug-hw-points.
7888 (handle_query): Process "set debug-hw-points".
7889 * server.h (debug_hw_points): Declare.
7890 (paddress): Declare.
7891 * utils.c (NUMCELLS, CELLSIZE): New macros.
7892 (get_sell, xsnprintf, paddress): New functions.
7893 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7894 remove_point, stopped_by_watchpoint, stopped_data_address.
7895 * win32-i386-low.c: Include i386-low.h.
7896 (debug_reg_state): Replaces dr.
7897 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7898 (i386_dr_low_get_status): New function.
7899 (i386_insert_point, i386_remove_point): New functions.
7900 (i386_stopped_by_watchpoint): New function.
7901 (i386_stopped_data_address): New function.
7902 (i386_initial_stuff): Update.
7903 (get_thread_context,set_thread_context,i386_thread_added): Update.
7904 (the_low_target): Add entries for insert_point,
7905 remove_point, stopped_by_watchpoint, stopped_data_address.
7906 * win32-low.c (win32_insert_watchpoint): New function.
7907 (win32_remove_watchpoint): New function.
7908 (win32_stopped_by_watchpoint): New function.
7909 (win32_stopped_data_address): New function.
7910 (win32_target_ops): Add entries for insert_watchpoint,
7911 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7912 * win32-low.h (win32_target_ops): New members insert_point,
7913 remove_point, stopped_by_watchpoint, stopped_data_address.
7914
d993e290
PA
79152009-06-25 Pedro Alves <pedro@codesourcery.com>
7916
7917 * server.c (process_serial_event): Re-return unsupported, not
7918 error, if the type isn't recognized. Re-allow supporting only
7919 insert or remove packets. Also call require_running for
7920 breakpoints. Add missing break statement to default case. Tidy.
7921 * target.h (struct target_ops): Rename insert_watchpoint to
7922 insert_point, and remove_watchpoint to remove_point.
7923
7924 * linux-low.h (struct linux_target_ops): Likewise.
7925 * linux-low.c (linux_insert_watchpoint): Rename to ...
7926 (linux_insert_point): ... this. Adjust.
7927 (linux_remove_watchpoint): Rename to ...
7928 (linux_remove_point): ... this. Adjust.
7929 (linux_target_ops): Adjust.
7930 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7931 (cris_insert_point): ... this.
7932 (cris_remove_watchpoint): Rename to ...
7933 (cris_remove_point): ... this.
7934 (the_low_target): Adjust.
7935
0f54c268
PM
79362009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7937
7938 * server.c (handle_v_kill): Pass signal_pid to
7939 kill_inferior if multi_process is zero.
7940
c6314022
AR
79412009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7942
7943 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7944 * target.h (target_ops): Comment for *_watchpoint to make it clear
7945 the functions can get types '0' and '1'.
7946
4463ce24
AR
79472009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7948
7949 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7950 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7951 * regcache.c (get_regcache): Likewise.
7952 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7953 * win32-low.c (child_fetch_inferior_registers): Remove check for
7954 regno 0.
7955
cf8fd78b
PA
79562009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7957 Pedro Alves <pedro@codesourcery.com>
7958
7959 * target.h (struct target_ops) <supports_multi_process>: New
7960 callback.
7961 (target_supports_multi_process): New.
7962 * server.c (handle_query): Even if GDB reports support, only
7963 enable multi-process if the target also supports it. Report
7964 multi-process support only if the target backend supports it.
7965 * linux-low.c (linux_supports_multi_process): New function.
7966 (linux_target_ops): Install it as target_supports_multi_process
7967 callback.
7968
47c0c975
DE
79692009-05-24 Doug Evans <dje@google.com>
7970
e09875d4
DE
7971 Global renaming of find_thread_pid to find_thread_ptid.
7972 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7973 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7974 All callers updated.
7975
e27d73f6
DE
7976 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7977 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7978 directly.
7979
47c0c975
DE
7980 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7981 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7982 (linux_resume_one_lwp): Ditto.
7983
2acc282a
DE
79842009-05-23 Doug Evans <dje@google.com>
7985
7986 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7987 from struct inferior_list_entry * to struct lwp_info *.
7988 All callers updated.
7989
9f1036c1
DE
79902009-05-13 Doug Evans <dje@google.com>
7991
7992 * linux-x86-low.c: Don't include assert.h.
7993 (x86_siginfo_fixup): Use fatal, not assert.
7994 (x86_arch_setup): Fix comment.
7995
d0722149
DE
79962009-05-12 Doug Evans <dje@google.com>
7997
7998 Biarch support for i386/amd64 gdbserver.
7999 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8000 Add linux-x86-low.c.
8001 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8002 (linux-x86-low.o): Add.
8003 * linux-x86-64-low.c: Delete.
8004 * linux-i386-low.c: Delete.
8005 * linux-x86-low.c: New file.
8006 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8007 linux-x86-low.o.
8008 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8009 linux-x86-low.o.
8010 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8011 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8012 (linux_child_pid_to_exec_file): New function.
8013 (elf_64_header_p, elf_64_file_p): New functions.
8014 (siginfo_fixup): New function.
8015 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8016 give target a chance to convert layout.
8017 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8018 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8019
fdeb2a12
DE
80202009-05-07 Doug Evans <dje@google.com>
8021
8022 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8023 (regsets_store_inferior_registers): Ditto.
8024
a6dbe5df
PA
80252009-05-06 Pedro Alves <pedro@codesourcery.com>
8026
8027 PR server/10048
8028
8029 * linux-low.c (must_set_ptrace_flags): Delete.
8030 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8031 of the global.
8032 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8033 `lwp->must_set_ptrace_flags' instead.
ba42693b 8034 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8035 (linux_wait_1): ... not here.
8036
5091eb23
DE
80372009-04-30 Doug Evans <dje@google.com>
8038
9f767825
DE
8039 * inferiors.c (started_inferior_callback): New function.
8040 (attached_inferior_callback): New function.
8041 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8042 * server.c (print_started_pid, print_attached_pid): New functions.
8043 (detach_or_kill_for_exit): New function.
8044 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8045 * server.h (have_started_inferiors_p): Declare.
8046 (have_attached_inferiors_p): Declare.
8047
5091eb23
DE
8048 * inferiors.c (remove_process): Fix memory leak, free process.
8049 * linux-low.c (linux_remove_process): New function.
8050 (linux_kill): Call it instead of remove_process.
8051 (linux_detach, linux_wait_1): Ditto.
8052
155c8968
PA
80532009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8054
8055 * configure.srv: Add x86 Windows CE target.
8056
7fe519cb
UW
80572009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8058
8059 * inferiors.c (get_thread_process): Make global.
8060 * server.h (get_thread_process): Add prototype.
8061 * thread-db.c (find_one_thread): Use get_thread_process
8062 instead of current_process.
8063 (thread_db_get_tls_address): Do not crash if called when
8064 thread layer is not yet initialized.
8065
5472f405
UW
80662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8067
8068 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8069 * spu-low.c (current_tid): Rename to ...
8070 (current_ptid): ... this.
8071 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8072 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8073 ptid_get_lwp (current_ptid) instead of current_tid.
8074 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8075 instead of current_tid. Use find_process_pid to verify pid
8076 argument is valid. Pass proper argument to remove_process.
8077 (spu_thread_alive): Compare current_ptid instead of current_tid.
8078 (spu_resume): Likewise.
8079
55ac2b99
PA
80802009-04-02 Pedro Alves <pedro@codesourcery.com>
8081
8082 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8083 variable.
8084
95954743
PA
80852009-04-01 Pedro Alves <pedro@codesourcery.com>
8086
8087 Implement the multiprocess extensions, and add linux multiprocess
8088 support.
8089
8090 * server.h (ULONGEST): Declare.
8091 (struct ptid, ptid_t): New.
8092 (minus_one_ptid, null_ptid): Declare.
8093 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8094 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8095 (struct inferior_list_entry): Change `id' type from unsigned from
8096 to ptid_t.
8097 (struct sym_cache, struct breakpoint, struct
8098 process_info_private): Forward declare.
8099 (struct process_info): Declare.
8100 (current_process): Declare.
8101 (all_processes): Declare.
8102 (initialize_inferiors): Declare.
8103 (add_thread): Adjust to use ptid_t.
8104 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8105 (add_process, remove_process, find_thread_pid): Declare.
8106 (find_inferior_id): Adjust to use ptid_t.
8107 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8108 (multi_process): Declare.
8109 (push_event): Adjust to use ptid_t.
8110 (read_ptid, write_ptid): Declare.
8111 (prepare_resume_reply): Adjust to use ptid_t.
8112 (clear_symbol_cache): Declare.
8113 * inferiors.c (all_processes): New.
8114 (null_ptid, minus_one_ptid): New.
8115 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8116 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8117 (add_thread): Change unsigned long to ptid. Remove gdb_id
8118 parameter. Adjust.
8119 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8120 (gdb_id_to_thread): Rename to ...
8121 (find_thread_pid): ... this. Change unsigned long to ptid.
8122 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8123 (loaded_dll, pull_pid_from_list): Adjust.
8124 (add_process, remove_process, find_process_pid)
8125 (get_thread_process, current_process, initialize_inferiors): New.
8126 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8127 (struct target_waitstatus) <related_pid>: Ditto.
8128 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8129 return type to int.
8130 (struct target_ops) <join>: Add `pid' argument.
8131 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8132 (struct target_ops) <wait>: Add `ptid' field. Change return type
8133 to ptid.
8134 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8135 (mywait): Add `ptid' argument. Change return type to ptid_t.
8136 (target_pid_to_str): Declare.
8137 * target.c (set_desired_inferior): Adjust to use ptids.
8138 (mywait): Add new `ptid' argument. Adjust.
8139 (target_pid_to_str): New.
8140 * mem-break.h (free_all_breakpoints): Declare.
8141 * mem-break.c (breakpoints): Delelete.
8142 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8143 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8144 to use per-process breakpoint list.
8145 (free_all_breakpoints): New.
8146 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8147 (symbol_cache, all_symbols_looked_up): Delete.
8148 (hexchars): New.
8149 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8150 read_ptid): New.
8151 (prepare_resume_reply): Change ptid argument's type from unsigned
8152 long to ptid_t. Adjust. Implement W;process and X;process.
8153 (free_sym_cache, clear_symbol_cache): New.
8154 (look_up_one_symbol): Adjust to per-process symbol cache. *
8155 * server.c (cont_thread, general_thread, step_thread): Change type
8156 to ptid_t.
8157 (attached): Delete.
8158 (multi_process): New.
8159 (last_ptid): Change type to ptid_t.
8160 (struct vstop_notif) <ptid>: Change type to ptid_t.
8161 (queue_stop_reply, push_event): Change `ptid' argument's type to
8162 ptid_t.
8163 (discard_queued_stop_replies): Add `pid' argument.
8164 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8165 changes. Don't reference the `attached' global.
8166 (attach_inferior): Adjust to mywait interface changes.
8167 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8168 features. Handle and report "multiprocess+". Handle
8169 "qAttached:PID".
8170 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8171 changes.
8172 (handle_v_kill): New.
8173 (handle_v_stopped): Adjust to use target_pid_to_str.
8174 (handle_v_requests): Allow multiple attaches and runs when
8175 multiprocess extensions are in effect. Handle "vKill".
8176 (myresume): Adjust to use ptids.
8177 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8178 (handle_status): Adjust to discard_queued_stop_replies interface
8179 change.
8180 (first_thread_of, kill_inferior_callback)
8181 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8182 (main): Call initialize_inferiors. Adjust to use ptids, killing
8183 and detaching from all inferiors. Handle multiprocess packet
8184 variants.
8185 * linux-low.h: Include gdb_proc_service.h.
8186 (struct process_info_private): New.
8187 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8188 <lwpid_of>: Use ptid_get_lwp.
8189 (get_lwp_thread): Adjust.
8190 (struct lwp_info): Add `dead' member.
8191 (find_lwp_pid): Declare.
8192 * linux-low.c (thread_db_active): Delete.
8193 (new_inferior): Adjust comment.
8194 (inferior_pid): Delete.
8195 (linux_add_process): New.
8196 (handle_extended_wait): Adjust.
8197 (add_lwp): Change unsigned long to ptid.
8198 (linux_create_inferior): Add process to processes table. Adjust
8199 to use ptids. Don't set new_inferior here.
8200 (linux_attach_lwp): Rename to ...
8201 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8202 it. Adjust to use ptids.
8203 (linux_attach_lwp): New.
8204 (linux_attach): Add process to processes table. Don't set
8205 new_inferior here.
8206 (struct counter): New.
8207 (second_thread_of_pid_p, last_thread_of_process_p): New.
8208 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8209 multiple processes.
8210 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8211 processes. Remove process from process table.
8212 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8213 to multiple processes.
8214 (any_thread_of): New.
8215 (linux_detach): Add `pid' argument, and handle it. Remove process
8216 from processes table.
8217 (linux_join): Add `pid' argument. Handle it.
8218 (linux_thread_alive): Change unsighed long argument to ptid_t.
8219 Consider dead lwps as not being alive.
8220 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8221 threads we're not interested in.
8222 (same_lwp, find_lwp_pid): New.
8223 (linux_wait_for_lwp): Change `pid' argument's type from int to
8224 ptid_t. Adjust.
8225 (linux_wait_for_event): Rename to ...
8226 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8227 from int to ptid_t. Adjust.
8228 (linux_wait_for_event): New.
8229 (linux_wait_1): Add `ptid' argument. Change return type to
8230 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8231 that exit from the process table.
8232 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8233 Adjust.
8234 (mark_lwp_dead): New.
8235 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8236 stopping all threads, mark its main lwp as dead.
8237 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8238 ptids.
8239 (fetch_register, usr_store_inferior_registers)
8240 (regsets_fetch_inferior_registers)
8241 (regsets_store_inferior_registers, linux_read_memory)
8242 (linux_write_memory): Inline `inferior_pid'.
8243 (linux_look_up_symbols): Adjust to use per-process
8244 `thread_db_active'.
8245 (linux_request_interrupt): Adjust to use ptids.
8246 (linux_read_auxv): Inline `inferior_pid'.
8247 (initialize_low): Don't reference thread_db_active.
8248 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8249 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8250 (ps_getpid): Return the pid of the current inferior.
8251 * thread-db.c (proc_handle, thread_agent): Delete.
8252 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8253 per-process data.
8254 (find_one_thread): Change argument type to ptid_t. Adjust to
8255 per-process data.
8256 (maybe_attach_thread): Adjust to per-process data and ptids.
8257 (thread_db_find_new_threads): Ditto.
8258 (thread_db_init): Ditto.
8259 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8260 processes table. Adjust to use ptids.
8261 (spu_kill, spu_detach): Adjust interface. Remove process from
8262 processes table.
8263 (spu_join, spu_thread_alive): Adjust interface.
8264 (spu_wait): Adjust interface. Remove process from processes
8265 table. Adjust to use ptids.
8266 * win32-low.c (current_inferior_tid): Delete.
8267 (current_inferior_ptid): New.
8268 (debug_event_ptid): New.
8269 (thread_rec): Take a ptid. Adjust.
8270 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8271 (child_delete_thread): Ditto.
8272 (do_initial_child_stuff): Add `attached' argument. Add process to
8273 processes table.
8274 (child_fetch_inferior_registers, child_store_inferior_registers):
8275 Adjust.
8276 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8277 (win32_attach): Pass 1 to do_initial_child_stuff.
8278 (win32_kill): Adjust interface. Remove process from processes
8279 table.
8280 (win32_detach): Ditto.
8281 (win32_join): Adjust interface.
8282 (win32_thread_alive): Take a ptid.
8283 (win32_resume): Adjust to use ptids.
8284 (get_child_debug_event): Ditto.
8285 (win32_wait): Adjust interface. Remove exiting process from
8286 processes table.
8287
bd99dc85
PA
82882009-04-01 Pedro Alves <pedro@codesourcery.com>
8289
8290 Non-stop mode support.
8291
8292 * server.h (non_stop): Declare.
8293 (gdb_client_data, handler_func): Declare.
8294 (delete_file_handler, add_file_handler, start_event_loop):
8295 Declare.
8296 (handle_serial_event, handle_target_event, push_event)
8297 (putpkt_notif): Declare.
8298 * target.h (enum resume_kind): New.
8299 (struct thread_resume): Replace `step' field by `kind' field.
8300 (TARGET_WNOHANG): Define.
8301 (struct target_ops) <wait>: Add `options' argument.
8302 <supports_non_stop, async, start_non_stop>: New fields.
8303 (target_supports_non_stop, target_async): New.
8304 (start_non_stop): Declare.
8305 (mywait): Add `options' argument.
8306 * target.c (mywait): Add `options' argument. Print child exit
8307 notifications here.
8308 (start_non_stop): New.
8309 * server.c (non_stop, own_buf, mem_buf): New globals.
8310 (struct vstop_notif): New.
8311 (notif_queue): New global.
8312 (queue_stop_reply, push_event, discard_queued_stop_replies)
8313 (send_next_stop_reply): New.
8314 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8315 interface changes.
8316 (attach_inferior): In non-stop mode, don't wait for the target
8317 here.
8318 (handle_general_set): Handle QNonStop.
8319 (handle_query): When handling qC, return the current general
8320 thread, instead of the first thread of the list.
8321 (handle_query): If the backend supports non-stop mode, include
8322 QNonStop+ in the qSupported query response.
8323 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8324 and non-stop mode.
8325 (handle_v_attach, handle_v_run): Handle non-stop mode.
8326 (handle_v_stopped): New.
8327 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8328 (myresume): Adjust to use resume_kind. Handle non-stop.
8329 (queue_stop_reply_callback): New.
8330 (handle_status): Handle non-stop mode.
8331 (main): Clear non_stop flag on reconnection. Use the event-loop.
8332 Refactor serial protocol handling from here ...
8333 (process_serial_event): ... to this new function. When GDB
8334 selects any thread, select one here. In non-stop mode, wait until
8335 GDB acks all pending events before exiting.
8336 (handle_serial_event, handle_target_event): New.
8337 * remote-utils.c (remote_open): Install remote_desc in the event
8338 loop.
8339 (remote_close): Remove remote_desc from the event loop.
8340 (putpkt_binary): Rename to...
8341 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8342 (putpkt_binary): New as wrapper around putpkt_binary_1.
8343 (putpkt_notif): New.
8344 (prepare_resume_reply): In non-stop mode, don't change the
8345 general_thread.
8346 * event-loop.c: New.
8347 * Makefile.in (OBJ): Add event-loop.o.
8348 (event-loop.o): New rule.
8349
8350 * linux-low.h (pid_of): Moved here.
8351 (lwpid_of): New.
8352 (get_lwp_thread): Use lwpid_of.
8353 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8354 * linux-low.c (pid_of): Delete.
8355 (inferior_pid): Use lwpid_of.
8356 (linux_event_pipe): New.
8357 (target_is_async_p): New.
8358 (delete_lwp): New.
8359 (handle_extended_wait): Use lwpid_of.
8360 (add_lwp): Don't set lwpid field.
8361 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8362 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8363 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8364 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8365 first. Adjust to linux_wait_for_event interface changes. Use
8366 lwpid_of.
8367 (linux_detach): Don't delete the main lwp here.
8368 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8369 (status_pending_p): Don't consider explicitly suspended lwps.
8370 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8371 pointer. Add OPTIONS argument. Change return type to int. Use
8372 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8373 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8374 pointer. Add status pointer argument. Return a pid instead of a
8375 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8376 changes. In non-stop mode, don't switch to a random thread.
8377 (linux_wait): Rename to...
8378 (linux_wait_1): ... this. Add target_options argument, and handle
8379 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8380 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8381 clean exit and signal exit code. Don't stop all threads in
8382 non-stop mode. In all-stop mode, only stop all threads when
8383 reporting a stop to GDB. Handle explicit thread stop requests.
8384 (async_file_flush, async_file_mark): New.
8385 (linux_wait): New.
8386 (send_sigstop): Use lwpid_of.
8387 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8388 interface changes. In non-stop mode, don't switch to a random
8389 thread.
8390 (linux_resume_one_lwp): Use lwpid_of.
8391 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8392 (linux_resume_one_thread): ... this. Handle resume_stop. In
8393 non-stop mode, don't look for pending flag in all threads.
8394 (resume_status_pending_p): Don't consider explicitly suspended
8395 threads.
8396 (my_waitpid): Reimplement. Emulate __WALL.
8397 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8398 Use lwpid_of.
8399 (sigchld_handler, linux_supports_non_stop, linux_async)
8400 (linux_start_non_stop): New.
8401 (linux_target_ops): Register linux_supports_non_stop, linux_async
8402 and linux_start_non_stop.
8403 (initialize_low): Install SIGCHLD handler.
8404 * thread-db.c (thread_db_create_event, find_one_thread)
8405 (thread_db_get_tls_address): Use lwpid_of.
8406 * win32-low.c (win32_detach): Adjust to use resume_kind.
8407 (win32_wait): Add `options' argument.
8408 * spu-low.c (spu_resume): Adjust to use resume_kind.
8409 (spu_wait): Add `options' argument.
8410
5b1c542e
PA
84112009-04-01 Pedro Alves <pedro@codesourcery.com>
8412
8413 Decouple target code from remote protocol.
8414
8415 * target.h (enum target_waitkind): New.
8416 (struct target_waitstatus): New.
8417 (struct target_ops) <wait>: Return an unsigned long. Take a
8418 target_waitstatus pointer instead of a char pointer.
8419 (mywait): Likewise.
8420 * target.c (mywait): Change prototype to return an unsigned long.
8421 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8422 * server.h (thread_from_wait, old_thread_from_wait): Delete
8423 declarations.
8424 (prepare_resume_reply): Change prototype to take a
8425 target_waitstatus.
8426 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8427 (last_status, last_ptid): New.
8428 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8429 pid instead of a signal.
8430 (attach_inferior): Remove "status" and "signal" parameters.
8431 Adjust.
8432 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8433 not as an address.
8434 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8435 (handle_v_requests, myresume): Remove "status" and "signal"
8436 parameters. Adjust.
8437 (handle_status): New.
8438 (main): Delete local `status'. Adjust.
8439 * remote-utils.c: Include target.h.
8440 (prepare_resume_reply): Change prototype to take a
8441 target_waitstatus. Adjust.
8442
8443 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8444 interface.
8445 * spu-low.c (spu_wait): Adjust.
8446 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8447 Delete.
8448 (win32_wait): Adjust.
8449
2bd7c093
PA
84502009-04-01 Pedro Alves <pedro@codesourcery.com>
8451
8452 * target.h (struct thread_resume): Delete leave_stopped member.
8453 (struct target_ops): Add a `n' argument to the `resume' callback.
8454 * server.c (start_inferior): Adjust.
8455 (handle_v_cont, myresume): Adjust.
8456 * linux-low.c (check_removed_breakpoint): Adjust to resume
8457 interface change, and to removed leave_stopped field.
8458 (resume_ptr): Delete.
8459 (struct thread_resume_array): New.
8460 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8461 resume interface change.
8462 (linux_continue_one_thread, linux_queue_one_thread)
8463 (resume_status_pending_p): Check if the resume field is NULL
8464 instead of checking the leave_stopped member.
8465 (linux_resume): Adjust to the target resume interface change.
8466 * spu-low.c (spu_resume): Adjust to the target resume interface
8467 change.
8468 * win32-low.c (win32_detach, win32_resume): Ditto.
8469
c35fafde
PA
84702009-04-01 Pedro Alves <pedro@codesourcery.com>
8471
8472 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8473 flag.
8474 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8475 pending.
8476 (linux_continue_one_thread): Only preserve the stepping flag if
8477 there's a pending breakpoint.
8478
0a59d50b
PA
84792009-03-31 Pedro Alves <pedro@codesourcery.com>
8480
8481 * server.c (main): After the inferior having exited, call
8482 remote_close before exiting gdbserver.
8483
f04c6d38
TJB
84842009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8485
8486 Fix size of FPSCR in Power 7 processors.
8487 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8488 (PPC_FEATURE_HAS_DFP): New #define.
8489 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8490 size of the FPSCR.
8491
78e5cee6
PA
84922009-03-23 Pedro Alves <pedro@codesourcery.com>
8493
8494 * server.c (handle_query) Whitespace and formatting.
8495
1b3f6016
PA
84962009-03-22 Pedro Alves <pedro@codesourcery.com>
8497
8498 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8499 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8500 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8501 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8502 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8503 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8504 Makefile.in, configure.ac: Fix whitespace throughout.
8505 * configure: Regenerate.
8506
a07b2135
PA
85072009-03-22 Pedro Alves <pedro@codesourcery.com>
8508
8509 * inferiors.c (find_inferior): Make it safe for the callback
8510 function to delete the currently iterated inferior.
8511
67cc2626
PA
85122009-03-22 Pedro Alves <pedro@codesourcery.com>
8513
8514 * Makefile.in (linuw_low_h): Move higher.
8515 (thread-db.o): Depend on $(linux_low_h).
8516
54a0b537
PA
85172009-03-17 Pedro Alves <pedro@codesourcery.com>
8518
8519 Rename "process" to "lwp" throughout.
8520
8521 * linux-low.c (all_processes): Rename to...
8522 (all_lwps): ... this.
8523 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8524 (add_process): Rename to ...
8525 (add_lwp): ... this. Adjust.
8526 (linux_create_inferior): Adjust.
8527 (linux_attach_lwp): Adjust.
8528 (linux_attach): Adjust.
8529 (linux_kill_one_process): Rename to ...
8530 (linux_kill_one_lwp): ... this. Adjust.
8531 (linux_kill): Adjust.
8532 (linux_detach_one_process): Rename to ...
8533 (linux_detach_one_lwp): ... this. Adjust.
8534 (linux_detach): Adjust.
8535 (check_removed_breakpoint): Adjust.
8536 (status_pending_p): Adjust.
8537 (linux_wait_for_process): Rename to ...
8538 (linux_wait_for_lwp): ... this. Adjust.
8539 (linux_wait_for_event): Adjust.
8540 (send_sigstop): Adjust.
8541 (wait_for_sigstop): Adjust.
8542 (stop_all_processes): Rename to ...
8543 (stop_all_lwps): ... this.
8544 (linux_resume_one_process): Rename to ...
8545 (linux_resume_one_lwp): ... this. Adjust.
8546 (linux_set_resume_request, linux_continue_one_thread)
8547 (linux_queue_one_thread, resume_status_pending_p)
8548 (usr_store_inferior_registers, regsets_store_inferior_registers)
8549 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8550 Adjust.
8551 * linux-low.h (get_process): Rename to ...
8552 (get_lwp): ... this. Adjust.
8553 (get_thread_process): Rename to ...
8554 (get_thread_lwp): ... this. Adjust.
8555 (get_process_thread): Rename to ...
8556 (get_lwp_thread): ... this. Adjust.
8557 (struct process_info): Rename to ...
8558 (struct lwp_info): ... this.
8559 (all_processes): Rename to ...
8560 (all_lwps): ... this.
8561 * proc-service.c (ps_lgetregs): Adjust.
8562 * thread-db.c (thread_db_create_event, find_one_thread)
8563 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8564
0b16c5cf
PA
85652009-03-14 Pedro Alves <pedro@codesourcery.com>
8566
8567 * server.c (handle_query): Handle "qAttached".
8568
32de4b9d
NS
85692009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8570
8571 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8572 GPLv3, update license URL.
8573
2aecd87f
DE
85742009-03-01 Doug Evans <dje@google.com>
8575
93efd302 8576 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8577 (server_h): Add gdb_signals.h.
8578 (signals.o): Update.
8579 * server.h (target_signal_from_host,target_signal_to_host_p)
8580 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8581
86b1f9c5
PM
85822009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8583
8584 * remote-utils.c (getpkt): Also generate remote-debug
8585 information if noack_mode is set.
8586
4aa995e1
PA
85872009-02-06 Pedro Alves <pedro@codesourcery.com>
8588
8589 * server.c (handle_query): Report qXfer:siginfo:read and
8590 qXfer:siginfo:write as supported and handle them.
8591 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8592 * linux-low.c (linux_xfer_siginfo): New.
8593 (linux_target_ops): Set it.
8594
62709adf
PA
85952009-01-26 Pedro Alves <pedro@codesourcery.com>
8596
8597 * server.c (gdbserver_usage): Mention --remote-debug.
8598 (main): Accept '--remote-debug' switch.
8599
aef93bd7
DE
86002009-01-18 Doug Evans <dje@google.com>
8601
8602 * regcache.c (new_register_cache): No need to check result of xcalloc.
8603 * server.c (handle_search_memory): Back out calls to xmalloc,
8604 result is checked and error is returned to user upon failure.
8605 (handle_query): Ditto. Add more checks for result of malloc.
8606 (handle_v_cont): Check result of malloc, report error back to
8607 user upon failure.
8608 (handle_v_run): Ditto. Call freeargv.
8609 * server.h (freeargv): Declare.
8610 * utils.c (freeargv): New fn.
8611
54363045
DE
86122009-01-15 Doug Evans <dje@google.com>
8613
f626972c
DE
8614 * gdbreplay.c (perror_with_name): Make arg const char *.
8615 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8616 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8617 * utils.c (perror_with_name): Make arg const char *.
54363045 8618
18aae699
PA
86192009-01-14 Pedro Alves <pedro@codesourcery.com>
8620
8621 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8622 when handling a EXIT_PROCESS_DEBUG_EVENT.
8623
ff703abe
JB
86242009-01-06 Joel Brobecker <brobecker@adacore.com>
8625
8626 * gdbreplay.c (gdbreplay_version): Update copyright year.
8627 * server.c (gdbserver_version): Likewise.
8628
f21cc1a2 86292009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8630
8631 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8632 (handle_extended_wait): Improve comment.
0e21c1ec 8633
bca929d3
DE
86342008-12-13 Doug Evans <dje@google.com>
8635
8636 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8637 * server.h (ATTR_MALLOC): New macro.
8638 (xmalloc,xcalloc,xstrdup): Declare.
8639 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8640 * inferiors.c: Ditto.
8641 * linux-low.c: Ditto.
8642 * mem-break.c: Ditto.
8643 * regcache.c: Ditto.
8644 * remote-utils.c: Ditto.
8645 * server.c: Ditto.
8646 * target.c: Ditto.
8647 * win32-low.c: Ditto.
8648
97438e3f
DE
86492008-12-12 Doug Evans <dje@google.com>
8650
896c7fbb
DE
8651 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8652 in debugging printf.
8653
97438e3f
DE
8654 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8655
e3b886f8
DE
86562008-12-09 Doug Evans <dje@google.com>
8657
8658 * linux-low.h (struct process_info): Delete member tid, unused.
8659 * thread-db.c (find_one_thread): Update.
8660 (maybe_attach_thread): Update.
8661
07e059b5
VP
86622008-12-02 Pedro Alves <pedro@codesourcery.com>
8663
889bf7c5
PA
8664 * target.h (struct target_ops): Add qxfer_osdata member.
8665 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8666 and dirent.h.
8667 (linux_qxfer_osdata): New functions.
8668 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8669 callback.
8670 * server.c (handle_query): Handle "qXfer:osdata:read:".
8671 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8672 (buffer_xml_printf): New functions.
8673 * server.h (struct buffer): New.
8674 (buffer_grow_str, buffer_grow_str0): New macros.
8675 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8676 (buffer_xml_printf): Declare.
07e059b5 8677
4cab47ab
DE
86782008-11-24 Doug Evans <dje@google.com>
8679
8680 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8681
f142445f
DJ
86822008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8683
8684 * server.c (handle_v_run): Always use the supplied argument list.
8685
d0107bb6 86862008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8687
d0107bb6
BW
8688 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8689 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8690
2c4ad781
TJB
86912008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8692
8693 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8694 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8695 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8696 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8697 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8698 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8699 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8700 XML target descriptions.
8701 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8702 when inferior is running on an ISA 2.05 or later processor. Add
8703 special case to return offset for full 64-bit slot of FPSCR when
8704 in 32-bits.
8705
dfb64f85
DJ
87062008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8707
8708 * Makefile.in (SFILES, clean): Added sparc64 files.
8709 (reg-sparc64.o, reg-sparc64.c): New.
8710 * configure.srv (sparc*-*-linux*): New configuration.
8711 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8712 syscall arguments for SPARC.
8713 (regsets_store_inferior_registers): Likewise.
8714 * linux-sparc-low.c: New file.
8715
66b6e1dd
DE
87162008-10-21 Doug Evans <dje@google.com>
8717
8718 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8719 (READLINE_DIR,READLINE_DEP): Delete.
8720 (INTERNAL_CFLAGS): Update.
8721 (LINTFLAGS): Update.
8722
9b710a42
PA
87232008-10-10 Pedro Alves <pedro@codesourcery.com>
8724
8725 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8726 whole argv from the last run, not just argv[0].
8727
5822d809
PA
87282008-09-08 Pedro Alves <pedro@codesourcery.com>
8729
8730 * regcache.c (new_register_cache): Return NULL if the register
8731 cache size isn't known yet.
8732 (free_register_cache): Avoid dereferencing a NULL regcache.
8733
74aac56f
DJ
87342008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8735
8736 * configure.srv: Merge MIPS and MIPS64.
8737
400b20f5
MR
87382008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8739
8740 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8741
677c5bb1
LM
87422008-08-18 Luis Machado <luisgpm@br.ibm.com>
8743
8744 * Makefile.in: Add required vsx dependencies.
8745
8746 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8747 Declare init_registers_powerpc_vsx32l.
8748 Declare init_registers_powerpc_vsx64l.
8749 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8750 (ppc_arch_setup): Check for VSX in hwcap.
8751 (ppc_fill_vsxregset): New function.
8752 (ppc_store_vsxregset): New function.
8753 Add new VSX entry in regset_info target_regsets.
8754
8755 * configure.srv: Add new VSX dependencies.
8756
a6f3e723
SL
87572008-08-12 Pedro Alves <pedro@codesourcery.com>
8758
8759 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8760 (remote_open): Set or clear transport_is_reliable.
8761 (putpkt_binary): Don't expect acks in noack mode.
8762 (getpkt): Don't send ack/nac in noack mode.
8763 * server.c (handle_general_set): Handle QStartNoAckMode.
8764 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8765 qSupported.
8766 (main): Reset noack_mode on every connection.
8767 * server.h (noack_mode): Declare.
8768
a417dc56
RW
87692008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8770
8771 * Makefile.in (GDBREPLAY_OBS): New variable.
8772 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8773
3221518c
UW
87742008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8775 Daniel Jacobowitz <dan@codesourcery.com>
8776
8777 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8778 (usr_store_inferior_registers): Likewise.
8779 (regsets_store_inferior_registers): Likewise.
8780
ec56be1b
PA
87812008-07-31 Rolf Jansen <rj@surtec.com>
8782 Pedro Alves <pedro@codesourcery.com>
8783
8784 * configure.ac: Check for memmem declaration.
8785 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8786 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8787 (disable_packet_qfThreadInfo): Unconditionally compile.
8788 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8789 * configure, config.in: Regenerate.
8790
2fe5e3ff
DE
87912008-07-28 Doug Kwan <dougkwan@google.com>
8792
8793 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8794 (linux_write_memory): Remove declaration of errno.
8795
836acd6d
UW
87962008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8797
8798 * linux-low.c (handle_extended_wait): Do not use "status"
8799 variable uninitialized.
8800
aeba519e
PA
88012008-07-07 Pedro Alves <pedro@codesourcery.com>
8802
8803 * server.c (handle_v_attach): Inhibit reporting dll changes.
8804
db42f210
PA
88052008-06-27 Pedro Alves <pedro@codesourcery.com>
8806
8807 * remote-utils.c (prepare_resume_reply): If requested, don't
8808 output "thread:TID" in the T stop reply.
8809
8810 * server.c (disable_packet_vCont, disable_packet_Tthread)
8811 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8812 (handle_query): If requested, disable support for qC, qfThreadInfo
8813 and qsThreadInfo.
8814 (handle_v_requests): If requested, disable support for vCont.
8815 (gdbserver_show_disableable): New.
8816 (main): Handle --disable-packet and --disable-packet=LIST.
8817
8818 * server.h (disable_packet_vCont, disable_packet_Tthread)
8819 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8820
8e4c5421
CD
88212008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8822
8823 * server.c (gdbserver_usage): Mention --version.
8824
6e23a804
DJ
88252008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8826
8827 * Makefile.in (gdbreplay.o): New rule.
8828
90aa6a40
JM
88292008-06-06 Joseph Myers <joseph@codesourcery.com>
8830
8831 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8832 message, not gdbserver.
8833
c16158bc 88342008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8835 Nathan Sidwell <nathan@codesourcery.com>
8836 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8837
8838 * acinclude.m4: Include ../../config/acx.m4.
8839 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8840 * configure, config.in: Regenerate.
8841 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8842 * server.c (gdbserver_version): Print PKGVERSION.
8843 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8844 (main): Adjust gdbserver_usage calls.
8845 * gdbreplay.c (version, host_name): Add declarations.
8846 (gdbreplay_version, gdbreplay_usage): New.
8847 (main): Accept --version and --help options.
8848
aeb75bf5
DJ
88492008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8850
8851 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8852 (arm_breakpoint_at): Handle Thumb.
8853 (the_low_target): Add comment.
8854
76b233dd
UW
88552008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8856
8857 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8858
08388c79
DE
88592008-05-09 Doug Evans <dje@google.com>
8860
a3c83fae
DE
8861 * server.h (decode_search_memory_packet): Declare.
8862 * remote-utils.c (decode_search_memory_packet): New fn.
8863 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8864 (handle_search_memory): New fn.
8865 (handle_query): Process qSearch:memory packets.
8866
bb9c3d36
UW
88672008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8868
8869 * regcache.c (registers_length): Remove.
8870 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8871 full register packet.
8872 * regcache.h (registers_length): Remove prototype.
8873 * server.h (PBUFSIZ): Define to 16384.
8874
7284e1be
UW
88752008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8876
8877 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8878 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8879 powerpc-64l.o, and powerpc-altivec64l.o.
8880 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8881 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8882 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8883 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8884 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8885 to srv_xmlfiles.
8886
8887 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8888 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8889 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8890 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8891 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8892 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8893 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8894 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8895 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8896 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8897 (clean): Update.
8898
8899 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8900 (init_registers_powerpc_32l): ... this new prototype.
8901 (init_registers_powerpc_32): Remove, replace by ...
8902 (init_registers_powerpc_altivec32l): ... this new prototype.
8903 (init_registers_powerpc_e500): Remove, replace by ...
8904 (init_registers_powerpc_e500l): ... this new prototype.
8905 (init_registers_ppc64): Remove, replace by ...
8906 (init_registers_powerpc_64l): ... this new prototype.
8907 (init_registers_powerpc_64): Remove, replace by ...
8908 (init_registers_powerpc_altivec64l): ... this new prototype.
8909 (ppc_num_regs): Set to 73.
8910 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8911 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8912 (ppc_cannot_store_register): Handle orig_r3 and trap.
8913 (ppc_arch_setup): Update init_registers_... calls.
8914 (ppc_fill_gregset): Handle orig_r3 and trap.
8915
8916 * inferiors.c (clear_inferiors): Reset current_inferior.
8917
fdc59709
PB
89182008-04-23 Paolo Bonzini <bonzini@gnu.org>
8919
889bf7c5
PA
8920 * acinclude.m4: Add override.m4.
8921 * configure: Regenerate.
fdc59709 8922
c9b2f845
UW
89232008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8924
8925 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8926 initial call to init_register_ppc64.
8927
550512b8
UW
89282008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8929
43aaf8b6
PA
8930 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8931 single powerpc*-*-linux* case.
550512b8
UW
8932 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8933
b6430ec3
UW
89342008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8935
8936 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8937 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8938 from reg_xmlfiles.
8939 * linux-ppc-low.c: Include <elf.h>.
8940 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8941 (ppc_hwcap): New global variable.
8942 (ppc_regmap): Remove __SPE__ #ifdef sections.
8943 (ppc_regmap_e500): New global variable.
8944 (ppc_cannot_store_register): Update __SPE__ special case.
8945 (ppc_get_hwcap): New function.
8946 (ppc_arch_setup): Use it to determine whether inferior supports
8947 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8948 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8949 Do not access registers if target does not support AltiVec.
8950 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8951 Do not access registers if target does not support SPE.
8952 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8953
52fa2412
UW
89542008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8955
8956 * linux-low.c (disabled_regsets, num_regsets): New.
8957 (use_regsets_p): Delete.
8958 (linux_wait_for_process): Clear disabled_regsets.
8959 (regsets_fetch_inferior_registers): Check and set it.
8960 (regsets_store_inferior_registers): Likewise.
8961 (linux_fetch_registers, linux_store_registers): Do not use
8962 use_regsets_p.
8963 (initialize_low): Allocate disabled_regsets.
8964
e28b3332
DJ
89652008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8966
8967 * Makefile.in (LIBOBJS): New.
8968 (OBS): Use LIBOBJS.
8969 (memmem.o): New rule.
8970 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8971 * configure: Regenerated.
8972
4536995d
UW
89732008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8974
8975 * server.c (handle_query): Never return "unsupported" for
8976 qXfer:features:read queries.
8977
221c031f
UW
89782008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8979
8980 * server.c (get_features_xml): Fix inverted condition.
8981 (handle_query): Always support qXfer:feature:read.
8982
ccd213ac
DJ
89832008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8984
8985 * server.c (wrapper_argv): New.
8986 (start_inferior): Handle wrapper_argv. If set, expect an extra
8987 trap.
8988 (gdbserver_usage): Document --wrapper.
8989 (main): Parse --wrapper.
8990
6fe305f7
UW
89912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8992
8993 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8994 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8995 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8996 (ppc_set_pc): Likewise.
8997 (ppc_arch_setup): New function.
8998 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8999 of collect_register.
889bf7c5 9000 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9001
5b0a002e
UW
90022008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9003
9004 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9005 instead of linux-ppc64-low.o.
9006 * linux-ppc64-low.c: Remove file.
9007 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9008 (linux-ppc64-low.o): Remove rule.
9009
9010 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9011 (init_registers_powerpc_64): Likewise.
9012 (ppc_regmap): Conditionally define depending on __powerpc64__.
9013 (ppc_cannot_store_register): Do not special-case "fpscr" when
9014 compiled on __powerpc64__.
9015 (ppc_collect_ptrace_register): New function.
9016 (ppc_supply_ptrace_register): New function.
9017 (ppc_breakpoint): Change type to "unsigned int".
9018 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9019 (the_low_target): Conditionally provide initializers for the
889bf7c5 9020 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9021 collect_ptrace_register and supply_ptrace_register members.
9022
9b4b61c8
UW
90232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9024
9025 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9026 * server.c (gdbserver_xmltarget): Define.
9027 (get_features_xml): Use it to replace "target.xml" and arch_string.
9028
9029 * configure.srv: Remove srv_xmltarget. Add XML files that were
9030 mentioned there to srv_xmlfiles instead. Remove conditional tests
9031 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9032 srv_xmlfiles and srv_regobj to include all possible choices.
9033 * configure.ac (srv_xmltarget): Remove.
9034 (srv_xmlfiles): Do not add "target.xml".
9035 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9036 checks for supplementary target information.
9037 * configure: Regenerate.
9038 * Makefile.in (XML_TARGET): Remove.
9039 (target.xml): Remove rule.
9040 (clean): Do not clean up target.xml.
9041 (.PRECIOUS): Do not mention target.xml.
9042
9043 * target.h (struct target_ops): Remove arch_string member.
9044 * linux-low.c (linux_arch_string): Remove.
9045 (linux_target_ops): Remove arch_string initializer.
9046 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9047 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9048 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9049 * spu-low.c (spu_arch_string): Remove.
9050 (spu_target_ops): Remove arch_string initializer.
9051 * win32-low.c (win32_arch_string): Remove.
9052 (win32_target_ops): Remove arch_string initializer.
9053 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9054 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9055 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9056
ee1a7ae4
UW
90572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9058
9059 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9060 by collect_ptrace_register and supply_ptrace_register hooks.
9061 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9062 instead of checking for the_low_target.left_pad_xfer.
9063 (usr_store_inferior_registers): Use collect_ptrace_register callback
9064 instead of checking for the_low_target.left_pad_xfer.
9065
9066 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9067 (s390_supply_ptrace_register): Likewise.
9068 (s390_fill_gregset): Call s390_collect_ptrace_register.
9069 (the_low_target): Update.
9070
9071 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9072 (ppc_supply_ptrace_register): Likewise.
9073 (the_low_target): Update.
9074
9075 * linux-i386-low.c (the_low_target): Update.
9076 * linux-x86-64-low.c (the_low_target): Update.
9077
d61ddec4
UW
90782008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9079
9080 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9081 reg-s390.o and reg-s390x.o.
9082
9083 * linux-low.c (new_inferior): New global variable.
9084 (linux_create_inferior, linux_attach): Set it.
9085 (linux_wait_for_process): Call the_low_target.arch_setup after the
9086 target has stopped for the first time.
9087 (initialize_low): Do not call the_low_target.arch_setup.
9088
9089 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9090 (s390_set_pc): Likewise.
9091 (s390_arch_setup): New function.
9092 (the_low_target): Use s390_arch_setup as arch_setup routine.
9093
9094 * regcache.c (realloc_register_cache): New function.
9095 (set_register_cache): Call it for each existing regcache.
9096
d05b4ac3
UW
90972008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9098
9099 * server.h (init_registers): Remove prototype.
9100
9101 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9102 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9103 instead of init_registers ().
9104 * linux-arm-low.c (init_registers_arm): Add prototype.
9105 (init_registers_arm_with_iwmmxt): Likewise.
9106 (the_low_target): Add initializer for arch_setup field.
9107 * linux-cris-low.c (init_registers_cris): Add prototype.
9108 (the_low_target): Add initializer for arch_setup field.
9109 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9110 (the_low_target): Add initializer for arch_setup field.
9111 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9112 (the_low_target): Add initializer for arch_setup field.
9113 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9114 (the_low_target): Add initializer for arch_setup field.
9115 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9116 (the_low_target): Add initializer for arch_setup field.
9117 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9118 (the_low_target): Add initializer for arch_setup field.
9119 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9120 (init_registers_mips64_linux): Likewise.
9121 (the_low_target): Add initializer for arch_setup field.
9122 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9123 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9124 (the_low_target): Add initializer for arch_setup field.
9125 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9126 (init_registers_powerpc_64): Likewise.
9127 (the_low_target): Add initializer for arch_setup field.
9128 * linux-s390-low.c (init_registers_s390): Add prototype.
9129 (init_registers_s390x): Likewise.
9130 (the_low_target): Add initializer for arch_setup field.
9131 * linux-sh-low.c (init_registers_sh): Add prototype.
9132 (the_low_target): Add initializer for arch_setup field.
9133 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9134 (the_low_target): Add initializer for arch_setup field.
9135 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9136 (the_low_target): Add initializer for arch_setup field.
9137
9138 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9139 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9140 instead of init_registers ().
9141 * win32-arm-low.c (init_registers_arm): Add prototype.
9142 (the_low_target): Add initializer for arch_setup field.
9143 * win32-i386-low.c (init_registers_i386): Add prototype.
9144 (the_low_target): Add initializer for arch_setup field.
9145
9146 * spu-low.c (init_registers_spu): Add prototype.
9147 (initialize_low): Call initialie_registers_spu () instead of
9148 initialize_registers ().
9149
fd96d250
PA
91502008-02-19 Pedro Alves <pedro@codesourcery.com>
9151
9152 * server.c (handle_v_requests): When handling the vRun and vAttach
9153 packets, if already debugging a process, don't kill it. Return an
9154 error instead.
9155
d41b6bb4
DJ
91562008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9157
9158 * server.c (handle_query): Correct length check.
9159
5ac588cf
PA
91602008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9161
9162 * win32-low.c (do_initial_child_stuff): Add process handle
9163 parameter. Set current_process_handle and current_process_id from the
9164 parameters. Clear globals.
9165 (win32_create_inferior): Don't set current_process_handle and
9166 current_process_id here. Instead pass them on the call to
9167 do_initial_child_stuff.
9168 (win32_attach): Likewise.
9169 (win32_clear_inferiors): New.
9170 (win32_kill): Don't close the current process handle or the
9171 current thread handle here. Instead call win32_clear_inferiors.
9172 (win32_detach): Don't open a new handle to the process. Call
9173 win32_clear_inferiors.
9174 (win32_join): Don't rely on current_process_handle; open a new
9175 handle using the process id.
9176 (win32_wait): Call win32_clear_inferiors when the inferior process
9177 has exited.
9178
ecd7ecbc
DJ
91792008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9180
9181 * server.c (monitor_show_help): Add "exit".
9182
1525d545
MG
91832008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9184
ecd7ecbc 9185 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9186 (clean): Add reg-xtensa.c.
9187 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9188 * configure.srv (xtensa*-*-linux*) New target.
9189 * linux-xtensa-low.c: New.
9190 * xtensa-xtregs.c: New.
1525d545 9191
59a016f0
PA
91922008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9193
9194 * hostio.c: Don't include errno.h.
9195 (errno_to_fileio_errno): Move to hostio-errno.
9196 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9197 error number outputting to the target->hostio_last_error callback.
9198 (hostio_packet_error): Use FILEIO_EINVAL directly.
9199 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9200 calls to hostio_error.
9201 * hostio-errno.c: New.
9202 * server.h (hostio_last_error_from_errno): Declare.
9203 * target.h (target_ops): Add hostio_last_error member.
9204 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9205 as hostio_last_error handler.
889bf7c5 9206 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9207 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9208 (wince_hostio_last_error): New functions.
9209 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9210 as hostio_last_error handler.
9211 (win32_target_ops) [!_WIN32_WCE]: Register
9212 hostio_last_error_from_errno as hostio_last_error handler.
9213 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9214 (hostio-errno.o): New rule.
9215 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9216 * configure.srv (srv_hostio_err_objs): New variable. Default to
9217 hostio-errno.o.
9218 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9219 * configure: Regenerate.
9220
2d717e4f
DJ
92212008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9222
9223 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9224 (linux_kill, linux_detach): Clean up the process list.
9225 * remote-utils.c (remote_open): Improve port number parsing.
9226 (putpkt_binary, input_interrupt): Only send interrupts if the target
9227 is running.
9228 * server.c (extended_protocol): Make static.
9229 (attached): Define earlier.
9230 (exit_requested, response_needed, program_argv): New variables.
9231 (target_running): New.
9232 (start_inferior): Clear attached here.
9233 (attach_inferior): Set attached here.
9234 (require_running): Define.
9235 (handle_query): Use require_running and target_running. Implement
9236 "monitor exit".
9237 (handle_v_attach, handle_v_run): New.
9238 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9239 (gdbserver_usage): Update.
9240 (main): Redo argument parsing. Handle --debug and --multi. Handle
9241 --attach along with other options or after the port. Save
9242 program_argv. Support no initial program. Resynchronize
9243 communication with GDB after an error. Handle "monitor exit".
9244 Use require_running and target_running. Always allow the extended
9245 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9246 restart in extended mode.
9247 * README: Refer to the GDB manual. Update --attach usage.
9248
7407e2de
AS
92492007-12-20 Andreas Schwab <schwab@suse.de>
9250
9251 * linux-low.c (STACK_SIZE): Define.
9252 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9253 (linux_test_for_tracefork): Likewise.
9254
b65d95c5
DJ
92552007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9256
9257 * linux-low.c (linux_wait_for_event): Update messages. Do not
9258 reinsert auto-delete breakpoints.
9259 * mem-break.c (struct breakpoint): Change return type of handler to
9260 int.
9261 (set_breakpoint_at): Update handler type.
9262 (reinsert_breakpoint_handler): Return 1 instead of calling
9263 delete_breakpoint.
9264 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9265 setting a new one.
9266 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9267 * mem-break.h (set_breakpoint_at): Update handler type.
9268 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9269 * win32-low.c (auto_delete_breakpoint): New.
9270 (get_child_debug_event): Use it.
9271
4e799345
DJ
92722007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9273
9274 * configure.ac: Check for pread and pwrite.
9275 * hostio.c (handle_pread): Fall back to lseek and read.
9276 (handle_pwrite): Fall back to lseek and write.
9277 * config.in, configure: Regenerated.
9278
27524b67
DJ
92792007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9280
9281 * server.c (myresume): Add own_buf argument.
9282 (main): Update calls.
9283
a20d5e98
DJ
92842007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9285
9286 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9287 * remote-utils.c (remote_open): Do not call disable_async_io.
9288 (block_async_io): Delete.
9289 (unblock_async_io): Make static.
9290 (initialize_async_io): New.
9291 * server.c (handle_v_cont): Handle async I/O here.
9292 (myresume): Likewise. Move other common resume tasks here...
9293 (main): ... from here. Call initialize_async_io. Disable async
9294 I/O before the main loop.
9295 * server.h (initialize_async_io): Declare.
9296 (block_async_io, unblock_async_io): Delete prototypes.
9297 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9298
b79d787e
DJ
92992007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9300
9301 * remote-utils.c (readchar): Allow binary data in received messages.
9302
d97903b2
PA
93032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9304
9305 * win32-low.c (attaching): New global.
9306 (win32_create_inferior): Clear the `attaching' global.
9307 (win32_attach): Set the `attaching' global.
9308 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9309 attaching. Only set a breakpoint at the entry point if not
9310 attaching.
9311
311de423
PA
93122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9313
9314 * server.c (main): Don't report dll events on the initial
9315 connection on attaches.
9316
6c2d16d2
PA
93172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9318
9319 * server.c (main): Relax numerical bases supported for the pid of
9320 the --attach command line argument.
9321
5ca906e6
PA
93222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9323
9324 * win32-low.c (win32_attach): Call OpenProcess before
9325 DebugActiveProcess, not after. Add last error output to error
9326 call.
9327
9c6c8194
PA
93282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9329
9330 * win32-low.c (win32_get_thread_context)
9331 (win32_set_thread_context): New functions.
9332 (thread_rec): Use win32_get_thread_context.
9333 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9334 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9335 field.
9336
4d5d1aaa
PA
93372007-12-03 Leo Zayas
9338 Pedro Alves <pedro_alves@portugalmail.pt>
9339
9340 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9341 global variables.
9342 (child_add_thread): Minor cleanup.
9343 (child_continue): Resume artificially suspended threads before
9344 calling ContinueDebugEvent.
9345 (suspend_one_thread): New.
9346 (fake_breakpoint_event): New.
9347 (get_child_debug_event): Change return type to int. Check here if
9348 gdb sent an interrupt request. If a soft interrupt was requested,
9349 fake a breakpoint event. Return 0 if there is no event to handle,
9350 and 1 otherwise.
9351 (win32_wait): Don't check here if gdb sent an interrupt request.
9352 Ensure there is a valid event to handle.
9353 (win32_request_interrupt): Add soft interruption method as last
9354 resort.
9355
c436e841
PA
93562007-12-03 Leo Zayas
9357 Pedro Alves <pedro_alves@portugalmail.pt>
9358
9359 * win32-low.h (win32_thread_info): Add descriptions to the
9360 structure members. Replace `suspend_count' counter by a
9361 `suspended' flag.
9362 * win32-low.c (thread_rec): Update condition of when to get the
9363 context from the inferior. Rely on ContextFlags being set if it
9364 has already been retrieved. Only suspend the inferior thread if
9365 we haven't already. Warn if that fails.
9366 (continue_one_thread): s/suspend_count/suspended/. Only call
9367 ResumeThread once. Warn if that fails.
9368
e7b5fa67
PA
93692007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9370
9371 * win32-low.c (win32_wait): Don't read from the inferior when it
9372 has already exited.
9373
a385171d
PA
93742007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9375
9376 * Makefile.in (win32_low_h): New variable.
9377 (win32-low.o): Add dependency on $(win32_low_h).
9378 (win32-arm-low.o, win32-i386-low.o): New rules.
9379
f80c84b3
DJ
93802007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9381
9382 * hostio.c: Correct copyright year.
9383
a6b151f1
DJ
93842007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9385
9386 * Makefile.in (OBS): Add hostio.o.
9387 (hostio.o): New rule.
9388 * server.h (handle_vFile): Declare.
9389 * hostio.c: New file.
9390 * server.c (handle_v_requests): Take packet_len and new_packet_len
9391 for binary packets. Call handle_vFile.
9392 (main): Update call to handle_v_requests.
9393
f9387fc3
DJ
93942007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9395
9396 * linux-low.c: Include <sched.h>.
9397
51c2684e
DJ
93982007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9399
9400 * linux-low.c (linux_tracefork_grandchild): New.
9401 (linux_tracefork_child): Use clone.
9402 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9403
75f83163
JB
94042007-10-31 Joel Brobecker <brobecker@adacore.com>
9405
9406 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9407
da5898ce
DJ
94082007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9409
9410 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9411
24a09b5f
DJ
94122007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9413
9414 * inferiors.c (change_inferior_id): Delete.
9415 (add_pid_to_list, pull_pid_from_list): New.
9416 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9417 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9418 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9419 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9420 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9421 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9422 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9423 (using_threads): Always set to 1.
9424 (handle_extended_wait): New.
9425 (add_process): Do not set TID.
9426 (linux_create_inferior): Set must_set_ptrace_flags.
9427 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9428 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9429 (linux_thread_alive): Rename TID argument to LWPID.
9430 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9431 (linux_wait_for_event): Do not use TID or check using_threads. Update
9432 call to dead_thread_notify. Call handle_extended_wait.
9433 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9434 (send_sigstop): Delete sigstop_sent.
9435 (wait_for_sigstop): Avoid TID.
9436 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9437 (linux_test_for_tracefork): New.
9438 (linux_lookup_signals): Use thread_db_active and
9439 linux_supports_tracefork_flag.
9440 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9441 * linux-low.h (get_process_thread): Avoid TID.
9442 (struct process_ifo): Move thread_known and tid to the end. Remove
9443 sigstop_sent.
9444 (linux_attach_lwp, thread_db_init): Update prototypes.
9445 * server.h (change_inferior_id): Delete prototype.
9446 (add_pid_to_list, pull_pid_from_list): New prototypes.
9447 * thread-db.c (thread_db_use_events): New.
9448 (find_first_thread): Rename to...
9449 (find_one_thread): ...this. Update callers and messages. Do not
9450 call fatal. Check thread_db_use_events. Do not call
9451 change_inferior_id or new_thread_notify.
9452 (maybe_attach_thread): Update. Do not call new_thread_notify.
9453 (thread_db_init): Set thread_db_use_events. Check use_events.
9454 * utils.c (fatal, warning): Correct message prefix.
9455
30ed0a8f
DJ
94562007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9457
9458 * Makefile.in (clean): Remove new files.
9459 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9460 (powerpc-64.o, powerpc-64.c): New rules.
9461 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9462 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9463 with SPE.
9464 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9465 SPE targets.
9466 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9467 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9468 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9469 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9470 (target_regsets): Add AltiVec and SPE register sets.
9471 * configure.ac: Check for AltiVec and SPE.
9472 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9473 (ppc_fill_vrregset, ppc_store_vrregset): New.
9474 (target_regsets): Add AltiVec register set.
9475 * configure: Regenerated.
9476
fd462a61
DJ
94772007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9478
9479 * linux-low.c (O_LARGEFILE): Define.
9480 (linux_read_memory): Use /proc/PID/mem.
9481 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9482 * configure, config.in: Regenerated.
9483
69f223ed
DJ
94842007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9485
9486 * linux-low.c (linux_wait_for_event): Do not pass signals while
9487 single-stepping.
9488
aec18585
PA
94892007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9490
9491 * win32-low.c (create_process): New.
9492 (win32_create_inferior): Use create_process instead of
9493 CreateProcess. If create_process failed retry appending an ".exe"
9494 suffix. Store the GetLastError result immediatelly after
9495 create_process calls and use it on the call to error.
9496
34d86ddd
PA
94972007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9498
9499 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9500
5a0e3bd0
JB
95012007-08-23 Joel Brobecker <brobecker@adacore.com>
9502
9503 * configure.ac: Switch license to GPLv3.
9504
f88c79e6
MS
95052007-08-01 Michael Snyder <msnyder@access-company.com>
9506
9507 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9508
6b3d9b83
PA
95092007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9510
9511 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9512 typedef.
9513 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9514 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9515 CloseToolhelp32Snapshot.
9516 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9517 CloseToolhelp32Snapshot.
9518
c588c53c
MS
95192007-07-27 Michael Snyder <michael.snyder@access-company.com>
9520
9521 * server.c (main): Check for inferior exit before main loop.
9522
aa0403d9
PA
95232007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9524
9525 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9526 instead of on tmp_desc.
9527
255e7678
DJ
95282007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9529 Daniel Jacobowitz <dan@codesourcery.com>
9530
9531 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9532 (add_thread): Minor cleanups.
9533 (clear_inferiors): Move lower in the file. Clear the DLL
9534 list.
9535 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9536 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9537 (xml_escape_text): New.
9538 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9539 for qSupported.
9540 (handle_v_cont): Report errors.
9541 (gdbserver_version): Update.
9542 (main): Correct size of own_buf. Do not report initial DLL events.
9543 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9544 (unloaded_dll, xml_escape_text): New.
9545 * win32-low.c (enum target_waitkind): Update comments.
9546 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9547 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9548 (win32_EnumProcessModules, win32_GetModuleInformation)
9549 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9550 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9551 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9552 (win32_Module32First, win32_Module32Next, load_toolhelp)
9553 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9554 (get_child_debug_event): Handle DLL events.
9555 (win32_wait): Likewise.
9556
0d37add9
DJ
95572007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9558
9559 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9560 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9561
45e2715e
PA
95622007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9563
9564 * win32-low.c (handle_output_debug_string): Ignore event if not
9565 waiting.
9566
c5674cf1
PA
95672007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9568
9569 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9570
2bbe3cc1
DJ
95712007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9572
9573 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9574
ae13219e
DJ
95752007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9576
9577 * inferiors.c (change_inferior_id): Add comment.
9578 * linux-low.c (check_removed_breakpoint): Add an early
9579 prototype. Improve debug output.
9580 (linux_attach): Doc update.
9581 (linux_detach_one_process, linux_detach): Clean up before releasing
9582 each process.
9583 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9584 * linux-low.h (struct process_info): Doc improvement.
9585 * mem-break.c (delete_all_breakpoints): New.
9586 * mem-break.h (delete_all_breakpoints): New prototype.
9587 * thread-db.c (find_first_thread): New.
9588 (thread_db_create_event): Call it instead of
9589 thread_db_find_new_threads. Clean up unused variables.
9590 (maybe_attach_thread): Remove first thread handling.
9591 (thread_db_find_new_threads): Use find_first_thread.
9592 (thread_db_get_tls_address): Likewise.
9593
4105de34
DJ
95942007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9595
9596 * thread-db.c (thread_db_find_new_threads): Add prototype.
9597 (thread_db_create_event): Check for the main thread before adding
9598 a new thread.
9599 (maybe_attach_thread): Only enable event reporting if TID == 0.
9600 (thread_db_get_tls_address): Check for new threads.
9601
2b876972
DJ
96022007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9603
9604 * linux-low.c (linux_create_inferior): Try execv before execvp.
9605 * spu-low.c (spu_create_inferior): Likewise.
9606
7a245884
DJ
96072007-06-13 Mike Frysinger <vapier@gentoo.org>
9608
9609 * linux-low.c (linux_create_inferior): Change execv to execvp.
9610 * spu-low.c (spu_create_inferior): Likewies.
9611
117ce543
DJ
96122007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9613
9614 * Makefile.in (clean): Clean new files instead of deleted ones.
9615 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9616 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9617 rules.
9618 * configure.srv: Specify XML files and new regformats for MIPS and
9619 MIPS64 GNU/Linux.
9620 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9621 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9622 an entry for the restart register.
9623 (mips_cannot_fetch_register, mips_cannot_store_register)
9624 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9625 register names to match the XML descriptions.
9626 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9627 restart register instead of $0.
9628
0e7f50da
UW
96292007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9630 Markus Deuling <deuling@de.ibm.com>
9631
9632 * remote-utils.c (decode_xfer_write): New function.
9633 * server.h (decode_xfer_write): Add prototype.
9634 * server.c (handle_query): Add PACKET_LEN argument. Support
9635 qXfer:spu:read and qXfer:spu:write packets.
9636 (main): Pass packet_len to handle_query.
9637 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9638 * target.h (target_ops): Add qxfer_spu.
9639
374c1d38
UW
96402007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9641
9642 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9643 accessing non-seekable spufs files.
9644
bb63802a
UW
96452007-05-16 Markus Deuling <deuling@de.ibm.com>
9646
889bf7c5 9647 * server.c (handle_query): Add reply for qC packet.
bb63802a 9648
7390519e
PA
96492007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9650 Leo Zayas <lerele@champenstudios@com>
9651
9652 * server.h (check_remote_input_interrupt_request): New function.
9653 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9654 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9655 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9656 (check_remote_input_interrupt_request): New function.
9657 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9658 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9659 winapi_GenerateConsoleCtrlEvent): New typedefs.
9660 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9661 to 250 ms.
9662 (win32_wait): Check for remote interrupt request
9663 with check_remote_input_interrupt_request.
9664 (win32_request_interrupt): New function.
9665 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9666
34b34921
PA
96672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9668
9669 * win32-low.c (debug_registers_changed,
9670 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9671 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9672 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9673 (thread_rec): Get context using the low target.
9674 (child_add_thread): Call thread_added on the low target,
9675 which does the same thing.
9676 (regptr): Delete.
9677 (do_initial_child_stuff): Remove debug registers references.
9678 Set context using the low target. Resume threads after
9679 setting the contexts.
9680 (child_continue): Remove dead variable. Remove debug
9681 registers references.
9682 (child_fetch_inferior_registers): Go through the low target.
9683 (do_child_store_inferior_registers): Remove.
9684 (child_store_inferior_registers): Go through the low target.
9685 (win32_resume): Remove debug registers references.
9686 Set context using the low target.
9687 (handle_exception): Change return type to void. Don't record
9688 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9689 first chance exception.
889bf7c5 9690 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9691 goto loop. Always return after waiting for debug event.
9692 (win32_wait): Convert to switch statement. Handle spurious
9693 events.
9694
9695 * win32-i386-low.c (debug_registers_changed,
9696 debug_registers_used): New.
9697 (initial_stuff): Rename to ...
9698 (i386_initial_stuff): ... this. Clear debug registers
9699 state variables.
9700 (store_debug_registers): Delete.
9701 (i386_get_thread_context): New.
9702 (load_debug_registers): Delete.
9703 (i386_set_thread_context): New.
9704 (i386_thread_added): New.
9705 (single_step): Rename to ...
9706 (i386_single_step): ... this.
9707 (do_fetch_inferior_registers): Rename to ...
9708 (i386_fetch_inferior_register): ... this.
9709 (i386_store_inferior_register): New.
9710 (the_low_target): Adapt to new interface.
9711
9712 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9713 (arm_get_thread_context): New.
9714 (arm_set_thread_context): New.
9715 (regptr): New.
9716 (do_fetch_inferior_registers): Rename to ...
9717 (arm_fetch_inferior_register): ... this.
9718 (arm_store_inferior_register): New.
9719 (arm_wince_breakpoint): Reimplement as unsigned long.
9720 (arm_wince_breakpoint_len): Define.
9721 (the_low_target): Adapt to new interface.
9722
9723 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9724 load_debug_registers. Add get_thread_context, set_thread_context,
9725 thread_added and store_inferior_register. Rename
9726 fetch_inferior_registers to fetch_inferior_register.
9727 (regptr): Remove declaration.
9728
dd6953e1
PA
97292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9730
9731 * linux-low.c (linux_detach): Change return type to int. Return 0.
9732 * spu-low.c (spu_detach): Likewise.
9733
444d6139
PA
97342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9735
9736 * target.h (target_ops): Change return type of detach to int.
9737 Add join.
9738 (join_inferior): New.
9739 * server.c (main): Don't skip detach support on mingw32.
9740 If the inferior doesn't support detaching return error.
9741 Call join_inferior instead of using waitpid.
9742 * linux-low.c (linux_join): New.
9743 (linux_target_op): Add linux_join.
9744 * spu-low.c (spu_join): New.
9745 (spu_target_ops): Add spu_join.
9746 * win32-low.c (win32_detach): Adapt to new interface.
9747 Reopen current_process_handle before detaching. Issue a child
9748 resume before detaching.
9749 (win32_join): New.
9750 (win32_target_op): Add win32_join.
9751
1d5315fe
PA
97522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9753
9754 * win32-low.c (win32-attach): Fix return value.
9755 * target.h (target_ops): Describe ATTACH return values.
9756
bf914831
PA
97572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9758
9759 * win32-low.c (GETPROCADDRESS): Define.
9760 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9761 (winapi_DebugSetProcessKillOnExit): Likewise.
9762 (win32_create_inferior): Force usage of ansi CreateProcessA.
9763 (win32_attach): Use GETPROCADDRESS.
9764 (win32_detach): Likewise.
9765
f72f3e60
PA
97662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9767
9768 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9769
ed50f18f
PA
97702007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9771
9772 * win32-low.c: Commit leftover changes from 2007-03-29.
9773
0c2ead7e
DJ
97742007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9775
9776 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9777 fields short instead of int. Add explicit padding.
9778 (i387_cache_to_fsave): Remove unnecessary casts.
9779 (i387_fsave_to_cache): Doc fix.
9780 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9781
73725ff3
DJ
97822007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9783
9784 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9785 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9786
d99f33d8
PA
97872007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9788
9789 * configure.srv (arm*-*-mingw32ce*): Move near the other
9790 arm targets.
9791
68070c10
PA
97922007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9793
2482afc6 9794 * configure.ac: Add errno checking.
68070c10
PA
9795 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9796 sys/file.h and malloc.h.
9797 (AC_CHECK_DECLS): Add perror.
9798 (srv_mingwce): Handle.
2482afc6 9799 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9800 win32-i386-low.o to srv_tgtobj.
9801 (i[34567]86-*-mingw*): Likewise.
9802 (arm*-*-mingw32ce*): Add case.
9803 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9804 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9805 [__MINGW32CE__] (strerror): New function.
9806 [__MINGW32CE__] (errno): Define to GetLastError.
9807 [__MINGW32CE__] (COUNTOF): New macro.
9808 (remote_open): Remove extra close call.
9809 * mem-break.c (delete_breakpoint_at): New function.
9810 * mem-break.h (delete_breakpoint_at): Declare.
9811 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9812 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9813 [USE_WIN32API] (read, write): Add char* casts.
9814 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9815 * server.h: Include wincecompat.h on Windows CE.
9816 [HAVE_ERRNO_H]: Check.
9817 (perror): Declare if not declared.
9818 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9819 (perror_with_name): Remove errno declaration.
9820 * wincecompat.h: New.
9821 * wincecompat.c: New.
9822 * win32-low.h: New.
9823 * win32-arm-low.c: New.
9824 * win32-i386-low.c: New.
9825 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9826 (OUTMSG2): Make it safe.
9827 (_T): New macro.
9828 (COUNTOF): New macro.
9829 (NUM_REGS): Get it from the low target.
9830 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9831 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9832 (thread_rec): Let low target handle debug registers.
9833 (child_add_thread): Likewise.
9834 (child_init_thread_list): Likewise.
9835 (continue_one_thread): Likewise.
9836 (regptr): New.
9837 (do_child_fetch_inferior_registers): Move to ...
9838 * win32-i386-low.c: ... here, and rename to ...
9839 (do_fetch_inferior_registers): ... this.
889bf7c5 9840 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9841 Go through the low target.
9842 (do_child_store_inferior_registers): Use regptr.
9843 (strwinerror): New function.
9844 (win32_create_inferior): Handle Windows CE.
9845 Use strwinerror instead of strerror on Windows error
9846 codes. Add program to the error output.
9847 Don't close the main thread handle on Windows CE.
9848 (win32_attach): Use coredll.dll on Windows CE.
9849 (win32_kill): Close current process and current
9850 thread handles.
9851 (win32_detach): Use coredll.dll on Windows CE.
9852 (win32_resume): Let low target handle debug registers, and
9853 step request.
9854 (handle_exception): Add/Remove initial breakpoint. Avoid
9855 non-existant WSTOPSIG on Windows CE.
9856 (win32_read_inferior_memory): Cast to remove warning.
9857 (win32_arch_string): Go through the low target.
9858 (initialize_low): Call set_breakpoint_data with the low
9859 target's breakpoint.
9860 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9861 FOP_REGNUM, mappings): Move to ...
9862 * win32-i386-low.c: ... here.
9863 * win32-low.c (win32_thread_info): Move to ...
9864 * win32-low.h: ... here.
9865 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9866 win32-arm-low.c and wincecompat.c.
9867 (all:): Add $EXEEXT.
9868 (install-only:): Likewise.
9869 (gdbserver:): Likewise.
9870 (gdbreplay:): Likewise.
9871 * config.in: Regenerate.
9872 * configure: Regenerate.
9873
41093d81
PA
98742007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9875
9876 * win32-low.c: Rename typedef thread_info to
9877 win32_thread_info throughout.
9878
544afa54
PA
98792007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9880
9881 * win32-i386-low.c: Rename to ...
9882 * win32-low.c: ... this.
9883 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9884 * Makefile.in: Likewise.
9885
bce7165d
PA
98862007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9887
9888 * remote-utils.c (monitor_output): Constify msg parameter.
9889 * server.h (monitor_output): Likewise.
9890 * win32-i386-low.c (handle_output_debug_string): New.
9891 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9892 handle_output_debug_string.
9893 (get_child_debug_event): Likewise.
9894
506c7aa0
DJ
98952007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9896
9897 * server.c (main): Correct strtoul check.
9898
42c81e2a
DJ
98992007-03-27 Jon Ringle <jon@ringle.org>
9900
9901 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9902
9453113a
DJ
99032007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9904
9905 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9906
64a69107
DJ
99072007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9908
9909 * terminal.h: Check HAVE_SGTTY_H.
9910
99112007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9912
9913 * remote-utils.c (remote_open): Print out the assigned port number.
9914
c74d0ad8
DJ
99152007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9916
9917 * remote-utils.c (monitor_output): New function.
9918 * server.c (debug_threads): Define here.
9919 (monitor_show_help): New function.
9920 (handle_query): Handle qRcmd.
9921 (main): Do not handle 'd' packet.
9922 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9923 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9924 of debug_threads.
9925
de7c3b4a
PA
99262007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9927
9928 * Makefile.in (EXEEXT): New.
9929 (clean): Use $(EXEEXT).
9930
ef57601b
PA
99312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9932
9933 * target.h (target_ops): Rename send_signal to request_interrupt,
9934 and remove enum target_signal parameter.
9935 * linux-low.c (linux_request_interrupt): Rename from
9936 linux_send_signal, and always send SIGINT.
9937 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9938 and always send SIGINT.
9939 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9940 of send_signal.
9941 (input_interrupt): Likewise.
9942
820f2bda
PA
99432007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9944
9945 * server.c (get_features_xml): Check if target implemented
9946 arch_string.
9947 * win32-i386-low.c (win32_arch_string): New.
9948 (win32_target_ops): Add win32_arch_string as arch_string member.
9949
ab39bf24
UW
99502007-02-22 Markus Deuling <deuling@de.ibm.com>
9951
9952 * spu-low.c (spu_arch_string): New.
9953 (spu_target_ops): Add spu_arch_string.
9954
61ff6e04
DJ
99552007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9956
9957 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9958 * configure.ac: Do not check for terminal.h.
9959 * configure, config.in: Regenerated.
9960
fb1e4ffc
DJ
99612007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9962
9963 * Makefile.in (OBS): Add $(XML_BUILTIN).
9964 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9965 (clean): Update.
9966 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9967 (arm-with-iwmmxt.c): New.
9968 * config.in, configure: Regenerate.
9969 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9970 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9971 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9972 (arm*-*-linux*): Add iWMMXt and regset support.
9973 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9974 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9975 (arm_store_wmmxregset, target_regsets): New.
9976 * server.c (get_features_xml): Take annex argument. Check builtin
9977 XML documents.
9978 (handle_query): Handle multiple annexes.
9979
0f48aa01
DJ
99802007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9981
9982 * remote-utils.c [USE_WIN32API] (read, write): Define.
9983 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9984 write.
9985
23181151
DJ
99862007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9987
9988 * linux-i386-low.c (the_low_target): Set arch_string.
9989 * linux-x86-64-low.c (the_low_target): Likewise.
9990 * linux-low.c (linux_arch_string): New.
9991 (linux_target_ops): Add it.
9992 * linux-low.h (struct linux_target_ops): Add arch_string.
9993 * server.c (write_qxfer_response): Use const void * for DATA.
9994 (get_features_xml): New.
9995 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9996 * target.h (struct target_ops): Add arch_string method.
9997
9d606399
DJ
99982007-01-03 Denis Pilat <denis.pilat@st.com>
9999 Daniel Jacobowitz <dan@codesourcery.com>
10000
10001 * linux-low.c (linux_kill): Handle being called with no threads.
10002 * win32-i386-low.c (win32_kill): Likewise.
10003 (get_child_debug_event): Clear current_process_handle.
10004
100052006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10006 Daniel Jacobowitz <dan@codesourcery.com>
10007
10008 * remote-utils.c (remote_open): Check the type of specified
10009 serial port devices before opening them.
10010 * server.c (main): Kill the inferior if an error occurs during
10011 the first remote_open.
10012
a5e13d24
DJ
100132006-12-05 Markus Deuling <deuling@de.ibm.com>
10014
10015 * README: Update supported targets.
10016
186947f7
DJ
100172006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * Makefile.in (clean): Remove reg-mips64.c.
10020 (reg-mips64.c, reg-mips64.o): New rules.
10021 * configure.srv: Handle mips64. Include regset support for mips.
10022 * linux-mips-low.c (union mips_register): New.
10023 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10024 (mips_breakpoint, mips_breakpoint_at): Use int.
10025 (mips_collect_register, mips_supply_register)
10026 (mips_collect_register_32bit, mips_supply_register_32bit)
10027 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10028 (mips_store_fpregset, target_regsets): New.
10029 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10030
a13e2c95
UW
100312006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10032
10033 * configure.srv: Add target "spu*-*-*".
10034 * Makefile.in (clean): Remove reg-spu.c.
10035 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10036 * spu-low.c: New file.
10037
cb7283db
DJ
100382006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10039
10040 * configure.ac: Correct td_thr_tls_get_addr test.
10041 * configure: Regenerated.
10042
89be2091
DJ
100432006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10044
10045 * linux-low.c (linux_wait_for_event): Reformat. Use the
10046 pass_signals array.
10047 * remote-utils.c (decode_address_to_semicolon): New.
10048 * server.c (pass_signals, handle_general_set): New.
10049 (handle_query): Mention QPassSignals for qSupported.
10050 (main): Call handle_general_set.
10051 * server.h (pass_signals, decode_address_to_semicolon): New.
10052
000ef4f0
DJ
100532006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10054
10055 * server.c (handle_query): Correct error handling for read_auxv.
10056
b7149293
UW
100572005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10058
10059 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10060 and srv_linux_thread_db to yes.
10061 * linux-s390-low.c (s390_fill_gregset): New function.
10062 (target_regsets): Define data structure.
10063
dae5f5cf
DJ
100642006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10065
10066 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10067 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10068 * config.in, configure: Regenerated.
10069 * inferiors.c (gdb_id_to_thread): New function.
10070 (gdb_id_to_thread_id): Use it.
10071 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10072 * linux-low.h (struct process_info): Add th member.
10073 (thread_db_get_tls_address): New prototype.
10074 * remote-utils.c (decode_address): Make non-static.
10075 * server.c (handle_query): Handle qGetTLSAddr.
10076 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10077 * target.h (struct target_ops): Add get_tls_address.
10078 * thread-db.c (maybe_attach_thread): Save the thread handle.
10079 (thread_db_get_tls_address): New.
10080
32ca6d61
DJ
100812006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10082
10083 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10084 (linux_resume_one_process): Take a siginfo_t *. Update all
10085 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10086 (struct pending_signals): Add a siginfo_t.
10087 (linux_wait_for_process): Always set last_status.
10088 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10089 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10090 * linux-low.h (struct process_info): Add last_status.
10091
5ffff7c1
DJ
100922006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10093
10094 * remote-utils.c (try_rle): New function.
10095 (putpkt_binary): Use it.
10096
8695c747
DJ
100972006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10098
10099 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10100 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10101 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10102 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10103 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10104 point registers.
10105
290fadea
RS
101062006-08-08 Richard Sandiford <richard@codesourcery.com>
10107
10108 * server.c (terminal_fd): New variable.
10109 (old_foreground_pgrp): Likewise.
10110 (restore_old_foreground_pgrp): New function.
10111 (start_inferior): Record the terminal file descriptor in terminal_fd
10112 and its original foreground group in old_foreground_pgrp. Register
10113 restore_old_foreground_pgrp with atexit().
10114
9f2e1e63
DJ
101152006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10116
10117 * server.c (handle_query): Correct qPart to qXfer.
10118
b80864fb
DJ
101192006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10120
10121 * configure.ac: Check for more headers which are missing on
10122 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10123 * configure.srv: Add Cygwin and mingw32.
10124 * remote-utils.c: Don't include headers unconditionally which
10125 are missing on mingw32. Include <winsock.h> for mingw32.
10126 (remote_open): Adjust for mingw32 support. Flush
10127 standard error after writing to it.
10128 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10129 (unblock_async_io, enable_async_io, disable_async_io)
10130 (readchar, getpkt): Update for Winsock support.
10131 (prepare_resume_reply): Expect a protocol signal number.
10132 * server.c: Disable <sys/wait.h> on mingw32.
10133 (start_inferior): Adjust for mingw32 support. Flush
10134 standard error after writing to it.
10135 (attach_inferior): Likewise. Use protocol signal
10136 numbers.
10137 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10138 and names.
10139 * win32-i386-low.c: New file.
10140 * Makefile.in (XM_CLIBS): Set.
10141 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10142 (win32-i386-low.o): New dependency rule.
10143 * linux-low.c (linux_wait): Use target signal numbers.
10144 * target.h (struct target_ops): Doc fix.
10145 * server.h (target_signal_to_name): New prototype.
10146 * gdbreplay.c: Don't include headers unconditionally which
10147 are missing on mingw32. Include <winsock.h> for mingw32.
10148 (remote_close, remote_open): Adjust for Winsock support.
10149 * configure, config.in: Regenerated.
10150
0876f84a
DJ
101512006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10152
10153 * server.c (decode_xfer_read, write_qxfer_response): New.
10154 (handle_query): Take a packet length argument. Handle
10155 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10156 the qSupported response.
10157 (main): Update call to handle_query.
10158
01f9e8fa
DJ
101592006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10160
10161 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10162 (putpkt_binary): Renamed from putpkt and adjusted for binary
10163 data.
10164 (putpkt): New wrapper for putpkt_binary.
10165 (readchar): Don't mask off the high bit.
10166 (decode_X_packet): New function.
10167 * server.c (main): Call putpkt_binary if a handler sets the packet
10168 length. Save the length of the incoming packet. Handle 'X'.
10169 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10170
be2a5f71
DJ
101712006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10172
10173 * server.c (handle_query): Handle qSupported.
10174
ea025f5f
DJ
101752006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10176
10177 * remote-utils.c (all_symbols_looked_up): New variable.
10178 (look_up_one_symbol): Check it.
10179 * server.h (look_up_one_symbol): New declaration.
10180 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10181
9308fc88
DJ
101822006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10183
10184 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10185 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10186 (PTRACE_GET_THREAD_AREA): Define.
10187 (ps_get_thread_area): New function.
10188
52fb6437
NS
101892006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10190
10191 * configure.srv (m68k*-*-uclinux*): New target.
10192 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10193 (linux_resume_one_process): Remove extraneous cast.
10194 (linux_read_offsets): New.
10195 (linux_target_op): Add linux_read_offsets on mmuless systems.
10196 * server.c (handle_query): Add qOffsets logic.
10197 * target.h (struct target_ops): Add read_offsets.
10198
21b0f40c
DJ
101992006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10200
10201 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10202 (PTRACE_GET_THREAD_AREA): Define.
10203 (ps_get_thread_area): New function.
10204 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10205 (linux-x86-64-low.o): Update.
10206
0050a760
DJ
102072006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10208
10209 * configure.ac: Remove checks for prfpregset_t.
10210 * gdb_proc_service.h: New file.
10211 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10212 new "gdb_proc_service.h".
10213 * proc-service.c: Likewise.
10214 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10215 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10216 * Makefile.in (gdb_proc_service_h): Updated.
10217 * configure, config.in: Regenerated.
10218
b92a518e
DJ
102192006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10220
10221 * remote-utils.c (prepare_resume_reply): Move declaration
10222 of gdb_id_from_wait to the top of the block.
10223
545587ee
DJ
102242006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10225
10226 * linux-low.c (regsets_store_inferior_registers): Read the regset
10227 from the target before filling it.
10228
9db87ebd
DJ
102292006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10230
10231 * server.c (attach_inferior): Return SIGTRAP for a successful
10232 attach.
10233
dd24457d
DJ
102342006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10235
10236 * Makefile.in (OBS): Add version.o.
10237 (STAGESTUFF): Delete.
10238 (version.o): Add dependencies.
10239 (version.c): Replace rule.
10240 (clean): Remove version.c.
10241 * server.c (gdbserver_version): New.
10242 (gdbserver_usage): Use printf.
10243 (main): Handle --version and --help.
10244 * server.h (version, host_name): Add declarations.
10245
6f0f660e
EZ
102462005-12-23 Eli Zaretskii <eliz@gnu.org>
10247
889bf7c5
PA
10248 * linux-arm-low.c:
10249 * linux-arm-low.c:
10250 * inferiors.c:
10251 * i387-fp.h:
10252 * i387-fp.c:
10253 * gdbreplay.c:
10254 * regcache.c:
10255 * proc-service.c:
10256 * mem-break.h:
10257 * mem-break.c:
10258 * linux-x86-64-low.c:
10259 * linux-sh-low.c:
10260 * linux-s390-low.c:
10261 * linux-ppc64-low.c:
10262 * linux-ppc-low.c:
10263 * linux-mips-low.c:
10264 * linux-m68k-low.c:
10265 * linux-m32r-low.c:
10266 * linux-low.h:
10267 * linux-low.c:
10268 * linux-ia64-low.c:
10269 * linux-i386-low.c:
10270 * linux-crisv32-low.c:
10271 * thread-db.c:
10272 * terminal.h:
10273 * target.h:
10274 * target.c:
10275 * server.h:
10276 * server.c:
10277 * remote-utils.c:
10278 * regcache.h:
10279 * utils.c:
10280 * Makefile.in:
10281 * configure.ac:
6f0f660e
EZ
10282 * gdbserver.1: Add (C) after Copyright. Update the FSF
10283 address.
10284
9d1fb177
DJ
102852005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10286
10287 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10288 (arm_breakpoint_at): Recognize both breakpoints.
10289 (the_low_target): Use the correct breakpoint instruction.
10290
011a70c2
DJ
102912005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10292
10293 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10294 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10295 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10296 (the_low_target): Update.
10297
7fb85e41
AS
102982005-10-25 Andreas Schwab <schwab@suse.de>
10299
10300 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10301
10302 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10303 (ia64_num_regs): Reduce to 462.
10304
3db0444b
DJ
103052005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10306
10307 * acinclude.m4: Correct quoting.
10308 * aclocal.m4: Regenerated.
10309
10310 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10311 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10312 (thread_db_init): Call thread_db_err_str.
10313 * configure.ac: Check for TD_VERSION.
10314 * config.in, configure: Regenerated.
10315
bee0189a
DJ
103162005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10317
10318 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10319
e9d25b98
DJ
103202005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10321
10322 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10323 is not available. Define HAVE_PTRACE_GETREGS if it is.
10324 * config.in, configure: Regenerated.
10325 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10326 * linux-i386-low.c, linux-m68k-low.c: Update to use
10327 HAVE_PTRACE_GETREGS.
10328 * linux-low.c (regsets_fetch_inferior_registers)
10329 (regsets_store_inferior_registers): Only return 0 if we processed
10330 GENERAL_REGS.
10331 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10332 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10333
a06660f7
DJ
103342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10335
10336 * inferiors.c (struct thread_info): Add gdb_id.
10337 (add_thread): Add gdb_id argument.
10338 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10339 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10340 calls to add_thread.
10341 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10342 * server.c (handle_query): Use thread_to_gdb_id.
10343 (handle_v_cont, main): Use gdb_id_to_thread_id.
10344 * server.h (add_thread): Update prototype.
10345 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10346 prototypes.
10347
5a1f5858
DJ
103482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10349
10350 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10351 left-padded registers.
10352 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10353 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10354
e122f1f5
SE
103552005-07-01 Steve Ellcey <sje@cup.hp.com>
10356
10357 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10358 * configure: Regenerate.
10359 * config.in: Regenerate.
10360 * server.h (NEED_DECLARATION_STRERROR):
10361 Replace with !HAVE_DECL_STRERROR.
10362
d592fa2f
DJ
103632005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10364
10365 * linux-low.c (linux_wait, linux_send_signal): Don't test
10366 an unsigned long variable for > 0 if it could be MAX_ULONG.
10367 * server.c (myresume): Likewise.
10368 * target.c (set_desired_inferior): Likewise.
10369
ccbd4912
MK
103702005-06-13 Mark Kettenis <kettenis@gnu.org>
10371
10372 * configure.ac: Simplify and improve check for socklen_t.
10373 * configure, config.in: Regenerate.
10374
f450004a
DJ
103752005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10376
10377 * acconfig.h: Remove.
10378 * configure.ac: Add a test for socklen_t. Use three-argument
10379 AC_DEFINE throughout.
10380 * config.in: Regenerated using autoheader 2.59.
10381 * configure: Regenerated.
10382
10383 * gdbreplay.c (socklen_t): Provide a default.
10384 (remote_open): Use socklen_t.
10385 * remote-utils.c (socklen_t): Provide a default.
10386 (remote_open): Use socklen_t.
10387 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10388 unsigned char.
10389
10390 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10391 char for buffers.
10392 * linux-low.c (linux_read_memory, linux_write_memory)
10393 (linux_read_auxv): Likewise.
10394 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10395 (check_mem_write): Likewise.
10396 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10397 Likewise.
10398 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10399 (registers_from_string, register_data): Likewise.
10400 * server.c (handle_query, main): Likewise.
10401 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10402 (decode_M_packet): Likewise.
10403 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10404 * target.h (struct target_ops): Update read_memory, write_memory,
10405 and read_auxv.
10406 (read_inferior_memory, write_inferior_memory): Update.
10407 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10408 to unsigned char *.
10409 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10410 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10411 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10412 linux-s390-low.c, linux-sh-low.c: Update for changes in
10413 read_inferior_memory and the_low_target->breakpoint.
10414
eee84df1
DJ
104152005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10416
10417 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10418 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10419 * configure.srv: Add powerpc64-*-linux*.
10420 * linux-ppc64-low.c: New file.
10421
45b134e5
OF
104222005-05-23 Orjan Friberg <orjanf@axis.com>
10423
10424 * linux-cris-low.c: New file with support for CRIS.
10425 * linux-crisv32-low.c: Ditto for CRISv32.
10426 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10427 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10428 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10429 reg-crisv32.o, and reg-crisv32.c to make rules.
10430 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10431 recognized targets.
10432
48d93c75
UW
104332005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10434
10435 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10436 of sizeof (PTRACE_XFER_TYPE).
10437 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10438
e013ee27
OF
104392005-05-12 Orjan Friberg <orjanf@axis.com>
10440
889bf7c5 10441 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10442 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10443 pointers for hardware watchpoint support.
10444 * linux-low.h (struct linux_target_ops): Ditto.
10445 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10446 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10447 to linux_target_ops.
10448 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10449 reply packet.
10450 * server.c (main): Recognize 'Z' and 'z' packets.
10451
b0ded00b
UW
104522005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10453
10454 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10455 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10456 (the_low_target): Add new members.
10457
8643e2ad
DJ
104582005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10459
10460 * proc-service.c (ps_lgetregs): Search all_processes instead of
10461 all_threads.
10462
fc620387
DJ
104632005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10464
10465 * server.c (start_inferior): Change return type to int.
10466 (attach_inferior): Change sigptr to int *.
10467 (handle_v_cont, handle_v_requests): Change signal to int *.
10468 (main): Change signal to int.
10469
104702005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10471
10472 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10473 * configure.srv: Add m32r*-*-linux*.
10474 * linux-m32r-low.c: New file.
10475
e0e76420
DJ
104762005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10477
10478 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10479
a1928bad
DJ
104802005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10481
10482 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10483 Take unsigned long arguments for PIDs.
10484 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10485 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10486 (wait_for_sigstop, linux_resume_one_process)
10487 (regsets_fetch_inferior_registers, linux_send_signal)
10488 (linux_read_auxv): Likewise. Update the types of variables holding
10489 PIDs. Update format string specifiers.
10490 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10491 * remote-utils.c (prepare_resume_reply): Likewise.
10492 * server.c (cont_thread, general_thread, step_thread)
10493 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10494 unsigned long.
10495 (handle_query): Update format specifiers.
10496 (handle_v_cont, main): Use strtoul for thread IDs.
10497 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10498 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10499 (general_thread, step_thread, thread_from_wait)
10500 (old_thread_from_wait): Update.
10501 * target.h (struct thread_resume): Use unsigned long for THREAD.
10502 (struct target_ops): Use unsigned long for arguments to attach and
10503 thread_alive.
10504
dcdb98d2
DJ
105052005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10506
10507 * acinclude.m4: Include bfd/bfd.m4 directly.
10508 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10509 <agriffis@toolchain.org>.
10510 * aclocal.m4, configure: Regenerated.
10511
bec39cab
AC
105122005-01-07 Andrew Cagney <cagney@gnu.org>
10513
10514 * configure.ac: Rename configure.in, require autoconf 2.59.
10515 * configure: Re-generate.
10516
434c4c77
DJ
105172004-12-08 Daniel Jacobowitz <dan@debian.org>
10518
10519 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10520 LIBS when finished.
10521 * aclocal.m4: Regenerated.
10522 * configure: Regenerated.
10523
db1d3e1b
AS
105242004-11-21 Andreas Schwab <schwab@suse.de>
10525
10526 * linux-m68k-low.c (m68k_num_gregs): Define.
10527 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10528 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10529 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10530 (m68k_breakpoint_at): New. Add to the_low_target.
10531
10532 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10533 srv_linux_thread_db to yes.
10534
43360365
JB
105352004-10-20 Joel Brobecker <brobecker@gnat.com>
10536
10537 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10538 (ARCH_SET_FS): Likewise.
10539 (ARCH_GET_FS): Likewise.
10540 (ARCH_GET_GS): Likewise.
10541
fd500816
DJ
105422004-10-16 Daniel Jacobowitz <dan@debian.org>
10543
10544 * linux-i386-low.c (ps_get_thread_area): New.
10545 * linux-x86-64-low.c (ps_get_thread_area): New.
10546 * linux-low.c: Include <sys/syscall.h>.
10547 (linux_kill_one_process): Don't kill the first thread here.
10548 (linux_kill): Kill the first thread here.
10549 (kill_lwp): New function.
10550 (send_sigstop, linux_send_signal): Use it.
10551 * proc-service.c: Clean up #ifdefs.
10552 (fpregset_info): Delete.
10553 (ps_lgetregs): Update and enable implementation.
10554 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10555 implementations.
10556 * remote-utils.c (struct sym_cache, symbol_cache): New.
10557 (input_interrupt): Print a clearer message.
10558 (async_io_enabled): New variable.
10559 (enable_async_io, disable_async_io): Use it. Update comments.
10560 (look_up_one_symbol): Use the symbol cache.
10561 * thread-db.c (thread_db_look_up_symbols): New function.
10562 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10563
f6de3c42
DJ
105642004-10-16 Daniel Jacobowitz <dan@debian.org>
10565
10566 * configure.in: Test for -rdynamic.
10567 * configure: Regenerated.
10568 * Makefile (INTERNAL_LDFLAGS): New.
10569 (gdbserver, gdbreplay): Use it.
10570
2c0fc042
AC
105712004-09-02 Andrew Cagney <cagney@gnu.org>
10572
10573 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10574
075b3282
DJ
105752004-03-23 Daniel Jacobowitz <drow@mvista.com>
10576
10577 * linux-low.c (linux_wait): Clear all_processes list also.
10578
fa6a77dc
DJ
105792004-03-12 Daniel Jacobowitz <drow@mvista.com>
10580
10581 * linux-low.c: Include <errno.h>. Remove extern declaration of
10582 errno.
10583
6d782a97
DJ
105842004-03-12 Daniel Jacobowitz <drow@mvista.com>
10585
10586 * gdbreplay.c, server.h, utils.c: Update copyright years.
10587
3a7fb99b
DJ
105882004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10589
10590 * server.c (main): Print child status or termination signal from
10591 variable 'signal', not 'sig'.
10592
c3e735a6
DJ
105932004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10594
10595 * linux-low.c (linux_read_memory): Change return type to
10596 int. Check for and return error from ptrace().
10597 * target.c (read_inferior_memory): Change return type to int. Pass
10598 back return status from the_target->read_memory().
10599 * target.h (struct target_ops): Adapt *read_memory() prototype.
10600 Update comment.
10601 (read_inferior_memory): Adapt prototype.
10602 * server.c (main): Return an error packet if
10603 read_inferior_memory() returns an error.
10604
a59d1c82
DJ
106052004-03-04 Daniel Jacobowitz <drow@mvista.com>
10606
10607 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10608 Unify with other clean targets.
10609
dc3f8883
DJ
106102004-02-29 Daniel Jacobowitz <drow@mvista.com>
10611
10612 * server.c (handle_v_cont): Call set_desired_inferior.
10613
89a208da
DJ
106142004-02-29 Daniel Jacobowitz <drow@mvista.com>
10615
10616 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10617
62ea82f5
DJ
106182004-02-29 Daniel Jacobowitz <drow@mvista.com>
10619
10620 * linux-low.c (linux_wait): Unblock async I/O.
10621 (linux_resume): Block and enable async I/O.
10622 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10623 * server.h (block_async_io, unblock_async_io): Add prototypes.
10624
6910d122
DJ
106252004-02-29 Daniel Jacobowitz <drow@mvista.com>
10626
10627 * remote-utils.c (remote_open): Print a status notice after
10628 opening a TCP port.
10629 * server.c (attach_inferior): Print a status notice after
10630 attaching.
10631
106322004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10633
10634 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10635
c89dc5d4
DJ
106362004-02-26 Daniel Jacobowitz <drow@mvista.com>
10637
10638 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10639 error packet.
10640 * server.c, target.h: Update copyright years.
10641
4b8dad4a
RM
106422004-02-25 Roland McGrath <roland@redhat.com>
10643
10644 * target.h (struct target_ops): New member `read_auxv'.
10645 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10646 * linux-low.c (linux_read_auxv): New function.
10647 (linux_target_ops): Initialize `read_auxv' member to that.
10648
d7446758
JB
106492004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10650
10651 Committed by Jim Blandy <jimb@redhat.com>.
10652
10653 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10654 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10655 instead of GPR_SIZE to distiguish s390 and s390x targets.
10656
5544ad89
DJ
106572004-01-31 Daniel Jacobowitz <drow@mvista.com>
10658
10659 * linux-low.c: Update copyright year.
10660 (check_removed_breakpoint): Clear pending_is_breakpoint.
10661 (linux_set_resume_request, linux_queue_one_thread)
10662 (resume_status_pending_p): New functions.
10663 (linux_continue_one_thread): Use process->resume.
10664 (linux_resume): Only resume threads if there are no pending events.
10665 * linux-low.h (struct process_info): Add resume request
10666 pointer.
10667
2a68b70e
DJ
106682004-01-30 Daniel Jacobowitz <drow@mvista.com>
10669
10670 * regcache.c (new_register_cache): Clear the allocated register
10671 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10672
64386c31
DJ
106732003-10-13 Daniel Jacobowitz <drow@mvista.com>
10674
10675 * linux-low.c (linux_resume): Take a struct thread_resume *
10676 argument.
10677 (linux_wait): Update call.
10678 (resume_ptr): New static variable.
10679 (linux_continue_one_thread): Renamed from
10680 linux_continue_one_process. Use resume_ptr.
10681 (linux_resume): Use linux_continue_one_thread.
10682 * server.c (handle_v_cont, handle_v_requests): New functions.
10683 (myresume): New function.
10684 (main): Handle 'v' case.
10685 * target.h (struct thread_resume): New type.
10686 (struct target_ops): Change argument of "resume" to struct
10687 thread_resume *.
10688 (myresume): Delete macro.
10689
c938e9b0
L
106902003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10691
10692 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10693 (uninstall): Support DESTDIR.
10694
7f313d07
BC
10695Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10696
10697 * configure.srv: Add xscale*linux copy of arm*linux entry.
10698
3b2fc2ea
DJ
106992003-07-24 Daniel Jacobowitz <drow@mvista.com>
10700
10701 * linux-arm-low.c (arm_reinsert_addr): New function.
10702 (the_low_target): Add arm_reinsert_addr.
10703
1c0a559e
MK
107042003-07-08 Mark Kettenis <kettenis@gnu.org>
10705
10706 * mem-break.c: Remove whitespace at end of file.
10707
43d5792c
DJ
107082003-06-28 Daniel Jacobowitz <drow@mvista.com>
10709
10710 * configure.in: Check whether we need to prototype strerror.
10711 * server.h: Optionally prototype strerror.
10712 * gdbreplay.c (perror_with_name): Use strerror.
10713 * linux-low.c (linux_attach_lwp): Use strerror.
10714 * utils.c (perror_with_name): Use strerror.
10715 * config.in, configure: Regenerated.
10716
c8a86edf
DJ
107172003-06-28 Daniel Jacobowitz <drow@mvista.com>
10718
10719 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10720 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10721
73d37363
DJ
107222003-06-20 Daniel Jacobowitz <drow@mvista.com>
10723
10724 * Makefile.in (SFILES): Update.
10725 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10726 low-sun3.c: Remove files.
10727
6ad8ae5c
DJ
107282003-06-17 Daniel Jacobowitz <drow@mvista.com>
10729
10730 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10731 (linux_detach_one_process, linux_detach): New functions.
10732 (linux_target_ops): Add linux_detach.
10733 * server.c (main): Handle 'D' packet.
10734 * target.h (struct target_ops): Add "detach" member.
10735 (detach_inferior): Define.
10736
1581182a
MK
107372003-06-13 Mark Kettenis <kettenis@gnu.org>
10738
10739 From Kelley Cook <kelleycook@wideopenwest.com>:
10740 * configure.srv: Accept i[34567]86 variants.
10741
e5379b03
DJ
107422003-06-05 Daniel Jacobowitz <drow@mvista.com>
10743
10744 * linux-low.c (linux_wait_for_event): Correct comment typos.
10745 (linux_resume_one_process): Call check_removed_breakpoint.
10746 (linux_send_signal): New function.
10747 (linux_target_ops): Add linux_send_signal.
10748 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10749 of kill.
10750 * target.h (struct target_ops): Add send_signal.
10751
2ff29de4
JB
107522003-05-29 Jim Blandy <jimb@redhat.com>
10753
10754 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10755 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10756 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10757 away part of the register's value.
10758
254787d4
DJ
107592003-03-26 Daniel Jacobowitz <drow@mvista.com>
10760
10761 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10762 (linux_wait_for_event, linux_init_signals): Likewise.
10763
94e10508
DJ
107642003-03-17 Daniel Jacobowitz <drow@mvista.com>
10765
10766 * configure.in: Check for stdlib.h.
10767 * configure: Regenerated.
10768 * config.in: Regenerated.
10769
4c0711e0
DJ
107702003-01-04 Andreas Schwab <schwab@suse.de>
10771
10772 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10773
ef66e766
AC
107742003-01-02 Andrew Cagney <ac131313@redhat.com>
10775
10776 * Makefile.in: Remove obsolete code.
10777
a1358604
DJ
107782002-11-20 Daniel Jacobowitz <drow@mvista.com>
10779
10780 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10781 defined(PT_FPR0_HI).
10782
23ce3b1c
DJ
107832002-11-17 Stuart Hughes <seh@zee2.com>
10784
10785 * linux-arm-low.c (arm_num_regs): Increase.
10786 (arm_regmap): Include status register.
10787
107882002-11-17 Daniel Jacobowitz <drow@mvista.com>
10789
10790 * linux-low.c (register_addr): Remove incorrect -1 check.
10791
a9fa9f7d
DJ
107922002-08-29 Daniel Jacobowitz <drow@mvista.com>
10793
10794 * linux-low.c (linux_create_inferior): Call setpgid. Return
10795 the new PID.
10796 (unstopped_p, linux_signal_pid): Remove.
10797 (linux_target_ops): Remove linux_signal_pid.
10798 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10799 global instead of target method.
10800 * target.h (struct target_ops): Remove signal_pid. Update comment
10801 for create_inferior.
10802 * server.c (signal_pid): New variable.
10803 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10804 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10805 (attach_inferior): Set signal_pid.
10806
17574093
DJ
108072002-08-23 Daniel Jacobowitz <drow@mvista.com>
10808
10809 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10810
108112002-08-20 Jim Blandy <jimb@redhat.com>
10812
10813 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10814 default for this.
10815
108162002-08-01 Andrew Cagney <cagney@redhat.com>
10817
10818 * Makefile.in: Make chill references obsolete.
10819
108202002-07-24 Kevin Buettner <kevinb@redhat.com>
10821
10822 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10823 * configure: Regenerate.
10824 * config.in: Regenerate.
10825
108262002-07-09 David O'Brien <obrien@FreeBSD.org>
10827
10828 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10829 (perror_with_name, remote_close, remote_open, expect, play): Static.
10830
108312002-07-04 Michal Ludvig <mludvig@suse.cz>
10832
4b8dad4a 10833 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10834 byte offsets instead of an array of indexes.
10835 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10836
108372002-06-13 Daniel Jacobowitz <drow@mvista.com>
10838
10839 * regcache.c: Add comment.
10840
108412002-06-11 Daniel Jacobowitz <drow@mvista.com>
10842
10843 * thread-db.c: New file.
10844 * proc-service.c: New file.
10845 * acinclude.m4: New file.
10846 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10847 proc-service.o, and thread-db.o.
10848 (linux-low.o): Add USE_THREAD_DB.
10849 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10850 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10851 * aclocal.m4: Regenerated.
10852 * config.in: Regenerated.
10853 * configure: Regenerated.
10854 * configure.in: Check for proc_service.h, sys/procfs.h,
10855 thread_db.h, and linux/elf.h headrs.
10856 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10857 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10858 Check for -lthread_db and thread support.
10859 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10860 PowerPC, and SuperH.
10861 * i387-fp.c: Constify arguments.
10862 * i387-fp.h: Likewise.
10863 * inferiors.c: (struct thread_info): Renamed from
10864 `struct inferior_info'. Remove PID member. Use generic inferior
10865 list header. All uses updated.
10866 (inferiors, signal_pid): Removed.
10867 (all_threads): New variable.
10868 (get_thread): Define.
10869 (add_inferior_to_list): New function.
10870 (for_each_inferior): New function.
10871 (change_inferior_id): New function.
10872 (add_inferior): Removed.
10873 (remove_inferior): New function.
10874 (add_thread): New function.
10875 (free_one_thread): New function.
10876 (remove_thread): New function.
10877 (clear_inferiors): Use for_each_inferior and free_one_thread.
10878 (find_inferior): New function.
10879 (find_inferior_id): New function.
10880 (inferior_target_data): Update argument type.
10881 (set_inferior_target_data): Likewise.
10882 (inferior_regcache_data): Likewise.
10883 (set_inferior_regcache_data): Likewise.
10884 * linux-low.c (linux_bp_reinsert): Remove.
10885 (all_processes, stopping_threads, using_thrads)
10886 (struct pending_signals, debug_threads, pid_of): New.
10887 (inferior_pid): Replace with macro.
10888 (struct inferior_linux_data): Remove.
10889 (get_stop_pc, add_process): New functions.
10890 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10891 Use add_process and add_thread.
10892 (linux_attach_lwp): New function, based on old linux_attach. Use
10893 add_process and add_thread. Set stop_expected for new threads.
10894 (linux_attach): New function.
10895 (linux_kill_one_process): New function.
10896 (linux_kill): Kill all LWPs.
10897 (linux_thread_alive): Use find_inferior_id.
10898 (check_removed_breakpoints, status_pending_p): New functions.
10899 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10900 Update. Use WNOHANG. Wait for cloned processes also. Update process
10901 struct for the found process.
10902 (linux_wait_for_event): New function.
10903 (linux_wait): Use it. Support LWPs.
10904 (send_sigstop, wait_for_sigstop, stop_all_processes)
10905 (linux_resume_one_process, linux_continue_one_process): New functions.
10906 (linux_resume): Support LWPs.
10907 (REGISTER_RAW_SIZE): Remove.
10908 (fetch_register): Use register_size instead. Call supply_register.
10909 (usr_store_inferior_registers): Likewise. Call collect_register.
10910 Fix recursive case.
10911 (regsets_fetch_inferior_registers): Improve error message.
10912 (regsets_store_inferior_registers): Add debugging.
10913 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10914 (unstopped_p, linux_signal_pid): New functions.
10915 (linux_target_ops): Add linux_signal_pid.
10916 (linux_init_signals): New function.
10917 (initialize_low): Call it. Initialize using_threads.
10918 * regcache.c (inferior_regcache_data): Add valid
10919 flag.
10920 (get_regcache): Fetch registers lazily. Add fetch argument
10921 and update all callers.
10922 (regcache_invalidate_one, regcache_invalidate): New
10923 functions.
10924 (new_register_cache): Renamed from create_register_cache.
10925 Return the new regcache.
10926 (free_register_cache): Change argument to a void *.
10927 (registers_to_string, registers_from_string): Call get_regcache
10928 with fetch flag set.
10929 (register_data): Make static. Pass fetch flag to get_regcache.
10930 (supply_register): Call get_regcache with fetch flag clear.
10931 (collect_register): Call get_regcache with fetch flag set.
10932 (collect_register_as_string): New function.
10933 * regcache.h: Update.
10934 * remote-utils.c (putpkt): Flush after debug output and use
10935 stderr.
10936 Handle input interrupts while waiting for an ACK.
10937 (input_interrupt): Use signal_pid method.
10938 (getpkt): Flush after debug output and use stderr.
10939 (outreg): Use collect_register_as_string.
10940 (new_thread_notify, dead_thread_notify): New functions.
10941 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10942 and general_thread.
10943 (look_up_one_symbol): Flush after debug output.
10944 * server.c (step_thread, server_waiting): New variables.
10945 (start_inferior): Don't use signal_pid. Update call to mywait.
10946 (attach_inferior): Update call to mywait.
10947 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10948 (main): Don't fetch/store registers explicitly. Use
10949 set_desired_inferior. Support proposed ``Hs'' packet. Update
10950 calls to mywait.
10951 * server.h: Update.
10952 (struct inferior_list, struct_inferior_list_entry): New.
10953 * target.c (set_desired_inferior): New.
10954 (write_inferior_memory): Constify.
10955 (mywait): New function.
10956 * target.h: Update.
10957 (struct target_ops): New signal_pid method.
10958 (mywait): Removed macro, added prototype.
10959
10960 * linux-low.h (regset_func): Removed.
10961 (regset_fill_func, regset_store_func): New.
10962 (enum regset_type): New.
10963 (struct regset_info): Add type field. Use new operation types.
10964 (struct linux_target_ops): stop_pc renamed to get_pc.
10965 Add decr_pc_after_break and breakpoint_at.
10966 (get_process, get_thread_proess, get_process_thread)
10967 (strut process_info, all_processes, linux_attach_lwp)
10968 (thread_db_init): New.
10969
10970 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10971 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10972 (the_low_target): Add new members.
10973 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10974 (i386_store_fpxregset): Constify.
10975 (target_regsets): Add new kind identifier.
10976 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10977 (i386_set_pc): Add debugging.
10978 (i386_breakpoint_at): New function.
10979 (the_low_target): Add new members.
10980 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10981 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10982 (mips_breakpoint_at): New.
10983 (the_low_target): Add new members.
10984 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10985 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10986 (the_low_target): Add new members.
10987 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10988 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10989 (the_low_target): Add new members.
10990 * linux-x86-64-low.c (target_regsets): Add new kind
10991 identifier.
10992
109932002-05-15 Daniel Jacobowitz <drow@mvista.com>
10994
10995 From Martin Pool <mbp@samba.org>:
10996 * server.c (gdbserver_usage): New function.
10997 (main): Call it.
10998
109992002-05-14 Daniel Jacobowitz <drow@mvista.com>
11000
11001 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11002 stop_at -> stop_pc.
11003
110042002-05-04 Andrew Cagney <ac131313@redhat.com>
11005
11006 * Makefile.in: Remove obsolete code.
11007
110082002-04-24 Michal Ludvig <mludvig@suse.cz>
11009
11010 * linux-low.c (regsets_fetch_inferior_registers),
11011 (regsets_store_inferior_registers): Removed cast to int from
11012 ptrace() calls.
11013 * regcache.h: Added declaration of struct inferior_info.
11014
110152002-04-20 Daniel Jacobowitz <drow@mvista.com>
11016
11017 * inferiors.c (struct inferior_info): Add regcache_data.
11018 (add_inferior): Call create_register_cache.
11019 (clear_inferiors): Call free_register_cache.
11020 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11021 * regcache.c (struct inferior_regcache_data): New.
11022 (registers): Remove.
11023 (get_regcache): New function.
11024 (create_register_cache, free_register_cache): New functions.
11025 (set_register_cache): Don't initialize the register cache here.
11026 (registers_to_string, registers_from_string, register_data): Call
11027 get_regcache.
11028 * regcache.h: Add prototypes.
11029 * server.h: Likewise.
11030
110312002-04-20 Daniel Jacobowitz <drow@mvista.com>
11032
11033 * mem-break.c: New file.
11034 * mem-break.h: New file.
11035 * Makefile.in: Add mem-break.o rule; update server.h
11036 dependencies.
11037 * inferiors.c (struct inferior_info): Add target_data
11038 member.
11039 (clear_inferiors): Free target_data member if set.
11040 (inferior_target_data, set_inferior_target_data): New functions.
11041 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11042 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11043 * linux-low.c (linux_bp_reinsert): New variable.
11044 (struct inferior_linux_data): New.
11045 (linux_create_inferior): Use set_inferior_target_data.
11046 (linux_attach): Likewise. Call add_inferior.
11047 (linux_wait_for_one_inferior): New function.
11048 (linux_wait): Call it.
11049 (linux_write_memory): Add const.
11050 (initialize_low): Call set_breakpoint_data.
11051 * linux-low.h (struct linux_target_ops): Add breakpoint
11052 handling members.
11053 * server.c (attach_inferior): Remove extra add_inferior
11054 call.
11055 * server.h: Include mem-break.h. Update inferior.c
11056 prototypes.
11057 * target.c (read_inferior_memory)
11058 (write_inferior_memory): New functions.
11059 * target.h (read_inferior_memory)
11060 (write_inferior_memory): Change macros to prototypes.
11061 (struct target_ops): Update comments. Add const to write_memory
11062 definition.
11063
110642002-04-11 Daniel Jacobowitz <drow@mvista.com>
11065
11066 * linux-low.c (usr_store_inferior_registers): Support
11067 registers which are allowed to fail to store.
11068 * linux-low.h (linux_target_ops): Likewise.
11069 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11070 (ppc_cannot_store_register): FPSCR may not be storable.
11071
110722002-04-09 Daniel Jacobowitz <drow@mvista.com>
11073
11074 * server.h: Include <string.h> if HAVE_STRING_H.
11075 * ChangeLog: Correct paths in last ChangeLog entry.
11076
110772002-04-09 Daniel Jacobowitz <drow@mvista.com>
11078
11079 * linux-low.h: Remove obsolete prototypes.
11080 (struct linux_target_ops): New.
11081 (extern the_low_target): New.
11082 * linux-low.c (num_regs, regmap): Remove declarations.
11083 (register_addr): Use the_low_target explicitly.
11084 (fetch_register): Likewise.
11085 (usr_fetch_inferior_registers): Likewise.
11086 (usr_store_inferior_registers): Likewise.
11087 * linux-arm-low.c (num_regs): Remove.
11088 (arm_num_regs): Define.
11089 (arm_regmap): Renamed from regmap, made static.
11090 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11091 made static.
11092 (arm_cannot_store_register): Renamed from cannot_store_register,
11093 made static.
11094 (the_low_target): New.
11095 * linux-i386-low.c (num_regs): Remove.
11096 (i386_num_regs): Define.
11097 (i386_regmap): Renamed from regmap, made static.
11098 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11099 made static.
11100 (i386_cannot_store_register): Renamed from cannot_store_register,
11101 made static.
11102 (the_low_target): New.
11103 * linux-ia64-low.c (num_regs): Remove.
11104 (ia64_num_regs): Define.
11105 (ia64_regmap): Renamed from regmap, made static.
11106 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11107 made static.
11108 (ia64_cannot_store_register): Renamed from cannot_store_register,
11109 made static.
11110 (the_low_target): New.
11111 * linux-m68k-low.c (num_regs): Remove.
11112 (m68k_num_regs): Define.
11113 (m68k_regmap): Renamed from regmap, made static.
11114 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11115 made static.
11116 (m68k_cannot_store_register): Renamed from cannot_store_register,
11117 made static.
11118 (the_low_target): New.
11119 * linux-mips-low.c (num_regs): Remove.
11120 (mips_num_regs): Define.
11121 (mips_regmap): Renamed from regmap, made static.
11122 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11123 made static.
11124 (mips_cannot_store_register): Renamed from cannot_store_register,
11125 made static.
11126 (the_low_target): New.
11127 * linux-ppc-low.c (num_regs): Remove.
11128 (ppc_num_regs): Define.
11129 (ppc_regmap): Renamed from regmap, made static.
11130 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11131 made static.
11132 (ppc_cannot_store_register): Renamed from cannot_store_register,
11133 made static.
11134 (the_low_target): New.
11135 * linux-s390-low.c (num_regs): Remove.
11136 (s390_num_regs): Define.
11137 (s390_regmap): Renamed from regmap, made static.
11138 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11139 made static.
11140 (s390_cannot_store_register): Renamed from cannot_store_register,
11141 made static.
11142 (the_low_target): New.
11143 * linux-sh-low.c (num_regs): Remove.
11144 (sh_num_regs): Define.
11145 (sh_regmap): Renamed from regmap, made static.
11146 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11147 made static.
11148 (sh_cannot_store_register): Renamed from cannot_store_register,
11149 made static.
11150 (the_low_target): New.
11151 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11152 (the_low_target): New.
11153
111542002-04-09 Daniel Jacobowitz <drow@mvista.com>
11155
11156 * Makefile.in: Add stamp-h target.
11157 * configure.in: Create stamp-h.
11158 * configure: Regenerated.
11159
111602002-04-09 Daniel Jacobowitz <drow@mvista.com>
11161
11162 * inferiors.c: New file.
11163 * target.c: New file.
11164 * target.h: New file.
11165 * Makefile.in: Add target.o and inferiors.o. Update
11166 dependencies.
11167 * linux-low.c (inferior_pid): New static variable,
11168 moved from server.c.
11169 (linux_create_inferior): Renamed from create_inferior.
11170 Call add_inferior. Return 0 on success instead of a PID.
11171 (linux_attach): Renamed from myattach.
11172 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11173 (linux_thread_alive): Renamed from mythread_alive.
11174 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11175 child dies.
11176 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11177 (regsets_store_inferior_registers): Correct error message.
11178 Add missing ``return 0''.
11179 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11180 (linux_store_registers): Renamed from store_inferior_registers.
11181 (linux_read_memory): Renamed from read_inferior_memory.
11182 (linux_write_memory): Renamed from write_inferior_memory.
11183 (linux_target_ops): New structure.
11184 (initialize_low): Call set_target_ops ().
11185 * remote-utils.c (unhexify): New function.
11186 (hexify): New function.
11187 (input_interrupt): Send signals to ``signal_pid''.
11188 * server.c (inferior_pid): Remove.
11189 (start_inferior): Update create_inferior call.
11190 (attach_inferior): Call add_inferior.
11191 (handle_query): New function.
11192 (main): Call handle_query for `q' packets.
11193 * server.h: Include "target.h". Remove obsolete prototypes.
11194 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11195
111962002-04-09 Daniel Jacobowitz <drow@mvista.com>
11197
11198 * Makefile.in: Add WARN_CFLAGS. Update configury
11199 dependencies.
11200 * configure.in: Check for <string.h>
11201 * configure: Regenerate.
11202 * config.in: Regenerate.
11203 * gdbreplay.c: Include needed system headers.
11204 (remote_open): Remove strchr prototype.
11205 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11206 * regcache.c (supply_register): Change buf argument to const void *.
11207 (supply_register_by_name): Likewise.
11208 (collect_register): Change buf argument to void *.
11209 (collect_register_by_name): Likewise.
11210 * regcache.h: Add missing prototypes.
11211 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11212 * server.c (handle_query): New function.
11213 (attached): New static variable, moved out of main.
11214 (main): Quiet longjmp clobber warnings.
11215 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11216 * utils.c (error): Remove NORETURN.
11217 (fatal): Likewise.
This page took 1.754359 seconds and 4 git commands to generate.