sim: mcore: clean up printf warnings
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
a2d5a9d7
MF
12015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2
3 * linux-xtensa-low.c (xtensa_fill_gregset)
4 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5 XCHAL_HAVE_LOOP.
6
deb44829
MF
72015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8
9 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10 (regs_info): Replace usrregs pointer with NULL.
11
e57f1de3
GB
122015-04-17 Gary Benson <gbenson@redhat.com>
13
14 * target.h (struct target_ops) <pid_to_exec_file>: New field.
15 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
16 * server.c (handle_qxfer_exec_file): New function.
17 (qxfer_packets): Add exec-file entry.
18 (handle_query): Report qXfer:exec-file:read as supported packet.
19
62828379
RN
202015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
21
22 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
23
b88bb450
GB
242015-04-09 Gary Benson <gbenson@redhat.com>
25
26 * hostio-errno.c (errno_to_fileio_error): Remove function.
27 Update caller to use remote_fileio_to_fio_error.
28
c8f4bfdd
YQ
292015-04-09 Yao Qi <yao.qi@linaro.org>
30
31 * linux-low.c (linux_insert_point): Call
32 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
33 (linux_remove_point): Call remove_memory_breakpoint if type is
34 raw_bkpt_type_sw.
35 * linux-x86-low.c (x86_insert_point): Don't call
36 insert_memory_breakpoint.
37 (x86_remove_point): Don't call remove_memory_breakpoint.
38
41f98f02
PA
392015-04-01 Pedro Alves <palves@redhat.com>
40 Cleber Rosa <crosa@redhat.com>
41
42 * server.c (gdbserver_usage): Reorganize and extend the usage
43 message.
44
2bf6fb9d
PA
452015-03-24 Pedro Alves <palves@redhat.com>
46
47 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
48 output. Also dump TRAP_TRACE.
49 (linux_low_filter_event): In debug output, distinguish a
50 resume_stop SIGSTOP from a delayed SIGSTOP.
51
369f6daa
GB
522015-03-24 Gary Benson <gbenson@redhat.com>
53
54 * linux-x86-low.c (x86_linux_new_thread): Moved to
55 nat/x86-linux.c.
56 (x86_linux_prepare_to_resume): Likewise.
57
8e5d4070
GB
582015-03-24 Gary Benson <gbenson@redhat.com>
59
60 * Makefile.in (x86-linux-dregs.o): New rule.
61 * configure.srv: Add x86-linux-dregs.o to relevant targets.
62 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
63 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
64 (x86_linux_dr_get): Likewise.
65 (x86_linux_dr_set): Likewise.
66 (update_debug_registers_callback): Likewise.
67 (x86_linux_dr_set_addr): Likewise.
68 (x86_linux_dr_get_addr): Likewise.
69 (x86_linux_dr_set_control): Likewise.
70 (x86_linux_dr_get_control): Likewise.
71 (x86_linux_dr_get_status): Likewise.
72 (x86_linux_update_debug_registers): Likewise.
73
2b95d440
GB
742015-03-24 Gary Benson <gbenson@redhat.com>
75
76 * linux-x86-low.c (x86_linux_update_debug_registers):
77 New function, factored out from...
78 (x86_linux_prepare_to_resume): ...this.
79
14b0bc68
GB
802015-03-24 Gary Benson <gbenson@redhat.com>
81
82 * linux-x86-low.c (x86_linux_dr_get): Update comments.
83 (x86_linux_dr_set): Likewise.
84 (update_debug_registers_callback): Likewise.
85 (x86_linux_dr_set_addr): Likewise.
86 (x86_linux_dr_get_addr): Likewise.
87 (x86_linux_dr_set_control): Likewise.
88 (x86_linux_dr_get_control): Likewise.
89 (x86_linux_dr_get_status): Likewise.
90 (x86_linux_prepare_to_resume): Likewise.
91
5dfe6ca8
GB
922015-03-24 Gary Benson <gbenson@redhat.com>
93
94 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
95 Use perror_with_name. Pass string through gettext.
96 (x86_linux_dr_set): Likewise.
97
d33472ad
GB
982015-03-24 Gary Benson <gbenson@redhat.com>
99
100 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
101 (x86_linux_dr_set_addr): ...this.
102 (x86_dr_low_get_addr): Rename to...
103 (x86_linux_dr_get_addr): ...this.
104 (x86_dr_low_set_control): Rename to...
105 (x86_linux_dr_set_control): ...this.
106 (x86_dr_low_get_control): Rename to...
107 (x86_linux_dr_get_control): ...this.
108 (x86_dr_low_get_status): Rename to...
109 (x86_linux_dr_get_status): ...this.
110 (x86_dr_low): Update with new function names.
111
4b134ca1
GB
1122015-03-24 Gary Benson <gbenson@redhat.com>
113
114 * Makefile.in (x86-linux.o): New rule.
115 * configure.srv: Add x86-linux.o to relevant targets.
116 * linux-low.c (lwp_set_arch_private_info): New function.
117 (lwp_arch_private_info): Likewise.
118 * linux-x86-low.c: Include nat/x86-linux.h.
119 (arch_lwp_info): Removed structure.
120 (update_debug_registers_callback):
121 Use lwp_set_debug_registers_changed.
122 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
123 and lwp_set_debug_registers_changed.
124 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
125
34c703da
GB
1262015-03-24 Gary Benson <gbenson@redhat.com>
127
128 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
129 * linux-arm-low.c (arm_new_thread): Likewise.
130 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
131 * linux-mips-low.c (mips_linux_new_thread): Likewise.
132 * linux-x86-low.c (x86_linux_new_thread): Likewise.
133 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
134
cff068da
GB
1352015-03-24 Gary Benson <gbenson@redhat.com>
136
137 * linux-low.c (ptid_of_lwp): New function.
138 (lwp_is_stopped): Likewise.
139 (lwp_stop_reason): Likewise.
140 * linux-x86-low.c (update_debug_registers_callback):
141 Use lwp_is_stopped.
142 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
143 lwp_stop_reason.
144
b2f7c7e8
GB
1452015-03-24 Gary Benson <gbenson@redhat.com>
146
147 * linux-low.h (linux_stop_lwp): Remove declaration.
148
6d4ee8c6
GB
1492015-03-24 Gary Benson <gbenson@redhat.com>
150
151 * linux-low.h: Include nat/linux-nat.h.
152 * linux-low.c (iterate_over_lwps_args): New structure.
153 (iterate_over_lwps_filter): New function.
154 (iterate_over_lwps): Likewise.
155 * linux-x86-low.c (update_debug_registers_callback):
156 Update signature to what iterate_over_lwps expects.
157 Remove PID check that iterate_over_lwps now performs.
158 (x86_dr_low_set_addr): Use iterate_over_lwps.
159 (x86_dr_low_set_control): Likewise.
160
70a0bb6b
GB
1612015-03-24 Gary Benson <gbenson@redhat.com>
162
163 * linux-x86-low.c (x86_debug_reg_state): New function.
164 (x86_linux_prepare_to_resume): Use the above.
165
7b669087
GB
1662015-03-24 Gary Benson <gbenson@redhat.com>
167
168 * linux-low.c (current_lwp_ptid): New function.
169 * linux-x86-low.c: Include nat/linux-nat.h.
170 (x86_dr_low_get_addr): Use current_lwp_ptid.
171 (x86_dr_low_get_control): Likewise.
172 (x86_dr_low_get_status): Likewise.
173
eef49a3d
PA
1742015-03-20 Pedro Alves <palves@redhat.com>
175
176 * tracepoint.c (cmd_qtstatus): Make "str" const.
177
b2333d22
PA
1782015-03-20 Pedro Alves <palves@redhat.com>
179
180 * server.c (handle_general_set): Make "req_str" const.
181
23f238d3
PA
1822015-03-19 Pedro Alves <palves@redhat.com>
183
184 * linux-low.c (linux_resume_one_lwp): Rename to ...
185 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
186 instead call perror_with_name.
187 (check_ptrace_stopped_lwp_gone): New function.
188 (linux_resume_one_lwp): Reimplement as wrapper around
189 linux_resume_one_lwp_throw that swallows errors if the LWP is
190 gone.
191
91baf43f
PA
1922015-03-19 Pedro Alves <palves@redhat.com>
193
194 * linux-low.c (count_events_callback, select_event_lwp_callback):
195 No longer check whether the thread has resume_stop as last resume
196 kind.
197
8bf3b159
PA
1982015-03-19 Pedro Alves <palves@redhat.com>
199
200 * linux-low.c (count_events_callback, select_event_lwp_callback):
201 Use the lwp's status_pending_p field, not the thread's.
202
b90fc188
PA
2032015-03-19 Pedro Alves <palves@redhat.com>
204
205 * linux-low.c (select_event_lwp_callback): Update comments to
206 no longer mention SIGTRAP.
207
464b0089
GB
2082015-03-18 Gary Benson <gbenson@redhat.com>
209
210 * server.c (handle_query): Do not report vFile:fstat as supported.
211
aa9e327f
GB
2122015-03-11 Gary Benson <gbenson@redhat.com>
213
214 * hostio.c (sys/types.h): New include.
215 (sys/stat.h): Likewise.
216 (common-remote-fileio.h): Likewise.
217 (handle_fstat): New function.
218 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 219
791c0056
GB
2202015-03-11 Gary Benson <gbenson@redhat.com>
221
222 * configure.ac (AC_CHECK_MEMBERS): Add checks for
223 struct stat.st_blocks and struct stat.st_blksize.
224 * configure: Regenerate.
225 * config.in: Likewise.
226 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
227 (OBS): Add common-remote-fileio.o.
228 (common-remote-fileio.o): New rule.
229
9a9df970
PA
2302015-03-09 Pedro Alves <palves@redhat.com>
231
232 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
233 'struct sockaddr' pointer in 'accept' call.
234
9eb1356e
PA
2352015-03-09 Pedro Alves <palves@redhat.com>
236
237 Revert:
238 2015-03-07 Pedro Alves <palves@redhat.com>
239 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
240 or <winsock2.h> here. Instead include "gdb_socket.h".
241 (remote_open): Use union gdb_sockaddr_u.
242 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
243 or <winsock2.h> here. Instead include "gdb_socket.h".
244 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
245 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
246 or <sys/un.h>.
247 (init_named_socket, gdb_agent_helper_thread): Use union
248 gdb_sockaddr_u.
249
aac331e4
PA
2502015-03-07 Pedro Alves <palves@redhat.com>
251
252 * configure.ac (build_warnings): Move
253 -Wdeclaration-after-statement to the C-specific set.
254 * configure: Regenerate.
255
366c75fc
PA
2562015-03-07 Pedro Alves <palves@redhat.com>
257
258 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
259 or <winsock2.h> here. Instead include "gdb_socket.h".
260 (remote_open): Use union gdb_sockaddr_u.
261 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
262 or <winsock2.h> here. Instead include "gdb_socket.h".
263 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
264 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
265 or <sys/un.h>.
266 (init_named_socket, gdb_agent_helper_thread): Use union
267 gdb_sockaddr_u.
268
492d29ea
PA
2692015-03-07 Pedro Alves <palves@redhat.com>
270
271 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
272 instead.
273
60a191ed
YQ
2742015-03-06 Yao Qi <yao.qi@linaro.org>
275
276 * linux-aarch64-low.c (aarch64_insert_point): Use
277 show_debug_regs as a boolean.
278 (aarch64_remove_point): Likewise.
279
f5771b1d
PA
2802015-03-05 Pedro Alves <palves@redhat.com>
281
282 * lynx-low.c (lynx_target_ops): Install NULL hooks for
283 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
284 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
285 * nto-low.c (nto_target_ops): Likewise.
286 * spu-low.c (spu_target_ops): Likewise.
287 * win32-low.c (win32_target_ops): Likewise.
288
3e572f71
PA
2892015-03-04 Pedro Alves <palves@redhat.com>
290
291 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
292 Decide whether a breakpoint triggered based on the SIGTRAP's
293 siginfo.si_code.
294 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
295 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
296 (linux_low_filter_event): Check for breakpoints before checking
297 watchpoints.
298 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
299 siginfo.si_code.
300 (linux_stopped_by_sw_breakpoint)
301 (linux_supports_stopped_by_sw_breakpoint)
302 (linux_stopped_by_hw_breakpoint)
303 (linux_supports_stopped_by_hw_breakpoint): New functions.
304 (linux_target_ops): Install new target methods.
305
1ec68e26
PA
3062015-03-04 Pedro Alves <palves@redhat.com>
307
308 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
309 * server.c (swbreak_feature, hwbreak_feature): New globals.
310 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
311 (captured_main): Clear swbreak_feature and hwbreak_feature.
312 * server.h (swbreak_feature, hwbreak_feature): Declare.
313 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
314 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
315 supports_stopped_by_hw_breakpoint>: New fields.
316 (target_supports_stopped_by_sw_breakpoint)
317 (target_stopped_by_sw_breakpoint)
318 (target_supports_stopped_by_hw_breakpoint)
319 (target_stopped_by_hw_breakpoint): Declare.
320
15c66dd6
PA
3212015-03-04 Pedro Alves <palves@redhat.com>
322
323 enum lwp_stop_reason -> enum target_stop_reason
324 * linux-low.c (check_stopped_by_breakpoint): Adjust.
325 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
326 (linux_wait_1, stuck_in_jump_pad_callback)
327 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
328 (linux_stopped_by_watchpoint):
329 * linux-low.h (enum lwp_stop_reason): Delete.
330 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
331 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
332
98fc70d6
YQ
3332015-03-04 Yao Qi <yao.qi@linaro.org>
334
335 * Makefile.in (SFILES): Add linux-aarch64-low.c.
336
dd2ac174
GB
3372015-03-03 Gary Benson <gbenson@redhat.com>
338
339 * hostio.c (handle_vFile): Fix prefix lengths.
340
d68e53f4
MM
3412015-03-03 Markus Metzger <markus.t.metzger@intel.com>
342
343 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
344 ptr_bits.
345
bf2d68ab
AA
3462015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
347
348 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
349 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
350 (clean): Add "rm -f" for above C files.
351 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
352 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
353 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
354 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
355 * linux-s390-low.c (HWCAP_S390_VX): New macro.
356 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
357 (init_registers_s390x_vx_linux64)
358 (init_registers_s390x_tevx_linux64)
359 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
360 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
361 declarations.
362 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
363 (s390_store_vxrs_high): New functions.
364 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
365 NT_S390_VXRS_HIGH.
366 (s390_arch_setup): Add logic for selecting one of the new target
367 descriptions. Activate the new vector regsets if applicable.
368 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
369 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
370 and init_registers_s390x_tevx_linux64.
371
c966a859
PA
3722015-03-01 Pedro Alves <palves@redhat.com>
373
374 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
375 parameter.
376
4180215b
PA
3772015-02-27 Pedro Alves <palves@redhat.com>
378
379 * linux-x86-low.c (u_debugreg_offset): New function.
380 (x86_linux_dr_get, x86_linux_dr_set): Use it.
381
749bab01
PA
3822015-02-27 Pedro Alves <palves@redhat.com>
383
384 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
385 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
386 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
387 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
388 (ps_lsetfpregs, ps_getpid)
389 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
390 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
391 (ps_lsetxregs, ps_plog): Declare.
392
3c14e5a3
PA
3932015-02-27 Pedro Alves <palves@redhat.com>
394
395 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
396 IP_AGENT_EXPORT_FUNC.
397 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
398 IP_AGENT_EXPORT_FUNC.
399 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
400 (IP_AGENT_EXPORT): Delete.
401 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
402 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
403 (gdb_trampoline_buffer_error, collecting, gdb_collect)
404 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
405 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
406 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
407 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
408 (traceframe_read_count, traceframe_write_count)
409 (traceframes_created, trace_state_variables, get_raw_reg)
410 (get_trace_state_variable_value, set_trace_state_variable_value)
411 (ust_loaded, helper_thread_id, cmd_buf): Use
412 IPA_SYM_EXPORTED_NAME.
413 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
414 (tracepoints) Use IP_AGENT_EXPORT_VAR.
415 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
416 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
417 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
418 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
419 EXTERN_C_PUSH/EXTERN_C_POP.
420 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
421 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
422 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
423 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
424 (traceframe_write_count, traceframe_read_count)
425 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
426 (about_to_request_buffer_space, get_trace_state_variable_value)
427 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
428 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
429 EXTERN_C_PUSH/EXTERN_C_POP.
430 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
431 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
432 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
433 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
434 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
435 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
436 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
437 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
438 Define.
439 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
440 (IP_AGENT_EXPORT_VAR_DECL): Define.
441 (tracing): Declare.
442 (gdb_agent_get_raw_reg): Declare.
443
fe978cb0
PA
4442015-02-27 Tom Tromey <tromey@redhat.com>
445 Pedro Alves <palves@redhat.com>
446
447 Rename symbols whose names are reserved C++ keywords throughout.
448
3bc3d82a
PA
4492015-02-27 Pedro Alves <palves@redhat.com>
450
451 * Makefile.in (COMPILER): New, get it from autoconf.
452 (CXX): Get from autoconf instead.
453 (COMPILE.pre): Use COMPILER.
454 (CC-LD): Rename to ...
455 (CC_LD): ... this. Use COMPILER.
456 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
457 (CXX_FOR_TARGET): Default to g++ instead of gcc.
458 * acinclude.m4: Include build-with-cxx.m4.
459 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
460 Disable -Werror by default if building in C++ mode.
461 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
462 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
463 the C++ compiler. Save/restore CXXFLAGS too.
464 * configure: Regenerate.
465
07697489
PA
4662015-02-27 Pedro Alves <palves@redhat.com>
467
468 * acinclude.m4: Include libiberty.m4.
469 * configure.ac: Call libiberty_INIT.
470 * config.in, configure: Regenerate.
471
9beb7c4e
PA
4722015-02-26 Pedro Alves <palves@redhat.com>
473
474 * linux-low.c (linux_wait_1): When incrementing the PC past a
475 program breakpoint always use the_low_target.breakpoint_len as
476 increment, rather than the maximum between that and
477 the_low_target.decr_pc_after_break.
478
8090aef2
PA
4792015-02-23 Pedro Alves <palves@redhat.com>
480
481 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
482 thread was doing a step-over; always adjust the PC if
483 we stepped over a permanent breakpoint.
484 (linux_wait_1): If we stepped over breakpoint that was on top of a
485 permanent breakpoint, manually advance the PC past it.
486
bc9540e8
PA
4872015-02-23 Pedro Alves <palves@redhat.com>
488
489 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
490 modes.
491 (x86_fill_gregset, x86_store_gregset): Use it when handling
492 $orig_eax.
493
2db9a427
PA
4942015-02-20 Pedro Alves <palves@redhat.com>
495
496 * thread-db.c: Include "nat/linux-procfs.h".
497 (thread_db_init): Skip listing new threads if the kernel supports
498 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
499
afa8d396
PA
5002015-02-20 Pedro Alves <palves@redhat.com>
501
502 * linux-low.c (status_pending_p_callback): Use ptid_match.
503
c9587f88
AT
5042015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
505
506 PR breakpoints/16812
507 * linux-low.c (wstatus_maybe_breakpoint): Remove.
508 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
509 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
510
b05ec7a5
AT
5112015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
512
513 PR breakpoints/15956
514 * tracepoint.c (cmd_qtinit): Add check for current_thread.
515
d33501a5
MM
5162015-02-09 Markus Metzger <markus.t.metzger@intel.com>
517
518 * linux-low.c (linux_low_btrace_conf): Print size.
519 * server.c (handle_btrace_conf_general_set): New.
520 (hanle_general_set): Call handle_btrace_conf_general_set.
521 (handle_query): Report Qbtrace-conf:bts:size as supported.
522
f4abbc16
MM
5232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
524
525 * linux-low.c (linux_low_enable_btrace): Update parameters.
526 (linux_low_btrace_conf): New.
527 (linux_target_ops)<to_btrace_conf>: Initialize.
528 * server.c (current_btrace_conf): New.
529 (handle_btrace_enable): Rename to ...
530 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
531 to target_enable_btrace. Update comment. Update users.
532 (handle_qxfer_btrace_conf): New.
533 (qxfer_packets): Add btrace-conf entry.
534 (handle_query): Report qXfer:btrace-conf:read as supported packet.
535 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
536 (target_ops)<read_btrace_conf>: New.
537 (target_enable_btrace): Update parameters.
538 (target_read_btrace_conf): New.
539
043c3577
MM
5402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
541
542 * server.c (handle_btrace_general_set): Remove call to
543 target_supports_btrace.
544 (supported_btrace_packets): New.
545 (handle_query): Call supported_btrace_packets.
546 * target.h: include btrace-common.h.
547 (btrace_target_info): Removed.
548 (supports_btrace, target_supports_btrace): Update parameters.
549
734b0e4b
MM
5502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
551
552 * Makefile.in (SFILES): Add common/btrace-common.c.
553 (OBS): Add common/btrace-common.o.
554 (btrace-common.o): Add build rules.
555 * linux-low: Include btrace-common.h.
556 (linux_low_read_btrace): Use struct btrace_data. Call
557 btrace_data_init and btrace_data_fini.
558
d6c146e9
PA
5592015-02-06 Pedro Alves <palves@redhat.com>
560
561 * thread-db.c (find_new_threads_callback): Add debug output.
562
20ba1ce6
PA
5632015-02-04 Pedro Alves <palves@redhat.com>
564
565 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
566 (resume_stopped_resumed_lwps): New function.
567 (linux_wait_for_event_filtered): Use it.
568
8cc73a39
SDJ
5692015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
570
571 * Makefile.in (SFILES): Add linux-personality.c.
572 (linux-personality.o): New rule.
573 * configure.srv (srv_linux_obj): Add linux-personality.o to the
574 list of objects to be built.
575 * linux-low.c: Include nat/linux-personality.h.
576 (linux_create_inferior): Remove code to disable address space
577 randomization (moved to ../nat/linux-personality.c). Create
578 cleanup to disable address space randomization.
579
fb23d554
SDJ
5802015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
581
582 * Makefile.in (posix-strerror.o): New rule.
583 (mingw-strerror.o): Likewise.
584 * configure: Regenerated.
585 * configure.ac: Source file ../common/common.host. Initialize new
586 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
587
cdf43629
YQ
5882015-01-14 Yao Qi <yao@codesourcery.com>
589
590 * Makefile.in (SFILES): Add nat/ppc-linux.c.
591 (ppc-linux.o): New rule.
592 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
593 * configure.ac: AC_CHECK_FUNCS(getauxval).
594 * config.in: Re-generated.
595 * configure: Re-generated.
596 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
597 ppc64_64bit_inferior_p
598
514c5338
YQ
5992015-01-14 Yao Qi <yao@codesourcery.com>
600
601 * linux-ppc-low.c: Include "nat/ppc-linux.h".
602 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
603 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
604 (PT_ORIG_R3, PT_TRAP): Likewise.
605 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
606 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
607 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
608
3368c1e5
JB
6092015-01-10 Joel Brobecker <brobecker@adacore.com>
610
611 * i387-fp.c (i387_cache_to_xsave): In look over
612 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
613 zmmh_low_space field by use of zmmh_high_space.
614
582511be
PA
6152015-01-09 Pedro Alves <palves@redhat.com>
616
617 * linux-low.c (step_over_bkpt): Move higher up in the file.
618 (handle_extended_wait): Don't store the stop_pc here.
619 (get_stop_pc): Adjust comments and rename to ...
620 (check_stopped_by_breakpoint): ... this. Record whether the LWP
621 stopped for a software breakpoint or hardware breakpoint.
622 (thread_still_has_status_pending_p): New function.
623 (status_pending_p_callback): Use
624 thread_still_has_status_pending_p. If the event is no longer
625 interesting, resume the LWP.
626 (handle_tracepoints): Add assert.
627 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
628 (wstatus_maybe_breakpoint): New function.
629 (cancel_breakpoint): Delete function.
630 (check_stopped_by_watchpoint): New function, factored out from
631 linux_low_filter_event.
632 (lp_status_maybe_breakpoint): Delete function.
633 (linux_low_filter_event): Remove filter_ptid argument.
634 Leave thread group exits pending here. Store the LWP's stop PC.
635 Always leave events pending.
636 (linux_wait_for_event_filtered): Pull all events out of the
637 kernel, and leave them all pending.
638 (count_events_callback, select_event_lwp_callback): Consider all
639 events.
640 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
641 (select_event_lwp): Only give preference to the stepping LWP in
642 all-stop mode. Adjust comments.
643 (ignore_event): New function.
644 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
645 references to cancel_breakpoints. Adjust to renames. Also give
646 equal priority to all LWPs that have had events in non-stop mode.
647 If reporting a software breakpoint event, unadjust the LWP's PC.
648 (linux_wait): If linux_wait_1 returned an ignored event, retry.
649 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
650 Adjust.
651 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
652 (resume_status_pending_p): Use thread_still_has_status_pending_p.
653 (linux_stopped_by_watchpoint): Adjust.
654 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
655 * linux-low.h (enum lwp_stop_reason): New.
656 (struct lwp_info) <stop_pc>: Adjust comment.
657 <stopped_by_watchpoint>: Delete field.
658 <stop_reason>: New field.
659 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
660 * mem-break.c (software_breakpoint_inserted_here)
661 (hardware_breakpoint_inserted_here): New function.
662 * mem-break.h (software_breakpoint_inserted_here)
663 (hardware_breakpoint_inserted_here): Declare.
664 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
665 (cancel_breakpoints): Delete.
666 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
667 (upload_fast_traceframes): Remove references to
668 cancel_breakpoints.
669
a33e3959
PA
6702015-01-09 Pedro Alves <palves@redhat.com>
671
672 * thread-db.c (find_new_threads_callback): Ignore thread if the
673 kernel thread ID is -1.
674
8784d563
PA
6752015-01-09 Pedro Alves <palves@redhat.com>
676
677 * linux-low.c (linux_attach_fail_reason_string): Move to
678 nat/linux-ptrace.c, and rename.
679 (linux_attach_lwp): Update comment.
680 (attach_proc_task_lwp_callback): New function.
681 (linux_attach): Adjust to rename and use
682 linux_proc_attach_tgid_threads.
683 (linux_attach_fail_reason_string): Delete declaration.
684
76f2b779
JB
6852015-01-01 Joel Brobecker <brobecker@adacore.com>
686
687 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
688 * server.c (gdbserver_version): Likewise.
689
fafcc06a
SDJ
6902014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
691
692 * remote-utils.c: Include ctype.h.
693 (input_interrupt): Explicitly handle the case when the char
694 received is the NUL byte. Improve the printing of non-ASCII
695 characters.
696
beed38b8
JB
6972014-12-16 Joel Brobecker <brobecker@adacore.com>
698
699 * linux-low.c (linux_low_filter_event): Update call to
700 linux_enable_event_reporting following the addition of
701 a new parameter to that function.
702
bf330350
CU
7032014-12-16 Catalin Udma <catalin.udma@freescale.com>
704
705 PR server/17457
706 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
707 (AARCH64_FPCR_REGNO): Likewise.
708 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
709 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
710 (aarch64_store_fpregset): Likewise.
711
5227d625
JB
7122014-12-15 Joel Brobecker <brobecker@adacore.com>
713
714 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
715 Remove FIXME comment about assumption about N.
716
f93b65a0
JB
7172014-12-13 Joel Brobecker <brobecker@adacore.com>
718
719 * configure.ac: If large-file support is disabled in GDBserver,
720 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
721 * configure: Regenerate.
722
e5a9158d
AA
7232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
724
725 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
726 warning upon ENODATA from ptrace.
727 * linux-s390-low.c (s390_store_tdb): New.
728 (s390_regsets): Add regset for NT_S390_TDB.
729
feea5f36
AA
7302014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
731
732 * linux-low.c (regsets_store_inferior_registers): Skip regsets
733 without a fill_function.
734 * linux-s390-low.c (s390_fill_last_break): Remove.
735 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
736 (s390_arch_setup): Use regset's size instead of fill_function for
737 loop end condition.
738
098dbe61
AA
7392014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
740
741 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
742 the regset's store function when ptrace returned an error.
743 * regcache.c (get_thread_regcache): Invalidate register cache
744 before fetching inferior's registers.
745
28eef672
AA
7462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
747
748 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
749 while-loop as for-loop.
750 (regsets_store_inferior_registers): Likewise.
751
bdca27a2
YQ
7522014-11-28 Yao Qi <yao@codesourcery.com>
753
754 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
755 * config.in, configure: Re-generate.
756 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
757 is defined.
758
9c232dda
YQ
7592014-11-21 Yao Qi <yao@codesourcery.com>
760
761 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
762 (AC_CHECK_HEADERS): Remove malloc.h.
763 * configure: Re-generated.
764 * config.in: Re-generated.
765 * server.h: Don't include alloca.h and malloc.h.
766 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
767 Don't include malloc.h.
768
43968415
JB
7692014-11-17 Joel Brobecker <brobecker@adacore.com>
770
771 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
772 corresponding ERRNO check in same block.
773
40e91bc7
PA
7742014-11-12 Pedro Alves <palves@redhat.com>
775
776 * server.c (cont_thread): Update comment.
777 (start_inferior, attach_inferior): No longer clear cont_thread.
778 (handle_v_cont): No longer set cont_thread.
779 (captured_main): Clear cont_thread each time a GDB connects.
780
c2c118cf
PA
7812014-11-12 Pedro Alves <palves@redhat.com>
782
783 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
784 thread, and don't resume all threads if the Hc thread has exited.
785
78708b7c
PA
7862014-11-12 Pedro Alves <palves@redhat.com>
787
788 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
789 the process group instead of to a specific LWP.
790
a2abc7de
PA
7912014-10-15 Pedro Alves <palves@redhat.com>
792
793 PR server/17487
794 * win32-arm-low.c (arm_set_thread_context): Remove current_event
795 parameter.
796 (arm_set_thread_context): Delete.
797 (the_low_target): Adjust.
798 * win32-i386-low.c (debug_registers_changed)
799 (debug_registers_used): Delete.
800 (update_debug_registers_callback): New function.
801 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
802 needing to update their debug registers.
803 (win32_get_current_dr): New function.
804 (x86_dr_low_get_addr, x86_dr_low_get_control)
805 (x86_dr_low_get_status): Fetch the debug register from the thread
806 record's context.
807 (i386_initial_stuff): Adjust.
808 (i386_get_thread_context): Remove current_event parameter. Don't
809 clear debug_registers_changed nor copy DR values to
810 debug_reg_state.
811 (i386_set_thread_context): Delete.
812 (i386_prepare_to_resume): New function.
813 (i386_thread_added): Mark the thread as needing to update irs
814 debug registers.
815 (the_low_target): Remove i386_set_thread_context and install
816 i386_prepare_to_resume.
817 * win32-low.c (win32_get_thread_context): Adjust.
818 (win32_set_thread_context): Use SetThreadContext
819 directly.
820 (win32_prepare_to_resume): New function.
821 (win32_require_context): New function, factored out from ...
822 (thread_rec): ... this.
823 (continue_one_thread): Call win32_prepare_to_resume on each thread
824 we're about to continue.
825 (win32_resume): Call win32_prepare_to_resume on the event thread.
826 * win32-low.h (struct win32_thread_info)
827 <debug_registers_changed>: New field.
828 (struct win32_target_ops): Change prototype of set_thread_context,
829 delete set_thread_context and add prepare_to_resume.
830 (win32_require_context): New declaration.
831
a442d071
GB
8322014-10-08 Gary Benson <gbenson@redhat.com>
833
834 * server.h: Do not include common-exceptions.h.
835
6f1947e8
GB
8362014-10-08 Gary Benson <gbenson@redhat.com>
837
838 * server.h: Do not include cleanups.h.
839
63b434a4
JH
8402014-09-30 James Hogan <james.hogan@imgtec.com>
841
842 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
843 mips64-dsp-linux.c.
844
c4d9ceb6
YQ
8452014-09-23 Yao Qi <yao@codesourcery.com>
846
847 * linux-low.c (lp_status_maybe_breakpoint): New function.
848 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
849 (count_events_callback): Likewise.
850 (select_event_lwp_callback): Likewise.
851 (cancel_breakpoints_callback): Likewise.
852
89a5711c
DB
8532014-09-19 Don Breazeal <donb@codesourcery.com>
854
855 * linux-low.c (handle_extended_wait): Call
856 linux_ptrace_get_extended_event.
857 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
858 linux_is_extended_waitstatus.
859
bffc0964
JB
8602014-09-16 Joel Brobecker <brobecker@adacore.com>
861
862 * Makefile.in (CPPFLAGS): Define.
863 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
864 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
865
0bfdf32f
GB
8662014-09-16 Gary Benson <gbenson@redhat.com>
867
868 * inferiors.h (current_inferior): Renamed as...
869 (current_thread): New variable. All uses updated.
870 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
871 (maybe_move_out_of_jump_pad): Likewise.
872 (cancel_breakpoint): Likewise.
873 (linux_low_filter_event): Likewise.
874 (wait_for_sigstop): Likewise.
875 (linux_resume_one_lwp): Likewise.
876 (need_step_over_p): Likewise.
877 (start_step_over): Likewise.
878 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
879 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
880 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
881 and save_inferior as saved_thread.
882 * regcache.c (get_thread_regcache): Renamed saved_inferior as
883 saved_thread.
884 (regcache_invalidate_thread): Likewise.
885 * remote-utils.c (prepare_resume_reply): Likewise.
886 * thread-db.c (thread_db_get_tls_address): Likewise.
887 (disable_thread_event_reporting): Likewise.
888 (remove_thread_event_breakpoints): Likewise.
889 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
890 as saved_thread.
891 * target.h (set_desired_inferior): Renamed as...
892 (set_desired_thread): New declaration. All uses updated.
893 * server.c (myresume): Updated comment to reference thread instead
894 of inferior.
895 (handle_serial_event): Likewise.
896 (handle_target_event): Likewise.
897
361c8ade
GB
8982014-09-12 Tom Tromey <tromey@redhat.com>
899 Gary Benson <gbenson@redhat.com>
900
901 * regcache.h: Include common-regcache.h.
902 (regcache_read_pc): Don't declare.
903 * regcache.c (get_thread_regcache_for_ptid): New function.
904
bd9269f7
GB
9052014-09-11 Tom Tromey <tromey@redhat.com>
906 Gary Benson <gbenson@redhat.com>
907
908 * symbol.c: New file.
909 * Makefile.in (SFILES): Add symbol.c.
910 (OBS): Add symbol.o.
911
f8c1d06b
GB
9122014-09-11 Gary Benson <gbenson@redhat.com>
913
914 * target.c (target_stop_ptid, target_continue_ptid): New
915 functions.
916
721ec300
GB
9172014-09-11 Tom Tromey <tromey@redhat.com>
918 Gary Benson <gbenson@redhat.com>
919
920 * target.h: Include target/target.h.
921 * target.c (target_read_memory, target_read_uint32)
922 (target_write_memory): New functions.
923
c5e92cca
GB
9242014-09-11 Gary Benson <gbenson@redhat.com>
925
926 * server.h (debug_hw_points): Don't declare.
927 * server.c (debug_hw_points): Don't define. Replace all uses
928 with show_debug_regs.
929 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
930 all uses with show_debug_regs.
931
2e4bb98a
EBM
9322014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
933
934 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
935 endianness into account.
936 (ppc_supply_ptrace_register): Likewise.
937
ac740bc7
JH
9382014-09-03 James Hogan <james.hogan@imgtec.com>
939
940 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
941 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
942
97ea6506
GB
9432014-09-03 Gary Benson <gbenson@redhat.com>
944
945 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
946 ALL_DEBUG_ADDRESS_REGISTERS.
947
df7e5265
GB
9482014-09-02 Gary Benson <gbenson@redhat.com>
949
950 * i386-low.h: Renamed as...
951 * x86-low.h: New file. All type, function and variable name
952 prefixes changed from "i386_" to "x86_". All references updated.
953 * i386-low.c: Renamed as...
954 * x86-low.c: New file. All type, function and variable name
955 prefixes changed from "i386_" to "x86_". All references updated.
956
ed859da7
GB
9572014-09-02 Gary Benson <gbenson@redhat.com>
958
959 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
960 (x86_linux_new_thread): Likewise.
961
860789c7
GB
9622014-08-29 Gary Benson <gbenson@redhat.com>
963
964 * server.h (setjmp.h): Do not include.
965 (toplevel): Do not declare.
966 (common-exceptions.h): Include.
967 (cleanups.h): Likewise.
968 * server.c (toplevel): Do not define.
969 (exit_code): New static global.
970 (detach_or_kill_for_exit_cleanup): New function.
971 (main): New function. Original main renamed to...
972 (captured_main): New function.
973 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
974
ff55e1b5
GB
9752014-08-29 Gary Benson <gbenson@redhat.com>
976
977 * Makefile.in (SFILES): Add common/common-exceptions.c.
978 (OBS): Add common-exceptions.o.
979 (common-exceptions.o): New rule.
980 * utils.c (prepare_to_throw_exception): New function.
981
e9bcb658
GB
9822014-08-29 Gary Benson <gbenson@redhat.com>
983
984 * config.in: Regenerate.
985 * configure: Likewise.
986
e3180625
GB
9872014-08-29 Gary Benson <gbenson@redhat.com>
988
989 * Makefile.in (SFILES): Add common/cleanups.c.
990 (OBS): cleanups.o.
991 (cleanups.o): New rule.
992
e3d6ba5d
GB
9932014-08-29 Gary Benson <gbenson@redhat.com>
994
995 * utils.c (internal_vwarning): New function.
996
7096e886
GB
9972014-08-28 Gary Benson <gbenson@redhat.com>
998
999 * utils.h (fatal): Remove declaration.
1000 * utils.c (fatal): Remove function.
1001
14ce3192
GB
10022014-08-28 Gary Benson <gbenson@redhat.com>
1003
1004 * tracepoint.c (gdb_agent_init): Replace fatal with
1005 perror_with_name.
1006 (initialize_tracepoint): Likewise.
1007
50278d59
GB
10082014-08-28 Gary Benson <gbenson@redhat.com>
1009
1010 * remote-utils.c (remote_prepare): Replace fatal with error.
1011
aa96c426
GB
10122014-08-28 Gary Benson <gbenson@redhat.com>
1013
1014 * linux-low.c (linux_async): Replace fatal with warning.
1015 Tidy up and return.
1016 (linux_start_non_stop): Return -1 if linux_async failed.
1017
f7160e97
GB
10182014-08-28 Gary Benson <gbenson@redhat.com>
1019
1020 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1021 gdb_assert.
1022 (i386_dr_low_get_addr): Remove vague comment.
1023 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1024 gdb_assert.
1025
38e08fca
GB
10262014-08-28 Gary Benson <gbenson@redhat.com>
1027
1028 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1029 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1030 internal_error.
1031 (linux_resume_one_lwp): Likewise.
1032 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1033 gdb_assert.
1034 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1035 with internal_error.
1036 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1037 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1038 (find_register_by_name): Replace fatal with internal_error.
1039 (find_regno): Likewise.
1040 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1041 * thread-db.c (thread_db_create_event): Likewise.
1042 (thread_db_load_search): Likewise.
1043 (try_thread_db_load_1): Likewise.
1044 * tracepoint.c (get_jump_space_head): Replace fatal with
1045 internal_error.
1046 (claim_trampoline_space): Likewise.
1047 (have_fast_tracepoint_trampoline_buffer): Likewise.
1048 (cmd_qtstart): Likewise.
1049 (stop_tracing): Likewise.
1050 (fast_tracepoint_collecting): Likewise.
1051 (target_malloc): Likewise.
1052 (download_tracepoint): Likewise.
1053 (download_trace_state_variables): Replace check with gdb_assert.
1054 (upload_fast_traceframes): Replace fatal with internal_error.
1055
34abf635
GB
10562014-08-19 Tom Tromey <tromey@redhat.com>
1057 Gary Benson <gbenson@redhat.com>
1058
1059 * Makefile.in (SFILES): Add common/common-debug.c.
1060 (OBS): Add common-debug.o.
1061 (common-debug.o): New rule.
1062 * debug.h (debug_printf): Don't declare.
1063 * debug.c (debug_printf): Renamed and rewritten as...
1064 (debug_vprintf): New function.
1065
f6e94d78
GB
10662014-08-19 Gary Benson <gbenson@redhat.com>
1067
1068 * utils.h: Do not include print-utils.h.
1069
9239eeab
GB
10702014-08-19 Tom Tromey <tromey@redhat.com>
1071 Gary Benson <gbenson@redhat.com>
1072
1073 * server.h: Add static assertion.
1074 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1075
ef87c8bb
GB
10762014-08-19 Tom Tromey <tromey@redhat.com>
1077 Gary Benson <gbenson@redhat.com>
1078
1079 * Makefile.in (SFILES): Add common/errors.c.
1080 (OBS): Add errors.o.
1081 (IPA_OBS): Add errors-ipa.o.
1082 (errors.o): New rule.
1083 (errors-ipa.o): Likewise.
1084 * utils.h (perror_with_name, error, warning): Don't declare.
1085 * utils.c (warning): Renamed and rewritten as...
1086 (vwarning): New function.
1087 (error): Renamed and rewritten as...
1088 (verror): New function.
1089 (internal_error): Renamed and rewritten as...
1090 (internal_verror): New function.
1091
bb974a24
GB
10922014-08-07 Gary Benson <gbenson@redhat.com>
1093
1094 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1095 * configure: Regenerate.
1096 * config.in: Likewise.
1097 * server.h: Do not include errno.h.
1098 * event-loop.c: Likewise.
1099 * hostio-errno.c: Likewise.
1100 * linux-low.c: Likewise.
1101 * remote-utils.c: Likewise.
1102 * spu-low.c: Likewise.
1103 * utils.c: Likewise.
1104 * gdbreplay.c: Unconditionally include errno.h.
1105
6d3d12eb
GB
11062014-08-07 Gary Benson <gbenson@redhat.com>
1107
1108 * server.h: Do not include string.h.
1109 * event-loop.c: Likewise.
1110 * linux-low.c: Likewise.
1111 * regcache.c: Likewise.
1112 * remote-utils.c: Likewise.
1113 * spu-low.c: Likewise.
1114 * utils.c: Likewise.
1115
dccbb609
GB
11162014-08-07 Gary Benson <gbenson@redhat.com>
1117
1118 * server.h: Do not include gdb_assert.h.
1119
e76df0d0
GB
11202014-08-07 Gary Benson <gbenson@redhat.com>
1121
1122 * server.h: Do not include common-utils.h.
1123
4cb9c816
GB
11242014-08-07 Gary Benson <gbenson@redhat.com>
1125
1126 * server.h: Do not include ptid.h.
1127 * notif.h: Likewise.
1128
3995eeee
GB
11292014-08-07 Gary Benson <gbenson@redhat.com>
1130
1131 * server.h: Do not include gdb_locale.h.
1132
cb9f1a9b
GB
11332014-08-07 Gary Benson <gbenson@redhat.com>
1134
1135 * server.h: Do not include gdb/signals.h.
1136 * win32-low.c: Likewise.
1137
a5fceff8
GB
11382014-08-07 Gary Benson <gbenson@redhat.com>
1139
1140 * server.h: Do not include pathmax.h.
1141
b9391142
GB
11422014-08-07 Gary Benson <gbenson@redhat.com>
1143
1144 * server.h: Do not include libiberty.h.
1145 * linux-bfin-low.c: Likewise.
1146
0e443c87
GB
11472014-08-07 Gary Benson <gbenson@redhat.com>
1148
1149 * server.h: Do not include ansidecl.h.
1150
8ebb3f56
GB
11512014-08-07 Gary Benson <gbenson@redhat.com>
1152
1153 * linux-x86-low.c: Do not include stddef.h.
1154 * lynx-ppc-low.c: Likewise.
1155 * tracepoint.c: Likewise.
1156
8980bdf6
GB
11572014-08-07 Gary Benson <gbenson@redhat.com>
1158
1159 * server.h: Do not include stdarg.h.
1160 * nto-low.c: Likewise.
1161
d7096f71
GB
11622014-08-07 Gary Benson <gbenson@redhat.com>
1163
1164 * server.h: Do not include stdlib.h.
1165 * inferiors.c: Likewise.
1166 * linux-low.c: Likewise.
1167 * regcache.c: Likewise.
1168 * spu-low.c: Likewise.
1169 * tracepoint.c: Likewise.
1170 * utils.c: Likewise.
1171
d02f550d
GB
11722014-08-07 Gary Benson <gbenson@redhat.com>
1173
1174 * server.h: Do not include stdio.h.
1175 * linux-low.c: Likewise.
1176 * remote-utils.c: Likewise.
1177 * spu-low.c: Likewise.
1178 * utils.c: Likewise.
1179 * wincecompat.c: Likewise.
1180
87f6c4e3
GB
11812014-08-06 Gary Benson <gbenson@redhat.com>
1182
1183 * regcache.c (init_register_cache): Move conditionals inside if.
1184
7089dca4
GB
11852014-08-06 Gary Benson <gbenson@redhat.com>
1186
1187 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1188
462f517e
GB
11892014-07-31 Gary Benson <gbenson@redhat.com>
1190
1191 * ax.h: Do not include server.h.
1192 * gdbthread.h: Likewise.
1193 * lynx-low.h: Likewise.
1194 * notif.h: Likewise.
1195
976411d6
GB
11962014-07-30 Gary Benson <gbenson@redhat.com>
1197
1198 * server.h: Include common-defs.h.
1199 Do not include config.h or build-gnulib-gdbserver/config.h.
1200
d41f6d8e
GB
12012014-07-30 Gary Benson <gbenson@redhat.com>
1202
1203 * hostio-errno.c: Move server.h to top of includes list.
1204 * inferiors.c: Likewise.
1205 * linux-x86-low.c: Likewise.
1206 * notif.c: Include server.h.
1207
314c6a35
TT
12082014-07-24 Tom Tromey <tromey@redhat.com>
1209 Gary Benson <gbenson@redhat.com>
1210
1211 * server.h (CORE_ADDR): Now unsigned.
1212
69ff6be5
PA
12132014-07-16 Pedro Alves <palves@redhat.com>
1214
1215 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1216
ce9e3fe7
PA
12172014-07-15 Pedro Alves <palves@redhat.com>
1218
1219 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1220 copy.
1221
e76126e8
PA
12222014-07-11 Pedro Alves <palves@redhat.com>
1223
1224 * linux-low.c (kill_wait_lwp): New function, based on
1225 kill_one_lwp_callback, but use my_waitpid directly.
1226 (kill_one_lwp_callback, linux_kill): Use it.
1227
8e9db26e
PA
12282014-06-23 Pedro Alves <palves@redhat.com>
1229
1230 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1231 before setting DR0..DR3.
1232
698b3e08
GB
12332014-06-20 Gary Benson <gbenson@redhat.com>
1234
1235 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1236 * configure: Regenerated.
1237 * config.in: Likewise.
1238
125f8a3d
GB
12392014-06-20 Gary Benson <gbenson@redhat.com>
1240
1241 * Makefile.in (SFILES): Update locations for files moved
1242 from common to nat.
1243 (object file files): Reordered.
1244
42995dbd
GB
12452014-06-20 Gary Benson <gbenson@redhat.com>
1246
1247 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1248 (i386_dr_low_set_addr): Likewise.
1249 (i386_dr_low_get_addr): Likewise.
1250 (i386_dr_low_can_set_control): Likewise.
1251 (i386_dr_low_set_control): Likewise.
1252 (i386_dr_low_get_control): Likewise.
1253 (i386_dr_low_get_status): Likewise.
1254 (i386_get_debug_register_length): Likewise.
1255 * linux-x86-low.c (i386_dr_low_set_addr):
1256 Changed signature. Made static.
1257 (i386_dr_low_get_addr): Likewise.
1258 (i386_dr_low_set_control): Likewise.
1259 (i386_dr_low_get_control): Likewise.
1260 (i386_dr_low_get_status): Likewise.
1261 (i386_dr_low): New global variable.
1262 * win32-i386-low.c (i386_dr_low_set_addr):
1263 Changed signature. Made static.
1264 (i386_dr_low_get_addr): Likewise.
1265 (i386_dr_low_set_control): Likewise.
1266 (i386_dr_low_get_control): Likewise.
1267 (i386_dr_low_get_status): Likewise.
1268 (i386_dr_low): New global variable.
1269
e1d2394b
MS
12702014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1271
1272 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1273 * Makefile.in (AR, AR_FLAGS): Define.
1274 * configure: Regenerate.
1275
3a8ee006
GB
12762014-06-19 Gary Benson <gbenson@redhat.com>
1277
1278 * Makefile.in (i386-dregs.o): New rule.
1279 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1280 * i386-low.c (target.h): Remove include.
1281 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1282 (DR_CONTROL_SHIFT): Likewise.
1283 (DR_CONTROL_SIZE): Likewise.
1284 (DR_RW_EXECUTE): Likewise.
1285 (DR_RW_WRITE): Likewise.
1286 (DR_RW_READ): Likewise.
1287 (DR_RW_IORW): Likewise.
1288 (DR_LEN_1): Likewise.
1289 (DR_LEN_2): Likewise.
1290 (DR_LEN_4): Likewise.
1291 (DR_LEN_8): Likewise.
1292 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1293 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1294 (DR_ENABLE_SIZE): Likewise.
1295 (DR_LOCAL_SLOWDOWN): Likewise.
1296 (DR_GLOBAL_SLOWDOWN): Likewise.
1297 (DR_CONTROL_RESERVED): Likewise.
1298 (I386_DR_CONTROL_MASK): Likewise.
1299 (I386_DR_VACANT): Likewise.
1300 (I386_DR_LOCAL_ENABLE): Likewise.
1301 (I386_DR_GLOBAL_ENABLE): Likewise.
1302 (I386_DR_DISABLE): Likewise.
1303 (I386_DR_SET_RW_LEN): Likewise.
1304 (I386_DR_GET_RW_LEN): Likewise.
1305 (I386_DR_WATCH_HIT): Likewise.
1306 (i386_wp_op_t): Likewise.
1307 (i386_show_dr): Likewise.
1308 (i386_length_and_rw_bits): Likewise.
1309 (i386_insert_aligned_watchpoint): Likewise.
1310 (i386_remove_aligned_watchpoint): Likewise.
1311 (i386_handle_nonaligned_watchpoint): Likewise.
1312 i386_update_inferior_debug_regs(): Likewise.
1313 (i386_dr_insert_watchpoint): Likewise.
1314 (i386_dr_remove_watchpoint): Likewise.
1315 (i386_dr_region_ok_for_watchpoint): Likewise.
1316 (i386_dr_stopped_data_address): Likewise.
1317 (i386_dr_stopped_by_watchpoint): Likewise.
1318
8f26655c
GB
13192014-06-19 Gary Benson <gbenson@redhat.com>
1320
1321 * i386-low.c (i386_dr_show): Renamed to
1322 i386_show_dr and made static. All uses updated.
1323 (i386_dr_length_and_rw_bits): Renamed to
1324 i386_length_and_rw_bits and made static.
1325 All uses updated.
1326 (i386_dr_insert_aligned_watchpoint): Renamed to
1327 i386_insert_aligned_watchpoint and made static.
1328 All uses updated.
1329 (i386_dr_remove_aligned_watchpoint): Renamed to
1330 i386_remove_aligned_watchpoint and made static.
1331 All uses updated.
1332 (i386_dr_update_inferior_debug_regs): Renamed to
1333 i386_update_inferior_debug_regs and made static.
1334 All uses updated.
1335
b9228891
GB
13362014-06-18 Gary Benson <gbenson@redhat.com>
1337
5171def3
GB
1338 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1339 (i386_dr_low_can_set_control): Likewise.
1340 (i386_get_debug_register_length): Likewise.
1341 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1342 (i386_dr_low_can_set_control): Likewise.
1343 (i386_get_debug_register_length): Likewise.
1344
13452014-06-17 Gary Benson <gbenson@redhat.com>
1346
b9228891
GB
1347 * i386-low.h (i386-dregs.h): New include.
1348 (DR_FIRSTADDR): Now in i386-dregs.h.
1349 (DR_LASTADDR): Likewise.
1350 (DR_NADDR): Likewise.
1351 (DR_STATUS): Likewise.
1352 (DR_CONTROL): Likewise.
1353 (i386_debug_reg_state): Likewise.
1354 (i386_dr_insert_watchpoint): Likewise.
1355 (i386_dr_remove_watchpoint): Likewise.
1356 (i386_dr_region_ok_for_watchpoint): Likewise.
1357 (i386_dr_stopped_data_address): Likewise.
1358 (i386_dr_stopped_by_watchpoint): Likewise.
1359 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1360
4be83cc2
GB
13612014-06-18 Gary Benson <gbenson@redhat.com>
1362
1363 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1364 i386_dr_insert_watchpoint.
1365 (i386_low_remove_watchpoint): Renamed to
1366 i386_dr_remove_watchpoint.
1367 (i386_low_region_ok_for_watchpoint): Renamed to
1368 i386_dr_region_ok_for_watchpoint.
1369 (i386_low_stopped_data_address): Renamed to
1370 i386_dr_stopped_data_address.
1371 (i386_low_stopped_by_watchpoint): Renamed to
1372 i386_dr_stopped_by_watchpoint.
1373 * i386-low.c (i386_show_dr): Renamed to
1374 i386_dr_show and made nonstatic. All uses updated.
1375 (i386_length_and_rw_bits): Renamed to
1376 i386_dr_length_and_rw_bits and made nonstatic.
1377 All uses updated.
1378 (i386_insert_aligned_watchpoint): Renamed to
1379 i386_dr_insert_aligned_watchpoint and made nonstatic.
1380 All uses updated.
1381 (i386_remove_aligned_watchpoint): Renamed to
1382 i386_dr_remove_aligned_watchpoint and made nonstatic.
1383 All uses updated.
1384 (i386_update_inferior_debug_regs): Renamed to
1385 i386_dr_update_inferior_debug_regs and made nonstatic.
1386 All uses updated.
1387 (i386_low_insert_watchpoint): Renamed to
1388 i386_dr_insert_watchpoint. All uses updated.
1389 (i386_low_remove_watchpoint): Renamed to
1390 i386_dr_remove_watchpoint. All uses updated.
1391 (i386_low_region_ok_for_watchpoint): Renamed to
1392 i386_dr_region_ok_for_watchpoint. All uses updated.
1393 (i386_low_stopped_data_address): Renamed to
1394 i386_dr_stopped_data_address. All uses updated.
1395 (i386_low_stopped_by_watchpoint): Renamed to
1396 i386_dr_stopped_by_watchpoint. All uses updated.
1397
131aa0d4
GB
13982014-06-18 Gary Benson <gbenson@redhat.com>
1399
1400 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1401 (i386_dr_low_can_set_control): Likewise.
1402 (i386_insert_aligned_watchpoint): New check.
1403
d9305f7f
GB
14042014-06-18 Gary Benson <gbenson@redhat.com>
1405
1406 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1407 Renamed to state.
1408
e927c9fc
GB
14092014-06-18 Gary Benson <gbenson@redhat.com>
1410
1411 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1412 instead of fatal and error.
1413 (i386_handle_nonaligned_watchpoint): Likewise.
1414
1b6d4134
GB
14152014-06-18 Gary Benson <gbenson@redhat.com>
1416
1417 * i386-low.c (i386_get_debug_register_length): New macro.
1418 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1419 (i386_show_dr): Use debug_printf instead of fprintf. Use
1420 phex to format values.
1421
6e62758f
GB
14222014-06-18 Gary Benson <gbenson@redhat.com>
1423
1424 * i386-low.h: Comment changes.
1425 * i386-low.c: Likewise.
1426
fc6e2f03
GB
14272014-06-18 Gary Benson <gbenson@redhat.com>
1428
1429 * i386-low.c: Whitespace changes.
1430
f9d1eeed
TT
14312014-06-12 Tom Tromey <tromey@redhat.com>
1432
1433 * utils.c (freeargv): Remove.
1434
0b04e523
TT
14352014-06-12 Tom Tromey <tromey@redhat.com>
1436
1437 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1438 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1439 (parse_debug_format_options): Likewise.
1440 (gdbserver_usage): Likewise.
1441 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1442 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1443 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1444 against libiberty.
1445 ($(LIBGNU)): Depend on libiberty.
1446 (all-lib): Recurse into all subdirs.
1447 (install-only): Invoke "install" target in subdirs.
1448 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1449 targets.
1450 * configure: Rebuild.
1451 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1452 for vasprintf, vsnprintf, or gettimeofday.
1453 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1454 srv_tgtobj.
1455
270c9937
JB
14562014-06-05 Joel Brobecker <brobecker@adacore.com>
1457
1458 * development.sh: Delete.
1459 * Makefile.in (config.status): Adjust dependency on development.sh.
1460 * configure.ac: Adjust development.sh source call.
1461 * configure: Regenerate.
1462
0a261ed8
PA
14632014-06-02 Pedro Alves <palves@redhat.com>
1464
1465 * ax.c (gdb_free_agent_expr): New function.
1466 * ax.h (gdb_free_agent_expr): New declaration.
1467 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1468 list.
1469 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1470 static.
1471 (clear_breakpoint_conditions_and_commands): New function.
1472 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1473 (clear_breakpoint_conditions_and_commands): New declaration.
1474
e9dae05e
RR
14752014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1476
1477 * linux-aarch64-low.c (asm/ptrace.h): Include.
1478
5876f503
JK
14792014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1480
1481 Fix TLS access for -static -pthread.
1482 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1483 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1484 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1485
802e8e6d
PA
14862014-05-20 Pedro Alves <palves@redhat.com>
1487
1488 * linux-aarch64-low.c (aarch64_insert_point)
1489 (aarch64_remove_point): No longer check whether the type is
1490 supported here. Adjust to new interface.
1491 (the_low_target): Install aarch64_supports_z_point_type as
1492 supports_z_point_type method.
1493 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1494 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1495 instead of a Z packet char. Adjust.
1496 (arm_supports_z_point_type): New function.
1497 (arm_insert_point, arm_remove_point): Adjust to new interface.
1498 (the_low_target): Install arm_supports_z_point_type.
1499 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1500 (cris_insert_point, cris_remove_point): Adjust to new interface.
1501 Don't check whether the type is supported here.
1502 (the_low_target): Install cris_supports_z_point_type.
1503 * linux-low.c (linux_supports_z_point_type): New function.
1504 (linux_insert_point, linux_remove_point): Adjust to new interface.
1505 * linux-low.h (struct linux_target_ops) <insert_point,
1506 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1507 raw_breakpoint pointer parameter.
1508 <supports_z_point_type>: New method.
1509 * linux-mips-low.c (mips_supports_z_point_type): New function.
1510 (mips_insert_point, mips_remove_point): Adjust to new interface.
1511 Use mips_supports_z_point_type.
1512 (the_low_target): Install mips_supports_z_point_type.
1513 * linux-ppc-low.c (the_low_target): Install NULL as
1514 supports_z_point_type method.
1515 * linux-s390-low.c (the_low_target): Install NULL as
1516 supports_z_point_type method.
1517 * linux-sparc-low.c (the_low_target): Install NULL as
1518 supports_z_point_type method.
1519 * linux-x86-low.c (x86_supports_z_point_type): New function.
1520 (x86_insert_point): Adjust to new insert_point interface. Use
1521 insert_memory_breakpoint. Adjust to new
1522 i386_low_insert_watchpoint interface.
1523 (x86_remove_point): Adjust to remove_point interface. Use
1524 remove_memory_breakpoint. Adjust to new
1525 i386_low_remove_watchpoint interface.
1526 (the_low_target): Install x86_supports_z_point_type.
1527 * lynx-low.c (lynx_target_ops): Install NULL as
1528 supports_z_point_type callback.
1529 * nto-low.c (nto_supports_z_point_type): New.
1530 (nto_insert_point, nto_remove_point): Adjust to new interface.
1531 (nto_target_ops): Install nto_supports_z_point_type.
1532 * mem-break.c: Adjust intro comment.
1533 (struct raw_breakpoint) <raw_type, size>: New fields.
1534 <inserted>: Update comment.
1535 <shlib_disabled>: Delete field.
1536 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1537 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1538 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1539 (raw_bkpt_type_to_target_hw_bp_type): New function.
1540 (find_enabled_raw_code_breakpoint_at): New function.
1541 (find_raw_breakpoint_at): New type and size parameters. Use them.
1542 (insert_memory_breakpoint): New function, based off
1543 set_raw_breakpoint_at.
1544 (remove_memory_breakpoint): New function.
1545 (set_raw_breakpoint_at): Reimplement.
1546 (set_breakpoint): New, based on set_breakpoint_at.
1547 (set_breakpoint_at): Reimplement.
1548 (delete_raw_breakpoint): Go through the_target->remove_point
1549 instead of assuming memory breakpoints.
1550 (find_gdb_breakpoint_at): Delete.
1551 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1552 (find_gdb_breakpoint): New function.
1553 (set_gdb_breakpoint_at): Delete.
1554 (z_type_supported): New function.
1555 (set_gdb_breakpoint_1): New function, loosely based off
1556 set_gdb_breakpoint_at.
1557 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1558 (delete_gdb_breakpoint_at): Delete.
1559 (delete_gdb_breakpoint_1): New function, loosely based off
1560 delete_gdb_breakpoint_at.
1561 (delete_gdb_breakpoint): New function.
1562 (clear_gdb_breakpoint_conditions): Rename to ...
1563 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1564 breakpoint.
1565 (add_condition_to_breakpoint): Make static.
1566 (add_breakpoint_condition): Take a struct breakpoint pointer
1567 instead of an address. Adjust.
1568 (gdb_condition_true_at_breakpoint): Rename to ...
1569 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1570 z_type parameter.
1571 (gdb_condition_true_at_breakpoint): Reimplement.
1572 (add_breakpoint_commands): Take a struct breakpoint pointer
1573 instead of an address. Adjust.
1574 (gdb_no_commands_at_breakpoint): Rename to ...
1575 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1576 parameter. Return true if no breakpoint was found. Change debug
1577 output.
1578 (gdb_no_commands_at_breakpoint): Reimplement.
1579 (run_breakpoint_commands): Rename to ...
1580 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1581 and change return type to boolean.
1582 (run_breakpoint_commands): New function.
1583 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1584 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1585 breakpoint. Go through the_target->remove_point instead of
1586 assuming memory breakpoint.
1587 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1588 software and hardware breakpoints.
1589 (reinsert_raw_breakpoint): Go through the_target->insert_point
1590 instead of assuming memory breakpoint.
1591 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1592 software and hardware breakpoints.
1593 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1594 Check both software and hardware breakpoints.
1595 (validate_inserted_breakpoint): Assert the breakpoint is a
1596 software breakpoint. Set the inserted flag to -1 instead of
1597 setting shlib_disabled.
1598 (delete_disabled_breakpoints): Adjust.
1599 (validate_breakpoints): Only validate software breakpoints.
1600 Adjust to inserted flag change.
1601 (check_mem_read, check_mem_write): Skip breakpoint types other
1602 than software breakpoints. Adjust to inserted flag change.
1603 * mem-break.h (enum raw_bkpt_type): New enum.
1604 (raw_breakpoint, struct process_info): Forward declare.
1605 (Z_packet_to_target_hw_bp_type): Delete declaration.
1606 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1607 (set_gdb_breakpoint, delete_gdb_breakpoint)
1608 (clear_breakpoint_conditions): New declarations.
1609 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1610 (breakpoint_inserted_here): Update comment.
1611 (add_breakpoint_condition, add_breakpoint_commands): Replace
1612 address parameter with a breakpoint pointer parameter.
1613 (gdb_breakpoint_here): Update comment.
1614 (delete_gdb_breakpoint_at): Delete.
1615 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1616 * server.c (process_point_options): Take a struct breakpoint
1617 pointer instead of an address. Adjust.
1618 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1619 delete_gdb_breakpoint.
1620 * spu-low.c (spu_target_ops): Install NULL as
1621 supports_z_point_type method.
1622 * target.h: Include mem-break.h.
1623 (struct target_ops) <prepare_to_access_memory>: Update comment.
1624 <supports_z_point_type>: New field.
1625 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1626 instead of a char. Also take a raw breakpoint pointer.
1627 * win32-arm-low.c (the_low_target): Install NULL as
1628 supports_z_point_type.
1629 * win32-i386-low.c (i386_supports_z_point_type): New function.
1630 (i386_insert_point, i386_remove_point): Adjust to new interface.
1631 (the_low_target): Install i386_supports_z_point_type.
1632 * win32-low.c (win32_supports_z_point_type): New function.
1633 (win32_insert_point, win32_remove_point): Adjust to new interface.
1634 (win32_target_ops): Install win32_supports_z_point_type.
1635 * win32-low.h (struct win32_target_ops):
1636 <supports_z_point_type>: New method.
1637 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1638 instead of a char. Also take a raw breakpoint pointer.
1639
932539e3
PA
16402014-05-20 Pedro Alves <palves@redhat.com>
1641
1642 * mem-break.h: Include break-common.h.
1643 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1644 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1645 (Z_packet_to_target_hw_bp_type): New declaration.
1646 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1647 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1648 (Z_PACKET_ACCESS_WP): Delete macros.
1649 (Z_packet_to_hw_type): Delete function.
1650 * i386-low.h: Don't include break-common.h here.
1651 (Z_packet_to_hw_type): Delete declaration.
1652 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1653 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1654 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1655 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1656 * linux-aarch64-low.c: Don't include break-common.h here.
1657 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1658 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1659 (Z_packet_to_target_hw_bp_type): Delete function.
1660 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1661 function.
1662 (mips_insert_point, mips_remove_point): Use
1663 Z_packet_to_target_hw_bp_type.
1664
4ff0d3d8
PA
16652014-05-20 Pedro Alves <palves@redhat.com>
1666
1667 * linux-aarch64-low.c: Include break-common.h.
1668 (enum target_point_type): Delete.
1669 (Z_packet_to_point_type): Rename to ...
1670 (Z_packet_to_target_hw_bp_type): ... this, and return a
1671 target_hw_bp_type instead.
1672 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1673 instead of an enum target_point_type.
1674 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1675 breakpoint type.
1676 (aarch64_dr_state_insert_one_point)
1677 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1678 (aarch64_handle_aligned_watchpoint)
1679 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1680 Take an enum target_hw_bp_type instead of an enum
1681 target_point_type.
1682 (aarch64_supports_z_point_type): New function.
1683 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1684 use Z_packet_to_target_hw_bp_type.
1685
786dc519
JB
16862014-05-20 Joel Brobecker <brobecker@adacore.com>
1687
1688 * configure.ac: Only use -Werror by default when DEVELOPMENT
1689 is true.
1690 * configure: Regenerate.
1691
9e0aa64f
JK
16922014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1693
1694 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1695 * linux-x86-low.c (X86_64_USER_REGS): New.
1696 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1697
2b577b92
YQ
16982014-04-28 Yao Qi <yao@codesourcery.com>
1699
1700 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1701 name.
1702
94611da2
PA
17032014-04-25 Pedro Alves <palves@redhat.com>
1704
1705 PR server/16255
1706 * linux-low.c (linux_attach_fail_reason_string): New function.
1707 (linux_attach_lwp): Delete.
1708 (linux_attach_lwp_1): Rename to ...
1709 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1710 argument. Remove "initial" parameter. Return int instead of
1711 void. Don't error or warn here.
1712 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1713 failure to attach to the tgid. Call warning when failing to
1714 attach to an lwp.
1715 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1716 argument. Remove "initial" parameter. Return int instead of
1717 void. Don't error or warn here.
1718 (linux_attach_fail_reason_string): New declaration.
1719 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1720 interface change. Use linux_attach_fail_reason_string.
1721
01f9f808
MS
17222014-04-24 Michael Sturm <michael.sturm@mintel.com>
1723 Walfred Tedeschi <walfred.tedeschi@intel.com>
1724
1725 * Makefile.in: Added rules to handle new files
1726 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1727 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1728 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1729 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1730 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1731 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1732 x32-avx512-linux.o.
1733 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1734 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1735 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1736 i386/x32-avx512.xml.
1737 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1738 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1739 i386/x32-avx512-linux.xml.
1740 * i387-fp.c (num_avx512_k_registers): New constant for number
1741 of K registers.
1742 (num_avx512_zmmh_low_registers): New constant for number of
1743 lower ZMM registers (0-15).
1744 (num_avx512_zmmh_high_registers): New constant for number of
1745 higher ZMM registers (16-31).
1746 (num_avx512_ymmh_registers): New contant for number of higher
1747 YMM registers (ymm16-31 added by avx521 on x86_64).
1748 (num_avx512_xmm_registers): New constant for number of higher
1749 XMM registers (xmm16-31 added by AVX512 on x86_64).
1750 (struct i387_xsave): Add space for AVX512 registers.
1751 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1752 Add code to handle AVX512 registers.
1753 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1754 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1755 prototypei from generated file.
1756 (tdesc_amd64_avx512_linux): Likewise.
1757 (init_registers_x32_avx512_linux): Likewise.
1758 (tdesc_x32_avx512_linux): Likewise.
1759 (init_registers_i386_avx512_linux): Likewise.
1760 (tdesc_i386_avx512_linux): Likewise.
1761 (x86_64_regmap): Add AVX512 registers.
1762 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1763 mask.
1764 (initialize_low_arch): Add code to initialize AVX512 registers.
1765
51aa91f9
PA
17662014-04-23 Pedro Alves <palves@redhat.com>
1767
1768 * mem-break.c (find_gdb_breakpoint_at): Make static.
1769 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1770
a4165e94
PA
17712014-04-23 Pedro Alves <palves@redhat.com>
1772
1773 * i386-low.c: Don't include break-common.h here.
1774 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1775 prototype to take target_hw_bp_type as argument instead of a Z
1776 packet char.
1777 * i386-low.h: Include break-common.h here.
1778 (Z_packet_to_hw_type): Declare.
1779 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1780 prototypes.
1781 * linux-x86-low.c (x86_insert_point): Convert the packet number to
1782 a target_hw_bp_type before calling i386_low_insert_watchpoint.
1783 (x86_remove_point): Convert the packet number to a
1784 target_hw_bp_type before calling i386_low_remove_watchpoint.
1785 * win32-i386-low.c (i386_insert_point): Convert the packet number
1786 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1787 (i386_remove_point): Convert the packet number to a
1788 target_hw_bp_type before calling i386_low_remove_watchpoint.
1789
b8acf843
PA
17902014-04-23 Pedro Alves <palves@redhat.com>
1791
1792 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1793
d708bcd1
PA
17942014-04-10 Pedro Alves <palves@redhat.com>
1795
1796 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1797 Check if the condition or command is NULL before checking if the
1798 breakpoint is known. On success, return true.
1799 * mem-break.h (add_breakpoint_condition): Document return.
1800 (add_breakpoint_commands): Add describing comment.
1801 * server.c (skip_to_semicolon): New function.
1802 (process_point_options): Use it.
1803
2eec7d5b
PA
18042014-04-09 Pedro Alves <palves@redhat.com>
1805
1806 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1807 to lwpid_of.
1808
fa96cb38
PA
18092014-02-27 Pedro Alves <palves@redhat.com>
1810
1811 PR 12702
1812 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1813 macros.
1814 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1815 output.
1816 (last_thread_of_process_p): Take a PID argument instead of a
1817 thread pointer.
1818 (linux_wait_for_lwp): Delete.
1819 (num_lwps, check_zombie_leaders, not_stopped_callback): New
1820 functions.
1821 (linux_low_filter_event): New function, party factored out from
1822 linux_wait_for_event.
1823 (linux_wait_for_event): Rename to ...
1824 (linux_wait_for_event_filtered): ... this. Add new filter ptid
1825 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
1826 sigsuspend. Check for zombie leaders.
1827 (linux_wait_for_event): Reimplement as wrapper around
1828 linux_wait_for_event_filtered.
1829 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
1830 a normal or signal exit is seen, it's the whole process exiting.
1831 (wait_for_sigstop): No longer a for_each_inferior callback.
1832 Rewrite on top of linux_wait_for_event_filtered.
1833 (stop_all_lwps): Call wait_for_sigstop directly.
1834 * server.c (resume, handle_target_event): Handle
1835 TARGET_WAITKIND_NO_RESUMED.
1836
d763de10
JB
18372014-02-26 Joel Brobecker <brobecker@adacore.com>
1838
1839 * win32-low.c (psapi_get_dll_name,
1840 * win32_CreateToolhelp32Snapshot): Delete.
1841 (win32_CreateToolhelp32Snapshot, win32_Module32First)
1842 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1843 Delete.
1844 (handle_load_dll): Add function description.
1845 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1846
850a0f76
JB
18472014-02-26 Joel Brobecker <brobecker@adacore.com>
1848
1849 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1850 Add comment.
1851 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1852 base address when calling win32_add_one_solib.
1853 (handle_load_dll): Delete local variable load_addr.
1854 Remove 0x1000 offset applied to DLL base address when calling
1855 win32_add_one_solib.
1856 (handle_unload_dll): Add comment.
1857
f25b3fc3
JB
18582014-02-26 Joel Brobecker <brobecker@adacore.com>
1859
1860 * win32-low.c (win32_add_all_dlls): Renames
1861 win32_ensure_ntdll_loaded. Rewrite function documentation.
1862 Adjust implementation to always load all DLLs.
1863 Add 0x1000 offset to DLL base address when calling
1864 win32_add_one_solib.
1865 (child_initialization_done): New static global.
1866 (do_initial_child_stuff): Set child_initialization_done to
1867 zero during child initialization, and 1 after. Replace call
1868 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1869 Add comment.
1870 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1871 (handle_unload_dll): Add function documentation.
1872 (get_child_debug_event): Ignore load and unload DLL events
1873 during child initialization.
1874
d86d4aaf
DE
18752014-02-20 Doug Evans <dje@google.com>
1876
3bc32da3 1877 Remove global all_lwps.
d86d4aaf
DE
1878 * inferiors.h (ptid_of): Move here from linux-low.h.
1879 (pid_of, lwpid_of): Ditto.
1880 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1881 parameter is a struct thread_info * now.
1882 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1883 directly. Pass &all_threads to find_inferior instead of &all_lwps.
1884 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1885 directly.
1886 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1887 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1888 * linux-arm-low.c (update_registers_callback): Update, "entry"
1889 parameter is a struct thread_info * now.
1890 Fetch lwpid from current_inferior directly.
1891 (arm_insert_point): Pass &all_threads to find_inferior instead of
1892 &all_lwps.
1893 (arm_remove_point): Ditto.
1894 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1895 (arm_prepare_to_resume): Fetch pid from thread.
1896 (arm_read_description): Fetch lwpid from current_inferior directly.
1897 * linux-low.c (all_lwps): Delete.
1898 (delete_lwp): Delete call to remove_inferior.
1899 (handle_extended_wait): Fetch lwpid from thread.
1900 (add_lwp): Don't set lwp->entry.id. Remove call to
1901 add_inferior_to_list.
1902 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1903 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1904 (kill_one_lwp_callback): Ditto.
1905 (linux_kill): Don't dereference NULL pointer.
1906 Fetch ptid,lwpid from thread.
1907 (get_detach_signal): Fetch ptid from thread.
1908 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1909 Simplify call to regcache_invalidate_thread.
1910 (delete_lwp_callback): Update, "entry" parameter is a
1911 struct thread_info * now. Fetch pid from thread.
1912 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1913 (status_pending_p_callback): Update, "entry" parameter is a
1914 struct thread_info * now. Fetch ptid from thread.
1915 (find_lwp_pid): Update, "entry" parameter is a
1916 struct thread_info * now.
1917 (linux_wait_for_lwp): Fetch pid from thread.
1918 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1919 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1920 (enqueue_one_deferred_signal): Fetch lwpid from thread.
1921 (dequeue_one_deferred_signal): Ditto.
1922 (cancel_breakpoint): Fetch ptid from current_inferior.
1923 (linux_wait_for_event): Pass &all_threads to find_inferior,
1924 not &all_lwps. Fetch ptid, lwpid from thread.
1925 (count_events_callback): Update, "entry" parameter is a
1926 struct thread_info * now.
1927 (select_singlestep_lwp_callback): Ditto.
1928 (select_event_lwp_callback): Ditto.
1929 (cancel_breakpoints_callback): Ditto.
1930 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1931 not &all_lwps.
1932 (select_event_lwp): Ditto. Fetch ptid from event_thread.
1933 (unsuspend_one_lwp): Update, "entry" parameter is a
1934 struct thread_info * now.
1935 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1936 not &all_lwps.
1937 (linux_stabilize_threads): Ditto. And for for_each_inferior.
1938 Fetch lwpid from thread, not lwp.
1939 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1940 Pass &all_threads to find_inferior, not &all_lwps.
1941 (send_sigstop): Fetch lwpid from thread, not lwp.
1942 (send_sigstop_callback): Update, "entry" parameter is a
1943 struct thread_info * now.
1944 (suspend_and_send_sigstop_callback): Ditto.
1945 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
1946 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1947 struct thread_info * now.
1948 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
1949 from thread, lwp.
1950 (lwp_running): Update, "entry" parameter is a
1951 struct thread_info * now.
1952 (stop_all_lwps): Fetch ptid from thread.
1953 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1954 (linux_resume_one_lwp): Fetch lwpid from thread.
1955 (linux_set_resume_request): Update, "entry" parameter is a
1956 struct thread_info * now. Fetch pid, lwpid from thread.
1957 (resume_status_pending_p): Update, "entry" parameter is a
1958 struct thread_info * now.
1959 (need_step_over_p): Ditto. Fetch lwpid from thread.
1960 (start_step_over): Fetch lwpid from thread.
1961 (linux_resume_one_thread): Update, "entry" parameter is a
1962 struct thread_info * now. Fetch lwpid from thread.
1963 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1964 (proceed_one_lwp): Update, "entry" parameter is a
1965 struct thread_info * now. Fetch lwpid from thread.
1966 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1967 struct thread_info * now.
1968 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1969 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
1970 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1971 directly.
1972 (regsets_store_inferior_registers): Ditto.
1973 (fetch_register, store_register): Ditto.
1974 (linux_read_memory, linux_write_memory): Ditto.
1975 (linux_request_interrupt): Ditto.
1976 (linux_read_auxv): Ditto.
1977 (linux_xfer_siginfo): Ditto.
1978 (linux_qxfer_spu): Ditto.
1979 (linux_qxfer_libraries_svr4): Ditto.
1980 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1981 moved to inferiors.h.
1982 (get_lwp): Delete.
1983 (get_thread_lwp): Update.
1984 (struct lwp_info): Delete member "entry". Simplify comment for
1985 member "thread".
1986 (all_lwps): Delete.
1987 * linux-mips-low.c (mips_read_description): Fetch lwpid from
1988 current_inferior directly.
1989 (update_watch_registers_callback): Update, "entry" parameter is a
1990 struct thread_info * now. Fetch pid from thread.
1991 (mips_linux_prepare_to_resume): Fetch ptid from thread.
1992 (mips_insert_point): Fetch lwpid from current_inferior.
1993 Pass &all_threads to find_inferior, not &all_lwps.
1994 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1995 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1996 directly.
1997 (mips_stopped_data_address): Ditto.
1998 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1999 directly.
2000 * linux-tile-low.c (tile_arch_setup): Ditto.
2001 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2002 (update_debug_registers_callback): Update, "entry" parameter is a
2003 struct thread_info * now. Fetch pid from thread.
2004 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2005 Pass &all_threads to find_inferior, not &all_lwps.
2006 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2007 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2008 Pass &all_threads to find_inferior, not &all_lwps.
2009 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2010 (i386_dr_low_get_status): Ditto.
2011 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2012 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2013 (x86_linux_read_description): Ditto.
2014 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2015
3b8361aa
DE
20162014-02-20 Doug Evans <dje@google.com>
2017
2018 * inferiors.c (get_first_inferior): Fix buglet.
2019
f7667f0d
DE
20202014-02-19 Doug Evans <dje@google.com>
2021
2022 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2023 * inferiors.c (add_thread): Change result type to struct thread_info *.
2024 All callers updated.
2025 (add_lwp): Call add_thread here instead of in callers.
2026 All callers updated.
2027 * linux-low.h (get_lwp_thread): Rewrite.
2028 (struct lwp_info): New member "thread".
2029
b3312d80
DE
20302014-02-19 Doug Evans <dje@google.com>
2031
2032 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2033 All callers updated.
2034
ecc6f45c
DE
20352014-02-19 Doug Evans <dje@google.com>
2036
2037 * inferiors.c (add_thread): Fix whitespace.
2038
649ebbca
DE
20392014-02-19 Doug Evans <dje@google.com>
2040
2041 * dll.c (clear_dlls): Replace accessing list implemention details
2042 with API function.
2043 * gdbthread.h (get_first_thread): Declare.
2044 * inferiors.c (for_each_inferior_with_data): New function.
2045 (get_first_thread): New function.
2046 (find_thread_ptid): Simplify.
2047 (get_first_inferior): New function.
2048 (clear_list): Delete.
2049 (one_inferior_p): New function.
2050 (clear_inferior_list): New function.
2051 (clear_inferiors): Update.
2052 * inferiors.h (for_each_inferior_with_data): Declare.
2053 (clear_inferior_list): Declare.
2054 (one_inferior_p): Declare.
2055 (get_first_inferior): Declare.
2056 * linux-low.c (linux_wait_for_event): Replace accessing list
2057 implemention details with API function.
2058 * server.c (target_running): Ditto.
2059 (accumulate_file_name_length): New function.
2060 (emit_dll_description): New function.
2061 (handle_qxfer_libraries): Replace accessing list implemention
2062 details with API function.
2063 (handle_qxfer_threads_worker): New function.
2064 (handle_qxfer_threads_proper): Replace accessing list implemention
2065 details with API function.
2066 (handle_query): Ditto.
2067 (visit_actioned_threads_callback_ftype): New typedef.
2068 (visit_actioned_threads_data): New struct.
2069 (visit_actioned_threads): Rewrite to be find_inferior callback.
2070 (resume): Call find_inferior.
2071 (handle_status): Replace accessing list implemention
2072 details with API function.
2073 (process_serial_event): Replace accessing list implemention details
2074 with API function.
2075 * target.c (set_desired_inferior): Replace accessing list implemention
2076 details with API function.
2077 * tracepoint.c (same_process_p): New function.
2078 (gdb_agent_about_to_close): Replace accessing list implemention
2079 details with API function.
2080 * win32-low.c (child_delete_thread): Replace accessing list
2081 implemention details with API function.
2082 (match_dll_by_basename): New function.
2083 (dll_is_loaded_by_basename): New function.
2084 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2085 details call to dll_is_loaded_by_basename.
2086
80894984
DE
20872014-02-19 Doug Evans <dje@google.com>
2088
2089 * dll.h (struct dll_info): Add comment.
2090 * gdbthread.h (struct thread_info): Add comment.
2091 (current_ptid): Simplify.
2092 * inferiors.c (add_process): Update.
2093 (remove_process): Update.
2094 * inferiors.h (struct process_info): Rename member "head" to "entry".
2095 * linux-low.c (delete_lwp): Update.
2096 (add_lwp): Update.
2097 (last_thread_of_process_p): Update.
2098 (kill_one_lwp_callback, linux_kill): Update.
2099 (status_pending_p_callback): Update.
2100 (wait_for_sigstop): Update. Simplify read of ptid.
2101 (start_step_over): Update.
2102 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2103 (get_lwp_thread): Update.
2104 (struct lwp_info): Rename member "head" to "entry".
2105 * regcache.h (inferior_list_entry): Delete.
2106 * server.c (kill_inferior_callback): Update.
2107 (detach_or_kill_inferior_callback): Update.
2108 (print_started_pid): Update.
2109 (print_attached_pid): Update.
2110 (process_serial_event): Simplify read of ptid.
2111 * thread-db.c (thread_db_create_event): Update.
2112 (thread_db_get_tls_address): Update.
2113 * win32-low.c (current_inferior_ptid): Simplify.
2114
46917d26
TT
21152014-02-19 Tom Tromey <tromey@redhat.com>
2116
2117 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2118 argument.
2119 (target_supports_btrace): Update.
2120
0759a81e
YQ
21212014-02-14 Yao Qi <yao@codesourcery.com>
2122
2123 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2124 (rsp-low-ipa.o): New target.
2125
a7191e8b
TT
21262014-02-12 Tom Tromey <tromey@redhat.com>
2127
2128 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2129 convert_ascii_to_int.
2130 * regcache.c (registers_to_string): Likewise.
2131 * remote-utils.c (decode_M_packet): Likewise.
2132 * server.c (process_serial_event): Likewise.
2133
ff0e980e
TT
21342014-02-12 Tom Tromey <tromey@redhat.com>
2135
2136 * server.c (handle_query, handle_v_run): Use hex2bin, not
2137 unhexify.
2138 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2139
e9371aff
TT
21402014-02-12 Tom Tromey <tromey@redhat.com>
2141
2142 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2143 convert_int_to_ascii.
2144 * regcache.c (registers_to_string, collect_register_as_string):
2145 Likewise.
2146 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2147 Likewise.
2148 * server.c (process_serial_event): Likewise.
2149 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2150 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2151
971dc0b8
TT
21522014-02-12 Tom Tromey <tromey@redhat.com>
2153
2154 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2155 bin2hex, not hexify.
2156 * tracepoint.c (cmd_qtstatus): Likewise.
2157
0a822afb
TT
21582014-02-12 Tom Tromey <tromey@redhat.com>
2159
2160 * remote-utils.c (monitor_output): Pass explicit length to
2161 hexify.
2162
9c3d6531
TT
21632014-02-12 Tom Tromey <tromey@redhat.com>
2164
2165 * tracepoint.c: Include rsp-low.h.
2166 * server.c: Include rsp-low.h.
2167 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2168 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2169 declare.
2170 * remote-utils.c: Include rsp-low.h.
2171 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2172 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2173 (convert_int_to_ascii, convert_ascii_to_int): Move to
2174 common/rsp-low.c.
2175 * regcache.c: Include rsp-low.h.
2176 * ax.c: Include rsp-low.h.
2177 * Makefile.in (SFILES): Add common/rsp-low.c.
2178 (OBS): Add rsp-low.o.
2179 (rsp-low.o): New target.
2180
01fd3ea5
TT
21812014-02-12 Tom Tromey <tromey@redhat.com>
2182
2183 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2184 Include print-utils.h.
2185 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2186 (plongest, thirty_two, phex_nz): Remove.
2187 * Makefile.in (SFILES): Add common/print-utils.c.
2188 (OBS): Add print-utils.o.
2189 (print-utils-ipa.o): New target.
2190 (print-utils.o): New target.
2191 (IPA_OBJS): Add print-utils-ipa.o.
2192
e99dc820
TT
21932014-02-06 Tom Tromey <tromey@redhat.com>
2194
2195 * Makefile.in (SFILES): Fix indentation.
2196
ee1e2d4f
DE
21972014-02-05 Doug Evans <dje@google.com>
2198
2199 * linux-low.c (linux_wait_for_event): Improve comment.
2200 (linux_wait_1): Keep current_inferior in sync with event_child.
2201
f5a02773
DE
22022014-01-22 Doug Evans <dje@google.com>
2203
2204 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2205
87ce2a04
DE
22062014-01-22 Doug Evans <dje@google.com>
2207
2208 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2209 * configure: Regenerate.
2210 * config.in: Regenerate.
2211 * Makefile.in (SFILES): Add debug.c.
2212 (OBS): Add debug.o.
2213 * debug.c: New file.
2214 * debug.h: New file.
2215 * linux-aarch64-low.c (*): Update all debugging printfs to use
2216 debug_printf instead of fprintf.
2217 * linux-arm-low.c (*): Ditto.
2218 * linux-cris-low.c (*): Ditto.
2219 * linux-crisv32-low.c (*): Ditto.
2220 * linux-m32r-low.c (*): Ditto.
2221 * linux-sparc-low.c (*): Ditto.
2222 * linux-x86.c (*): Ditto.
2223 * linux-low.c (*): Ditto.
2224 (linux_wait_1): Add calls to debug_enter, debug_exit.
2225 (linux_wait): Remove redundant debugging printf.
2226 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2227 (linux_resume, unstop_all_lwps): Ditto.
2228 * mem-break.c (*): Update all debugging printfs to use
2229 debug_printf instead of fprintf.
2230 * remote-utils.c (*): Ditto.
2231 * thread-db.c (*): Ditto.
2232 * server.c #include <ctype.h>, "gdb_vecs.h".
2233 (debug_threads): Moved to debug.c.
2234 (*): Update all debugging printfs to use debug_printf instead of
2235 fprintf.
2236 (start_inferior): Replace call to fflush with call to debug_flush.
2237 (monitor_show_help): Mention set debug-format.
2238 (parse_debug_format_options): New function.
2239 (handle_monitor_command): Handle "monitor set debug-format".
2240 (gdbserver_usage): Mention --debug-format.
2241 (main): Parse --debug-format.
2242 * server.h (debug_threads): Declaration moved to debug.h.
2243 #include "debug.h".
2244 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2245 trace_debug_1 that uses debug_printf.
2246 (tracepoint_look_up_symbols): Update all debugging printfs to use
2247 debug_printf instead of fprintf.
2248
e671835b
BS
22492014-01-20 Baruch Siach <baruch@tkos.co.il>
2250
2251 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2252 sys/ptrace.h.
2253
b5737fa9
PA
22542014-01-17 Pedro Alves <palves@redhat.com>
2255
ea38d2a9 2256 PR build/16445
c7faa97a
PA
2257 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2258 defined after including gdb_proc_service.h.
b5737fa9 2259
40ed484e
DE
22602014-01-16 Doug Evans <dje@google.com>
2261
2262 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2263 (match_dll): Use it.
2264
969c39fb
MM
22652014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2266
2267 * target.h (target_ops) <read_btrace>: Change parameters and
2268 return type to allow error reporting.
2269 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2270 trace reading errors on.
2271 * linux-low.c (linux_low_read_btrace): Pass trace reading
2272 errors on.
2273 (linux_low_disable_btrace): New.
2274
ab7f45ba
DE
22752014-01-15 Doug Evans <dje@google.com>
2276
2277 * inferiors.c (thread_id_to_gdb_id): Delete.
2278 * inferiors.h (thread_id_to_gdb_id): Delete.
2279
66af0f44
EZ
22802014-01-13 Eli Zaretskii <eliz@gnu.org>
2281
2282 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2283 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2284 versions.
2285
9939e131
PA
22862014-01-08 Pedro Alves <palves@redhat.com>
2287
2288 * server.c (handle_status): Don't discard previous queued stop
2289 replies or thread's pending status here.
2290 (main) <disconnection>: Do it here instead.
2291
b7ea362b
PA
22922014-01-08 Pedro Alves <palves@redhat.com>
2293
2294 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2295 * server.c (visit_actioned_threads, handle_pending_status): New
2296 function.
2297 (handle_v_cont): Factor out parts to ...
2298 (resume): ... this new function. If in all-stop, and a thread
2299 being resumed has a pending status, report it without actually
2300 resuming.
2301 (myresume): Adjust to use the new 'resume' function.
2302 (clear_pending_status_callback, set_pending_status_callback)
2303 (find_status_pending_thread_callback): New functions.
2304 (handle_status): Handle the case of multiple threads having
2305 interesting statuses to report. Report threads' real last signal
2306 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2307 with an interesting thread to report the status for, instead of
2308 always reporting the status of the first thread.
2309
28498c42
JB
23102014-01-01 Joel Brobecker <brobecker@adacore.com>
2311
2312 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2313 * gdbreplay.c (gdbreplay_version): Likewise.
2314
f45c82da
YZ
23152013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2316
2317 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2318 iov.iov_len with the real length in use.
2319
379a5e2d
JB
23202013-12-13 Joel Brobecker <brobecker@adacore.com>
2321
2322 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2323 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2324 for all targets that use win32-low.c.
2325 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2326 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2327
4210d83e
PA
23282013-12-13 Pedro Alves <palves@redhat.com>
2329
2330 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2331 if equal to TARGET_WAITKIND_LOADED.
2332 * win32-low.c (cached_status): New static global.
2333 (win32_wait): Add declaration.
2334 (do_initial_child_stuff): Flush all initial pending debug events
2335 up to the initial breakpoint.
2336 (win32_wait): If CACHED_STATUS was set, return that instead
2337 of doing a real wait. Remove the code resuming the execution
2338 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2339 during the initial phase. Also remove the code changing
2340 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2341 TARGET_WAITKIND_STOPPED.
2342
e7f0d979
YQ
23432013-12-11 Yao Qi <yao@codesourcery.com>
2344
2345 * notif.c (handle_notif_ack): Return 0 if no notification
2346 matches.
2347
ebcf782c
DE
23482013-11-20 Doug Evans <dje@google.com>
2349
2350 * linux-low.c (linux_set_resume_request): Fix comment.
2351
20ad9378
DE
23522013-11-20 Doug Evans <dje@google.com>
2353
2354 * linux-low.c (resume_status_pending_p): Tweak comment.
2355
a196ebeb
WT
23562013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2357
2358 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2359 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2360 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2361 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2362 (srv_amd64_regobj): Add amd64-mpx.o.
2363 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2364 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2365 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2366 * i387-fp.c (num_pl_bnd_register) Added constant.
2367 (num_pl_bnd_cfg_registers) Added constant.
2368 (struct i387_xsave) Added reserved area and MPX fields.
2369 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2370 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2371 function.
2372 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2373 (init_registers_amd64_mpx_linux): Declare new function.
2374 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2375 (x86_64_regmap): Add MPX registers.
2376 (x86_linux_read_description): Add MPX case.
2377 (initialize_low_arch): Initialize MPX targets.
2378
0080a2f6
TT
23792013-11-18 Tom Tromey <tromey@redhat.com>
2380
2381 * configure: Rebuild.
2382 * configure.ac: Don't check for stdlib.h.
2383 * gdbreplay.c: Unconditionally include stdlib.h.
2384
2978b111
TT
23852013-11-18 Tom Tromey <tromey@redhat.com>
2386
2387 * config.in: Rebuild.
2388 * configure: Rebuild.
2389 * configure.ac: Don't use AC_HEADER_DIRENT.
2390
a3d08894
TT
23912013-11-18 Tom Tromey <tromey@redhat.com>
2392
2393 * server.h: Don't check HAVE_STRING_H.
2394 * gdbreplay.c: Don't check HAVE_STRING_H.
2395 * configure: Rebuild.
2396
0a5dd17d
TT
23972013-11-18 Tom Tromey <tromey@redhat.com>
2398
2399 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2400 LIBGNU.
2401
1bd2f0ba
TT
24022013-11-08 Tom Tromey <tromey@redhat.com>
2403
2404 * configure, config.in: Rebuild.
2405 * configure.ac: Remove unused configury.
2406
3266f10b
TT
24072013-11-08 Tom Tromey <tromey@redhat.com>
2408
2409 * acinclude.m4: Include common.m4, codeset.m4.
2410 * configure, config.in: Rebuild.
2411 * configure.ac: Use GDB_AC_COMMON.
2412
6682d959
AA
24132013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2414
2415 * linux-s390-low.c (HWCAP_S390_TE): New define.
2416 (s390_arch_setup): Consider the TE field in the HWCAP for
2417 determining 'have_regset_tdb'.
2418
fd0a4d76
SDJ
24192013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2420
2421 PR gdb/16014
2422 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2423 call to sizeof.
2424
1a3d890b
PA
24252013-10-02 Pedro Alves <palves@redhat.com>
2426
2427 * server.c (process_serial_event): Don't output "GDBserver
2428 exiting" if GDB is connected through stdio.
2429 * target.c (mywait): Likewise, be silent if GDB is connected
2430 through stdio.
2431
97ad4581
JB
24322013-10-01 Joel Brobecker <brobecker@adacore.com>
2433
2434 * lynx-low.c (lynx_add_threads_after_attach): New function.
2435 (lynx_attach): Remove call to add_thread. Add call to
2436 lynx_add_threads_after_attach instead.
2437
5b4e221c
MF
24382013-09-28 Mike Frysinger <vapier@gentoo.org>
2439
2440 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2441 * config.in, configure: Regenerated.
2442
ee47b2f8
YQ
24432013-09-18 Yao Qi <yao@codesourcery.com>
2444
2445 PR server/15959
2446 * server.c (start_inferior): Clear 'resume_info'.
2447
d6707650 24482013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2449
d6707650
JW
2450 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2451 for each register.
2452
9243dd0e 24532013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2454
9243dd0e
JW
2455 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2456 linux-tile-low.o to srv_tgtobj.
2457
c623a6ef
WN
24582013-09-16 Will Newton <will.newton@linaro.org>
2459
2460 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2461 out regs.
2462
fb71d39e
PA
24632013-09-06 Pedro Alves <palves@redhat.com>
2464
2465 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2466 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2467 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2468 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2469 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2470 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2471
8e7e9910
PA
24722013-09-06 Pedro Alves <palves@redhat.com>
2473
2474 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2475 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2476
7c3a12ca
PA
24772013-09-06 Pedro Alves <palves@redhat.com>
2478
2479 * linux-amd64-ipa.c: Include tracepoint.h.
2480 * linux-i386-ipa.c: Include tracepoint.h.
2481
8eb3d7b6
RW
24822013-09-06 Ricard Wanderlof <ricardw@axis.com>
2483
2484 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2485 (ps_get_thread_area): New function.
2486
eddddb9d
RW
24872013-09-06 Ricard Wanderlof <ricardw@axis.com>
2488
2489 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2490 (initialize_low_arch): Call init_registers_crisv32 rather than
2491 init_register_crisv32.
2492
533b0600
PA
24932013-09-05 Pedro Alves <palves@redhat.com>
2494
2495 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2496 to ...
2497 * hostio.h: ... this new file.
2498 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2499 win32-low.c: Include hostio.h.
2500
0ce3d3b5
PA
25012013-09-05 Pedro Alves <palves@redhat.com>
2502
2503 * server.h (gdb_client_data, handler_func, callback_handler_func)
2504 (delete_file_handler, add_file_handler, append_callback_event)
2505 (delete_callback_event, start_event_loop, initialize_event_loop):
2506 Move to event-loop.h and include it.
2507 * event-loop.h: New file.
2508
799cdc37
PA
25092013-09-05 Pedro Alves <palves@redhat.com>
2510
2511 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2512 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2513 (loaded_dll, unloaded_dll): Move to ...
2514 * dll.h: ... this new file.
2515 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2516
6a6bbd9d
PA
25172013-09-05 Pedro Alves <palves@redhat.com>
2518
2519 * server.h (current_process, get_thread_process, all_processes)
2520 (add_inferior_to_list, for_each_inferior, current_inferior)
2521 (remove_inferior, add_process, remove_process, find_process_pid)
2522 (have_started_inferiors_p, have_attached_inferiors_p)
2523 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2524 (clear_inferiors, find_inferior, find_inferior_id)
2525 (inferior_target_data, set_inferior_target_data)
2526 (inferior_regcache_data, set_inferior_regcache_data): Move to
2527 inferiors.h, and include it.
2528 * inferiors.h: New file.
2529
f699aaba
PA
25302013-09-05 Pedro Alves <palves@redhat.com>
2531
2532 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2533 Move ...
2534 * ax.h: ... here.
2535
c144c7a0
PA
25362013-09-05 Pedro Alves <palves@redhat.com>
2537
2538 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2539 tracepoint.h.
2540 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2541 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2542 (handle_tracepoint_general_set, handle_tracepoint_query)
2543 (tracepoint_finished_step, tracepoint_was_hit)
2544 (release_while_stepping_state_list, current_traceframe)
2545 (in_readonly_region, traceframe_read_mem)
2546 (fetch_traceframe_registers, traceframe_read_sdata)
2547 (traceframe_read_info, struct fast_tpoint_collect_status)
2548 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2549 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2550 (supply_fast_tracepoint_registers)
2551 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2552 (ipa_tdesc, claim_trampoline_space)
2553 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2554 (agent_mem_read, agent_get_trace_state_variable_value)
2555 (agent_set_trace_state_variable_value, agent_tsv_read)
2556 (agent_mem_read_string, get_raw_reg_func_addr)
2557 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2558 * tracepoint.h: ... this new file.
2559
ff42e6ab
PA
25602013-09-05 Pedro Alves <palves@redhat.com>
2561
2562 * server.h (perror_with_name, error, fatal, warning, paddress)
2563 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2564 include it.
2565 * utils.h: New file.
2566
541af0f4
PA
25672013-09-05 Pedro Alves <palves@redhat.com>
2568
2569 * server.h (remote_debug, noack_mode, transport_is_reliable)
2570 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2571 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2572 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2573 (write_enn, initialize_async_io, enable_async_io)
2574 (disable_async_io, check_remote_input_interrupt_request)
2575 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2576 (dead_thread_notify, prepare_resume_reply)
2577 (decode_address_to_semicolon, decode_address, decode_m_packet)
2578 (decode_M_packet, decode_X_packet, decode_xfer_write)
2579 (decode_search_memory_packet, unhexify, hexify)
2580 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2581 (look_up_one_symbol, relocate_instruction)
2582 (monitor_output): Move to remote-utils.h, and include it.
2583 * remote-utils.h: New file.
2584
eebdf26b
PA
25852013-09-05 Pedro Alves <palves@redhat.com>
2586
2587 * server.h (_): Delete.
2588
3aafd2ff
PA
25892013-09-02 Pedro Alves <palves@redhat.com>
2590
2591 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2592 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2593 allocated.
2594 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2595
cee83bcb
PM
25962013-09-02 Pierre Muller <muller@sourceware.org>
2597
2598 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2599 or WriteProcessMemory complete successfully and handle
2600 ERROR_PARTIAL_COPY error.
2601
9a13b2fa
PA
26022013-09-02 Pedro Alves <palves@redhat.com>
2603
2604 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2605 error instead of EIO.
2606
602e3198
JK
26072013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2608
2609 PR server/15604
2610 * linux-low.c: Include filestuff.h.
2611 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2612 * lynx-low.c: Include filestuff.h.
2613 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2614 * server.c: Include filestuff.h.
2615 (main): Call notice_open_fds.
2616 * spu-low.c: Include filestuff.h.
2617 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2618
96d7229d
LM
26192013-08-22 Luis Machado <lgustavo@codesourcery.com>
2620
2621 * Makefile.in: Explain why ../target and ../nat are not
2622 listed as include file search paths.
2623 (linux-waitpid.o): New object file rule.
2624 * configure.srv (srv_native_linux_obj): New variable.
2625 Replace all occurrences of linux native object files with
2626 $srv_native_linux_obj.
2627 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2628 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2629 (linux_enable_event_reporting): Remove declaration.
2630 (my_waitpid): Moved to common/linux-waitpid.c.
2631 (linux_wait_for_event): Pass ptid when calling
2632 linux_enable_event_reporting.
2633 (linux_supports_tracefork_flag): Remove.
2634 (linux_enable_event_reporting): Likewise.
2635 (linux_tracefork_grandchild): Remove.
2636 (STACK_SIZE): Moved to common/linux-ptrace.c.
2637 (linux_tracefork_child): Remove.
2638 (linux_test_for_tracefork): Remove.
2639 (linux_look_up_symbols): Call linux_supports_traceclone.
2640 (initialize_low): Remove call to linux_test_for_tracefork.
2641 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2642 common/linux-ptrace.h.
2643 (PTRACE_TYPE_ARG4): Likewise.
2644 Include linux-ptrace.h.
2645
32940073
PA
26462013-08-21 Pedro Alves <palves@redhat.com>
2647
2648 * config.in: Renegerate.
2649
33b60d58 26502013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2651
33b60d58
LM
2652 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2653 (SFILES): Remove $(srcdir)/common/target-common.c and
2654 add $(srcdir)/target/waitstatus.c.
2655 (OBS): Remove target-common.o and add waitstatus.o.
2656 (server_h): Remove $(srcdir)/../common/target-common.h and
2657 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2658 and $(srcdir)/../target/waitstatus.h.
2659 (target-common.o): Remove.
2660 (waitstatus.o): New target object file.
2661 * target.h: Do not include target-common.h and
2662 include target/resume.h, target/wait.h and
2663 target/waitstatus.h.
2664
b8e1b30e
LM
26652013-08-13 Luis Machado <lgustavo@codesourcery.com>
2666
2667 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2668 to PTRACE_TYPE_ARG3.
2669 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2670 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2671 PTRACE_TYPE_ARG4.
2672 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2673 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2674
7a60ad40
YQ
26752013-07-27 Jie Zhang <jie@codesourcery.com>
2676 Daniel Jacobowitz <dan@codesourcery.com>
2677 Yao Qi <yao@codesourcery.com>
2678
2679 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2680 (mips-linux-watch.o): New rule.
2681 (mips_linux_watch_h): New variable.
2682 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2683 srv_tgtobj.
2684 * linux-mips-low.c: Include mips-linux-watch.h.
2685 (struct arch_process_info, struct arch_lwp_info): New.
2686 (update_watch_registers_callback): New function.
2687 (mips_linux_new_process, mips_linux_new_thread) New functions.
2688 (mips_linux_prepare_to_resume, mips_insert_point): New
2689 functions.
2690 (mips_remove_point, mips_stopped_by_watchpoint): New
2691 functions.
2692 (rsp_bp_type_to_target_hw_bp_type): New function.
2693 (mips_stopped_data_address): New function.
2694 (the_low_target): Add watchpoint support functions.
2695
de6f69ad
YQ
26962013-07-27 Yao Qi <yao@codesourcery.com>
2697
2698 * i386-low.c: Include break-common.h.
2699 (enum target_hw_bp_type): Remove.
2700
3360c0bf
LM
27012013-07-24 Luis Machado <lgustavo@codesourcery.com>
2702
2703 * Makefile.in (SFILES): /common/target-common.c.
2704 (OBS): Add target-common.o.
2705 (server_h): Add $(srcdir)/../common/target-common.h.
2706 (target-common.o): New target.
2707 * server.c (queue_stop_reply_callback): Free
2708 status string after use.
2709 * target.c (target_waitstatus_to_string): Remove.
2710 * target.h: Include target-common.h.
2711 (resume_kind): Likewise.
2712 (target_waitkind): Likewise.
2713 (target_waitstatus): Likewise.
2714 (TARGET_WNOHANG): Likewise.
2715
bd885420
YQ
27162013-07-04 Yao Qi <yao@codesourcery.com>
2717
2718 * Makefile.in (host_alias): Use @host_noncanonical@.
2719 (target_alias): Use @target_noncanonical@.
2720 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2721 ACX_NONCANONICAL_HOST.
2722 * configure: Regenerated.
2723
2724 Revert:
2725 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2726
2727 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2728 * configure: Rebuild.
2729 * Makefile.in (version_host, version_target): Get from configure.
2730 (version.c): Use $(version_host) and $(version_target).
2731
17ef446e
PA
27322013-07-03 Pedro Alves <palves@redhat.com>
2733
2734 * Makefile.in (config.status): Depend on development.sh.
2735 * acinclude.m4: Include libmcheck.m4.
2736 * configure: Regenerate.
2737
7a9a7487
MG
27382013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2739
2740 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2741 attribute inside the parentheses.
2742 (winapi_DebugSetProcessKillOnExit): Ditto.
2743 (winapi_DebugBreakProcess): Ditto.
2744 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2745
49b64de6
MG
27462013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2747
2748 * notif.h (notif_event): Add a dummy member to avoid compiler
2749 errors.
2750
d5749ee7
PA
27512013-07-01 Pedro Alves <palves@redhat.com>
2752
2753 * hostio.c (HOSTIO_PATH_MAX): Define.
2754 (require_filename, handle_open, handle_unlink, handle_readlink):
2755 Use it.
2756
d8d2a3ee
PA
27572013-07-01 Pedro Alves <palves@redhat.com>
2758
2759 * server.h: Include "pathmax.h".
2760 * linux-low.c: Don't include sys/param.h.
2761 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2762 MAXPATHLEN.
2763 * win32-low.c: Don't include sys/param.h.
2764 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2765
bc7dea8d
PA
27662013-07-01 Pedro Alves <palves@redhat.com>
2767
2768 * event-loop.c: Don't check HAVE_UNISTD_H before including
2769 <unistd.h>.
2770 * gdbreplay.c: Likewise.
2771 * remote-utils.c: Likewise.
2772 * server.c: Likewise.
2773 * configure.ac: Don't check for unistd.h.
2774 * configure: Regenerate.
2775
d6c2da54
TT
27762013-06-28 Tom Tromey <tromey@redhat.com>
2777
2778 * Makefile.in (version.c): Use version.in, not
2779 common/version.in.
2780
257b6bec
MG
27812013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2782
2783 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2784 * configure: Rebuild.
2785 * Makefile.in (version_host, version_target): Get from configure.
2786 (version.c): Use $(version_host) and $(version_target).
2787
86ebe149
DK
27882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2789
2790 Fix trace-status to output user name without trailing colon.
2791 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2792
f30aa5af
DK
27932013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
2794
2795 Fix trace-status to output proper start-time and stop-time.
2796 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2797 output start time and stop time in hex as gdb expects.
2798
28a93511
YQ
27992013-06-26 Pedro Alves <pedro@codesourcery.com>
2800
2801 * tracepoint.c (build_traceframe_info_xml): Output trace state
2802 variables present in the trace buffer.
2803
01208463
TT
28042013-06-24 Tom Tromey <tromey@redhat.com>
2805
2806 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2807 create-version.sh.
2808 (version.o): Remove.
2809 * gdbreplay.c: Include version.h.
2810 (version, host_name): Don't declare.
2811 * server.h: Include version.h.
2812 (version, host_name): Don't declare.
2813
760256f9
PA
28142013-06-12 Pedro Alves <palves@redhat.com>
2815
2816 * linux-x86-low.c (linux_is_elf64): Delete global.
2817 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2818 with local linux_pid_exe_is_elf_64_file use.
2819
030031ee
PA
28202013-06-11 Pedro Alves <palves@redhat.com>
2821
2822 * linux-low.c (regset_disabled, disable_regset): New functions.
2823 (regsets_fetch_inferior_registers)
2824 (regsets_store_inferior_registers): Use them.
2825 (initialize_regsets_info); Don't allocate the disabled_regsets
2826 array here.
2827 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2828 comment.
2829
5da6eb0a
PA
28302013-06-11 Pedro Alves <palves@redhat.com>
2831
2832 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2833 xmalloc.
2834
7e5aaa09
PA
28352013-06-11 Pedro Alves <palves@redhat.com>
2836
2837 * linux-x86-low.c (initialize_low_arch): Call
2838 init_registers_x32_avx_linux.
2839
d878444c
JK
28402013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
2841
2842 Fix compatibility with Android Bionic.
2843 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2844 it is not empty.
2845
3aee8918
PA
28462013-06-07 Pedro Alves <palves@redhat.com>
2847
5f2b57b5 2848 PR server/14823
3aee8918
PA
2849 * Makefile.in (OBS): Add tdesc.o.
2850 (IPA_OBJS): Add tdesc-ipa.o.
2851 (tdesc-ipa.o): New rule.
2852 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2853 interface.
2854 * linux-low.c (new_inferior): Delete.
2855 (disabled_regsets, num_regsets): Delete.
2856 (linux_add_process): Adjust to set the new per-process
2857 new_inferior flag.
2858 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2859 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
2860 was a stop. When calling arch_setup, switch the current inferior
2861 to the thread that got an event.
2862 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2863 (regsets_fetch_inferior_registers)
2864 (regsets_store_inferior_registers): New regsets_info parameter.
2865 Adjust to use it.
2866 (linux_register_in_regsets): New regs_info parameter. Adjust to
2867 use it.
2868 (register_addr, fetch_register, store_register): New usrregs_info
2869 parameter. Adjust to use it.
2870 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2871 parameter regs_info. Adjust to use it.
2872 (linux_fetch_registers): Get the current inferior's regs_info, and
2873 adjust to use it.
2874 (linux_store_registers): Ditto.
2875 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2876 (initialize_low): Don't initialize the target_regsets here. Call
2877 initialize_low_arch.
2878 * linux-low.h (target_regsets): Delete declaration.
2879 (struct regsets_info): New.
2880 (struct usrregs_info): New.
2881 (struct regs_info): New.
2882 (struct process_info_private) <new_inferior>: New field.
2883 (struct linux_target_ops): Delete the num_regs, regmap, and
2884 regset_bitmap fields. New field regs_info.
2885 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2886 * i387-fp.c (num_xmm_registers): Delete.
2887 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2888 calls to new interface.
2889 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2890 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2891 Infer the number of xmm registers from the regcache's target
2892 description.
2893 * i387-fp.h (num_xmm_registers): Delete.
2894 * inferiors.c (add_thread): Don't install the thread's regcache
2895 here.
2896 * proc-service.c (gregset_info): Fetch the current inferior's
2897 regs_info. Adjust to use it.
2898 * regcache.c: Include tdesc.h.
2899 (register_bytes, reg_defs, num_registers)
2900 (gdbserver_expedite_regs): Delete.
2901 (get_thread_regcache): If the thread doesn't have a regcache yet,
2902 create one, instead of aborting gdbserver.
2903 (regcache_invalidate_one): Rename to ...
2904 (regcache_invalidate_thread): ... this.
2905 (regcache_invalidate_one): New.
2906 (regcache_invalidate): Only invalidate registers of the current
2907 process.
2908 (init_register_cache): Add target_desc parameter, and use it.
2909 (new_register_cache): Ditto. Assert the target description has a
2910 non zero registers_size.
2911 (regcache_cpy): Add assertions. Adjust.
2912 (realloc_register_cache, set_register_cache): Delete.
2913 (registers_to_string, registers_from_string): Adjust.
2914 (find_register_by_name, find_regno, find_register_by_number)
2915 (register_cache_size): Add target_desc parameter, and use it.
2916 (free_register_cache_thread, free_register_cache_thread_one)
2917 (regcache_release, register_cache_size): New.
2918 (register_size): Add target_desc parameter, and use it.
2919 (register_data, supply_register, supply_register_zeroed)
2920 (supply_regblock, supply_register_by_name, collect_register)
2921 (collect_register_as_string, collect_register_by_name): Adjust.
2922 * regcache.h (struct target_desc): Forward declare.
2923 (struct regcache) <tdesc>: New field.
2924 (init_register_cache, new_register_cache): Add target_desc
2925 parameter.
2926 (regcache_invalidate_thread): Declare.
2927 (regcache_invalidate_one): Delete declaration.
2928 (regcache_release): Declare.
2929 (find_register_by_number, register_cache_size, register_size)
2930 (find_regno): Add target_desc parameter.
2931 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2932 declarations.
2933 * remote-utils.c: Include tdesc.h.
2934 (outreg, prepare_resume_reply): Adjust.
2935 * server.c: Include tdesc.h.
2936 (gdbserver_xmltarget): Delete declaration.
2937 (get_features_xml, process_serial_event): Adjust.
2938 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2939 declare.
2940 (struct process_info) <tdesc>: New field.
2941 (ipa_tdesc): Declare.
2942 * tdesc.c: New file.
2943 * tdesc.h: New file.
2944 * tracepoint.c: Include tdesc.h.
2945 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2946 (get_context_regcache): Adjust to pass ipa_tdesc down.
2947 (do_action_at_tracepoint): Adjust to get the register cache size
2948 from the context regcache's description.
2949 (traceframe_walk_blocks): Adjust to get the register cache size
2950 from the current trace frame's description.
2951 (traceframe_get_pc): Adjust to get current trace frame's
2952 description and pass it down.
2953 (gdb_collect): Adjust to get the register cache size from the
2954 IPA's description.
2955 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2956 (gdbserver_xmltarget): Delete.
2957 (initialize_low_tracepoint): Set the ipa's target description.
2958 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2959 (initialize_low_tracepoint): Set the ipa's target description.
2960 * linux-x86-low.c: Include tdesc.h.
2961 [__x86_64__] (is_64bit_tdesc): New.
2962 (ps_get_thread_area, x86_get_thread_area): Use it.
2963 (i386_cannot_store_register): Rename to ...
2964 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
2965 (i386_cannot_fetch_register): Rename to ...
2966 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
2967 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2968 to new interface.
2969 (target_regsets): Rename to ...
2970 (x86_regsets): ... this.
2971 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2972 interface.
2973 (x86_siginfo_fixup): Use is_64bit_tdesc.
2974 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2975 (tdesc_x32_avx_linux, tdesc_x32_linux)
2976 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2977 Declare.
2978 (x86_linux_update_xmltarget): Delete.
2979 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2980 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2981 (AMD64_LINUX_USER64_CS): New.
2982 (x86_linux_read_description): New, based on
2983 x86_linux_update_xmltarget.
2984 (same_process_callback): New.
2985 (x86_arch_setup_process_callback): New.
2986 (x86_linux_update_xmltarget): New.
2987 (x86_regsets_info): New.
2988 (amd64_linux_regs_info): New.
2989 (i386_linux_usrregs_info): New.
2990 (i386_linux_regs_info): New.
2991 (x86_linux_regs_info): New.
2992 (x86_arch_setup): Reimplement.
2993 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2994 (x86_emit_ops): Ditto.
2995 (the_low_target): Adjust. Install x86_linux_regs_info,
2996 x86_cannot_fetch_register, and x86_cannot_store_register.
2997 (initialize_low_arch): New.
2998 * linux-ia64-low.c (tdesc_ia64): Declare.
2999 (ia64_fetch_register): Adjust.
3000 (ia64_usrregs_info, regs_info): New globals.
3001 (ia64_regs_info): New function.
3002 (the_low_target): Adjust.
3003 (initialize_low_arch): New function.
3004 * linux-sparc-low.c (tdesc_sparc64): Declare.
3005 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3006 Adjust.
3007 (sparc_arch_setup): New function.
3008 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3009 (the_low_target): Adjust.
3010 (initialize_low_arch): New function.
3011 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3012 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3013 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3014 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3015 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3016 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3017 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3018 (tdesc_powerpc_isa205_vsx64l): Declare.
3019 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3020 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3021 (ppc_set_pc, ppc_get_hwcap): Adjust.
3022 (ppc_usrregs_info): Forward declare.
3023 (!__powerpc64__) ppc_regmap_adjusted: New global.
3024 (ppc_arch_setup): Adjust to the current process'es target
3025 description.
3026 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3027 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3028 (ppc_store_evrregset): Adjust.
3029 (target_regsets): Rename to ...
3030 (ppc_regsets): ... this, and make static.
3031 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3032 (ppc_regs_info): New function.
3033 (the_low_target): Adjust.
3034 (initialize_low_arch): New function.
3035 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3036 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3037 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3038 (tdesc_s390x_linux64v2): Declare.
3039 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3040 (s390_fill_gregset, s390_store_last_break): Adjust.
3041 (target_regsets): Rename to ...
3042 (s390_regsets): ... this, and make static.
3043 (s390_get_pc, s390_set_pc): Adjust.
3044 (s390_get_hwcap): New target_desc parameter, and use it.
3045 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3046 (s390_arch_setup): Adjust to set the current process'es target
3047 description. Don't adjust the regmap.
3048 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3049 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3050 (regs_info_3264): New globals.
3051 (s390_regs_info): New function.
3052 (the_low_target): Adjust.
3053 (initialize_low_arch): New function.
3054 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3055 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3056 [__mips64] (init_registers_mips_linux)
3057 (init_registers_mips_dsp_linux): Delete defines.
3058 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3059 (have_dsp): New global.
3060 (mips_read_description): New, based on mips_arch_setup.
3061 (mips_arch_setup): Reimplement.
3062 (get_usrregs_info): New function.
3063 (mips_cannot_fetch_register, mips_cannot_store_register)
3064 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3065 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3066 (target_regsets): Rename to ...
3067 (mips_regsets): ... this, and make static.
3068 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3069 (dsp_regs_info, regs_info): New globals.
3070 (mips_regs_info): New function.
3071 (the_low_target): Adjust.
3072 (initialize_low_arch): New function.
3073 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3074 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3075 Declare.
3076 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3077 (arm_read_description): New, with bits factored from
3078 arm_arch_setup.
3079 (arm_arch_setup): Reimplement.
3080 (target_regsets): Rename to ...
3081 (arm_regsets): ... this, and make static.
3082 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3083 (arm_regs_info): New function.
3084 (the_low_target): Adjust.
3085 (initialize_low_arch): New function.
3086 * linux-m68k-low.c (tdesc_m68k): Declare.
3087 (target_regsets): Rename to ...
3088 (m68k_regsets): ... this, and make static.
3089 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3090 (m68k_regs_info): New function.
3091 (m68k_arch_setup): New function.
3092 (the_low_target): Adjust.
3093 (initialize_low_arch): New function.
3094 * linux-sh-low.c (tdesc_sharch): Declare.
3095 (target_regsets): Rename to ...
3096 (sh_regsets): ... this, and make static.
3097 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3098 (sh_regs_info, sh_arch_setup): New functions.
3099 (the_low_target): Adjust.
3100 (initialize_low_arch): New function.
3101 * linux-bfin-low.c (tdesc_bfin): Declare.
3102 (bfin_arch_setup): New function.
3103 (bfin_usrregs_info, regs_info): New globals.
3104 (bfin_regs_info): New function.
3105 (the_low_target): Adjust.
3106 (initialize_low_arch): New function.
3107 * linux-cris-low.c (tdesc_cris): Declare.
3108 (cris_arch_setup): New function.
3109 (cris_usrregs_info, regs_info): New globals.
3110 (cris_regs_info): New function.
3111 (the_low_target): Adjust.
3112 (initialize_low_arch): New function.
3113 * linux-cris-low.c (tdesc_crisv32): Declare.
3114 (cris_arch_setup): New function.
3115 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3116 (cris_regs_info): New function.
3117 (the_low_target): Adjust.
3118 (initialize_low_arch): New function.
3119 * linux-m32r-low.c (tdesc_m32r): Declare.
3120 (m32r_arch_setup): New function.
3121 (m32r_usrregs_info, regs_info): New globals.
3122 (m32r_regs_info): Adjust.
3123 (initialize_low_arch): New function.
3124 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3125 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3126 (tic6x_usrregs_info): Forward declare.
3127 (tic6x_read_description): New function, based on ...
3128 (tic6x_arch_setup): ... this. Reimplement.
3129 (target_regsets): Rename to ...
3130 (tic6x_regsets): ... this, and make static.
3131 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3132 (tic6x_regs_info): New function.
3133 (the_low_target): Adjust.
3134 (initialize_low_arch): New function.
3135 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3136 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3137 (target_regsets): Rename to ...
3138 (xtensa_regsets): ... this, and make static.
3139 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3140 globals.
3141 (xtensa_arch_setup, xtensa_regs_info): New functions.
3142 (the_low_target): Adjust.
3143 (initialize_low_arch): New function.
3144 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3145 (nios2_arch_setup): Set the current process'es tdesc.
3146 (target_regsets): Rename to ...
3147 (nios2_regsets): ... this.
3148 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3149 (nios2_regs_info): New function.
3150 (the_low_target): Adjust.
3151 (initialize_low_arch): New function.
a261b8f5
PA
3152 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3153 (aarch64_arch_setup): Set the current process'es tdesc.
3154 (target_regsets): Rename to ...
3155 (aarch64_regsets): ... this.
3156 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3157 (aarch64_regs_info): New function.
3158 (the_low_target): Adjust.
3159 (initialize_low_arch): New function.
3aee8918
PA
3160 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3161 globals.
3162 (target_regsets): Rename to ...
3163 (tile_regsets): ... this.
3164 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3165 (tile_regs_info): New function.
3166 (tile_arch_setup): Set the current process'es tdesc.
3167 (the_low_target): Adjust.
3168 (initialize_low_arch): New function.
3169 * spu-low.c (tdesc_spu): Declare.
3170 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3171 * win32-arm-low.c (tdesc_arm): Declare.
3172 (arm_arch_setup): New function.
3173 (the_low_target): Install arm_arch_setup instead of
3174 init_registers_arm.
3175 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3176 (init_windows_x86): Rename to ...
3177 (i386_arch_setup): ... this. Set `win32_tdesc'.
3178 (the_low_target): Adjust.
3179 * win32-low.c (win32_tdesc): New global.
3180 (child_add_thread): Don't create the thread cache here.
3181 (do_initial_child_stuff): Set the new process'es tdesc.
3182 * win32-low.h (struct target_desc): Forward declare.
3183 (win32_tdesc): Declare.
3184 * lynx-i386-low.c (tdesc_i386): Declare global.
3185 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3186 * lynx-low.c (lynx_tdesc): New global.
3187 (lynx_add_process): Set the new process'es tdesc.
3188 * lynx-low.h (struct target_desc): Forward declare.
3189 (lynx_tdesc): Declare global.
3190 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3191 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3192 * nto-low.c (nto_tdesc): New global.
3193 (do_attach): Set the new process'es tdesc.
3194 * nto-low.h (struct target_desc): Forward declare.
3195 (nto_tdesc): Declare.
3196 * nto-x86-low.c (tdesc_i386): Declare.
3197 (nto_x86_arch_setup): Set `nto_tdesc'.
3198
b1fbec62
GB
31992013-06-04 Gary Benson <gbenson@redhat.com>
3200
3201 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3202 to qSupported response when appropriate.
3203 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3204 with nonzero-length annex.
3205 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3206 arguments supplied in annex.
3207
d1ec4ce7
DE
32082013-05-31 Doug Evans <dje@google.com>
3209
ac44adcb 3210 PR server/15594
d1ec4ce7
DE
3211 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3212 64 bits in 64-cross-32 environment.
3213
9b25f2d3
PA
32142013-05-28 Pedro Alves <palves@redhat.com>
3215
3216 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3217 (aarch64-without-fpu.c): Delete rule.
3218 * configure.srv (aarch64*-*-linux*): Remove references to
3219 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3220 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3221 declaration.
3222
6740dc9c
PA
32232013-05-24 Pedro Alves <palves@redhat.com>
3224
3225 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3226 instead of strchr/decode_address. Error if the range isn't split
3227 with a ','. Don't assume there's be a ':' in the action.
3228
c2d6af84
PA
32292013-05-23 Yao Qi <yao@codesourcery.com>
3230 Pedro Alves <palves@redhat.com>
3231
3232 * linux-low.c (lwp_in_step_range): New function.
3233 (linux_wait_1): If the thread was range stepping and stopped
3234 outside the stepping range, report the stop to GDB. Otherwise,
3235 continue stepping. Add range stepping debug output.
3236 (linux_set_resume_request): Copy the step range from the resume
3237 request to the lwp.
3238 (linux_supports_range_stepping): New.
3239 (linux_target_ops) <supports_range_stepping>: Set to
3240 linux_supports_range_stepping.
3241 * linux-low.h (struct linux_target_ops)
3242 <supports_range_stepping>: New field.
3243 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3244 * linux-x86-low.c (x86_supports_range_stepping): New.
3245 (the_low_target) <supports_range_stepping>: Set to
3246 x86_supports_range_stepping.
3247 * server.c (handle_v_cont): Handle 'r' action.
3248 (handle_v_requests): Append ";r" if the target supports range
3249 stepping.
3250 * target.h (struct thread_resume) <step_range_start,
3251 step_range_end>: New fields.
3252 (struct target_ops) <supports_range_stepping>:
3253 New field.
3254 (target_supports_range_stepping): New macro.
3255
58794e1a
JB
32562013-05-17 Joel Brobecker <brobecker@adacore.com>
3257
3258 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3259 confusion in comment.
3260
d631c5a7
JB
32612013-05-17 Joel Brobecker <brobecker@adacore.com>
3262
3263 * lynx-low.c (struct process_info_private): New type.
3264 (lynx_add_process): New function.
3265 (lynx_create_inferior, lynx_attach): Replace calls to
3266 add_process by calls to lynx_add_process.
3267 (lynx_resume): If PTID is null, then try using
3268 current_process()->private->last_wait_event_ptid.
3269 Add comments.
3270 (lynx_clear_inferiors): Delete. The contents of that function
3271 has been inlined in lynx_mourn;
3272 (lynx_wait_1): Save the ptid in the process's private data.
3273 (lynx_mourn): Free the process' private data. Replace call
3274 to lynx_clear_inferiors by call to clear_inferiors.
3275
96f7a20f
YQ
32762013-05-17 Yao Qi <yao@codesourcery.com>
3277
3278 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3279 the right place.
3280
db0dfaa0
LM
32812013-05-16 Luis Machado <lgustavo@codesourcery.com>
3282
3283 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3284 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3285 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3286 PT_TEXT_END_ADDR guards. Update comments.
3287 (linux_target_op) <read_offsets>: Conditionally define to
3288 linux_read_offsets if the target is UCLIBC and if it defines
3289 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3290
68f5f838
SL
32912013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3292 Andrew Jenner <andrew@codesourcery.com>
3293
3294 * Makefile.in (SFILES): Add linux-nios2-low.c.
3295 (clean): Add action to delete nios2-linux.c.
3296 (nios2-linux.c): New rule.
3297 * configure.srv: Add nios2*-*-linux*.
3298 * linux-nios2-low.c: New.
3299
1ebff1fd
HAQ
33002013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3301
3302 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3303
f6150862
HZ
33042013-04-25 Hui Zhu <hui@codesourcery.com>
3305
3306 PR gdb/15186
f6150862
HZ
3307 * ax.c (ax_printf): Add fflush.
3308
614c279d
TT
33092013-04-22 Tom Tromey <tromey@redhat.com>
3310
3311 * Makefile.in (SFILES): Add filestuff.c.
3312 (OBS): Add filestuff.o.
3313 (filestuff.o): New target.
3314 * config.in, configure: Rebuild.
3315 * configure.ac: Check for fdwalk, pipe2.
3316
7d4e5717
PA
33172013-04-17 Pedro Alves <palves@redhat.com>
3318
3319 * configure.ac (USE_THREAD_DB): Delete variable.
3320 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3321 Don't AC_SUBST USE_THREAD_DB.
3322 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3323 * config.in, configure: Regenerate.
3324
d5c93e41
PA
33252013-04-16 Pedro Alves <palves@redhat.com>
3326
3327 * linux-low.h (struct lwp_info) <thread_known>: Move under
3328 the USE_THREAD_DB #ifdef.
3329
04f5fe89
PA
33302013-04-16 Pedro Alves <palves@redhat.com>
3331
3332 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3333 (linux-low.o): Delete rule.
3334 * linux-low.h: Always include "gdb_thread_db.h" instead of
3335 conditionally including thread_db.h.
3336 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3337 HAVE_THREAD_DB_H.
3338
480b27bf
JK
33392013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3340
3341 * Makefile.in (install-only): Fix make install regression.
3342
43662968
JK
33432013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3344
3345 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3346 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3347 installation.
3348 * gdbserver.1: Remove.
3349
3e74e146
PA
33502013-03-22 Pedro Alves <palves@redhat.com>
3351
3352 * linux-low.c (handle_extended_wait): Don't call
3353 linux_enable_event_reporting.
3354
a8347a2a
TT
33552013-03-15 Tony Theodore <tonyt@logyst.com>
3356
3357 PR build/9098:
3358 * Makefile.in (SHELL): Use @SHELL@.
3359
eeb56fa7
SDJ
33602013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3361
3362 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3363 compiler warning.
3364
4fa7e2ff
JB
33652013-03-13 Joel Brobecker <brobecker@adacore.com>
3366
3367 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3368 Remove extraneous NULL element.
3369
8ddb1965
YQ
33702013-03-13 Yao Qi <yao@codesourcery.com>
3371
3372 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3373 'V' block in trace frame.
3374
9accd112
MM
33752013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3376
3377 * target.h (struct target_ops): Add btrace ops.
3378 (target_supports_btrace): New macro.
3379 (target_enable_btrace): New macro.
3380 (target_disable_btrace): New macro.
3381 (target_read_btrace): New macro.
3382 * gdbthread.h (struct thread_info): Add btrace field.
3383 * server.c: Include btrace-common.h.
3384 (handle_btrace_general_set): New function.
3385 (handle_btrace_enable): New function.
3386 (handle_btrace_disable): New function.
3387 (handle_general_set): Call handle_btrace_general_set.
3388 (handle_qxfer_btrace): New function.
3389 (struct qxfer qxfer_packets[]): Add btrace entry.
3390 * inferiors.c (remove_thread): Disable btrace.
3391 * linux-low: Include linux-btrace.h.
3392 (linux_low_enable_btrace): New function.
3393 (linux_low_read_btrace): New function.
3394 (linux_target_ops): Add btrace ops.
3395 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3396 Add srv_linux_btrace=yes.
3397 (x86_64-*-linux*): Add linux-btrace.o.
3398 Add srv_linux_btrace=yes.
3399 * configure.ac: Define HAVE_LINUX_BTRACE.
3400 * config.in: Regenerated.
3401 * configure: Regenerated.
3402
5cc22e4c
MM
34032013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3404
3405 * server.c (handle_qxfer): Preserve error message if -3 is
3406 returned.
3407 (qxfer): Document the -3 return value.
3408
7c97f91e
MM
34092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3410
3411 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3412 (linux_btrace_h): New variable.
3413 (linux-btrace.o): New rule.
3414
be9a119c 34152013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3416 Hafiz Abid Qadeer <abidh@codesourcery.com>
3417
3418 * tracepoint.c (trace_buffer_size): New global.
3419 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3420 (init_trace_buffer): Change to one-argument function. Allocate
3421 trace buffer memory.
3422 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3423 handle QTBuffer:size packet.
3424 (cmd_bigqtbuffer_size): New function.
3425 (initialize_tracepoint): Call init_trace_buffer with
3426 DEFAULT_TRACE_BUFFER_SIZE.
3427 * server.c (handle_query): Add QTBuffer:size in the
3428 supported packets.
3429
e64f7499
YQ
34302013-03-07 Yao Qi <yao@codesourcery.com>
3431
3432 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3433 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3434 of -1.
3435 (cmd_qtsp): Adjust condition. Do post increment.
3436 Set cur_action and cur_step_action back to 0.
3437
f0ae6fc3
PA
34382013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3439
3440 PR server/15236
3441 * linux-low.c (linux_write_memory): Return early success if LEN is
3442 zero.
3443
b5b0b0af
CV
34442013-03-05 Corinna Vinschen <vinschen@redhat.de>
3445
334ad4a8 3446 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3447
589bc927
TT
34482013-02-28 Tom Tromey <tromey@redhat.com>
3449
3450 * configure.ac: Invoke AC_SYS_LARGEFILE.
3451 * configure, config.in: Rebuild.
3452
dfe07582
CV
34532013-02-28 Corinna Vinschen <vinschen@redhat.com>
3454
3455 * win32-low.c: Throughout, fix format strings and casts of
3456 printf-like functions to avoid type related warnings on all
3457 platforms.
3458 (get_child_debug_event): Print dwDebugEventCode as hex since
3459 that's how it's usually documented.
3460
736cd585
YQ
34612013-02-28 Yao Qi <yao@codesourcery.com>
3462
3463 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3464 pulongest.
3465
e1f58301
JW
34662013-02-27 Jiong Wang <jiwang@tilera.com>
3467
3468 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3469 (reg-tilegx32.c): New rule.
3470 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3471 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3472 different register info initializer according to elf class.
3473 (init_registers_tilgx32): New function. The tilegx32 register info
3474 initializer.
3475 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3476 (tile_store_gregset): Likewise.
3477
d171ca78
YQ
34782013-02-27 Yao Qi <yao@codesourcery.com>
3479
3480 * server.c (process_point_options): Print debug message when
3481 debug_threads is true.
3482
282bbdf3
YQ
34832013-02-26 Yao Qi <yao@codesourcery.com>
3484
3485 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3486
aca22551
PA
34872013-02-19 Pedro Alves <palves@redhat.com>
3488 Kai Tietz <ktietz@redhat.com>
3489
3490 PR gdb/15161
3491
3492 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3493 instead of strtoul to extract address from packet.
3494 (process_serial_event) <'z'>: Likewise.
3495
4f3cee1c
YQ
34962013-02-18 Yao Qi <yao@codesourcery.com>
3497
3498 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3499
8e1d55a3
PA
35002013-02-14 Pedro Alves <palves@redhat.com>
3501
3502 Plug memory leak.
3503
3504 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3505 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3506
458820da
PA
35072013-02-14 Pedro Alves <palves@redhat.com>
3508
3509 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3510
baea0dae
PA
35112013-02-14 Pedro Alves <palves@redhat.com>
3512
3513 * tracepoint.c (save_string): Delete.
3514 (add_tracepoint_action): Use savestring instead of save_string.
3515
0b1afbb3
PA
35162013-02-12 Pedro Alves <palves@redhat.com>
3517
3518 * linux-xtensa-low.c: Ditto.
3519 * xtensa-xtregs.c: Ditto.
3520
8a4ac37e
PA
35212013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3522
3523 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3524 thread_db.
3525
148de6bb
MS
35262013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3527
3528 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3529 aarch64_num_wp_regs and aarch64_num_bp_regs to
3530 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3531
55fac6e0
MS
35322013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3533
3534 * linux-aarch64-low.c (ps_get_thread_area): Replace
3535 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3536
176eb98c
MS
35372013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3538 Marcus Shawcroft <marcus.shawcroft@arm.com>
3539 Nigel Stephens <nigel.stephens@arm.com>
3540 Yufeng Zhang <yufeng.zhang@arm.com>
3541
3542 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3543 (aarch64.c, aarch64-without-fpu.c): New targets.
3544 * configure.srv (aarch64*-*-linux*): New.
3545 * linux-aarch64-low.c: New file.
3546
56f7af9c
MS
35472013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3548
43aaf8b6 3549 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3550 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3551 (dequeue_one_deferred_signal, linux_resume_one_thread)
3552 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3553 (linux_tracefork_grandchild, linux_test_for_tracefork)
3554 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3555 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3556 where the argument is 0.
3557
60f662b0
YQ
35582013-01-25 Yao Qi <yao@codesourcery.com>
3559
3560 * event-loop.c: Include "queue.h".
3561 (gdb_event_p): New typedef.
3562 (struct gdb_event) <next_event>: Remove.
3563 (event_queue): Change to QUEUE(gdb_event_p).
3564 (async_queue_event): Remove.
3565 (gdb_event_xfree): New.
3566 (initialize_event_loop): New.
3567 (process_event): Use API from QUEUE.
3568 (wait_for_event): Likewise.
3569 * server.c (main): Call initialize_event_loop.
3570 * server.h (initialize_event_loop): Declare.
3571
5ae4861a
YQ
35722013-01-18 Yao Qi <yao@codesourcery.com>
3573
3574 * ax.h (struct eval_agent_expr_context): New.
3575 (gdb_eval_agent_expr): Update declaration.
3576 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3577 TFRAME. Add new argument CTX.
3578 * server.h (struct eval_agent_expr_context): Declare.
3579 (agent_mem_read, agent_tsv_read): Update declaration.
3580 (agent_mem_read_string): Likewise.
3581 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3582 (add_traceframe_block): Add new argument TPOINT.
3583 Increase TPOINT->traceframe_usage.
3584 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3585 eval_tracepoint_agent_expr.
3586 (condition_true_at_tracepoint): Likewise.
3587 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3588 (agent_mem_read_string, agent_tsv_read): Likewise.
3589
85e00e85
YQ
35902013-01-16 Yao Qi <yao@codesourcery.com>
3591
3592 * linux-low.c (linux_resume_one_lwp): Don't check
3593 'lwp->bp_reinsert != 0'.
3594
4039cf45
JB
35952013-01-07 Joel Brobecker <brobecker@adacore.com>
3596 Pedro Alves <palves@redhat.com>
3597
3598 * lynx-low.c (ptrace_request_to_str): Define a temporary
3599 macro and use it to simplify this function's implementation.
3600
9044dee2
JB
36012013-01-07 Joel Brobecker <brobecker@adacore.com>
3602
3603 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3604 sets errno.
3605
e6352c8f
JB
36062013-01-07 Joel Brobecker <brobecker@adacore.com>
3607
3608 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3609
50681a27
JB
36102013-01-07 Joel Brobecker <brobecker@adacore.com>
3611
3612 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3613
3f6e77ef
JB
36142013-01-07 Joel Brobecker <brobecker@adacore.com>
3615
3616 * lynx-low.c (lynx_resume): Use the resume_info parameter
3617 to determine the ptid for the lynx_ptrace call, unless
3618 it is equal to minus_one_ptid, in which case we use the
3619 ptid of the current_inferior.
3620 (lynx_wait_1): After having received a thread create/exit
3621 event, resume the inferior's execution using the signaling
3622 thread's ptid, rather than the old ptid.
3623
7fda33ae
JB
36242013-01-07 Joel Brobecker <brobecker@adacore.com>
3625
3626 * lynx-low.c (lynx_resume): Delete variable ret.
3627
b9786c74
JB
36282013-01-01 Joel Brobecker <brobecker@adacore.com>
3629
3630 * gdbreplay.c (gdbreplay_version): Update copyright year.
3631 * server.c (gdbserver_version): Likewise.
3632
8b93d60f
JB
36332012-12-17 Joel Brobecker <brobecker@adacore.com>
3634
3635 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3636 new thread.
3637
037335a7
JB
36382012-12-17 Joel Brobecker <brobecker@adacore.com>
3639
3640 * lynx-low.c (ptrace_request_to_str): Add handling for
3641 PTRACE_GETTRACESIG.
3642
52d4cbd8
JB
36432012-12-17 Joel Brobecker <brobecker@adacore.com>
3644
3645 * lynx-low.c (lynx_attach): Delete variable new_process.
3646
ab8f6ca9
JB
36472012-12-17 Joel Brobecker <brobecker@adacore.com>
3648
3649 * lynx-low.c (lynx_create_inferior): Delete variable
3650 new_process.
3651
78cbc024
JB
36522012-12-17 Joel Brobecker <brobecker@adacore.com>
3653
3654 * lynx-low.c (ptrace_request_to_str): Do not handle
3655 PTRACE_GETTHREADLIST if this macro does not exist.
3656
14a00470
YQ
36572012-12-15 Yao Qi <yao@codesourcery.com>
3658
3659 * Makefile.in (OBS): Add notif.o.
3660 * notif.c, notif.h: New.
3661 * server.c: Include "notif.h".
3662 (struct vstop_notif) <next>: Remove.
3663 <base>: New field.
3664 (queue_stop_reply): Update.
3665 (push_event, send_next_stop_reply): Remove.
3666 (discard_queued_stop_replies): Update.
3667 (notif_stop): New variable.
3668 (handle_v_stopped): Remove.
3669 (handle_v_requests): Don't call handle_v_stopped. Call
3670 handle_ack_notif instead.
3671 (queue_stop_reply_callback): Call notif_event_enque instead
3672 of queue_stop_reply.
3673 (handle_status): Don't call send_next_stop_reply, call
3674 notif_write_event instead.
3675 (kill_inferior_callback): Likewise.
3676 (detach_or_kill_inferior_callback): Likewise.
3677 (main): Call initialize_notif.
3678 (process_serial_event): Call QUEUE_is_empty.
3679 (handle_target_event): Call notif_push instead of push event.
3680 * server.h (push_event): Remove declaration.
3681
61c125b9
TT
36822012-12-10 Tom Tromey <tromey@redhat.com>
3683
3684 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3685 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3686 macros.
3687 (.c.o): Rewrite.
3688 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3689 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3690 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3691 (amd64-linux-ipa.o, ax.o): Rewrite.
3692 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3693 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3694 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3695 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3696 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3697 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3698 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3699 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3700 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3701 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3702 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3703 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3704 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3705 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3706 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3707 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3708 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3709 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3710 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3711 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3712 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3713 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3714 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3715 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3716 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3717 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3718 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3719 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3720 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3721 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3722 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3723 (reg-tilegx.o): Remove.
3724 (all_object_files): New macro.
3725 Include .deps files.
3726 * aclocal.m4, configure: Rebuild.
3727 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3728 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3729 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3730
e90e9ad9
TT
37312012-12-05 Tom Tromey <tromey@redhat.com>
3732
3733 PR gdb/14917:
3734 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3735
02d403bf 37362012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3737
3738 * configure.ac: Check for linux/perf_event.h.
3739 * config.in: Regenerated.
3740 * configure: Regenerated.
3741
0270a750
PA
37422012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3743
3744 * hostio.c (handle_readlink): Decrease buffer size
3745 parameter passed to readlink by one byte.
3746
8c29b58e
YQ
37472012-11-26 Yao Qi <yao@codesourcery.com>
3748
3749 * configure.ac (build_warnings): Append '-Wempty-body'.
3750 * configure: Regenerated.
3751 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3752 body.
3753
8bdce1ff
PM
37542012-11-15 Pierre Muller <muller@sourceware.org>
3755
3756 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3757 * config.in: Regenerate.
3758 * configure: Regenerate.
3759 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3760 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3761 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3762 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3763 header.
3764 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3765 instead of <sys/wait.h> header.
3766 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3767
02d403bf 37682012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3769
3770 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3771 (various make rules): Remove -DGDBSERVER
3772
fbd5db48
YQ
37732012-11-09 Yao Qi <yao@codesourcery.com>
3774
3775 * spu-low.c (current_ptid): Move it to ..
3776 * gdbthread.h: ... here. New.
3777 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3778 * server.c (myresume, process_serial_event): Likewise.
3779 * thread-db.c (thread_db_find_new_threads): Likewise.
3780 * tracepoint.c (run_inferior_command): Likewise.
3781
b3dc46ff
AB
37822012-10-01 Andrew Burgess <aburgess@broadcom.com>
3783
3784 * server.c (handle_search_memory_1): Include access length in
3785 warning message.
3786
07c04788
HPN
37872012-09-05 Michael Brandt <michael.brandt@axis.com>
3788
3789 * linux-crisv32-low.c: Fix compile errors.
3790
918d227b
YQ
37912012-09-04 Yao Qi <yao@codesourcery.com>
3792
3793 * tracepoint.c (cmd_qtsv): Adjust debug message.
3794 Don't check CUR_TPOINT.
3795
18c1b81a
YQ
37962012-08-28 Yao Qi <yao@codesourcery.com>
3797
3798 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3799 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3800 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3801 Remove declarations of xmalloc, xreallloc, xstrdup and
3802 freeargv.
3803 * Makefile.in (libiberty_h): New.
3804 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3805 (linux-bfin-low.o): Append dependency 'libiberty.h'.
3806
dc82f37b
YQ
38072012-08-23 Yao Qi <yao@codesourcery.com>
3808
3809 * server.h: Remove declaration of 'xsnprintf'.
3810
406b1477
KS
38112012-08-22 Keith Seitz <keiths@redhat.com>
3812
3813 * server.h: Include build-gnulib-gbserver/config.h.
3814 * gdbreplay.c: Likewise.
3815
e6712ff1
DE
38162012-08-08 Doug Evans <dje@google.com>
3817
3818 * Makefile.in (SFILES): Add gdb_vecs.c.
3819 (OBS): Add gdb_vecs.o.
3820 (gdb_vecs_h, host_defs_h): New variables.
3821 (thread-db.o): Add $(gdb_vecs_h) dependency.
3822 (gdb_vecs.o): New rule.
3823 * thread-db.c: #include "gdb_vecs.h".
3824 (thread_db_load_search): Use a vector to iterate over path elements.
3825 Handle text appearing after "$pdir".
3826
3827 * configure.ac: Add check for strstr.
3828 * config.in: Regenerate.
3829 * configure: Regenerate.
3830
7c3270ae
UW
38312012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
3832
3833 * hostio.c (handle_pread): If pread fails, fall back to attempting
3834 lseek/read.
3835 (handle_pwrite): Likewise for pwrite.
3836
b62e2b27
UW
38372012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
3838
3839 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3840 between unsupported TYPE and unimplementable ADDR/LEN combination.
3841 (arm_insert_point): Act on new return value.
3842
78a99e91
PA
38432012-07-31 Pedro Alves <palves@redhat.com>
3844
3845 * server.c (process_point_options): Only skip tokens if we find
3846 one that is unrecognized. Don't treat 'X' specially while
3847 skipping unrecognized tokens.
3848
fcf303ab
UW
38492012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
3850
3851 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3852 to 4-byte-align HW breakpoint addresses for Thumb.
3853
7255706c
YQ
38542012-07-27 Yao Qi <yao@codesourcery.com>
3855
3856 PR remote/14161.
3857
3858 * server.h: Declare gdb_agent_about_to_close.
3859 * target.c (kill_inferior): Include "agent.h".
3860 New. Send command 'kill'.
3861 * target.h (kill_inferior): Removed macro.
3862 * tracepoint.c (gdb_agent_about_to_close): New.
3863 (gdb_agent_helper_thread): Handle command 'close'.
3864 Wait endlessly until the inferior stops.
3865 Install gdb_agent_remove_socket to atexit hook.
3866 (agent_socket_name): New static variable.
3867 (gdb_agent_socket_init): Replace local variable 'name' with
3868 'agent_socket_name'.
3869 (gdb_agent_remove_socket): New.
3870
5a3f286f
YQ
38712012-07-27 Yao Qi <yao@codesourcery.com>
3872
3873 * server.c (process_point_options): Stop at 'X' when parsing.
3874
961bd387
ME
38752012-07-19 Michael Eager <eager@eagercon.com>
3876
a261b8f5 3877 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
3878 to hw_execute.
3879 * linux-x86-low.c (x86_insert_point, x86_remove_point):
3880 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3881 hardware breakpoint.
3882
aa7c7447
JK
38832012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3884
3885 * gdbserver/linux-low.c (initialize_low): Call
3886 linux_ptrace_init_warnings.
3887
7f216e7c
DE
38882012-07-02 Doug Evans <dje@google.com>
3889
3890 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3891 pointer to int.
3892
d3ce09f5
SS
38932012-07-02 Stan Shebs <stan@codesourcery.com>
3894
3895 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3896 (ax.o): Add it to build rule.
3897 (ax-ipa.o): Ditto.
3898 (OBS): Add format.o.
3899 (IPA_OBS): Add format.o.
3900 * server.c (handle_query): Claim support for breakpoint commands.
3901 (process_point_options): Add command case.
3902 (process_serial_event): Leave running if there are printfs in
3903 effect.
3904 * mem-break.h (any_persistent_commands): Declare.
3905 (add_breakpoint_commands): Declare.
3906 (gdb_no_commands_at_breakpoint): Declare.
3907 (run_breakpoint_commands): Declare.
3908 * mem-break.c (struct point_command_list): New struct.
3909 (struct breakpoint): New field command_list.
3910 (any_persistent_commands): New function.
3911 (add_commands_to_breakpoint): New function.
3912 (add_breakpoint_commands): New function.
3913 (gdb_no_commands_at_breakpoint): New function.
3914 (run_breakpoint_commands): New function.
3915 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3916 locally.
3917 * ax.c: Include format.h.
3918 (ax_printf): New function.
3919 (gdb_eval_agent_expr): Add printf opcode.
3920
2f8f6aed
YQ
39212012-06-13 Yao Qi <yao@codesourcery.com>
3922
3923 * server.c (start_inferior): Remove duplicated writes to fields
3924 'last_resume_kind' and 'last_status' of 'current_inferior'.
3925
0c9070b3
YQ
39262012-06-12 Yao Qi <yao@codesourcery.com>
3927 Pedro Alves <palves@redhat.com>
3928
3929 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
3930 comment.
3931 * server.c (handle_v_cont): Extend comment.
3932
c52daf70
YQ
39332012-06-11 Yao Qi <yao@codesourcery.com>
3934
3935 * linux-low.c (linux_attach): Add 'static'.
3936
d38bbb0a
YQ
39372012-06-06 Yao Qi <yao@codesourcery.com>
3938
3939 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3940
89dc0afd
JK
39412012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3942
3943 Fix gcc -flto compilation warning.
3944 * server.c (main): Make variable multi_mode and attach volatile.
3945
75f62ce7
TJB
39462012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
3947
3948 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3949 if the platform doesn't know about it.
3950
65f479b6
PA
39512012-05-30 Jeff Kenton <jkenton@tilera.com>
3952
3953 * Makefile.in (SFILES): Add linux-tile-low.c.
3954 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3955 * configure.srv: Handle tilegx-*-linux*.
3956 * linux-tile-low.c: New file.
3957
0c5bf5a9
JK
39582012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3959
3960 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3961
a493e3e2
PA
39622012-05-24 Pedro Alves <palves@redhat.com>
3963
3964 PR gdb/7205
3965
43aaf8b6 3966 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 3967
2ea28649
PA
39682012-05-24 Pedro Alves <palves@redhat.com>
3969
3970 PR gdb/7205
3971
3972 Replace target_signal with gdb_signal throughout.
3973
8d409d16
MR
39742012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
3975
3976 * linux-low.c (linux_store_registers): Avoid the copying sequence
3977 when no data has been retrieved by ptrace.
3978
23512c01
MGD
39792012-05-22 Will Deacon <will.deacon@arm.com>
3980
3981 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3982 Include asm/ptrace.h.
3983 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3984 already defined.
3985
4934b29e
MR
39862012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
3987
3988 * linux-low.c (linux_store_registers): Don't re-retrieve data
3989 with ptrace that has already been obtained from /proc. Always
3990 copy any data retrieved with ptrace to the buffer supplied.
3991
bde24c0a
PA
39922012-05-11 Yao Qi <yao@codesourcery.com>
3993 Pedro Alves <palves@redhat.com>
3994
3995 * linux-low.c (enum stopping_threads_kind): New.
3996 (stopping_threads): Change type to `enum stopping_threads_kind'.
3997 (handle_extended_wait): If stopping and suspending threads, leave
3998 the new_lwp suspended too.
3999 (linux_wait_for_event): Adjust.
4000 (stop_all_lwps): Set `stopping_threads' to
4001 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4002 whether we're suspending threads or just stopping them. Assert no
4003 recursion happens.
4004
623b6bdf
YQ
40052012-04-29 Yao Qi <yao@codesourcery.com>
4006
4007 * server.h: Move some code to ...
4008 * gdbthread.h: ... here. New.
4009 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4010 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4011 (nto-low.o, win32-low.o): Likewise.
4012 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4013 * regcache.c, remote-utils.c, server.c: Likewise.
4014 * target.c, tracepoint.c, win32-low.c: Likewise.
4015
f15f9948
TJB
40162012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4017
4018 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4019 (PTRACE_ARG4_TYPE): Likewise.
4020 (PTRACE_XFER_TYPE): Likewise.
4021 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4022 ptrace to PTRACE_ARG3_TYPE.
4023 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4024 (PTRACE_ARG4_TYPE): Likewise.
4025 (PTRACE_XFER_TYPE): Likewise.
4026 (linux_detach_one_lwp): Cast fourth argument of
4027 ptrace to long then PTRACE_ARG4_TYPE.
4028 (regsets_fetch_inferior_registers): Cast third argument of
4029 ptrace to long then PTRACE_ARG3_TYPE.
4030 (regsets_store_inferior_registers): Likewise.
4031
38ea300a
PA
40322012-04-20 Pedro Alves <palves@redhat.com>
4033
4034 * configure: Regenerate.
4035
c971b7fa
PA
40362012-04-19 Pedro Alves <palves@redhat.com>
4037
43aaf8b6 4038 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4039 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4040 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4041 (all, install-only, uninstall, clean-info, all-lib, clean): No
4042 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4043 (maintainer-clean realclean distclean): Use subdir_do.
4044 (subdir_do): New.
4045 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4046 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4047 * acinclude.m4: Include acx_configure_dir.m4.
4048 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4049 calls. Call AC_PROG_RANLIB. Configure gnulib using
4050 ACX_CONFIGURE_DIR.
4051 (GNULIB): New.
4052 (GNULIB_STDINT_H): Adjust.
4053 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4054 * gdbreplay.c: Include build-gnulib/config.h.
4055 * server.h: Likewise.
4056 * aclocal.m4: Regenerate.
4057 * config.in: Regenerate.
4058 * configure: Regenerate.
c971b7fa 4059
809277f8
PA
40602012-04-19 Pedro Alves <palves@redhat.com>
4061
4062 * Makefile.in (LIBGNU, INCGNU): Adjust.
4063 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4064 (all, install-only, uninstall, clean-info, all-lib, clean)
4065 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4066 * configure.ac: Adjust AC_OUTPUT output.
4067 * aclocal.m4: Regenerate.
4068 * configure: Regenerate.
4069
fd9bb8b8
PA
40702012-04-19 Pedro Alves <palves@redhat.com>
4071
4072 * Makefile.in (generated_files): New.
4073 (server_h): Remove the explicit dependency on config.h, and depend
4074 on $generated_files.
4075
1c298c66
PA
40762012-04-19 Pedro Alves <palves@redhat.com>
4077
4078 * Makefile.in (INCGNU): Add -Ignulib.
4079
57c4b50b
PA
40802012-04-19 Pedro Alves <palves@redhat.com>
4081
4082 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4083 (INCGNU): ... this, and spell out -I here.
4084 (GNULIB_LIB): Rename to ...
4085 (LIBGNU): ... this.
4086 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4087
1030e047
PA
40882012-04-19 Pedro Alves <palves@redhat.com>
4089
4090 * config.in: Regenerate.
4091
447d4319
PA
40922012-04-19 Pedro Alves <palves@redhat.com>
4093
4094 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4095 * server.h (memmem): Remove declaration.
4096 * config.in: Regenerate.
4097 * configure: Regenerate.
4098
aad9eab9
YQ
40992012-04-19 Yao Qi <yao@codesourcery.com>
4100
4101 * Makefile.in (SFILES): Add common/vec.c.
4102 (OBS): Add vec.o.
4103 (vec.o): New rule.
4104
3e10640f
YQ
41052012-04-19 Yao Qi <yao@codesourcery.com>
4106
4107 * remote-utils.c (prepare_resume_reply): Replace with macro
4108 target_core_of_thread.
4109 * server.c (handle_qxfer_threads_proper): Likewise.
4110 * target.h (traget_core_of_thread): New macro.
4111
71622373
PA
41122012-04-18 Pedro Alves <palves@redhat.com>
4113
4114 * aclocal.m4: Regenerate.
4115 * configure: Regenerate.
4116
80d26939
YQ
41172012-04-16 Yao Qi <yao@codesourcery.com>
4118
4119 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4120 duplicated on address.
4121
42476b70
YQ
41222012-04-16 Yao Qi <yao@codesourcery.com>
4123
4124 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4125 (struct tracepoint_action_ops) <send>: New field.
4126 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4127 (agent_expr_send, x_tracepoint_action_send): New.
4128 (l_tracepoint_action_send): New.
4129 (cmd_qtdp): Download and install tracepoint
4130 according to `use_agent'.
4131 (run_inferior_command): Add one more parameter `len'.
4132 Update callers.
4133 (tracepoint_send_agent): New.
4134 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4135
7bc83639
YQ
41362012-04-16 Yao Qi <yao@codesourcery.com>
4137
4138 * tracepoint.c (download_tracepoints): Moved to ...
4139 (cmd_qtstart): ... here.
4140
5f18041e
YQ
41412012-04-14 Yao Qi <yao@codesourcery.com>
4142
4143 * tracepoint.c: Include inttypes.h.
4144 (struct collect_memory_action): Use sized types.
4145 (struct tracepoint): Likewise.
4146 (cmd_qtdp, stop_tracing): Update print specifiers.
4147 (cmd_qtp, response_tracepoint): Likewise.
4148 (collect_data_at_tracepoint): Likewise.
4149 (collect_data_at_step): Likewise.
4150
55a8c076
YQ
41512012-04-14 Yao Qi <yao@codesourcery.com>
4152
4153 Import gnulib module inttypes.
4154 * aclocal.m4, config.in, configure: Regenerated.
4155
dc750257
YQ
41562012-04-14 Yao Qi <yao@codesourcery.com>
4157
4158 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4159 Makefile and config.status at last.
4160
0ab5faf9
YQ
41612012-04-13 Yao Qi <yao@codesourcery.com>
4162
4163 * tracepoint.c: Include stdint.h unconditionally.
4164
18f5fd81
TJB
41652012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4166
4167 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4168 on BFD_HAVE_SYS_PROCFS_TYPE.
4169 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4170 * configure: Regenerate.
4171 * config.in: Likewise.
4172
4d47af5c
L
41732012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4174
4175 * Makefile.in (clean): Also remove x32.c x32-linux.c
4176 x32-avx.c x32-avx-linux.c.
4177 (x32.o): New target.
4178 (x32.c): Likewise.
4179 (x32-linux.o): Likewise.
4180 (x32-linux.c): Likewise.
4181 (x32-avx.o): Likewise.
4182 (x32-avx.c): Likewise.
4183 (x32-avx-linux.o): Likewise.
4184 (x32-avx-linux.c): Likewise.
4185
4186 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4187 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4188 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4189 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4190 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4191 i386/x32-avx-linux.xml.
4192
4193 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4194 (init_registers_x32_avx_linux): Likwise.
4195 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4196 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4197
ecedbe58
PA
41982012-04-13 Pedro Alves <palves@redhat.com>
4199
4200 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4201 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4202 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4203 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4204 the sub-make.
4205
c92b5177
L
42062012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4207
4208 * linux-x86-low.c (compat_x32_clock_t): New.
4209 (compat_x32_siginfo_t): Likewise.
4210 (compat_x32_siginfo_from_siginfo): Likewise.
4211 (siginfo_from_compat_x32_siginfo): Likewise.
4212 (linux_is_elf64): Likewise.
4213 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4214 and siginfo_from_compat_x32_siginfo for x32.
4215 (x86_arch_setup): Set linux_is_elf64.
4216
214d508e
L
42172012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4218
4219 PR gdb/13969
4220 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4221 e_machine field.
4222 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4223 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4224 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4225 compatible with process.
4226
c9a1864a
YQ
42272012-04-12 Yao Qi <yao@codesourcery.com>
4228
4229 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4230 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4231 (install-only, install-info, clean): Handle sub dir gnulib.
4232 (all-lib, am--refresh): New targets.
4233 (memmem.o): Remove target.
4234 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4235 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4236 (AC_REPLACE_FUNCS): Remove memmem.
4237 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4238 (AC_OUTPUT): Generate Makefile in gnulib/.
4239 * aclocal.m4, config.in, configure: Regenerated.
4240
367ba2c2
MR
42412012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4242
4243 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4244
9d236627
PA
42452012-04-05 Pedro Alves <palves@redhat.com>
4246
4247 -Werror=strict-aliasing
4248
4249 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4250 pointer.
4251
111217b3
PA
42522012-04-04 Pedro Alves <palves@redhat.com>
4253
4254 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4255 (sparc_store_gregset_from_stack, sparc_store_gregset)
4256 (sparc_breakpoint_at): Fix formatting.
4257
8365dcf5
TJB
42582012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4259
4260 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4261 are available.
4262 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4263 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4264 * config.in: Regenerate.
4265 * configure: Likewise.
4266
689cc2ae
PA
42672012-03-29 Pedro Alves <palves@redhat.com>
4268
4269 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4270 Correct ptrace arguments.
4271
c14dfd32
PA
42722012-03-28 Pedro Alves <palves@redhat.com>
4273
4274 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4275 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4276 (IA64_FR1_REGNUM): New defines.
4277 (ia64_fetch_register): New.
4278 (the_low_target): Install it.
4279 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4280 field.
4281 * linux-low.c (linux_fetch_registers): Try the
4282 the_low_target.fetch_register hook first.
4283
4284 * linux-arm-low.c (the_low_target): Adjust.
4285 * linux-bfin-low.c (the_low_target): Adjust.
4286 * linux-cris-low.c (the_low_target): Adjust.
4287 * linux-crisv32-low.c (the_low_target): Adjust.
4288 * linux-m32r-low.c (the_low_target): Adjust.
4289 * linux-m68k-low.c (the_low_target): Adjust.
4290 * linux-mips-low.c (the_low_target): Adjust.
4291 * linux-ppc-low.c (the_low_target): Adjust.
4292 * linux-s390-low.c (the_low_target): Adjust.
4293 * linux-sh-low.c (the_low_target): Adjust.
4294 * linux-sparc-low.c (the_low_target): Adjust.
4295 * linux-tic6x-low.c (the_low_target): Adjust.
4296 * linux-x86-low.c (the_low_target): Adjust.
4297 * linux-xtensa-low.c (the_low_target): Adjust.
4298
63c88e13
PA
42992012-03-26 Pedro Alves <palves@redhat.com>
4300
4301 * server.c (handle_qxfer_libraries): Don't bail early if
4302 the_target->qxfer_libraries_svr4 is not NULL.
4303
fb723180
PA
43042012-03-26 Pedro Alves <palves@redhat.com>
4305
4306 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4307
0afae3cf
PA
43082012-03-23 Pedro Alves <palves@redhat.com>
4309
4310 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4311 "library-list-svr4" element's start tag when the the DSO list is
4312 empty.
4313
485f1ee4
PA
43142012-03-23 Pedro Alves <palves@redhat.com>
4315
4316 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4317 a variable whose type size is the same as the inferior's pointer
4318 size.
4319
a5362b9a
TS
43202012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4321
4322 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4323 struct siginfo.
4324 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4325 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4326 * linux-low.h: Include <signal.h>.
4327 (struct siginfo): Remove forward declaration.
4328 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4329 struct siginfo.
4330
d226c142
MF
43312012-03-21 Mike Frysinger <vapier@gentoo.org>
4332
4333 * .gitignore: Ignore more files.
4334
122f36ef
PA
43352012-03-19 Pedro Alves <palves@redhat.com>
4336 Jan Kratochvil <jan.kratochvil@redhat.com>
4337
4338 * server.c (cont_thread, general_thread): Add describing comments.
4339 (start_inferior): Clear `cont_thread'.
4340 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4341 of a process.
4342
fc3e5175
YQ
43432012-03-15 Yao Qi <yao@codesourcery.com>
4344
4345 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4346 handling to ...
4347 (cmd_qtdp): ... here.
4348
8d0d92cd
YQ
43492012-03-15 Yao Qi <yao@codesourcery.com>
4350
4351 * tracepoint.c (struct tracepoint_action_ops): New.
4352 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4353 (m_tracepoint_action_download): New.
4354 (r_tracepoint_action_download): New.
4355 (x_tracepoint_action_download): New.
4356 (l_tracepoint_action_download): New.
4357 (add_tracepoint_action): Install `action->ops' according type.
4358 (download_tracepoint_1): Move code `download' function pointer
4359 of various tracepoint_action_ops.
4360
87b0bb13
JK
43612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4362
4363 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4364 linux_ptrace_attach_warnings.
4365
5f572dec
JK
43662012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4367
4368 * Makefile.in (linux-ptrace.o): New.
4369 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4370 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4371 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4372 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4373 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4374 of these targets.
4375 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4376
f4647387
YQ
43772012-03-08 Yao Qi <yao@codesourcery.com>
4378 Pedro Alves <palves@redhat.com>
4379
4380 Fix PR server/13392.
4381 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4382 offset of JMP insn.
4383 * tracepoint.c (remove_tracepoint): New.
4384 (cmd_qtdp): Call remove_tracepoint when failed to install.
4385
9b224c5e
PA
43862012-03-07 Pedro Alves <palves@redhat.com>
4387
4388 * linux-low.c (get_detach_signal): New.
4389 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4390 Pass on pending signals to PTRACE_DETACH. Check the result of the
4391 ptrace call.
4392 * server.c (program_signals, program_signals_p): New.
4393 (handle_general_set): Handle QProgramSignals.
4394 * server.h (program_signals, program_signals_p): Declare.
4395
e237a7e2
JK
43962012-03-05 Pedro Alves <palves@redhat.com>
4397 Jan Kratochvil <jan.kratochvil@redhat.com>
4398
4399 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4400 New comment why.
4401
5808517f
YQ
44022012-03-03 Yao Qi <yao@codesourcery.com>
4403
4404 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4405 agent_look_up_symbols.
4406
58b4daa5
YQ
44072012-03-03 Yao Qi <yao@codesourcery.com>
4408
4409 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4410 (linux-x86-low.o): Likewise.
4411 * server.h: Remove in_process_agent_loaded.
4412 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4413 common/agent.c.
4414 Update callers.
4415
8ffcbaaf
YQ
44162012-03-03 Yao Qi <yao@codesourcery.com>
4417
4418 * tracepoint.c (gdb_agent_capability): New global.
4419 (in_process_agent_loaded_ust): Renamed to
4420 `in_process_agent_supports_ust'.
4421 Update callers.
4422 (in_process_agent_supports_ust): Call agent_capability_check.
4423 (clear_installed_tracepoints): Assert that agent supports
4424 agent.
4425
d1feda86
YQ
44262012-03-03 Yao Qi <yao@codesourcery.com>
4427
4428 * linux-low.c (linux_supports_agent): New.
4429 (linux_target_ops): Initialize field `supports_agent' with
4430 linux_supports_agent.
4431 * target.h (struct target_ops) <supports_agent>: New.
4432 (target_supports_agent): New macro.
4433 * server.c (handle_general_set): Handle packet 'QAgent'.
4434 (handle_query): Send `QAgent+'.
4435 * Makefile.in (server.o): Depends on agent.h.
4436
2fa291ac
YQ
44372012-03-03 Yao Qi <yao@codesourcery.com>
4438
4439 * Makefile.in (OBS): Add agent.o.
4440 Add new rule for agent.o.
4441 Track dependence of tracepoint.c on agent.h.
4442 * tracepoint.c (run_inferior_command_1):
4443 (run_inferior_command): Call agent_run_command.
4444 (gdb_ust_connect_sync_socket): Deleted. Move it to
4445 common/agent.c.
4446 (resume_thread, stop_thread): Likewise.
4447 (gdb_ust_socket_init): Renamed to ...
4448 (gdb_agent_socket_init): ... New.
4449 (gdb_ust_thread): Renamed to ...
4450 (gdb_agent_helper_thread): ... New.
4451 (gdb_ust_init): Move some code to ...
4452 (gdb_agent_init): ... here. New.
4453 [HAVE_UST]: Call gdb_ust_init.
4454 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4455 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4456 * config.in, configure: Regenerated.
4457
05044653
PA
44582012-03-02 Pedro Alves <palves@redhat.com>
4459
4460 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4461 * linux-low.c (struct simple_pid_list): New.
4462 (stopped_pids): New a struct simple_pid_list pointer.
4463 (add_to_pid_list, pull_pid_from_list): New.
4464 (handle_extended_wait): Don't assume the first signal new children
4465 report is SIGSTOP. Adjust call to pull_pid_from_list.
4466 (linux_wait_for_lwp): Adjust.
4467
8d00225b
YQ
44682012-03-02 Yao Qi <yao@codesourcery.com>
4469
4470 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4471 debug log.
4472
19560ba5
YQ
44732012-03-02 Yao Qi <yao@codesourcery.com>
4474
4475 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4476 `stop_pc' and `tpoint'. Update caller.
4477
1faeff08
MR
44782012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4479
4480 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4481 * linux-low.c (use_linux_regsets): New macro.
4482 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4483 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4484 (linux_register_in_regsets): New function.
4485 (usr_fetch_inferior_registers): Skip registers covered by
4486 regsets.
4487 (usr_store_inferior_registers): Likewise.
4488 (usr_fetch_inferior_registers): New macro.
4489 (usr_store_inferior_registers): Likewise.
4490 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4491 (linux_store_registers): Likewise.
4492 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4493 prototype.
4494 (init_registers_mips64_dsp_linux): Likewise.
4495 (init_registers_mips_linux): New macro.
4496 (init_registers_mips_dsp_linux): Likewise.
4497 (mips_dsp_num_regs): Likewise.
4498 (DSP_BASE, DSP_CONTROL): New fallback macros.
4499 (mips_base_regs): New macro.
4500 (mips_regmap): Use it. Fix the size.
4501 (mips_dsp_regmap): New variable.
4502 (mips_dsp_regset_bitmap): Likewise.
4503 (mips_arch_setup): New function.
4504 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4505 than mips_regmap.
4506 (mips_cannot_store_register): Likewise.
4507 (the_low_target): Update .arch_setup, .num_regs and .regmap
4508 initializers. Add .regset_bitmap initializer.
4509 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4510 initializer.
4511 * linux-bfin-low.c (the_low_target): Likewise.
4512 * linux-cris-low.c (the_low_target): Likewise.
4513 * linux-crisv32-low.c (the_low_target): Likewise.
4514 * linux-ia64-low.c (the_low_target): Likewise.
4515 * linux-m32r-low.c (the_low_target): Likewise.
4516 * linux-m68k-low.c (the_low_target): Likewise.
4517 * linux-ppc-low.c (the_low_target): Likewise.
4518 * linux-s390-low.c (the_low_target): Likewise.
4519 * linux-sh-low.c (the_low_target): Likewise.
4520 * linux-sparc-low.c (the_low_target): Likewise.
4521 * linux-tic6x-low.c (the_low_target): Likewise.
4522 * linux-x86-low.c (the_low_target): Likewise.
4523 * linux-xtensa-low.c (the_low_target): Likewise.
4524 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4525 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4526 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4527 srv_xmlfiles.
4528 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4529 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4530
c03e6ccc
YQ
45312012-02-29 Yao Qi <yao@codesourcery.com>
4532 Pedro Alves <palves@redhat.com>
4533
4534 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4535 `step_over_finished' is true.
4536
644cebc9
PA
45372012-02-27 Pedro Alves <palves@redhat.com>
4538
4539 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4540 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4541
c14d7ab2
PA
45422012-02-27 Pedro Alves <palves@redhat.com>
4543
4544 PR server/9684
4545 * linux-low.c (pid_is_stopped): New.
4546 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4547
412c89dd
LM
45482012-02-25 Luis Machado <lgustavo@codesourcery.com>
4549
4550 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4551 of conditions.
4552
b745defe
MR
45532012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4554
4555 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4556
9f3a5c85
LM
45572012-02-24 Luis Machado <lgustavo@codesourcery>
4558
4559 * server.c (handle_query): Advertise support for target-side
4560 breakpoint condition evaluation.
4561 (process_point_options): New function.
4562 (process_serial_event): When inserting a breakpoint, check for
4563 a target-side condition that should be evaluated.
4564
4565 * mem-break.c: Include regcache.h and ax.h.
4566 (point_cond_list_t): New data structure.
4567 (breakpoint) <cond_list>: New field.
4568 (find_gdb_breakpoint_at): Make non-static.
4569 (delete_gdb_breakpoint_at): Clear any target-side
4570 conditions.
4571 (clear_gdb_breakpoint_conditions): New function.
4572 (add_condition_to_breakpoint): Likewise.
4573 (add_breakpoint_condition): Likewise.
4574 (gdb_condition_true_at_breakpoint): Likewise.
4575 (gdb_breakpoint_here): Return result directly instead
4576 of going through a local variable.
4577
4578 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4579 (clear_gdb_breakpoint_conditions): Likewise.
4580 (add_breakpoint_condition): Likewise.
4581 (gdb_condition_true_at_breakpoint): Likewise.
4582
4583 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4584 (need_step_over_p): Take target-side breakpoint condition into
4585 consideration.
4586
5e1dc496
LM
45872012-02-24 Luis Machado <lgustavo@codesourcery>
4588
4589 * server.h: Include tracepoint.h.
4590 (agent_mem_read, agent_get_trace_state_variable_value,
4591 agent_set_trace_state_variable_value,
4592 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4593 get_set_tsv_func_addr): New prototypes.
4594
4595 * ax.h: New include file.
4596 * ax.c: New source file.
4597
4598 * tracepoint.c: Include ax.h.
4599 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4600 agent_expr, eval_result_type): Move to ax.h.
4601 (parse_agent_expr): Rename to ...
4602 (gdb_parse_agent_expr): ... this, make it non-static and move
4603 to ax.h.
4604 (unparse_agent_expr) Rename to ...
4605 (gdb_unparse_agent_expr): ... this, make it non-static and move
4606 to ax.h.
4607 (eval_agent_expr): Rename to ...
4608 (eval_tracepoint_agent_expr): ... this.
4609 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4610 forward declarations.
4611 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4612 (agent_get_trace_state_variable_value): New function.
4613 (agent_set_trace_state_variable_value): New function.
4614 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4615 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4616 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4617 (condition_true_at_tracepoint): Likewise.
4618 (parse_agent_expr): Rename to ...
4619 (gdb_parse_agent_expr): ... this and move to ax.c.
4620 (unparse_agent_expr): Rename to ...
4621 (gdb_unparse_agent_expr): ... this and move to ax.c.
4622 (gdb_agent_op_name): Move to ax.c.
4623 (eval_agent_expr): Rename to ...
4624 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4625 and move to ax.c.
4626 (eval_tracepoint_agent_expr): New function.
4627 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4628 non-static.
5e1dc496
LM
4629 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4630 ax.c.
4631 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4632 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4633 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4634 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4635 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4636 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4637 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4638 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4639 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4640 (compile_bytecodes): Remove forward declaration.
4641 (is_goto_target): Move to ax.c.
4642 (compile_bytecodes): Move to ax.c and call
4643 agent_get_trace_state_variable_value (...) and
4644 agent_set_trace_state_variable_value (...).
4645
4646 * Makefile.in: Update ax.c and IPA dependencies.
4647
277e4e52
PA
46482012-02-24 Pedro Alves <palves@redhat.com>
4649
4650 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4651 (cmd_bigqtbuffer_circular): ... this. Only handle
4652 'QTBuffer:circular:'.
4653 (handle_tracepoint_general_set): Adjust.
4654
bf4c19f7
YQ
46552012-02-16 Yao Qi <yao@codesourcery.com>
4656
4657 * inferiors.c: Move code to ...
4658 * dll.c: .... here. New.
4659 * server.h: Declare clear_dlls.
4660 * Makefile.in (SFILES): Add dll.c.
4661 (OBS): Add dll.o
4662 (dll.o): New rule.
4663
d73f2619
YQ
46642012-02-11 Yao Qi <yao@codesourcery.com>
4665
4666 * server.c: (handle_monitor_command): Add a new parameter
4667 `own_buf'.
4668 (handle_query): Update caller.
4669
f8255c2a
JB
46702012-02-09 Joel Brobecker <brobecker@adacore.com>
4671
4672 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4673 * configure, config.in: Regenerate.
4674 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4675 is not defined.
4676
da84f473
PA
46772012-02-02 Pedro Alves <palves@redhat.com>
4678
4679 Try SIGKILL first, then PTRACE_KILL.
4680 * linux-low.c (linux_kill_one_lwp): New.
4681 (linux_kill_one_lwp): Rename to ...
4682 (kill_one_lwp_callback): ... this. Use the new
4683 linux_kill_one_lwp.
4684
e886a173
PA
46852012-02-02 Pedro Alves <palves@redhat.com>
4686
4687 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4688 inferior.
4689
be07f1a2
PA
46902012-01-27 Pedro Alves <palves@redhat.com>
4691
4692 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4693 (elf_64_file_p): Make static.
4694 (linux_pid_exe_is_elf_64_file): New.
4695 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4696 Delete declarations.
4697 (linux_pid_exe_is_elf_64_file): Declare.
4698 * linux-x86-low.c (x86_arch_setup): Use
4699 linux_pid_exe_is_elf_64_file.
4700
d8301ad1
JK
47012012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4702
4703 * linux-low.c (linux_wait_for_event_1): Rename to ...
4704 (linux_wait_for_event): ... here and merge it with former
4705 linux_wait_for_event - new variable wait_ptid, use it.
4706 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4707
01b17894
PA
47082012-01-23 Pedro Alves <palves@redhat.com>
4709
4710 * server.c (main): Avoid yet another case of infinite loop while
4711 detaching/killing after a longjmp.
4712
e825046f
JK
47132012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4714
4715 Code cleanup.
4716 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4717
b9e7b9c3
UW
47182012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4719
4720 * hostio.c (handle_readlink): New function.
4721 (handle_vFile): Call it to handle "vFile:readlink" packets.
4722
901f9912
UW
47232012-01-20 Pedro Alves <palves@redhat.com>
4724 Ulrich Weigand <ulrich.weigand@linaro.org>
4725
4726 * server.c (handle_v_requests): Only support vAttach and vRun to
4727 start multiple processes when in extended protocol mode.
4728
fc1ab1a0
PA
47292012-01-17 Pedro Alves <palves@redhat.com>
4730
4731 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4732 memalign plus mprotect to allocate the scratch buffer.
4733
7d5d4e98
PA
47342012-01-13 Pedro Alves <palves@redhat.com>
4735
4736 * server.c (attach_inferior): Clear `cont_thread'.
4737
f128d5e9
PA
47382012-01-13 Pedro Alves <palves@redhat.com>
4739
4740 * server.c (main): Avoid infinite loop while detaching/killing
4741 after a longjmp.
4742
06db92f0
DE
47432012-01-09 Doug Evans <dje@google.com>
4744
4745 * server.c (start_inferior): Set last_ptid in --wrapper case.
4746
32d92999
YQ
47472012-01-06 Yao Qi <yao@codesourcery.com>
4748
4749 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4750 defined.
4751 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4752
5e0a92a9
YQ
47532012-01-04 Yao Qi <yao@codesourcery.com>
4754
4755 * tracepoint.c (cmd_qtdp): Print debug message
4756 for static tracepoint.
4757
ae639e8c
YQ
47582012-01-04 Yao Qi <yao@codesourcery.com>
4759
4760 * tracepoint.c (trace_vdebug): Differentiate debug message
4761 between gdbserver and IPA.
4762
f72429c5
YQ
47632012-01-03 Yao Qi <yao@codesourcery.com>
4764
4765 * tracepoint.c (tracepoint_was_hit): Don't collect for
4766 static tracepoint.
4767
12c3e59c
JB
47682012-01-02 Joel Brobecker <brobecker@adacore.com>
4769
4770 * terminal.h: Reformat copyright header.
4771
67827812
JB
47722012-01-02 Joel Brobecker <brobecker@adacore.com>
4773
4774 * server.c (gdbserver_version): Update copyright year.
4775 * gdbreplay.c (gdbreplay_version): Likewise.
4776
3e52c33d
JK
47772011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4778
4779 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4780
4781 Revert:
4782 2011-12-18 Hui Zhu <teawater@gmail.com>
4783 * linux-low.c (linux_create_inferior): Save return value to ret.
4784
66f1260e
HZ
47852011-12-18 Hui Zhu <teawater@gmail.com>
4786
4787 * linux-low.c (linux_create_inferior): Save return value to ret.
4788
e77616d7
DE
47892011-12-16 Doug Evans <dje@google.com>
4790
e7b06c57
DE
4791 * linux-low.c (linux_create_inferior): If stdio connection,
4792 redirect stdin from /dev/null, stdout to stderr.
4793 * remote-utils.c (remote_is_stdio): New static global.
4794 (remote_connection_is_stdio): New function.
4795 (remote_prepare): Handle stdio connection.
4796 (remote_open): Ditto.
4797 (remote_close): Don't close stdin for stdio connections.
4798 (read_prim,write_prim): New functions. Replace all calls to
4799 read/write to these.
4800 * server.c (main): Watch for "-" argument. Move call to
4801 remote_prepare before start_inferior.
4802 * server.h (STDIO_CONNECTION_NAME): New macro.
4803 (remote_connection_is_stdio): Declare.
4804
e77616d7
DE
4805 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4806 in debugging output.
4807
82067193
YQ
48082011-12-15 Yao Qi <yao@codesourcery.com>
4809
4810 * tracepoint.c: Include sys/syscall.h.
4811 (gdb_ust_thread): Remove preprocessor conditional.
4812
82bfbe7e
PA
48132011-12-14 Pedro Alves <pedro@codesourcery.com>
4814
4815 * linux-low.c (linux_detach_one_lwp): Call
4816 the_low_target.prepare_to_resume before detaching.
4817
712c6575
YQ
48182011-12-14 Yao Qi <yao@codesourcery.com>
4819
4820 * tracepoint.c (gdb_ust_thread): Don't ignore return value
4821 of write.
4822
d54d1edf
YQ
48232011-12-14 Yao Qi <yao@codesourcery.com>
4824
4825 * i386-low.c (i386_low_stopped_data_address): Initialize local
4826 variable `control'.
4827
6210a125
PA
48282011-12-13 Pedro Alves <pedro@codesourcery.com>
4829
4830 PR remote/13492
4831
4832 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4833 DR_CONTROL unless necessary. Extend comments.
4834 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4835 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
4836
2ece8244
YQ
48372011-12-13 Yao Qi <yao@codesourcery.com>
4838
4839 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4840 macros.
4841 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4842
784867a5
JK
48432011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
4844
4845 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4846 Print new debug message for such case.
4847
6bf36717
JK
48482011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4849
4850 Fix overlapping memcpy.
4851 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
4852 the read_inferior_memory transfer.
4853 (delete_fast_tracepoint_jump): New variable buf. Use it for the
4854 write_inferior_memory transfer.
4855 (set_fast_tracepoint_jump): New variable buf. Use it for the
4856 read_inferior_memory and write_inferior_memory transfers.
4857 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4858 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4859 Use it for the write_inferior_memory transfer.
4860 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4861 buffers.
4862
50275556
MR
48632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4864
4865 * linux-low.c (fetch_register, store_register): Make code
4866 consistent, fix formatting.
4867
7325beb4
MR
48682011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
4869
4870 * linux-low.c (usr_store_inferior_registers): Factor out code
4871 to handle individual registers into...
4872 (store_register): ... this new function.
4873
c642a434
UW
48742011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
4875
4876 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4877 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4878 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4879 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4880 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4881 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4882 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4883 (srv_xmlfiles): Add new XML files.
4884
4885 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4886 and <sys/uio.h>.
4887 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4888 (init_registers_s390_linux32v1): Add prototype.
4889 (init_registers_s390_linux32v2): Likewise.
4890 (init_registers_s390_linux64v1): Likewise.
4891 (init_registers_s390_linux64v2): Likewise.
4892 (init_registers_s390x_linux64v1): Likewise.
4893 (init_registers_s390x_linux64v2): Likewise.
4894 (s390_num_regs): Increment to 52.
4895 (s390_regmap): Add orig_r2 register.
4896 (s390_num_regs_3264): Increment to 68.
4897 (s390_regmap_3264): Add orig_r2 register.
4898 (s390_collect_ptrace_register): Handle orig_r2 register.
4899 (s390_supply_ptrace_register): Likewise.
4900 (s390_fill_last_break): New function.
4901 (s390_store_last_break): Likewise.
4902 (s390_fill_system_call): New function.
4903 (s390_store_system_call): Likewise.
4904 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4905 register sets.
4906 (s390_check_regset): New function.
4907 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4908 NT_S390_SYSTEM_CALL regsets and use appropriate description.
4909 Update target_regsets for available register sets.
4910
2268b414
JK
49112011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
4912 Jan Kratochvil <jan.kratochvil@redhat.com>
4913
4914 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4915 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4916 New.
4917 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4918 * linux-low.h (struct process_info_private): New member r_debug.
4919 * server.c (handle_qxfer_libraries): Call
4920 the_target->qxfer_libraries_svr4.
4921 (handle_qxfer_libraries_svr4): New function.
4922 (qxfer_packets): New entry "libraries-svr4".
4923 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4924 * target.h (struct target_ops): New member qxfer_libraries_svr4.
4925 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4926 PACKET_qXfer_libraries_svr4.
4927
d6db1fab
UW
49282011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
4929
4930 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4931 PSW address/mask between 8-byte and 16-byte formats.
4932 (s390_supply_ptrace_register): Likewise.
4933 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4934 basic addressing mode bit.
4935
242f5f1c
SS
49362011-11-24 Stan Shebs <stan@codesourcery.com>
4937
4938 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4939
f196051f
SS
49402011-11-17 Stan Shebs <stan@codesourcery.com>
4941
4942 * tracepoint.c (struct tracepoint): New field traceframe_usage.
4943 (tracing_start_time): New global.
4944 (tracing_stop_time): New global.
4945 (tracing_user_name): New global.
4946 (tracing_notes): New global.
4947 (tracing_stop_note): New global.
4948 (cmd_qtstart): Set traceframe_usage, start_time.
4949 (stop_tracing): Set stop_time.
4950 (cmd_qtstatus): Report additional status.
4951 (cmd_qtp): New function.
4952 (handle_tracepoint_query): Call it.
4953 (cmd_qtnotes): New function.
4954 (handle_tracepoint_general_set): Call it.
4955 (get_timestamp): Rename from tsv_get_timestamp.
4956
405f8e94
SS
49572011-11-14 Stan Shebs <stan@codesourcery.com>
4958 Kwok Cheung Yeung <kcy@codesourcery.com>
4959
4960 * linux-x86-low.c (small_jump_insn): New.
4961 (i386_install_fast_tracepoint_jump_pad): Add arguments for
4962 trampoline and error message, build a trampoline and issue a small
4963 jump instruction to it.
4964 (x86_install_fast_tracepoint_jump_pad): Add arguments for
4965 trampoline and error message.
4966 (x86_get_min_fast_tracepoint_insn_len): New.
4967 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4968 * linux-low.h (struct linux_target_ops): Add arguments to
4969 install_fast_tracepoint_jump_pad operation, add new operation.
4970 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4971 arguments.
4972 (linux_get_min_fast_tracepoint_insn_len): New function.
4973 (linux_target_op): Add new operation.
4974 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4975 (gdb_trampoline_buffer_end): Ditto.
4976 (gdb_trampoline_buffer_error): Ditto.
4977 (struct ipa_sym_addresses): Add fields for new IPA variables.
4978 (symbol_list): Add entries for new IPA variables.
4979 (struct tracepoint): Add fields to hold the address range of the
4980 trampoline used by the tracepoint.
4981 (trampoline_buffer_head): New static variable.
4982 (trampoline_buffer_tail): Ditto.
4983 (claim_trampoline_space): New function.
4984 (have_fast_tracepoint_trampoline_buffer): New function.
4985 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4986 structure.
4987 (install_fast_tracepoint): Ditto, also add error buffer argument.
4988 (cmd_qtminftpilen): New function.
4989 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4990 (fast_tracepoint_from_trampoline_address): New function.
4991 (fast_tracepoint_collecting): Handle trampoline as part of jump
4992 pad space.
4993 (set_trampoline_buffer_space): New function.
4994 (initialize_tracepoint): Initialize new IPA variables.
4995 * target.h (struct target_ops): Add arguments to
4996 install_fast_tracepoint_jump_pad operation, add new
4997 get_min_fast_tracepoint_insn_len operation.
4998 (target_get_min_fast_tracepoint_insn_len): New.
4999 (install_fast_tracepoint_jump_pad): Add arguments.
5000 * server.h (IPA_BUFSIZ): Define.
5001 * linux-i386-ipa.c: Include extra header files.
5002 (initialize_fast_tracepoint_trampoline_buffer): New function.
5003 (initialize_low_tracepoint): Call it.
5004 * server.h (set_trampoline_buffer_space): Declare.
5005 (claim_trampoline_space): Ditto.
5006 (have_fast_tracepoint_trampoline_buffer): Ditto.
5007
1e4d1764
YQ
50082011-11-14 Yao Qi <yao@codesourcery.com>
5009
5010 * server.c (handle_query): Handle InstallInTrace for qSupported.
5011 * tracepoint.c (add_tracepoint): Sort list.
5012 (install_tracepoint, download_tracepoint): New.
5013 (cmd_qtdp): Call them to install and download tracepoints.
5014 (sort_tracepoints): Removed.
5015 (cmd_qtstart): Update.
5016
5c73ff4e
YQ
50172011-11-14 Yao Qi <yao@codesourcery.com>
5018
5019 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5020 * mem-break.h: Declare.
5021 * tracepoint.c (cmd_qtstart): Move some code to ...
5022 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5023 New.
5024 (download_tracepoints): Move some code to ...
5025 (download_tracepoint_1): ... here. New.
5026
86a30030
YQ
50272011-11-08 Yao Qi <yao@codesourcery.com>
5028
5029 * remote-utils.c (relocate_instruction): A comment fix.
5030
8d26e50c
JB
50312011-11-07 Joel Brobecker <brobecker@adacore.com>
5032
5033 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5034 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5035 dr_status_mirror and dr_control_mirror from debug_reg_state.
5036 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5037 (i386_initial_stuff): Remove use of deleted globals.
5038 (i386_get_thread_context, i386_set_thread_context,
5039 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5040 from debug_reg_state.
5041
a59306a3
YQ
50422011-11-05 Yao Qi <yao@codesourcery.com>
5043
5044 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5045 address as TPOINT's.
5046
3065dfb6
SS
50472011-11-02 Stan Shebs <stan@codesourcery.com>
5048
5049 * tracepoint.c (agent_mem_read_string): New function.
5050 (eval_agent_expr): Call it for tracenz.
5051 * server.c (handle_query): Report support for tracenz.
5052
fd0d8c7c
YQ
50532011-11-02 Yao Qi <yao@codesourcery.com>
5054
5055 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5056
609086b1
YQ
50572011-11-02 Yao Qi <yao@codesourcery.com>
5058
5059 * target.h: Fix a typo in comment.
5060
b9fd1791
PA
50612011-10-31 Pedro Alves <pedro@codesourcery.com>
5062
5063 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5064 clobber the breakpoints' shadows with fast tracepoint jumps.
5065 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5066 * target.c (write_inferior_memory): Also pass MYADDR down to
5067 check_mem_write.
5068
03583c20
UW
50692011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5070
5071 * configure.ac: Check support for personality routine.
5072 * configure: Regenerate.
5073 * config.in: Likewise.
5074 * linux-low.c: Include <sys/personality.h>.
5075 Define ADDR_NO_RANDOMIZE if necessary.
5076 (linux_create_inferior): Disable address space randomization when
5077 forking inferior, if requested.
5078 (linux_supports_disable_randomization): New function.
5079 (linux_target_ops): Install it.
5080 * server.h (disable_randomization): Declare.
5081 * server.c (disable_randomization): New global variable.
5082 (handle_general_set): Handle QDisableRandomization.
5083 (handle_query): Likewise for qSupported.
5084 (main): Support --disable-randomization and --no-disable-randomization
5085 command line arguments.
5086 * target.h (struct target_ops): Add supports_disable_randomization.
5087 (target_supports_disable_randomization): New macro.
5088
723b724b
MF
50892011-09-29 Mike Frysinger <vapier@gentoo.org>
5090
5091 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5092 ifdef check.
5093 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5094 [!PT_GETDSBT] (target_loadmap): New definition.
5095 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5096 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5097 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5098 and PT_GETDSBT to LINUX_LOADMAP.
5099 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5100 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5101
55329a5c 51022011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5103
5104 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5105 (arm_linux_hwbp_cap): New static variable.
5106 (arm_linux_get_hwbp_cap): Replace by ...
5107 (arm_linux_init_hwbp_cap): ... this new function.
5108 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5109 (arm_linux_get_hw_watchpoint_count): Likewise.
5110 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5111 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5112 (arm_prepare_to_resume): Use perror_with_name instead of error.
5113
55329a5c 51142011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5115
5116 * linux-arm-low.c: Include <signal.h>.
5117 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5118 (struct arm_linux_hwbp_cap): New data type.
5119 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5120 (struct arm_linux_hw_breakpoint): New data type.
5121 (MAX_BPTS, MAX_WPTS): Define.
5122 (struct arch_process_info, struct arch_lwp_info): New data types.
5123 (arm_linux_get_hwbp_cap): New function.
5124 (arm_linux_get_hw_breakpoint_count): Likewise.
5125 (arm_linux_get_hw_watchpoint_count): Likewise.
5126 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5127 (arm_hwbp_control_initialize): Likewise.
5128 (arm_hwbp_control_is_enabled): Likewise.
5129 (arm_hwbp_control_is_initialized): Likewise.
5130 (arm_hwbp_control_disable): Likewise.
5131 (arm_linux_hw_breakpoint_equal): Likewise.
5132 (arm_linux_hw_point_initialize): Likewise.
5133 (struct update_registers_data): New data structure.
5134 (update_registers_callback: New function.
5135 (arm_insert_point): Likewise.
5136 (arm_remove_point): Likewise.
5137 (arm_stopped_by_watchpoint): Likewise.
5138 (arm_stopped_data_address): Likewise.
5139 (arm_new_process): Likewise.
5140 (arm_new_thread): Likewise.
5141 (arm_prepare_to_resume): Likewise.
5142 (the_low_target): Register arm_insert_point, arm_remove_point,
5143 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5144 arm_new_thread, and arm_prepare_to_resume.
5145
6b9801d4
SS
51462011-09-15 Stan Shebs <stan@codesourcery.com>
5147
5148 * server.h (struct emit_ops): Add compare-goto fields.
5149 * tracepoint.c (gdb_agent_op_sizes): New table.
5150 (emit_eq_goto): New function.
5151 (emit_ne_goto): New function.
5152 (emit_lt_goto): New function.
5153 (emit_le_goto): New function.
5154 (emit_gt_goto): New function.
5155 (emit_ge_goto): New function.
5156 (is_goto_target): New function.
5157 (compile_bytecodes): Recognize special cases of compare-goto
5158 combinations and call specialized emitters for them.
5159 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5160 (amd64_emit_ne_goto): New function.
5161 (amd64_emit_lt_goto): New function.
5162 (amd64_emit_le_goto): New function.
5163 (amd64_emit_gt_goto): New function.
5164 (amd64_emit_ge_goto): New function.
5165 (amd64_emit_ops): Add the new functions.
5166 (i386_emit_eq_goto): New function.
5167 (i386_emit_ne_goto): New function.
5168 (i386_emit_lt_goto): New function.
5169 (i386_emit_le_goto): New function.
5170 (i386_emit_gt_goto): New function.
5171 (i386_emit_ge_goto): New function.
5172 (i386_emit_ops): Add the new functions.
5173
bf15cbda
SS
51742011-09-08 Stan Shebs <stan@codesourcery.com>
5175
5176 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5177 (i386_emit_epilogue): Restore %ebx.
5178
943ca1dd
JZ
51792011-08-31 Jie Zhang <jzhang918@gmail.com>
5180
5181 * server.c (step_thread): Remove definition.
5182 (process_serial_event): Don't handle Hs.
5183 * server.h (step_thread): Remove declaration.
5184 * target.c (set_desired_inferior): Remove use of step_thread.
5185
e3deef73
LM
51862011-08-24 Luis Machado <lgustavo@codesourcery.com>
5187
5188 * linux-low.c: Include linux-procfs.h.
5189 (linux_attach_lwp_1): Update comments.
5190 (linux_attach): Scan for existing threads when attaching to a
5191 process that is the tgid.
5192 * Makefile.in: Update dependencies.
5193
13da1c97
LM
51942011-08-24 Luis Machado <lgustavo@codesourcery.com>
5195
5196 * configure.srv: Add linux-procfs.o dependencies.
5197
881127c9
YQ
51982011-08-14 Yao Qi <yao@codesourcery.com>
5199
5200 * target.h (struct target_ops): Fix indent.
5201 * win32-low.c (win32_target_ops): Fix comment.
5202
58dbd541
YQ
52032011-08-14 Andrew Jenner <andrew@codesourcery.com>
5204 Yao Qi <yao@codesourcery.com>
5205
5206 * Makefile.in (clean): Remove tic6x-*.c files.
5207 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5208 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5209 (tic6x-c64xp-linux.c): Likewise.
5210 * configure.srv: Add support for tic6x-*-uclinux.
5211 * linux-tic6x-low.c: New.
5212 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5213
78d85199
YQ
52142011-08-14 Andrew Stubbs <ams@codesourcery.com>
5215 Yao Qi <yao@codesourcery.com>
5216
5217 * target.h (struct target_ops): Add read_loadmap.
5218 * linux-low.c (struct target_loadseg): New type.
5219 (struct target_loadmap): New type.
5220 (linux_read_loadmap): New function.
5221 (linux_target_ops): Add linux_read_loadmap.
5222 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5223 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5224 to NULL.
78d85199 5225
a959a88d
EZ
52262011-08-05 Eli Zaretskii <eliz@gnu.org>
5227
5228 * win32-low.c: Include <stdint.h>.
5229
1ced966e
PA
52302011-07-22 Pedro Alves <pedro@codesourcery.com>
5231
5232 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5233 to the inferior here.
5234 (i386_remove_aligned_watchpoint): Ditto.
5235 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5236 fit part of the watchpoint in the debug registers.
5237 (i386_update_inferior_debug_regs): New.
5238 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5239 registers, and only update the inferior on success.
5240 (i386_low_remove_watchpoint): Ditto.
5241
d26e3629
KY
52422011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5243
5244 * linux-low.c (compare_ints, unique, list_threads, show_process,
5245 linux_core_of_thread): Delete.
5246 (linux_target_ops): Change linux_core_of_thread to
5247 linux_common_core_of_thread.
5248 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5249 * utils.c (malloc_failure): Change type of argument.
5250 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5251 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5252 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5253 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5254 (IPA_OBJS): Add common-utils-ipa.o.
5255 (ptid_h, linux_osdata_h): New macros.
5256 (server_h): Add common/common-utils.h, common/xml-utils.h,
5257 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5258 common/ptid.h.
5259 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5260 ptid.o, buffer.o): New rules.
5261 (linux-low.o): Add common/linux-osdata.h as a dependency.
5262 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5263 * configure.ac: Add AC_HEADER_DIRENT check.
5264 * config.in: Regenerate.
5265 * configure: Regenerate.
5266 * remote-utils.c (xml_escape_text): Delete.
5267 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5268 buffer_xml_printf): Move to common/buffer.c.
5269 * server.c (main): Remove call to initialize_inferiors.
5270 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5271 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5272 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5273 internal_error, gdb_assert, gdb_assert_fail): Delete.
5274 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5275 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5276 common/buffer.h.
5277 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5278 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5279 initialize_inferiors): Delete.
5280
2275a1a7
PA
52812011-07-20 Pedro Alves <pedro@codesourcery.com>
5282
5283 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5284 symbol error.
5285
0a5b1e09
PA
52862011-05-31 Pedro Alves <pedro@codesourcery.com>
5287
5288 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5289 assertion.
5290 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5291
6938fd34
YQ
52922011-05-26 Yao Qi <yao@codesourcery.com>
5293
5294 * Makefile.in (thread-db.o): Track dependence to
5295 common/gdb_thread_db.h.
5296 * thread-db.c: include gdb_thread_db.h from right place.
5297
b481f9e0
TT
52982011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5299
5300 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5301 __FILE__ and __LINE__ to internal_error.
5302
98a5dd13
DE
53032011-05-13 Doug Evans <dje@google.com>
5304
5305 * thread-db.c (try_thread_db_load_from_sdir): New function.
5306 (try_thread_db_load_from_dir): New function.
5307 (thread_db_load_search): Handle $sdir, ignore $pdir.
5308 Remove trying of system directories if search of
5309 libthread-db-search-path fails, that is now done via $sdir.
5310
d248b706
KY
53112011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5312
5313 * server.c (handle_query): Add EnableDisableTracepoints to the list
5314 of supported features.
43aaf8b6 5315 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5316 tracepoints.
43aaf8b6
PA
5317 (cmd_qtenable_disable): New.
5318 (cmd_qtstart): Install tracepoints even if disabled.
5319 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5320 receiving a QTEnable or QTDisable packet.
5321 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5322 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5323 tracepoints.
5324 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5325
84e578fb
DE
53262011-05-10 Doug Evans <dje@google.com>
5327
5328 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5329
71f55dd8
DE
53302011-05-04 Doug Evans <dje@google.com>
5331
5332 * linux-low.c (linux_join): Skip process lookup.
5333 * spu-low.c (spu_join): Ditto.
5334 * server.c (join_inferiors_callback): Delete.
5335 (process_serial_event): For 'D' packet (detach) call join_inferior
5336 directly.
5337
4d393d60
JM
53382011-05-04 Joseph Myers <joseph@codesourcery.com>
5339
5340 * README: Don't mention xscale*-*-linux*.
5341 * configure.srv (xscale*-*-linux*): Don't handle target.
5342
b00ad6ff
NF
53432011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5344
5345 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5346 casting pointers.
5347 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5348 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5349 (i386_emit_void_call_2): Likewise.
5350
af96c192
YQ
53512011-04-26 Yao Qi <yao@codesourcery.com>
5352
43aaf8b6
PA
5353 * linux-low.c: Move common macros to linux-ptrace.h.
5354 Include linux-ptrace.h.
af96c192
YQ
5355 * Makefile.in (linux_ptrace_h): New.
5356 (linux-low.o): Depends on linux-ptrace.h.
5357
03f2bd59
JK
53582011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5359
5360 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5361 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5362 (remote_prepare): New function with most of the TCP code from ...
5363 (remote_open): ... here. Detect PORT here unconditionally. Move also
5364 setting transport_is_reliable.
5365 * server.c (run_once): New variable.
5366 (gdbserver_usage): Document it.
5367 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5368 the first run if RUN_ONCE.
5369 * server.h (run_once, remote_prepare): New declarations.
5370
7a9dd1b2
TT
53712011-04-19 Tom Tromey <tromey@redhat.com>
5372
5373 * win32-low.c (handle_load_dll): Remove duplicate "the".
5374
81239425
PM
53752011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5376
5377 Remove support for old Cygwin 1.5 versions.
5378 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5379 function to avoid warning.
5380 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5381 warning.
5382
9e0627f1
PM
53832011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5384
5385 * gdbserver/server.h (Macro _): Define it if not available.
5386
588eebee
MS
53872011-03-14 Michael Snyder <msnyder@vmware.com>
5388
348af9f7 5389 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5390
43f70d4c
JB
53912011-03-10 Joel Brobecker <brobecker@adacore.com>
5392
5393 * Makefile.in (maintainer-clean realclean distclean): Remove
5394 "make ... subdir_do" command.
5395
348af9f7
MS
53962011-03-10 Michael Snyder <msnyder@vmware.com>
5397
5398 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5399
5400 * server.c (handle_v_run): Free alloced buffer on early return.
5401
e637a4f5
YQ
54022011-03-09 Yao Qi <yao@codesourcery.com>
5403
5404 Revert:
5405 2011-03-04 Yao Qi <yao@codesourcery.com>
5406
5407 * Makefile.in: Remove GNU make feature --directory.
5408
5409 2011-03-05 Yao Qi <yao@codesourcery.com>
5410
5411 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5412 (subdir_do): New make target. Copied from gdb/Makefile.
5413 (maintainer-clean, realclean, distclean, clean): Call corresponding
5414 make targets in common/Makefile.
5415
5416 2011-02-11 Yao Qi <yao@codesourcery.com>
5417
5418 * configure.ac: Call AC_PROG_RANLIB.
5419 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5420 * configure: Regenerate.
5421
e6edda56
JK
54222011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5423
5424 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5425
e5141119
JB
54262011-03-06 Yao Qi <yao@codesourcery.com>
5427
5428 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5429
64794aa4
JB
54302011-03-05 Yao Qi <yao@codesourcery.com>
5431
5432 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5433 (subdir_do): New make target. Copied from gdb/Makefile.
5434 (maintainer-clean, realclean, distclean, clean): Call corresponding
5435 make targets in common/Makefile.
5436
7a762829
YQ
54372011-03-04 Yao Qi <yao@codesourcery.com>
5438
5439 * Makefile.in: Remove GNU make feature --directory.
5440
348af9f7
MS
54412011-03-04 Michael Snyder <msnyder@vmware.com>
5442
5443 * server.c (queue_stop_reply): Call xmalloc not malloc.
5444
54452011-03-02 Michael Snyder <msnyder@vmware.com>
5446
5447 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5448
9f72fee2
MS
54492011-02-28 Michael Snyder <msnyder@vmware.com>
5450
588eebee
MS
5451 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5452 (cmd_qtframe): Ditto.
5453 (cmd_qtbuffer): Ditto.
5454 (cmd_bigqtbuffer): Ditto.
5455
9f72fee2
MS
5456 * utils.c (decimal2str): Initialize 'width' to nine, then
5457 don't mess with it.
5458
8040bd49
UW
54592011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5460
5461 * hostio.c (require_data): Free *data, not data.
5462
7e52cbd0
JK
54632011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5464
5465 * hostio.c (require_data): Use free, not xfree.
5466
9130f83e
MS
54672011-02-27 Michael Snyder <msnyder@vmware.com>
5468
4b812f4e
MS
5469 * server.c (handle_query): Discard unused value.
5470
9130f83e
MS
5471 * hostio.c (require_data): Free malloc memory before returning
5472 error.
5473
69d37113
MS
54742011-02-26 Michael Snyder <msnyder@vmware.com>
5475
5476 * linux-low.c (list_threads): Call closedir for dirent.
5477
35f5825a
MS
54782011-02-27 Michael Snyder <msnyder@vmware.com>
5479
2a589cef
MS
5480 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5481 a case statement falls through.
5482
0adea5f7
MS
5483 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5484
35f5825a
MS
5485 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5486 in comparison.
5487
238f1c74
MS
54882011-02-26 Michael Snyder <msnyder@vmware.com>
5489
5490 * utils.c (decimal2str): Eliminate dead code and dead param.
5491 (pulongest): Drop dead param from call to decimal2str.
5492 (plongest): Ditto.
5493
633ff500
JB
54942011-02-24 Joel Brobecker <brobecker@adacore.com>
5495
5496 Revert the following patch (not approved yet):
5497 2011-02-21 Hui Zhu <teawater@gmail.com>
5498 * tracepoint.c (tp_printf): New function.
5499 (eval_agent_expr): Handle gdb_agent_op_printf.
5500
f9c6ff72
HZ
55012011-02-21 Hui Zhu <teawater@gmail.com>
5502
5503 * tracepoint.c (tp_printf): New function.
5504 (eval_agent_expr): Handle gdb_agent_op_printf.
5505
94d5e490
TT
55062011-02-18 Tom Tromey <tromey@redhat.com>
5507
5508 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5509 (tracepoint.o): Likewise.
5510 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5511 (gdb_agent_op_names): Likewise.
5512
c7f96d2b
TT
55132011-02-18 Tom Tromey <tromey@redhat.com>
5514
5515 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5516 gdb_agent_op_rot>: New constants.
5517 (gdb_agent_op_names): Add pick and roll.
5518 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5519 cases.
5520
0feedb2c
JK
55212011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5522
5523 * aclocal.m4: Regenerated with aclocal-1.11.1.
5524
b3b9301e
PA
55252011-02-14 Pedro Alves <pedro@codesourcery.com>
5526
5527 * server.c (handle_qxfer_traceframe_info): New.
5528 (qxfer_packets): Register "traceframe-info".
5529 (handle_query): Report support for qXfer:traceframe-info:read+.
5530 * tracepoint.c (match_blocktype): New.
5531 (traceframe_find_block_type): Rename to ...
5532 (traceframe_walk_blocks): ... this. Add callback filter argument,
5533 and use it.
5534 (traceframe_find_block_type): New, reimplemented on top of
5535 traceframe_walk_blocks.
5536 (build_traceframe_info_xml): New.
5537 (traceframe_read_info): New.
5538 * server.h (traceframe_read_info): Declare.
5539
4f3e6fb7
YQ
55402011-02-11 Yao Qi <yao@codesourcery.com>
5541
5542 * configure.ac: Call AC_PROG_RANLIB.
5543 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5544 * configure: Regenerate.
5545
764880b7
PA
55462011-02-07 Pedro Alves <pedro@codesourcery.com>
5547
5548 * server.c (gdb_read_memory): Change return semantics to allow
5549 partial transfers.
5550 (handle_search_memory_1): Adjust.
5551 (process_serial_event) <'m' packet>: Handle partial transfers.
5552 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5553
1c79eb8a
PA
55542011-01-28 Pedro Alves <pedro@codesourcery.com>
5555
5556 * regcache.c (init_register_cache): Initialize
5557 regcache->register_status.
5558 (free_register_cache): Release regcache->register_status.
5559 (regcache_cpy): Copy register_status.
5560 (registers_to_string): Print 'x's for unavailable registers.
5561 (supply_register): Mark the register's status valid or
5562 unavailable, depending on whether a buffer was passed in or not.
5563 (supply_register_zeroed): New.
5564 (supply_regblock): Mark the registers' status valid or
5565 unavailable, depending on whether a buffer was passed in or not.
5566 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5567 (struct regcache): New `register_status' field.
5568 (supply_register_zeroed): Declare.
5569 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5570 supply_register_zeroed, rather than passing a NULL buffer to
5571 supply_register.
5572 * tracepoint.c (fetch_traceframe_registers): Update comment.
5573
85724a0e
PA
55742011-01-28 Pedro Alves <pedro@codesourcery.com>
5575
5576 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5577 buffer explicit.
5578
d08aafef
PA
55792011-01-25 Pedro Alves <pedro@codesourcery.com>
5580
5581 * server.h (decode_xfer_write): Change prototype.
5582 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5583 and don't extract the annex here.
5584 * server.c (decode_xfer_read): Remove `annex' parameter,
5585 and don't extract the annex here.
5586 (decode_xfer): New.
5587 (struct qxfer): New.
5588 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5589 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5590 (handle_qxfer_statictrace): New functions, abstracted out from
5591 handle_query, and made to use the struct qxfer interface.
5592 (handle_threads_qxfer_proper): Rename to ...
5593 (handle_qxfer_threads_proper): ... this.
5594 (handle_threads_qxfer): Rename to ...
5595 (handle_qxfer_threads): ... this. Adjust.
5596 (qxfer_packets): New array.
5597 (handle_qxfer): New function.
5598 (handle_query): Use handle_qxfer.
5599
493e2a69
MS
56002011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5601
5602 * gdbreplay.c: Shorten lines of >= 80 columns.
5603 * linux-low.c: Ditto.
5604 * linux-ppc-low.c: Ditto.
5605 * linux-s390-low.c: Ditto.
5606 * linux-sparc-low.c: Ditto.
5607 * linux-x86-low.c: Ditto.
5608 * linux-xtensa-low.c: Ditto.
5609 * mem-break.c: Ditto.
5610 * nto-low.c: Ditto.
5611 * regcache.h: Ditto.
5612 * remote-utils.c: Ditto.
5613 * server.c: Ditto.
5614 * server.h: Ditto.
5615 * thread-db.c: Ditto.
5616 * tracepoint.c: Ditto.
5617 * utils.c: Ditto.
5618 * win32-low.h: Ditto.
5619
44944448
JB
56202011-01-05 Joel Brobecker <brobecker@adacore.com>
5621
5622 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5623 update.
5624
71ce852c
JB
56252011-01-01 Joel Brobecker <brobecker@adacore.com>
5626
5627 * server.c (gdbserver_version): Update copyright year in version
5628 output.
5629 * gdbreplay.c (gdbreplay_version): Ditto.
5630
eb826dc6
MF
56312010-12-29 Jie Zhang <jie.zhang@analog.com>
5632
5633 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5634 * linux-bfin-low.c: New file.
5635 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5636 PT_DATA_ADDR for BFIN targets.
5637 * Makefile.in (SFILES): Add linux-bfin-low.c.
5638 (clean): Remove reg-bfin.c.
5639 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5640 * README: Mention supported Blackfin targets.
5641
39ab222a
MF
56422010-12-23 Mike Frysinger <vapier@gentoo.org>
5643
5644 * .gitignore: New file.
5645
a1f2ce7d
MF
56462010-11-16 Mike Frysinger <vapier@gentoo.org>
5647
5648 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5649
f474844c
JZ
56502010-10-22 Jie Zhang <jie@codesourcery.com>
5651
5652 * Makefile.in: Add FLAGS_TO_PASS variable.
5653 (install): Remove dependency of install-only and recursively
5654 invoke make for install-only.
5655
f1048712
DE
56562010-10-04 Doug Evans <dje@google.com>
5657
5658 * Makefile.in (uninstall): Use $(DESTDIR).
5659
b53a1623
PA
56602010-09-24 Pedro Alves <pedro@codesourcery.com>
5661
e6ee044d
PA
5662 PR gdb/11842
5663
b53a1623
PA
5664 * linux-x86-low.c (compat_siginfo_from_siginfo)
5665 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5666 si_code is < 0. Check for si_code == SI_TIMER before checking for
5667 si_code < 0.
5668
fa1bd1e4
JB
56692010-09-13 Joel Brobecker <brobecker@adacore.com>
5670
5671 * lynx-i386-low.c: New file.
5672 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5673
47fac8f8
JB
56742010-09-13 Joel Brobecker <brobecker@adacore.com>
5675
5676 * lynx-low.c (ptrace_request_to_str): Remove handling for
5677 request values that have been removed in LynxOS 5.x.
5678
1adfc54d
JB
56792010-09-13 Joel Brobecker <brobecker@adacore.com>
5680
5681 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5682 <ptrace.h>
5683
c2a66c29
NS
56842010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5685
5686 * configure.ac: Add --enable-inprocess-agent option.
5687 * configure: Rebuilt.
5688
32fcada3
YQ
56892010-09-06 Yao Qi <yao@codesourcery.com>
5690
5691 * linux-low.c (linux_kill): Remove unused variable.
5692 (linux_stabilize_threads): Likewise.
5693 * server.c (start_inferior): Likewise.
5694 (queue_stop_reply_callback): Likewise.
5695 * tracepoint.c (do_action_at_tracepoint): Likewise.
5696
0cccb683
YQ
56972010-09-06 Yao Qi <yao@codesourcery.com>
5698
5699 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5700 on return.
5701
423ec54c
JK
57022010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5703
5704 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5705
12ac6819
PA
57062010-09-06 Pedro Alves <pedro@codesourcery.com>
5707
5708 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5709 "$(IPA_DEPFILES)".
5710
8ed54b31
JB
57112010-09-01 Joel Brobecker <brobecker@adacore.com>
5712
5713 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5714 gdbserver/lynx-ppc-low.c: New files.
5715 * Makefile.in (lynx_low_h): New variable.
5716 (lynx-low.o, lynx-ppc-low.o): New rules.
5717 * configure.ac: On LynxOS, link with -lnetinet.
5718 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5719 * configure: regenerate.
5720
bb0116a4
JB
57212010-09-01 Joel Brobecker <brobecker@adacore.com>
5722
5723 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5724 * configure.ac: Add check for vasprintf and vsnprintf.
5725 * configure, config.in: Regenerate.
5726 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5727
a778ab81 57282010-09-01 Joel Brobecker <brobecker@adacore.com>
5729
5730 * gdbreplay.c: Move include of alloca.h up, next to include of
5731 malloc.h.
5732 * server.h: Add include of malloc.h.
5733 * mem-break.c: Remove include of malloc.h.
5734 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5735
8b034a19 57362010-09-01 Joel Brobecker <brobecker@adacore.com>
5737
5738 * Makefile.in (memmem.o): Build with -Wno-error.
5739
57402010-09-01 Joel Brobecker <brobecker@adacore.com>
5741
5742 * utils.c (xsnprintf): Make non-static.
5743 * server.h: Add xsnprintf declaration.
5744 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5745 replace calls to snprintf by calls to xsnprintf throughout.
5746
57472010-09-01 Joel Brobecker <brobecker@adacore.com>
5748
5749 * configure.ac: Add configure check for alloca.
5750 * configure, config.in: Regenerate.
5751 * server.h: Include alloca.h if it exists.
5752 * gdbreplay.c: Include alloca.h if it exists.
5753
1a981360
PA
57542010-08-28 Pedro Alves <pedro@codesourcery.com>
5755
5756 * linux-low.c (__SIGRTMIN): Define if not already defined.
5757 (linux_create_inferior): Check for __ANDROID__ rather than
5758 __SIGRTMIN.
5759 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5760 are already deferred.
5761 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5762 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5763 stopped and already has a pending signal to report.
5764 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5765 a pending signal to report or is moving out of a jump pad.
5766 (linux_init_signals): Check for __ANDROID__ rather than
5767 __SIGRTMIN.
5768
b4d51a55
PA
57692010-08-28 Pedro Alves <pedro@codesourcery.com>
5770
5771 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5772 debug_threads check. Avoid a linear search when not doing debug
5773 output.
5774
ec48365d
PA
57752010-08-27 Pedro Alves <pedro@codesourcery.com>
5776
5777 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5778 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5779 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5780 (process_event): Change local fd's type to gdb_fildes_t.
5781 (create_file_handler): Adjust prototype.
5782 (delete_file_handler): Adjust prototype.
5783 (handle_file_event): Adjust prototype. Use pfildes.
5784 (create_file_event): Adjsut prototype.
5785 * remote-utils.c (remote_desc, listen_desc): Change type to
5786 gdb_fildes_t.
5787 * server.h: New gdb_fildes_t typedef.
5788 [USE_WIN32API]: Include winsock2.h.
5789 (delete_file_handler, add_file_handler): Adjust prototypes.
5790 (pfildes): Declare.
5791 * utils.c (pfildes): New.
5792
854d88f0
PA
57932010-08-27 Pedro Alves <pedro@codesourcery.com>
5794
5795 * configure.ac (build_warnings): Add -Wno-char-subscripts.
5796 * configure: Regenerate.
5797
0146f85b
PA
57982010-08-27 Pedro Alves <pedro@codesourcery.com>
5799
5800 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5801 (linux_done_accessing_memory): ... this.
5802 (linux_target_ops): Adjust.
5803 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5804 * nto-low.c (nto_target_ops): Adjust comment.
5805 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5806 * spu-low.c (spu_target_ops): Adjust comment.
5807 * target.h (target_ops): Rename unprepare_to_access_memory field
5808 to done_accessing_memory.
5809 (unprepare_to_access_memory): Rename to ...
5810 (done_accessing_memory): ... this.
5811
90d74c30
PA
58122010-08-26 Pedro Alves <pedro@codesourcery.com>
5813
5814 * linux-low.c (linux_prepare_to_access_memory): New.
5815 (linux_unprepare_to_access_memory): New.
5816 (linux_target_ops): Install them.
5817 * server.c (read_memory): Rename to ...
5818 (gdb_read_memory): ... this. Use
5819 prepare_to_access_memory/prepare_to_access_memory.
5820 (write_memory): Rename to ...
5821 (gdb_write_memory): ... this. Use
5822 prepare_to_access_memory/prepare_to_access_memory.
5823 (handle_search_memory_1): Adjust.
5824 (process_serial_event): Adjust.
5825 * target.h (struct target_ops): New fields
5826 prepare_to_access_memory and unprepare_to_access_memory.
5827 (prepare_to_access_memory, unprepare_to_access_memory): New.
5828 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5829 prepare_to_access_memory/prepare_to_access_memory.
5830 * nto-low.c (nto_target_ops): Adjust.
5831 * spu-low.c (spu_target_ops): Adjust.
5832 * win32-low.c (win32_target_ops): Adjust.
5833
fd467969
PA
58342010-08-26 Pedro Alves <pedro@codesourcery.com>
5835
5836 * Makefile.in (WARN_CFLAGS): Get it from configure.
5837 (WERROR_CFLAGS): New.
5838 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5839 * configure.ac: Introduce --enable-werror, which adds -Werror to
5840 the compiler command line. Enabled by default. Disable with
5841 --disable-werror. Add -Wdeclaration-after-statement
5842 Wpointer-arith and -Wformat-nonliteral to warning flags.
5843 * configure: Regenerate.
5844
331e2f5f
PA
58452010-08-26 Pedro Alves <pedro@codesourcery.com>
5846
5847 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5848
e581f2b4
PA
58492010-08-26 Pedro Alves <pedro@codesourcery.com>
5850
5851 * gdbreplay.c (remote_error): New.
5852 (gdbchar): New.
5853 (expect): Use gdbchar. Check for error reading from GDB.
5854 Clarify sync error output.
5855 (play): Check for errors writing to GDB.
5856 * linux-low.c (sigchld_handler): Really ignore `write' errors.
5857 * remote-utils.c (getpkt): Check for errors writing to the remote
5858 descriptor.
5859
3c11dd79
PA
58602010-08-25 Pedro Alves <pedro@codesourcery.com>
5861
5862 * linux-low.c (linux_wait_1): Move non-debugging code out of
5863 `debug_threads' control.
5864
d20a8ad9
PA
58652010-08-25 Pedro Alves <pedro@codesourcery.com>
5866
5867 * linux-low.c (linux_wait_1): Don't set last_status here.
5868 * server.c (push_event, queue_stop_reply_callback): Assert we're
5869 not pushing a TARGET_WAITKIND_IGNORE event.
5870 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5871 (myresume, handle_target_event): Set the thread's last_resume_kind
5872 and last_status from the target returned status.
5873
964e4306
PA
58742010-08-25 Pedro Alves <pedro@codesourcery.com>
5875
5876 PR threads/10729
5877
5878 * linux-x86-low.c (update_debug_registers_callback): New.
5879 (i386_dr_low_set_addr): Use it.
5880 (i386_dr_low_get_addr): New.
5881 (i386_dr_low_set_control): Use update_debug_registers_callback.
5882 (i386_dr_low_get_control): New.
5883 (i386_dr_low_get_status): Adjust.
5884 * linux-low.c (linux_stop_lwp): New.
5885 * linux-low.h (linux_stop_lwp): Declare.
5886
5887 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5888 argument instead of a i386_debug_reg_state.
5889 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5890 a i386_debug_reg_state.
5891 (i386_insert_aligned_watchpoint): Adjust.
5892 (i386_remove_aligned_watchpoint): Adjust.
5893 (i386_low_stopped_data_address): Read the debug registers from the
5894 inferior instead of from the mirrors.
5895 * i386-low.h (struct i386_debug_reg_state): Extend comment.
5896 (i386_dr_low_get_addr): Declare.
5897 (i386_dr_low_get_control): Declare.
5898 (i386_dr_low_get_status): Change prototype.
5899
5900 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5901 (i386_dr_low_get_addr): New.
5902 (i386_dr_low_get_control): New.
5903 (i386_dr_low_get_status): Adjust prototype. Return
5904 dr_status_mirror.
5905 (i386_initial_stuff): Clear dr_status_mirror and
5906 dr_control_mirror.
5907 (i386_get_thread_context): Adjust.
5908 (i386_set_thread_context): Adjust.
5909 (i386_thread_added): Adjust.
5910
5f21a75b
PA
59112010-08-24 Pedro Alves <pedro@codesourcery.com>
5912
5913 * linux-low.h (linux_thread_area): Delete declaration.
5914
3e4c1235
TS
59152010-08-11 Thomas Schwinge <thomas@codesourcery.com>
5916
5917 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5918 after its termination.
5919
1971b033
PA
59202010-08-09 Pedro Alves <pedro@codesourcery.com>
5921
5922 * linux-low.c (gdb_wants_lwp_stopped): Delete.
5923 (gdb_wants_all_stopped): Delete.
5924 (linux_wait_1): Don't call them.
5925 * server.c (handle_v_cont): Tag all threads as want-stopped.
5926 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
5927 stopped as "client-wants-stopped".
5928
310444ac
PA
59292010-07-31 Pedro Alves <pedro@codesourcery.com>
5930
5931 * Makefile.in (signals_h): New.
5932 (server_h): Depend on it.
5933 (server.o): Don't depend on $(signals_def).
5934 (signals.o): Depend on $(signals_def).
5935
a19cae16
JK
59362010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
5937
5938 * Makefile.in (signals_def): New.
5939 (server_h): Append include/gdb/signals.h and signals_def.
5940 (server.o): Append signals_def.
5941
30d50328
JK
59422010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5943
5944 * server.c (handle_target_event): Use target_signal_to_host for
5945 resume_info.sig initialization.
5946 * target.h (struct thread_resume) <sig>: New comment.
5947
5c3216e2
OS
59482010-07-20 Ozkan Sezer <sezeroz@gmail.com>
5949
c6f46ca0
OS
5950 * server.c (handle_query): strcpy() the returned string from paddress()
5951 instead of sprintf().
5c3216e2
OS
5952 * utils.c (paddress): Return phex_nz().
5953
6bd31874
JB
59542010-07-07 Joel Brobecker <brobecker@adacore.com>
5955
5956 * server.c (handle_v_cont): Call mourn_inferior if process
5957 just exited.
5958 (myresume): Likewise.
5959
0fb4aa4b
PA
59602010-07-01 Pedro Alves <pedro@codesourcery.com>
5961
5962 Static tracepoints, and integration with UST.
5963
5964 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
5965 * mem-break.c (uninsert_all_breakpoints)
5966 (reinsert_all_breakpoints): New.
5967 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5968 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5969 (gdb_agent_ust_loaded, helper_thread_id)
5970 (gdb_agent_helper_thread_id): New macros.
5971 (struct ipa_sym_addresses): Add addr_ust_loaded,
5972 addr_helper_thread_id, addr_cmd_buf.
5973 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5974 (in_process_agent_loaded_ust): New.
5975 (write_e_ust_not_loaded): New.
5976 (maybe_write_ipa_ust_not_loaded): New.
5977 (struct collect_static_trace_data_action): New.
5978 (enum tracepoint_type) <static_tracepoint>: New.
5979 (struct tracepoint) <handle>: Mention static tracepoints.
5980 (struct static_tracepoint_ctx): New.
5981 (CMD_BUF_SIZE): New.
5982 (add_tracepoint_action): Handle static tracepoint actions.
5983 (unprobe_marker_at): New.
5984 (clear_installed_tracepoints): Handle static tracepoints.
5985 (cmd_qtdp): Handle static tracepoints.
5986 (probe_marker_at): New.
5987 (cmd_qtstart): Handle static tracepoints.
5988 (response_tracepoint): Handle static tracepoints.
5989 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5990 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5991 (get_context_regcache): Handle static tracepoints.
5992 (do_action_at_tracepoint): Handle static tracepoint actions.
5993 (traceframe_find_block_type): Handle static trace data blocks.
5994 (traceframe_read_sdata): New.
5995 (download_tracepoints): Download static tracepoint actions.
5996 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5997 (GDB_PROBE_NAME): New.
5998 (ust_ops): New.
5999 (GET_UST_SYM): New.
6000 (USTF): New.
6001 (dlsym_ust): New.
6002 (ust_marker_to_static_tracepoint): New.
6003 (gdb_probe): New.
6004 (collect_ust_data_at_tracepoint): New.
6005 (gdb_ust_probe): New.
6006 (UNIX_PATH_MAX, SOCK_DIR): New.
6007 (gdb_ust_connect_sync_socket): New.
6008 (resume_thread, stop_thread): New.
6009 (run_inferior_command): New.
6010 (init_named_socket): New.
6011 (gdb_ust_socket_init): New.
6012 (cstr_to_hexstr): New.
6013 (next_st): New.
6014 (first_marker, next_marker): New.
6015 (response_ust_marker): New.
6016 (cmd_qtfstm, cmd_qtsstm): New.
6017 (unprobe_marker_at, probe_marker_at): New.
6018 (cmd_qtstmat, gdb_ust_thread): New.
6019 (gdb_ust_init): New.
6020 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6021 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6022 (ST_REGENTRY): New.
6023 (x86_64_st_collect_regmap): New.
6024 (X86_64_NUM_ST_COLLECT_GREGS): New.
6025 (AMD64_RIP_REGNUM): New.
6026 (supply_static_tracepoint_registers): New.
6027 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6028 (ST_REGENTRY): New.
6029 (i386_st_collect_regmap): New.
6030 (i386_NUM_ST_COLLECT_GREGS): New.
6031 (supply_static_tracepoint_registers): New.
6032 * server.c (handle_query): Handle qXfer:statictrace:read.
6033 <qSupported>: Report support for StaticTracepoints, and
6034 qXfer:statictrace:read features.
6035 * server.h (traceframe_read_sdata)
6036 (supply_static_tracepoint_registers): Declare.
6037 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6038 (unpack_varlen_hex): Include in IPA build.
6039 * Makefile.in (ustlibs, ustinc): New.
6040 (IPA_OBJS): Add remote-utils-ipa.o.
6041 ($(IPA_LIB)): Link -ldl and -lpthread.
6042 (UST_CFLAGS): New.
6043 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6044 * config.in, configure: Regenerate.
6045
9e4344e5
PA
60462010-06-20 Ian Lance Taylor <iant@google.com>
6047 Pedro Alves <pedro@codesourcery.com>
6048
6049 * linux-x86-low.c (always_true): Delete.
6050 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6051 trying to fool the compiler with always_true.
6052
c6beb2cb
PA
60532010-06-20 Pedro Alves <pedro@codesourcery.com>
6054
6055 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6056 conditions in gdbserver.
6057
d2ed6730
UW
60582010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6059
6060 * spu-low.c (spu_read_memory): Wrap around local store limit.
6061 (spu_write_memory): Likewise.
6062
4e29fb54
PA
60632010-06-15 Pedro Alves <pedro@codesourcery.com>
6064
6065 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6066 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6067 LONGEST uses.
6068 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6069 uses.
6070 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6071 uses with LONGEST uses.
6072
6a271cae
PA
60732010-06-14 Stan Shebs <stan@codesourcery.com>
6074 Pedro Alves <pedro@codesourcery.com>
6075
6076 Bytecode compiler.
6077
6078 * linux-x86-low.c: Include limits.h.
6079 (add_insns): New.
6080 (always_true): New.
6081 (EMIT_ASM): New.
6082 (EMIT_ASM32): New.
6083 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6084 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6085 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6086 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6087 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6088 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6089 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6090 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6091 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6092 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6093 (amd64_emit_void_call_2): New.
6094 (amd64_emit_ops): New.
6095 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6096 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6097 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6098 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6099 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6100 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6101 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6102 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6103 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6104 (i386_emit_stack_adjust, i386_emit_int_call_1)
6105 (i386_emit_void_call_2): New.
6106 (i386_emit_ops): New.
6107 (x86_emit_ops): New.
6108 (the_low_target): Install x86_emit_ops.
6109 * server.h (struct emit_ops): New.
6110 (get_raw_reg_func_addr): Declare.
6111 (current_insn_ptr, emit_error): Declare.
6112 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6113 (set_trace_state_variable_value): New defines.
6114 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6115 addr_get_trace_state_variable_value and
6116 addr_set_trace_state_variable_value.
6117 (symbol_list): New fields for get_raw_reg,
6118 get_trace_state_variable_value and set_trace_state_variable_value.
6119 (condfn): New typedef.
6120 (struct tracepoint): New field `compiled_cond'.
6121 (do_action_at_tracepoint): Clear compiled_cond.
6122 (get_trace_state_variable_value, set_trace_state_variable_value):
6123 Export in the IPA.
6124 (condition_true_at_tracepoint): If there's a compiled condition,
6125 run that.
6126 (current_insn_ptr, emit_error): New globals.
6127 (struct bytecode_address): New.
6128 (get_raw_reg_func_addr): New.
6129 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6130 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6131 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6132 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6133 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6134 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6135 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6136 (compile_tracepoint_condition, compile_bytecodes): New.
6137 * target.h (emit_ops): Forward declare.
6138 (struct target_ops): New field emit_ops.
6139 (target_emit_ops): New.
6140 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6141 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6142 * linux-low.c (linux_emit_ops): New.
6143 (linux_target_ops): Install it.
6144 * linux-low.h (struct linux_target_ops): New field emit_ops.
6145
92b72907
UW
61462010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6147
6148 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6149 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6150
fa593d66
PA
61512010-06-01 Pedro Alves <pedro@codesourcery.com>
6152 Stan Shebs <stan@codesourcery.com>
6153
6154 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6155 (all): Depend on $(extra_libraries).
6156 (install-only): Install the IPA.
6157 (IPA_OBJS, IPA_LIB): New.
6158 (clean): Remove the IPA lib.
6159 (IPAGENT_CFLAGS): New.
6160 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6161 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6162 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6163 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6164 * configure.ac: Check for atomic builtins support in the compiler.
6165 (IPA_DEPFILES, extra_libraries): Define.
6166 * configure.srv (ipa_obj): Add description.
6167 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6168 (i[34567]86-*-linux*): Set ipa_obj.
6169 (x86_64-*-linux*): Set ipa_obj.
6170 * linux-low.c (stabilizing_threads): New.
6171 (supports_fast_tracepoints): New.
6172 (linux_detach): Stabilize threads before detaching.
6173 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6174 the lwp is either not stabilizing, or is moving out of a jump pad.
6175 (linux_fast_tracepoint_collecting): New.
6176 (maybe_move_out_of_jump_pad): New.
6177 (enqueue_one_deferred_signal): New.
6178 (dequeue_one_deferred_signal): New.
6179 (linux_wait_for_event_1): If moving out of a jump pad, defer
6180 pending signals to later.
6181 (linux_stabilize_threads): New.
6182 (linux_wait_1): Check if threads need moving out of jump pads, and
6183 do it if so.
6184 (stuck_in_jump_pad_callback): New.
6185 (move_out_of_jump_pad_callback): New.
6186 (lwp_running): New.
6187 (linux_resume_one_lwp): Handle moving out of jump pads.
6188 (linux_set_resume_request): Dequeue deferred signals.
6189 (need_step_over_p): Also step over fast tracepoint jumps.
6190 (start_step_over): Also uninsert fast tracepoint jumps.
6191 (finish_step_over): Also reinsert fast tracepoint jumps.
6192 (linux_install_fast_tracepoint_jump): New.
6193 (linux_target_ops): Install linux_stabilize_threads and
6194 linux_install_fast_tracepoint_jump_pad.
6195 * linux-low.h (linux_target_ops) <get_thread_area,
6196 install_fast_tracepoint_jump_pad>: New fields.
6197 (struct lwp_info) <collecting_fast_tracepoint,
6198 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6199 (linux_get_thread_area): Declare.
6200 * linux-x86-low.c (jump_insn): New.
6201 (x86_get_thread_area): New.
6202 (append_insns): New.
6203 (push_opcode): New.
6204 (amd64_install_fast_tracepoint_jump_pad): New.
6205 (i386_install_fast_tracepoint_jump_pad): New.
6206 (x86_install_fast_tracepoint_jump_pad): New.
6207 (the_low_target): Install x86_get_thread_area and
6208 x86_install_fast_tracepoint_jump_pad.
6209 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6210 (struct fast_tracepoint_jump): New.
6211 (fast_tracepoint_jump_insn): New.
6212 (fast_tracepoint_jump_shadow): New.
6213 (find_fast_tracepoint_jump_at): New.
6214 (fast_tracepoint_jump_here): New.
6215 (delete_fast_tracepoint_jump): New.
6216 (set_fast_tracepoint_jump): New.
6217 (uninsert_fast_tracepoint_jumps_at): New.
6218 (reinsert_fast_tracepoint_jumps_at): New.
6219 (set_breakpoint_at): Use write_inferior_memory.
6220 (uninsert_raw_breakpoint): Use write_inferior_memory.
6221 (check_mem_read): Mask out fast tracepoint jumps.
6222 (check_mem_write): Mask out fast tracepoint jumps.
6223 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6224 (set_fast_tracepoint_jump): Declare.
6225 (delete_fast_tracepoint_jump)
6226 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6227 (reinsert_fast_tracepoint_jumps_at): Declare.
6228 * regcache.c: Don't compile many functions when building the
6229 in-process agent library.
6230 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6231 the register buffer in the heap.
6232 (free_register_cache): If the register buffer isn't owned by the
6233 regcache, don't free it.
6234 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6235 pre-existing register caches.
6236 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6237 type.
6238 (convert_ascii_to_int): : Constify `from' parameter type.
6239 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6240 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6241 the needed buffer in-place.
6242 (relocate_instruction): New.
6243 * server.c (handle_query) <qSymbols>: If the target supports
6244 tracepoints, give it a chance of looking up symbols. Report
6245 support for fast tracepoints.
6246 (handle_status): Stabilize threads.
6247 (process_serial_event): Adjust.
6248 * server.h (struct fast_tracepoint_jump): Forward declare.
6249 (struct process_info) <fast_tracepoint_jumps>: New field.
6250 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6251 (decode_X_packet, decode_M_packet): Adjust.
6252 (relocate_instruction): Declare.
6253 (in_process_agent_loaded): Declare.
6254 (tracepoint_look_up_symbols): Declare.
6255 (struct fast_tpoint_collect_status): Declare.
6256 (fast_tracepoint_collecting): Declare.
6257 (force_unlock_trace_buffer): Declare.
6258 (handle_tracepoint_bkpts): Declare.
6259 (initialize_low_tracepoint)
6260 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6261 * target.h (struct target_ops) <stabilize_threads,
6262 install_fast_tracepoint_jump_pad>: New fields.
6263 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6264 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6265 [HAVE_STDINT_H]: Include stdint.h.
6266 (trace_debug_1): Rename to ...
6267 (trace_vdebug): ... this.
6268 (trace_debug): Rename to ...
6269 (trace_debug_1): ... this. Add `level' parameter.
6270 (trace_debug): New.
6271 (ATTR_USED, ATTR_NOINLINE): New.
6272 (IP_AGENT_EXPORT): New.
6273 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6274 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6275 (about_to_request_buffer_space, trace_buffer_is_full)
6276 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6277 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6278 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6279 (traceframe_write_count, traceframes_created)
6280 (trace_state_variables)
6281 New renaming defines.
6282 (struct ipa_sym_addresses): New.
6283 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6284 (symbol_list): New.
6285 (ipa_sym_addrs): New.
6286 (all_tracepoint_symbols_looked_up): New.
6287 (in_process_agent_loaded): New.
6288 (write_e_ipa_not_loaded): New.
6289 (maybe_write_ipa_not_loaded): New.
6290 (tracepoint_look_up_symbols): New.
6291 (debug_threads) [IN_PROCESS_AGENT]: New.
6292 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6293 (UNKNOWN_SIDE_EFFECTS): New.
6294 (stop_tracing): New.
6295 (flush_trace_buffer): New.
6296 (stop_tracing_bkpt): New.
6297 (flush_trace_buffer_bkpt): New.
6298 (read_inferior_integer): New.
6299 (read_inferior_uinteger): New.
6300 (read_inferior_data_pointer): New.
6301 (write_inferior_data_pointer): New.
6302 (write_inferior_integer): New.
6303 (write_inferior_uinteger): New.
6304 (struct collect_static_trace_data_action): Delete.
6305 (enum tracepoint_type): New.
6306 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6307 <actions_str, step_actions, step_actions_str>: Only include in
6308 GDBserver.
fa593d66
PA
6309 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6310 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6311 (tracepoints): Use IP_AGENT_EXPORT.
6312 (last_tracepoint): Don't include in the IPA.
6313 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6314 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6315 (alloced_trace_state_variables): New.
6316 (trace_state_variables): Use IP_AGENT_EXPORT.
6317 (traceframe_t): Delete unused variable.
6318 (circular_trace_buffer): Don't include in the IPA.
6319 (trace_buffer_start): Delete.
6320 (struct trace_buffer_control): New.
6321 (trace_buffer_free): Delete.
6322 (struct ipa_trace_buffer_control): New.
6323 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6324 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6325 New.
6326 (trace_buffer_ctrl): New.
6327 (TRACE_BUFFER_CTRL_CURR): New.
6328 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6329 Reimplement as macros.
6330 (trace_buffer_wrap): Delete.
6331 (traceframe_write_count, traceframe_read_count)
6332 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6333 (struct tracepoint_hit_ctx) <type>: New field.
6334 (struct fast_tracepoint_ctx): New.
6335 (memory_barrier): New.
6336 (cmpxchg): New.
6337 (record_tracepoint_error): Update atomically in the IPA.
6338 (clear_inferior_trace_buffer): New.
6339 (about_to_request_buffer_space): New.
6340 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6341 updating the same buffer.
6342 (add_tracepoint): Default the tracepoint's type to trap
6343 tracepoint, and orig_size to -1.
6344 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6345 internal variables.
6346 (create_trace_state_variable): New parameter `gdb'. Handle it.
6347 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6348 (cmd_qtdp): Handle fast tracepoints.
6349 (cmd_qtdv): Adjust.
6350 (max_jump_pad_size): New.
6351 (gdb_jump_pad_head): New.
6352 (get_jump_space_head): New.
6353 (claim_jump_space): New.
6354 (sort_tracepoints): New.
6355 (MAX_JUMP_SIZE): New.
6356 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6357 IPA.
6358 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6359 support. Upload fast traceframes, and delete internal IPA
6360 breakpoints.
6361 (stop_tracing_handler): New.
6362 (flush_trace_buffer_handler): New.
6363 (cmd_qtstop): Upload fast tracepoints.
6364 (response_tracepoint): Handle fast tracepoints.
6365 (tracepoint_finished_step): Upload fast traceframes. Set the
6366 tracepoint hit context's tracepoint type.
6367 (handle_tracepoint_bkpts): New.
6368 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6369 type. Add comment about fast tracepoints.
6370 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6371 non-existing action_str field.
6372 (get_context_regcache): Handle fast tracepoints.
6373 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6374 to the regcache.
6375 (fast_tracepoint_from_jump_pad_address): New.
6376 (fast_tracepoint_from_ipa_tpoint_address): New.
6377 (collecting_t): New.
6378 (force_unlock_trace_buffer): New.
6379 (fast_tracepoint_collecting): New.
6380 (collecting): New.
6381 (gdb_collect): New.
6382 (write_inferior_data_ptr): New.
6383 (target_tp_heap): New.
6384 (target_malloc): New.
6385 (download_agent_expr): New.
6386 (UALIGN): New.
6387 (download_tracepoints): New.
6388 (download_trace_state_variables): New.
6389 (upload_fast_traceframes): New.
6390 (IPA_FIRST_TRACEFRAME): New.
6391 (IPA_NEXT_TRACEFRAME_1): New.
6392 (IPA_NEXT_TRACEFRAME): New.
6393 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6394 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6395 (gdb_jump_pad_buffer_end): New.
6396 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6397 (initialize_tracepoint): Adjust.
6398 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6399 buffer. Initialize the low module.
6400 * utils.c (PREFIX, TOOLNAME): New.
6401 (malloc_failure): Use PREFIX.
6402 (error): In the IPA, an error causes an exit.
6403 (fatal, warning): Use PREFIX.
6404 (internal_error): Use TOOLNAME.
6405 (NUMCELLS): Increase to 10.
6406 * configure, config.in: Regenerate.
6407
d149dd1d
PA
64082010-06-01 Pedro Alves <pedro@codesourcery.com>
6409
6410 * server.c (handle_query) <qSupported>: Do two passes over the
6411 qSupported string to avoid nesting strtok.
6412
f6528abd
JK
64132010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6414
6415 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6416 (CDEPS): New.
6417 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6418 -Wl,--dynamic-list.
6419 * configure: Regenerate.
6420 * proc-service.list: New.
6421
ca2a87a0
JK
64222010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6423
6424 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6425 New comment.
6426
363a6e9f
OS
64272010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6428
6429 * gdbreplay.c (remote_open): Check error return from socket() call by
6430 its equality to -1 not by it being negative.
6431 * remote-utils.c (remote_open): Likewise.
6432
d23b6cb1
PA
64332010-05-23 Pedro Alves <pedro@codesourcery.com>
6434
6435 * config.h: Regenerate.
6436
28d3cf85
MK
64372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6438
6439 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6440 doesn't provide PTRACE_GET_THREAD_AREA.
6441
fea36a59
MK
64422010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6443
6444 * linux-m68k-low.c: Include <asm/ptrace.h>
6445 (ps_get_thread_area): Implement.
6446
24b066ba
DE
64472010-05-03 Doug Evans <dje@google.com>
6448
6449 * event-loop.c (struct callback_event): New struct.
6450 (callback_list): New global.
6451 (append_callback_event, delete_callback_event): New functions.
6452 (process_callback): New function.
6453 (start_event_loop): Call it.
6454 * remote-utils.c (NOT_SCHEDULED): Define.
6455 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6456 moved out of readchar.
6457 (readchar): Rewrite. Call reschedule before returning.
6458 (reset_readchar): New function.
6459 (remote_close): Call it.
6460 (process_remaining, reschedule): New functions.
6461 * server.h (callback_handler_func): New typedef.
6462 (append_callback_event, delete_callback_event): Declare.
6463
9836d6ea
PA
64642010-05-03 Pedro Alves <pedro@codesourcery.com>
6465
6466 * proc-service.c (ps_pglobal_lookup): Use
6467 thread_db_look_up_one_symbol.
6468 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6469 parameter. Use it instead of all_symbols_looked_up.
6470 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6471 field.
6472 (all_symbols_looked_up): Don't declare.
6473 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6474 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6475 field.
6476 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6477 Set all_symbols_looked_up here.
6478 (thread_db_look_up_one_symbol): New.
6479 (thread_db_get_tls_address): Adjust.
6480 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6481 thread_db object on the heap, and tentatively set it in the
6482 process structure.
6483 (thread_db_init): Don't set all_symbols_looked_up here.
6484 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6485
7984d532
PA
64862010-05-03 Pedro Alves <pedro@codesourcery.com>
6487
6488 * linux-low.c (linux_kill, linux_detach): Adjust.
6489 (status_pending_p_callback): Remove redundant statement. Check
6490 for !TARGET_WAITIKIND_IGNORE, instead of
6491 TARGET_WAITKIND_STOPPED.
6492 (handle_tracepoints): Make sure LWP is locked. Adjust.
6493 (linux_wait_for_event_1): Adjust.
6494 (linux_cancel_breakpoints): New.
6495 (unsuspend_one_lwp): New.
6496 (unsuspend_all_lwps): New.
6497 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6498 (send_sigstop_callback): Change return type to int, add new
6499 `except' parameter and handle it.
6500 (suspend_and_send_sigstop_callback): New.
6501 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6502 pass them down. If SUSPEND, also increment the lwp's suspend
6503 count.
6504 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6505 (need_step_over_p): Don't consider suspended LWPs.
6506 (start_step_over): Adjust.
6507 (proceed_one_lwp): Change return type to int, add new `except'
6508 parameter and handle it.
6509 (unsuspend_and_proceed_one_lwp): New.
6510 (proceed_all_lwps): Use find_inferior instead of
6511 for_each_inferior.
6512 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6513 also decrement the suspend count of LWPs. Pass `except' down,
6514 instead of hacking its suspend count.
6515 (linux_pause_all): Add `freeze' parameter. Adjust.
6516 (linux_unpause_all): New.
6517 (linux_target_ops): Install linux_unpause_all.
6518 * server.c (handle_status): Adjust.
6519 * target.h (struct target_ops): New fields `unpause_all' and
6520 `cancel_breakpoints'. Add new parameter to `pause_all'.
6521 (pause_all): Add new `freeze' parameter.
6522 (unpause_all): New.
6523 (cancel_breakpoints): New.
6524 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6525 cancel breakpoints.
6526 (cmd_qtstart): Pause threads.
6527 (stop_tracing): Pause threads, and cancel breakpoints.
6528 * win32-low.c (win32_target_ops): Adjust.
6529
e471f25b
PA
65302010-05-03 Pedro Alves <pedro@codesourcery.com>
6531
6532 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6533 the inferior right away from here...
6534 (linux_wait_1): ... to here, and adjust to check the thread's
6535 last_resume_kind instead of the lwp's step or stop_expected flags.
6536
1915ef4f
PA
65372010-05-02 Pedro Alves <pedro@codesourcery.com>
6538
6539 * README: Use consistent `GDB' and `GDBserver' spellings.
6540
f9e39928
PA
65412010-05-02 Pedro Alves <pedro@codesourcery.com>
6542
6543 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6544 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6545 (linux_detach_one_lwp): Assume the lwp is stopped.
6546 (any_thread_of): Delete.
6547 (linux_detach): Stop all lwps here. Don't blindly delete all
6548 breakpoints.
6549 (delete_lwp_callback): New.
6550 (linux_mourn): Delete all lwps of the process that is gone.
6551 (linux_wait_1): Don't delete the last lwp of the process here.
6552 * mem-break.h (mark_breakpoints_out): Declare.
6553 * mem-break.c (mark_breakpoints_out): New.
6554 (free_all_breakpoints): Use it.
6555 * server.c (handle_target_event): If the process is gone, mark
6556 breakpoints out.
6557 * thread-db.c (struct thread_db) <create_bp>: New field.
6558 (thread_db_enable_reporting): Fix prototype. Store a thread event
6559 breakpoint reference in the thread_db struct.
6560 (thread_db_load_search): Clear the thread_db object.
6561 (try_thread_db_load_1): Ditto.
6562 (switch_to_process): New.
6563 (disable_thread_event_reporting): Use it.
6564 (remove_thread_event_breakpoints): New.
6565 (thread_db_detach, thread_db_mourn): Use it.
6566
1e7fc18c
PA
65672010-05-01 Pedro Alves <pedro@codesourcery.com>
6568
6569 * linux-low.c (linux_enable_event_reporting): New.
6570 (linux_wait_for_event_1, handle_extended_wait): Use it.
6571
02fc4de7
PA
65722010-04-30 Pedro Alves <pedro@codesourcery.com>
6573
6574 * linux-low.c (linux_kill_one_lwp, linux_kill)
6575 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6576 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6577 SIGSTOP even if the LWP is stopped.
6578 (send_sigstop_callback): New.
6579 (stop_all_lwps): Use send_sigstop_callback instead.
6580 (linux_resume_one_thread): Adjust.
6581 (proceed_one_lwp): Still proceed an LWP that the client has
6582 requested to stop, if we haven't reported it as stopped yet. Make
6583 sure that LWPs the client want stopped, have a pending SIGSTOP.
6584
bc3b5632
DE
65852010-04-26 Doug Evans <dje@google.com>
6586
ae1ada35
DE
6587 * server.c (handle_general_set): Make static.
6588
bc3b5632
DE
6589 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6590 Print received char after testing for error/eof instead of before.
6591 (input_interrupt): Tweak comment.
6592
65730243
DE
65932010-04-23 Doug Evans <dje@google.com>
6594
6595 * server.c (start_inferior): Print inferior argv if --debug.
6596
a8ae7dc0
AR
65972010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6598
6599 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6600 * nto-x86-low.c: Include server.h
6601
1c07cc19
PM
66022010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6603
6604 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6605 be consistent with other sources of this directory.
6606 (init_registers_amd64): Correct name of source file of this function
6607 in the comment.
6608
e0a61e09
PM
66092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6610
6611 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6612 64-bit executables.
6613
54709339
PM
66142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6615
6616 * win32-i386-low.c: Add 64-bit support.
6617 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6618 (init_registers_amd64): Declare.
6619 (mappings): Add 64-bit version of array.
6620 (init_windows_x86): New function.
6621 (the_low_target): Change init_arch field to init_windows_x86.
6622
e8f0053d
PM
66232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6624
6625 * win32-low.c: Adapt to support also 64-bit architecture.
6626 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6627 (get_image_name): Use SIZE_T type for local variable `done'.
6628 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6629 (toolhelp_get_dll_name): Idem.
6630 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6631 Use uintptr_t typecast to avoid warning.
6632 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6633 (handle_exception): Use phex_nz to avoid warning.
6634 (win32_wait): Remove unused local variable `process'.
6635
c481e77e
PM
66362010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6637
6638 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6639 `amd64-avx.o'.
6640
12ea4b69
PM
66412010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6642
6643 * configure.ac: Use `ws2_32' library for srv_mingw.
6644 * configure: Regenerate.
6645 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6646 * remote-utils.c: Likewise.
6647
f6d1620c
L
66482010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6649
6650 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6651 if __x86_64__ is defined.
6652
8e642873
PM
66532010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6654
6655 * configure: Regenerate.
6656
711e434b
PM
66572010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6658
6659 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6660 * target.h (target_ops): New get_tib_address field.
6661 * win32-low.h (win32_thread_info): Add thread_local_base field.
6662 * win32-low.c (child_add_thread): Add tlb argument.
6663 Set thread_local_base field to TLB.
6664 (get_child_debug_event): Adapt to child_add_thread change.
6665 (win32_get_tib_address): New function.
6666 (win32_target_ops): Set get_tib_address field to
6667 win32_get_tib_address.
6668 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6669
505106cd
PA
66702010-04-12 Pedro Alves <pedro@codesourcery.com>
6671
505106cd
PA
6672 * linux-low.c (linux_mourn): Also remove the process.
6673 * server.c (handle_target_event): Don't remove the process here.
6674 * nto-low.c (nto_mourn): New.
6675 (nto_target_ops): Install it.
6676 * spu-low.c (spu_mourn): New.
6677 (spu_target_ops): Install it.
6678 * win32-low.c (win32_mourn): New.
6679 (win32_target_ops): Install it.
6680
e8470a06
PA
66812010-04-12 Pedro Alves <pedro@codesourcery.com>
6682
6683 * server.h (buffer_xml_printf): Remove redundant `;'.
6684
45ba0d02
PA
66852010-04-12 Pedro Alves <pedro@codesourcery.com>
6686
6687 * regcache.c (set_register_cache): Invalidate regcaches before
6688 changing the register cache layout.
6689 (regcache_invalidate_one): Allow a NULL regcache.
6690 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6691 regcaches before changing the register cache layout or the target
6692 regsets.
6693
59e04013
L
66942010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6695
6696 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6697 variable warning on Linux/x86-64.
6698
8336d594
PA
66992010-04-11 Pedro Alves <pedro@codesourcery.com>
6700
6701 GDBserver disconnected tracing support.
6702
6703 * linux-low.c (linux_remove_process): Delete.
6704 (add_lwp): Don't set last_resume_kind here.
6705 (linux_kill): Use `mourn'.
6706 (linux_detach): Use `thread_db_detach', and `mourn'.
6707 (linux_mourn): New.
6708 (linux_attach_lwp_1): Adjust comment.
6709 (linux_attach): last_resume_kind moved the thread_info; adjust.
6710 (status_pending_p_callback): Adjust.
6711 (linux_wait_for_event_1): Adjust.
6712 (count_events_callback, select_singlestep_lwp_callback)
6713 (select_event_lwp_callback, cancel_breakpoints_callback)
6714 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6715 (proceed_one_lwp): Adjust.
6716 (linux_async): Add debug output.
6717 (linux_thread_stopped): New.
6718 (linux_pause_all): New.
6719 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6720 linux_pause_all.
6721 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6722 (thread_db_free): Delete declaration.
6723 (thread_db_detach, thread_db_mourn): Declare.
6724 * thread-db.c (thread_db_init): Use thread_db_mourn.
6725 (thread_db_free): Delete, split in two.
6726 (disable_thread_event_reporting): New.
6727 (thread_db_detach): New.
6728 (thread_db_mourn): New.
6729
6730 * server.h (struct thread_info) <last_resume_kind>: New field.
6731 <attached>: Add comment.
6732 <gdb_detached>: New field.
6733 (handler_func): Change return type to int.
6734 (handle_serial_event, handle_target_event): Ditto.
6735 (gdb_connected): Declare.
6736 (tracing): Delete.
6737 (disconnected_tracing): Declare.
6738 (stop_tracing): Declare.
6739
6740 * server.c (handle_query) <qSupported>: Report support for
6741 disconnected tracing.
6742 (queue_stop_reply_callback): Account for running threads.
6743 (gdb_wants_thread_stopped): New.
6744 (gdb_wants_all_threads_stopped): New.
6745 (gdb_reattached_process): New.
6746 (handle_status): Clear the `gdb_detached' flag of all processes.
6747 In all-stop, stop all threads.
6748 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6749 (process_serial_event): If the remote connection breaks, or if an
6750 exit was forced with "monitor exit", force an event loop exit.
6751 Handle disconnected tracing on detach.
6752 (handle_serial_event): Adjust.
6753 (handle_target_event): If GDB isn't connected, forward events back
6754 to the inferior, unless the last process exited, in which case,
6755 exit gdbserver. Adjust interface.
6756
6757 * remote-utils.c (remote_open): Don't block in accept. Instead
6758 register an event loop source on the listen socket file
6759 descriptor. Refactor bits into ...
6760 (listen_desc): ... this new global.
6761 (gdb_connected): ... this new function.
6762 (enable_async_notification): ... this new function.
6763 (handle_accept_event): ... this new function.
6764 (remote_close): Clear remote_desc.
6765
6766 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6767
6768 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6769 New fields.
6770 (mourn_inferior): Define.
6771 (target_process_qsupported): Avoid the dangling else problem.
6772 (thread_stopped): Define.
6773 (pause_all): Define.
6774 (target_waitstatus_to_string): Declare.
6775 * target.c (target_waitstatus_to_string): New.
6776
6777 * tracepoint.c (tracing): Make extern.
6778 (disconnected_tracing): New.
6779 (stop_tracing): Make extern. Handle tracing stops due to GDB
6780 disconnecting.
6781 (cmd_qtdisconnected): New.
6782 (cmd_qtstatus): Report disconnected tracing status in trace reply.
6783 (handle_tracepoint_general_set): Handle QTDisconnected.
6784
6785 * event-loop.c (event_handler_func): Change return type to int.
6786 (process_event): Bail out if the event handler wants the event
6787 loop to stop.
6788 (handle_file_event): Ditto.
6789 (start_event_loop): Bail out if the event handler wants the event
6790 loop to stop.
6791
6792 * nto-low.c (nto_target_ops): Adjust.
6793 * spu-low.c (spu_wait): Don't remove the process here.
6794 (spu_target_ops): Adjust.
6795 * win32-low.c (win32_wait): Don't remove the process here.
6796 (win32_target_ops): Adjust.
6797
5d267c4c
PA
67982010-04-11 Pedro Alves <pedro@codesourcery.com>
6799
6800 * regcache.c (realloc_register_cache): Invalidate inferior's
6801 regcache before recreating it.
6802
623ccd72
PA
68032010-04-09 Pedro Alves <pedro@codesourcery.com>
6804
6805 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6806
219f2f23
PA
68072010-04-09 Stan Shebs <stan@codesourcery.com>
6808 Pedro Alves <pedro@codesourcery.com>
6809
6810 * server.h (LONGEST): New.
6811 (struct thread_info) <while_stepping>: New field.
6812 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6813 Declare.
6814 (initialize_tracepoint, handle_tracepoint_general_set)
6815 (handle_tracepoint_query, tracepoint_finished_step)
6816 (tracepoint_was_hit, release_while_stepping_state_list):
6817 (current_traceframe): Declare.
6818 * server.c (handle_general_set): Handle tracepoint packets.
6819 (read_memory): New.
6820 (write_memory): New.
6821 (handle_search_memory_1): Use read_memory.
6822 (handle_query): Report support for conditional tracepoints, trace
6823 state variables, and tracepoint sources. Handle tracepoint
6824 queries.
6825 (main): Initialize the tracepoints module.
6826 (process_serial_event): Handle traceframe reads/writes.
6827
6828 * linux-low.c (handle_tracepoints): New.
6829 (linux_wait_1): Call it.
6830 (linux_resume_one_lwp): Handle while-stepping.
6831 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6832 (linux_target_ops): Install them.
6833 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6834 New field.
6835 * linux-x86-low.c (x86_supports_tracepoints): New.
6836 (the_low_target). Install it.
6837
6838 * mem-break.h (delete_breakpoint): Declare.
6839 * mem-break.c (delete_breakpoint): Make external.
6840
6841 * target.h (struct target_ops): Add `supports_tracepoints',
6842 `read_pc', and `write_pc' fields.
6843 (target_supports_tracepoints): Define.
6844 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6845 (phex_nz): New.
6846
6847 * regcache.h (struct regcache) <registers_owned>: New field.
6848 (init_register_cache, regcache_cpy): Declare.
6849 (regcache_read_pc, regcache_write_pc): Declare.
6850 (register_cache_size): Declare.
6851 (supply_regblock): Declare.
6852 * regcache.c (init_register_cache): New.
6853 (new_register_cache): Use it.
6854 (regcache_cpy): New.
6855 (register_cache_size): New.
6856 (supply_regblock): New.
6857 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 6858
219f2f23
PA
6859 * tracepoint.c: New.
6860
6861 * Makefile.in (OBS): Add tracepoint.o.
6862 (tracepoint.o): New rule.
6863
3a13a53b
L
68642010-04-08 H.J. Lu <hongjiu.lu@intel.com>
6865
6866 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6867 (i386-mmx.o): New.
6868 (i386-mmx.c): Likewise.
6869 (i386-mmx-linux.o): Likewise.
6870 (i386-mmx-linux.c): Likewise.
6871
6872 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6873 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6874 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6875 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6876
6877 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6878 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6879 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6880
1570b33e
L
68812010-04-07 H.J. Lu <hongjiu.lu@intel.com>
6882
6883 * Makefile.in (clean): Updated.
6884 (i386-avx.o): New.
6885 (i386-avx.c): Likewise.
6886 (i386-avx-linux.o): Likewise.
6887 (i386-avx-linux.c): Likewise.
6888 (amd64-avx.o): Likewise.
6889 (amd64-avx.c): Likewise.
6890 (amd64-avx-linux.o): Likewise.
6891 (amd64-avx-linux.c): Likewise.
6892
6893 * configure.srv (srv_i386_regobj): Add i386-avx.o.
6894 (srv_i386_linux_regobj): Add i386-avx-linux.o.
6895 (srv_amd64_regobj): Add amd64-avx.o.
6896 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6897 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6898 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6899 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6900 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6901 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6902 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6903
6904 * i387-fp.c: Include "i386-xstate.h".
6905 (i387_xsave): New.
6906 (i387_cache_to_xsave): Likewise.
6907 (i387_xsave_to_cache): Likewise.
6908 (x86_xcr0): Likewise.
6909
6910 * i387-fp.h (i387_cache_to_xsave): Likewise.
6911 (i387_xsave_to_cache): Likewise.
6912 (x86_xcr0): Likewise.
6913
6914 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6915 * linux-crisv32-low.c (target_regsets): Likewise.
6916 * linux-m68k-low.c (target_regsets): Likewise.
6917 * linux-mips-low.c (target_regsets): Likewise.
6918 * linux-ppc-low.c (target_regsets): Likewise.
6919 * linux-s390-low.c (target_regsets): Likewise.
6920 * linux-sh-low.c (target_regsets): Likewise.
6921 * linux-sparc-low.c (target_regsets): Likewise.
6922 * linux-xtensa-low.c (target_regsets): Likewise.
6923
6924 * linux-low.c: Include <sys/uio.h>.
6925 (regsets_fetch_inferior_registers): Support nt_type.
6926 (regsets_store_inferior_registers): Likewise.
6927 (linux_process_qsupported): New.
6928 (linux_target_ops): Add linux_process_qsupported.
6929
6930 * linux-low.h (regset_info): Add nt_type.
6931 (linux_target_ops): Add process_qsupported.
6932
6933 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6934 and <sys/uio.h>.
6935 (init_registers_i386_avx_linux): New.
6936 (init_registers_amd64_avx_linux): Likewise.
6937 (xmltarget_i386_linux_no_xml): Likewise.
6938 (xmltarget_amd64_linux_no_xml): Likewise.
6939 (PTRACE_GETREGSET): Likewise.
6940 (PTRACE_SETREGSET): Likewise.
6941 (x86_fill_xstateregset): Likewise.
6942 (x86_store_xstateregset): Likewise.
6943 (use_xml): Likewise.
6944 (x86_linux_update_xmltarget): Likewise.
6945 (x86_linux_process_qsupported): Likewise.
6946 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6947 (x86_arch_setup): Don't call init_registers_amd64_linux nor
6948 init_registers_i386_linux here. Call
6949 x86_linux_update_xmltarget.
6950 (the_low_target): Add x86_linux_process_qsupported.
6951
6952 * server.c (handle_query): Call target_process_qsupported.
6953
6954 * target.h (target_ops): Add process_qsupported.
6955 (target_process_qsupported): New.
6956
fc7238bb
PA
69572010-04-03 Pedro Alves <pedro@codesourcery.com>
6958
6959 * inferiors.c (add_thread): Set last_status kind to
6960 TARGET_WAITKIND_IGNORE.
6961 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6962 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
6963 (linux_wait_1): Move `thread' local definition to block that uses
6964 it. Don't NULL initialize `event_child'.
6965 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6966 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6967 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6968
bdabb078
PA
69692010-04-01 Pedro Alves <pedro@codesourcery.com>
6970
6971 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6972 an extended waitstatus, or by a watchpoint.
6973 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6974 thread was stepping or has been stopped by a watchpoint.
6975
d3bbe7a0
PA
69762010-04-01 Pedro Alves <pedro@codesourcery.com>
6977
6978 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6979 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6980 of another, then delete the previous, and validate all
6981 breakpoints.
6982 (validate_inserted_breakpoint): New.
6983 (delete_disabled_breakpoints): New.
6984 (validate_breakpoints): New.
6985 (check_mem_read): Validate breakpoints before trusting their
6986 shadow. Delete disabled breakpoints.
6987 (check_mem_write): Validate breakpoints before trusting they
6988 should be inserted. Delete disabled breakpoints.
6989 * mem-break.h (validate_breakpoints):
6990 * server.c (handle_query): Validate breakpoints when we see a
6991 qSymbol query.
6992
8b07ae33
PA
69932010-04-01 Pedro Alves <pedro@codesourcery.com>
6994
6995 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6996 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
6997 if we could tell there's a GDB breakpoint at stop_pc.
6998 (need_step_over_p): Don't do a step over if we find a GDB
6999 breakpoint at the resume PC.
7000
7001 * mem-break.c (struct raw_breakpoint): New.
7002 (enum bkpt_type): New type `gdb_breakpoint'.
7003 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7004 fields. New field `raw'.
7005 (find_raw_breakpoint_at): New.
7006 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7007 breakpoint instead.
7008 (set_breakpoint_at): Adjust.
7009 (delete_raw_breakpoint): New.
7010 (release_breakpoint): New.
7011 (delete_breakpoint): Rename to...
7012 (delete_breakpoint_1): ... this. Add proc parameter. Use
7013 release_breakpoint. Return ENOENT.
7014 (delete_breakpoint): Reimplement.
7015 (find_breakpoint_at): Delete.
7016 (find_gdb_breakpoint_at): New.
7017 (delete_breakpoint_at): Delete.
7018 (set_gdb_breakpoint_at): New.
7019 (delete_gdb_breakpoint_at): New.
7020 (gdb_breakpoint_here): New.
7021 (set_reinsert_breakpoint): Use release_breakpoint.
7022 (uninsert_breakpoint): Rename to ...
7023 (uninsert_raw_breakpoint): ... this.
7024 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7025 (reinsert_raw_breakpoint): Change parameter type to
7026 raw_breakpoint.
7027 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7028 instead.
7029 (check_breakpoints): Adjust. Use release_breakpoint.
7030 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7031 (breakpoint_inserted_here): Ditto.
7032 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7033 Don't trust the breakpoint's shadow if it is not inserted.
7034 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7035 (delete_all_breakpoints): Adjust.
7036 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7037 use delete_breakpoint_1.
7038
7039 * mem-break.h (breakpoints_supported): Delete declaration.
7040 (set_gdb_breakpoint_at): Declare.
7041 (gdb_breakpoint_here): Declare.
7042 (delete_breakpoint_at): Delete.
7043 (delete_gdb_breakpoint_at): Declare.
7044
7045 * server.h (struct raw_breakpoint): Forward declare.
7046 (struct process_info): New field `raw_breakpoints'.
7047
7048 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7049 breakpoints.
7050
6bf5e0ba
PA
70512010-03-24 Pedro Alves <pedro@codesourcery.com>
7052
7053 * linux-low.c (status_pending_p_callback): Fix comment.
7054 (linux_wait_for_event_1): Move most of the internal breakpoint
7055 handling from here...
7056 (linux_wait_1): ... to here.
7057 (count_events_callback): New.
7058 (select_singlestep_lwp_callback): New.
7059 (select_event_lwp_callback): New.
7060 (cancel_breakpoints_callback): New.
7061 (select_event_lwp): New.
7062 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7063 priority to all LWPs that have had events that should be reported
7064 to the client. Cancel breakpoints when about to reporting the
7065 event to the client, not while stopping lwps. No longer cancel
7066 finished single-steps here.
7067 (cancel_finished_single_step): Delete.
7068 (cancel_finished_single_steps): Delete.
7069
414a389f
PA
70702010-03-24 Pedro Alves <pedro@codesourcery.com>
7071
7072 * mem-break.c (enum bkpt_type): New.
7073 (struct breakpoint): New field `type'.
7074 (set_breakpoint_at): Change return type to struct breakpoint
7075 pointer. Set type to `other_breakpoint' by default.
7076 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7077 in the breakpoint list.
7078 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7079 (reinsert_breakpoint): Rename to ...
7080 (reinsert_raw_breakpoint): ... this.
7081 (reinsert_breakpoints_at): Adjust.
7082 * mem-break.h (struct breakpoint): Declare.
7083 (set_breakpoint_at): Change return type to struct breakpoint
7084 pointer.
7085
2280c721
PA
70862010-03-24 Pedro Alves <pedro@codesourcery.com>
7087
7088 * server.c (handle_query): Assign, not compare.
7089
d50171e4
PA
70902010-03-24 Pedro Alves <pedro@codesourcery.com>
7091
7092 Teach linux gdbserver to step-over-breakpoints.
7093
7094 * linux-low.c (can_hardware_single_step): New.
7095 (supports_breakpoints): New.
7096 (handle_extended_wait): If stopping threads, read the stop pc of
7097 the new cloned LWP.
7098 (get_pc): New.
7099 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7100 low target doesn't support retrieving the PC.
7101 (add_lwp): Set last_resume_kind to resume_continue.
7102 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7103 (linux_attach): Don't clear stop_expected. Set the lwp's
7104 last_resume_kind to resume_stop.
7105 (linux_detach_one_lwp): Don't check for removed breakpoints.
7106 (check_removed_breakpoint): Delete.
7107 (status_pending_p): Rename to ...
7108 (status_pending_p_callback): ... this. Don't check for removed
7109 breakpoints. Don't consider threads that are stopped from GDB's
7110 perspective.
7111 (linux_wait_for_lwp): Always read the stop_pc here.
7112 (cancel_breakpoint): New.
7113 (step_over_bkpt): New global.
7114 (linux_wait_for_event_1): Implement stepping over breakpoints.
7115 (gdb_wants_lwp_stopped): New.
7116 (gdb_wants_all_stopped): New.
7117 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7118 single-step traps here. Store the thread's last reported target
7119 wait status.
7120 (send_sigstop): Don't clear stop_expected. Always set it,
7121 instead.
7122 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7123 (cancel_finished_single_step): New.
7124 (cancel_finished_single_steps): New.
7125 (wait_for_sigstop): Don't cancel finished single-step traps here.
7126 (linux_resume_one_lwp): Don't check for removed breakpoints.
7127 Don't set `step' on non-hardware step archs.
7128 (linux_set_resume_request): Ignore resume_stop requests if already
7129 stopping or stopped. Set the lwp's last_resume_kind.
7130 (resume_status_pending_p): Don't check for removed breakpoints.
7131 (need_step_over_p): New.
7132 (start_step_over): New.
7133 (finish_step_over): New.
7134 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7135 requests. Clear the thread's last reported target waitstatus.
7136 Don't use the `suspended' flag. Don't consider pending breakpoints.
7137 (linux_resume): Start a step-over if necessary.
7138 (proceed_one_lwp): New.
7139 (proceed_all_lwps): New.
7140 (unstop_all_lwps): New.
7141 * linux-low.h (struct lwp_info): Rewrite comment for the
7142 `suspended' flag. Add the `stop_pc' field. Delete the
7143 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7144 Add `'last_resume_kind' and `need_step_over' fields.
7145 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7146 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7147 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7148 (set_raw_breakpoint_at): New.
7149 (set_breakpoint_at): Rewrite to use it.
7150 (reinsert_breakpoint_handler): Delete.
7151 (set_reinsert_breakpoint): New.
7152 (reinsert_breakpoint_by_bp): Delete.
7153 (delete_reinsert_breakpoints): New.
7154 (uninsert_breakpoint): Rewrite.
7155 (uninsert_breakpoints_at): New.
7156 (reinsert_breakpoint): Rewrite.
7157 (reinsert_breakpoints_at): New.
7158 (check_breakpoints): Rewrite.
7159 (breakpoint_here): New.
7160 (breakpoint_inserted_here): New.
7161 (check_mem_read): Adjust.
7162 * mem-break.h (breakpoints_supported, breakpoint_here)
7163 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7164 (reinsert_breakpoint_by_bp): Delete declaration.
7165 (delete_reinsert_breakpoints): Declare.
7166 (reinsert_breakpoint): Delete declaration.
7167 (reinsert_breakpoints_at): Declare.
7168 (uninsert_breakpoint): Delete declaration.
7169 (uninsert_breakpoints_at): Declare.
7170 (check_breakpoints): Adjust prototype.
7171 * server.h: Adjust include order.
7172 (struct thread_info): Declare here. Add a `last_status' field.
7173
30ba68cb
MS
71742010-03-23 Michael Snyder <msnyder@vmware.com>
7175
7176 * server.c (crc32): New function.
7177 (handle_query): Add handling for 'qCRC:' request.
7178
b9a881c2
PA
71792010-03-23 Pedro Alves <pedro@codesourcery.com>
7180
7181 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7182 lwp had been stopped by a watchpoint.
7183
e92d13d5
PA
71842010-03-16 Pedro Alves <pedro@codesourcery.com>
7185
7186 * server.h (internal_error): Declare.
7187 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7188 * utils.c (internal_error): New function.
7189
64daa791
AS
71902010-03-15 Andreas Schwab <schwab@redhat.com>
7191
7192 * configure.srv: Fix typo setting srv_regobj.
7193
f52cd8cd
PA
71942010-03-15 Pedro Alves <pedro@codesourcery.com>
7195
7196 * linux-low.c (fetch_register): Avoid passing a non string literal
7197 format to `error'.
7198 (usr_store_inferior_registers): Ditto.
7199
93ae6fdc
PA
72002010-03-14 Pedro Alves <pedro@codesourcery.com>
7201
7202 * linux-low.c (linux_write_memory): Bail out early if peeking
7203 memory failed.
7204
c3adc08c
PA
72052010-03-14 Pedro Alves <pedro@codesourcery.com>
7206
7207 * linux-low.h (struct lwp_info): New fields
7208 `stopped_by_watchpoint' and `stopped_data_address'.
7209 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7210 here, and cache them in the lwp object.
7211 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7212 directly.
7213 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7214 field.
7215 (linux_stopped_by_watchpoint): Rewrite.
7216 (linux_stopped_data_address): Rewrite.
7217
bce522a2
PA
72182010-03-06 Simo Melenius <simo.melenius@iki.fi>
7219
7220 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7221 switching the current inferior, not before.
7222
90884b2b
L
72232010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7224
7225 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7226 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7227 i386-linux.c and amd64-linux.c.
7228 (reg-i386.o): Removed.
7229 (reg-i386.c): Likewise.
7230 (reg-i386-linux.o): Likewise.
7231 (reg-i386-linux.c): Likewise.
7232 (reg-x86-64.o): Likewise.
7233 (reg-x86-64.c): Likewise.
7234 (reg-x86-64-linux.o): Likewise.
7235 (reg-x86-64-linux.c): Likewise.
7236 (i386.o): New.
7237 (i386.c): Likewise.
7238 (i386-linux.o): Likewise.
7239 (i386-linux.c): Likewise.
7240 (amd64.o): Likewise.
7241 (amd64.c): Likewise.
7242 (amd64-linux.o): Likewise.
7243 (amd64-linux.c): Likewise.
7244
7245 * configure.srv (srv_i386_regobj): New.
7246 (srv_i386_linux_regobj): Likewise.
7247 (srv_amd64_regobj): Likewise.
7248 (srv_amd64_linux_regobj): Likewise.
7249 (srv_i386_32bit_xmlfiles): Likewise.
7250 (srv_i386_64bit_xmlfiles): Likewise.
7251 (srv_i386_xmlfiles): Likewise.
7252 (srv_amd64_xmlfiles): Likewise.
7253 (srv_i386_linux_xmlfiles): Likewise.
7254 (srv_amd64_linux_xmlfiles): Likewise.
7255 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7256 srv_xmlfiles to $srv_i386_xmlfiles.
7257 (i[34567]86-*-mingw32ce*): Likewise.
7258 (i[34567]86-*-mingw*): Likewise.
7259 (i[34567]86-*-nto*): Likewise.
7260 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7261 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7262 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7263 (x86_64-*-linux*): Likewise.
7264
7265 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7266 (init_registers_amd64_linux): New.
7267 (x86_arch_setup): Replace init_registers_x86_64_linux with
7268 init_registers_amd64_linux.
7269
193f13e6
MK
72702010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7271
7272 * configure.ac: Check for libdl. If it is not available link against
7273 static libthread_db.
7274 * configure: Regenerate.
7275
85d721b8
PA
72762010-02-22 Pedro Alves <pedro@codesourcery.com>
7277
7278 PR9605
7279
7280 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7281 handing a read watchpoint.
7282 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7283
6076632b
DE
72842010-02-12 Doug Evans <dje@google.com>
7285
7286 * linux-low.c (linux_supports_tracefork_flag): Document.
7287 (linux_look_up_symbols): Add comment.
7288
3327ccf7
L
72892010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7290
7291 * regcache.c (supply_register): Clear regcache if buf is NULL.
7292
0718675c 72932010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7294 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7295
7296 * inferiors.c (find_inferior): Add function documentation.
7297 (unloaded_dll): Handle the case where the unloaded dll has not
7298 been previously registered in the dll list.
7299
177321bd
DJ
73002010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7301
7302 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7303 (thumb2_breakpoint): New.
7304 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7305
2b009048
DJ
73062010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7307
7308 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7309 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7310 breakpoints.
7311
3be029c7
PA
73122010-01-21 Pedro Alves <pedro@codesourcery.com>
7313
7314 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7315
18f5de3b
JK
73162010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7317
7318 * linux-s390-low.c (s390_collect_ptrace_register)
7319 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7320
3743bb4f
DE
73212010-01-21 Doug Evans <dje@google.com>
7322
14ce3065
DE
7323 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7324 (PTRACE_ARG4_TYPE): New macro.
7325 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7326 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7327 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7328 (usr_store_inferior_registers): Ditto.
7329 (linux_read_memory, linux_write_memory): Ditto.
7330 (linux_test_for_tracefork): Ditto.
7331
3743bb4f
DE
7332 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7333 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7334
8b315be5
PA
73352010-01-21 Pedro Alves <pedro@codesourcery.com>
7336
7337 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7338 target.
7339
85492558
PA
73402010-01-21 Pedro Alves <pedro@codesourcery.com>
7341
7342 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7343 prototype to take a regcache. Adjust.
7344
442ea881
PA
73452010-01-20 Pedro Alves <pedro@codesourcery.com>
7346
7347 * regcache.h (struct thread_info): Forward declare.
7348 (struct regcache): New.
7349 (new_register_cache): Adjust prototype.
7350 (get_thread_regcache): Declare.
7351 (free_register_cache): Adjust prototype.
7352 (registers_to_string, registers_from_string): Ditto.
7353 (supply_register, supply_register_by_name, collect_register)
7354 (collect_register_as_string, collect_register_by_name): Ditto.
7355 * regcache.c (struct inferior_regcache_data): Delete.
7356 (get_regcache): Rename to ...
7357 (get_thread_regcache): ... this. Adjust. Switch inferior before
7358 fetching registers.
7359 (regcache_invalidate_one): Adjust.
7360 (regcache_invalidate): Fix prototype.
7361 (new_register_cache): Return the new register cache.
7362 (free_register_cache): Change prototype.
7363 (realloc_register_cache): Adjust.
7364 (registers_to_string): Change prototype to take a regcache. Adjust.
7365 (registers_from_string): Ditto.
7366 (register_data): Ditto.
7367 (supply_register): Ditto.
7368 (supply_register_by_name): Ditto.
7369 (collect_register): Ditto.
7370 (collect_register_as_string): Ditto.
7371 (collect_register_by_name): Ditto.
7372 * server.c (process_serial_event): Adjust.
7373 * linux-low.h (regset_fill_func, regset_store_func): Change
7374 prototype.
7375 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7376 Change prototype.
7377 * linux-low.c (get_stop_pc): Adjust.
7378 (check_removed_breakpoint): Adjust.
7379 (linux_wait_for_event): Adjust.
7380 (linux_resume_one_lwp): Adjust.
7381 (fetch_register): Add regcache parameter. Adjust.
7382 (usr_store_inferior_registers): Ditto.
7383 (regsets_fetch_inferior_registers): Ditto.
7384 (regsets_store_inferior_registers): Ditto.
7385 (linux_fetch_registers, linux_store_registers): Ditto.
7386 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7387 regcache. Adjust.
43aaf8b6
PA
7388 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7389 Ditto.
442ea881
PA
7390 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7391 prototype to take a regcache.
7392 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7393 * remote-utils.c (convert_ascii_to_int, outreg)
7394 (prepare_resume_reply): Change prototype to take a regcache.
7395 Adjust.
7396 * target.h (struct target_ops) <fetch_registers, store_registers>:
7397 Change prototype to take a regcache.
7398 (fetch_inferior_registers, store_inferior_registers): Change
7399 prototype to take a regcache. Adjust.
7400 * proc-service.c (ps_lgetregs): Adjust.
7401 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7402 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7403 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7404 take a regcache. Adjust.
7405 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7406 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7407 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7408 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7409 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7410 (cris_cannot_fetch_register):
7411 (cris_breakpoint_at): Change prototype to take a regcache.
7412 Adjust.
7413 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7414 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7415 to take a regcache. Adjust.
7416 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7417 Adjust.
7418 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7419 take a regcache. Adjust.
7420 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7421 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7422 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7423 * linux-mips-low.c (mips_get_pc):
7424 (mips_set_pc): Change prototype to take a regcache. Adjust.
7425 (mips_reinsert_addr): Adjust.
7426 (mips_collect_register): Change prototype to take a regcache.
7427 Adjust.
7428 (mips_supply_register):
7429 (mips_collect_register_32bit, mips_supply_register_32bit)
7430 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7431 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7432 * linux-ppc-low.c (ppc_supply_ptrace_register)
7433 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7434 (parse_spufs_run): Adjust.
7435 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7436 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7437 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7438 take a regcache. Adjust.
7439 * linux-s390-low.c (s390_collect_ptrace_register)
7440 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7441 (s390_set_pc): Change prototype to take a regcache. Adjust.
7442 (s390_arch_setup): Adjust.
7443 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7444 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7445 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7446 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7447 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7448 regcache. Adjust.
7449 (sparc_breakpoint_at): Adjust.
7450 * linux-xtensa-low.c (xtensa_fill_gregset):
7451 (xtensa_store_gregset):
7452 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7453 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7454 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7455 prototype to take a regcache. Adjust.
7456 * win32-arm-low.c (arm_fetch_inferior_register)
7457 (arm_store_inferior_register): Change prototype to take a
7458 regcache. Adjust.
7459 * win32-i386-low.c (i386_fetch_inferior_register)
7460 (i386_store_inferior_register): Change prototype to take a
7461 regcache. Adjust.
7462 * win32-low.c (child_fetch_inferior_registers)
7463 (child_store_inferior_registers): Change prototype to take a
7464 regcache. Adjust.
7465 (win32_wait): Adjust.
7466 (win32_fetch_inferior_registers): Change prototype to take a
7467 regcache. Adjust.
7468 (win32_store_inferior_registers): Adjust.
7469 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7470 store_inferior_register>: Change prototype to take a regcache.
7471
60c3d7b0
DE
74722010-01-20 Doug Evans <dje@google.com>
7473
7474 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7475 #ifdef.
7476 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7477 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7478
dc146f7c
VP
74792010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7480
7481 * linux-low.c (linux_core_of_thread): New.
7482 (compare_ints, show_process, list_threads): New.
7483 (linux_qxfer_osdata): Report threads and cores.
7484 (linux_target_op): Register linux_core_of_thread.
7485 * remote-utils.c (prepare_resume_reply): Report the core.
7486 (buffer_xml_printf): Support %d specifier.
7487 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7488 New.
7489 (handle_query): Handle qXfer:threads. Announce availability
7490 thereof.
7491 * target.h (struct target_ops): New field core_of_thread.
7492
7803799a
UW
74932010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7494
7495 * Makefile.in (clean): Remove new generated files.
7496 (reg-s390.o, reg-s390.c): Remove rules.
7497 (reg-s390x.o, reg-s390x.c): Likewise.
7498 (s390-linux32.o, s390-linux32.c): Add rules.
7499 (s390-linux64.o, s390-linux64.c): Likewise.
7500 (s390x-linux64.o, s390x-linux64.c): Likewise.
7501 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7502 * linux-s390-low.c: Include <elf.h>.
7503 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7504 (init_registers_s390): Remove prototype.
7505 (init_registers_s390x): Likewise.
7506 (init_registers_s390_linux32): Add prototype.
7507 (init_registers_s390_linux64): Likewise.
7508 (init_registers_s390x_linux64): Likewise.
7509 (s390_num_regs_3264): New define.
7510 (s390_regmap_3264): New global variable.
7511 (s390_cannot_fetch_register): Remove obsolete check.
7512 (s390_cannot_store_register): Likewise.
7513 (s390_collect_ptrace_register): Handle upper/lower register halves.
7514 (s390_supply_ptrace_register): Likewise.
7515 (s390_fill_gregset): Update to register number changes.
7516 (s390_get_hwcap): New routine.
7517 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7518 Install appropriate regmap and register set.
7519
6e7ffa39
JB
75202010-01-01 Joel Brobecker <brobecker@adacore.com>
7521
7522 * server.c (gdbserver_version): Update copyright year to 2010.
7523 * gdbreplay.c (gdbreplay_version): Likewise.
7524
957f3f49
DE
75252009-12-28 Doug Evans <dje@google.com>
7526
7527 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7528 elf/external.h. Include <elf.h> instead but only if necessary.
7529
ca5c370d
PA
75302009-12-28 Pedro Alves <pedro@codesourcery.com>
7531
7532 * linux-low.c (linux_remove_process): Remove `detaching'
7533 parameter. Don't release/detach from thread_db here.
7534 (linux_kill): Release/detach from thread_db here, ...
7535 (linux_detach): ... and here, before actually detaching.
7536 (linux_wait_1): ... and here, when a process exits.
7537 * thread-db.c (any_thread_of): New.
7538 (thread_db_free): Switch the current inferior to a thread of the
7539 passed in process.
7540
4ee62156
DE
75412009-12-21 Doug Evans <dje@google.com>
7542
d90e6a88
DE
7543 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7544
c5f62d5f
DE
7545 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7546 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7547 warning ifndef __NR_tkill. Move setting of errno there too.
7548 Delete unnecessary resetting of errno after syscall.
7549 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7550
10e86dd7
DE
7551 * configure.ac: Check for dladdr.
7552 * config.in: Regenerate.
7553 * configure: Regenerate.
7554 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7555 (try_thread_db_load): Update.
7556
4ee62156
DE
7557 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7558
00f515da
DE
75592009-12-18 Doug Evans <dje@google.com>
7560
e9464885
DE
7561 * event-loop.c: Include unistd.h if it exists.
7562
07d4f67e
DE
7563 * linux-low.c (my_waitpid): Move definition away from being in
7564 between linux_tracefork_child/linux_test_for_tracefork.
7565
00f515da
DE
7566 * gdb_proc_service.h (psaddr_t): Fix type.
7567 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7568 signature to match glibc.
7569
1de1badb
DE
75702009-12-16 Doug Evans <dje@google.com>
7571
7572 * linux-low.c (linux_read_memory): Fix argument to read.
7573
aeeb81d1
PA
75742009-11-26 Pedro Alves <pedro@codesourcery.com>
7575
7576 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7577 events, don't leave current_inferior pointing at null.
7578
10357975
PA
75792009-11-26 Pedro Alves <pedro@codesourcery.com>
7580
7581 * win32-low.c (LOG): Delete.
7582 (OUTMSG): Output to stderr.
7583 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7584 on compile time LOG macro.
7585 (win32_wait): Fix debug output.
7586
cf6e3471
PA
75872009-11-26 Pedro Alves <pedro@codesourcery.com>
7588
7589 * win32-low.c (win32_add_one_solib): If the dll name is
7590 "ntdll.dll", prepend the system directory to the dll path.
7591
0c85e18e
MK
75922009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7593
7594 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7595
9ac544ce 75962009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7597 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7598
7599 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7600 * configure.ac: Check for __mcoldfire__ and set
7601 gdb_cv_m68k_is_coldfire.
7602 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7603 reg-cf.o and reg-m68k.o.
7604 * configure: Regenerated.
7605
fd7dd3e6
PA
76062009-11-16 Pedro Alves <pedro@codesourcery.com>
7607
7608 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7609 Pass it to thread_db_free.
7610 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7611 proper `detaching' argument to linux_remove_process.
7612 * linux-low.h (thread_db_free): Add `detaching' parameter.
7613 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7614 to thread_db_free.
7615 (thread_db_free): Add `detaching' parameter. Only
7616 call td_ta_clear_event if detaching from process.
7617
75aa492e
MK
76182009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7619
7620 * thread-db.c (thread_db_free): Fix typo.
7621
21e1bee4
PP
76222009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7623
7624 PR gdb/10838
7625 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7626
8838b45e
NS
76272009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7628
7629 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7630 with an i686 compiler.
7631 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7632 needed.
7633 * configure: Rebuilt.
7634
8a35fb51
SL
76352009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7636
7637 PR gdb/10783
7638
7639 * server.c (handle_search_memory_1): Correct read_addr initialization
7640 in loop for searching subsequent chunks.
7641
96f15937
PP
76422009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7643
7644 * configure.ac: New --with-libthread-db option.
7645 * thread-db.c: Allow direct dependence on libthread_db.
7646 (thread_db_free): Adjust.
7647 * config.in: Regenerate.
7648 * configure: Likewise.
889bf7c5 7649
5f7d1694
PP
76502009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7651
7652 PR gdb/10757
7653 * thread-db.c (attach_thread): New function.
7654 (maybe_attach_thread): Return success/failure.
7655 (find_new_threads_callback): Adjust.
889bf7c5
PA
7656 (thread_db_find_new_threads): Loop until no new threads.
7657
88e3b899
PA
76582009-10-13 Pedro Alves <pedro@codesourcery.com>
7659
7660 * proc-service.c (ps_lgetregs): Formatting.
7661
cdbfd419
PP
76622009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7663
7664 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7665 * configure.ac: Adjust.
7666 * linux-low.h (struct process_info_private): Move members to struct
7667 thread_db.
7668 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7669 * linux-low.c (linux_remove_process): Adjust.
7670 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7671 * server.c (handle_query): Move code ...
7672 (handle_monitor_command): ... here. New function.
7673 * target.h (struct target_ops): New member.
7674 * thread-db.c (struct thread_db): New.
7675 (libthread_db_search_path): New variable.
7676 (thread_db_create_event, thread_db_enable_reporting)
7677 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7678 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7679 (try_thread_db_load_1, dladdr_to_soname): New functions.
7680 (try_thread_db_load, thread_db_load_search): New functions.
7681 (thread_db_init): Search for libthread_db.
7682 (thread_db_free): New function.
7683 (thread_db_handle_monitor_command): Likewise.
7684 * config.in: Regenerate.
7685 * configure: Regenerate.
889bf7c5 7686
4168d2d6
UW
76872009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7688
7689 * spu-low.c (spu_kill): Wait for inferior to terminate.
7690 Call clear_inferiors.
7691 (spu_detach): Call clear_inferiors.
7692
81ecdfbb
RW
76932009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7694
7695 * aclocal.m4: Regenerate.
7696 * config.in: Likewise.
7697 * configure: Likewise.
7698
0b9ff2c0
UW
76992009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7700
7701 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7702 (parse_spufs_run): New function.
7703 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7704 (ppc_breakpoint_at): Handle SPU breakpoints.
7705
efcbbd14
UW
77062009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7707
7708 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7709 (SPUFS_MAGIC): Define.
7710 (spu_enumerate_spu_ids): New function.
7711 (linux_qxfer_spu): New function.
7712 (linux_target_ops): Install linux_qxfer_spu.
7713
f4d9bade
UW
77142009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7715
7716 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7717 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7718 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7719 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7720 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7721 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7722 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7723 (init_registers_powerpc_cell32l): Add prototype.
7724 (init_registers_powerpc_cell64l): Likewise.
7725 (ppc_arch_setup): Detect Cell/B.E. architecture.
7726
96e946ca
RW
77272009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7728
7729 * Makefile.in (datarootdir): New variable.
7730
58d6951d
DJ
77312009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7732
7733 * linux-low.c (linux_write_memory): Update debugging output.
7734 * Makefile.in (clean): Add new descriptions.
7735 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7736 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7737 * configure.srv: Add new files for arm*-*-linux*.
7738 * linux-arm-low.c: Add new declarations.
7739 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7740 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7741 (HWCAP_VFPv3D16): New.
7742 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7743 instead of __IWMMXT__.
7744 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7745 (arm_arch_setup): New.
7746 (target_regsets): Remove #ifdef. Add VFP regset.
7747 (the_low_target): Use arm_arch_setup.
7748
12b42a12
DJ
77492009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7750
7751 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7752 the main thread again.
7753
ac8c974e
AR
77542009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7755
7756 Adding Neutrino gdbserver.
7757 * configure: Regenerated.
7758 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7759 * configure.srv (i[34567]86-*-nto*): New target.
7760 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7761 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7762 (nto_comctrl) [__QNX__]: New function.
7763 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7764
4424e0c3 77652009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7766
7767 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7768 srv_tgtobj.
7769
912cf4ba
PA
77702009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7771 Pedro Alves <pedro@codesourcery.com>
7772
7773 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7774 don't support CONTEXT_EXTENDED_REGISTERS.
7775 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7776 (the_low_target): Install them.
7777 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7778 failing with ERROR_PIPE_NOT_CONNECTED.
7779
aa5ca48f
DE
77802009-06-30 Doug Evans <dje@google.com>
7781 Pierre Muller <muller@ics.u-strasbg.fr>
7782
7783 Add h/w watchpoint support to x86-linux, win32-i386.
7784 * Makefile.in (SFILES): Add i386-low.c
7785 (i386_low_h): Define.
7786 (i386-low.o): Add dependencies.
7787 (linux-x86-low.o): Add i386-low.h dependency.
7788 (win32-i386-low.o): Ditto.
7789 * i386-low.c: New file.
7790 * i386-low.h: New file.
7791 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7792 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7793 * linux-low.c (linux_add_process): Initialize arch_private.
7794 (linux_remove_process): Free arch_private.
7795 (add_lwp): Initialize arch_private.
7796 (delete_lwp): Free arch_private.
7797 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7798 provided.
7799 * linux-low.h (process_info_private): New member arch_private.
7800 (lwp_info): New member arch_private.
7801 (linux_target_ops): New members new_process, new_thread,
7802 prepare_to_resume.
7803 (ptid_of): New macro.
7804 * linux-x86-low.c: Include stddef.h, i386-low.h.
7805 (arch_process_info): New struct.
7806 (arch_lwp_info): New struct.
7807 (x86_linux_dr_get, x86_linux_dr_set): New functions.
7808 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7809 (i386_dr_low_get_status): New function.
7810 (x86_insert_point, x86_remove_point): New functions.
7811 (x86_stopped_by_watchpoint): New function.
7812 (x86_stopped_data_address): New function.
7813 (x86_linux_new_process, x86_linux_new_thread): New functions.
7814 (x86_linux_prepare_to_resume): New function.
7815 (the_low_target): Add entries for insert_point, remove_point,
7816 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7817 prepare_to_resume.
7818 * server.c (debug_hw_points): New global.
7819 (monitor_show_help): Document set debug-hw-points.
7820 (handle_query): Process "set debug-hw-points".
7821 * server.h (debug_hw_points): Declare.
7822 (paddress): Declare.
7823 * utils.c (NUMCELLS, CELLSIZE): New macros.
7824 (get_sell, xsnprintf, paddress): New functions.
7825 * win32-arm-low.c (the_low_target): Add entries for insert_point,
7826 remove_point, stopped_by_watchpoint, stopped_data_address.
7827 * win32-i386-low.c: Include i386-low.h.
7828 (debug_reg_state): Replaces dr.
7829 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7830 (i386_dr_low_get_status): New function.
7831 (i386_insert_point, i386_remove_point): New functions.
7832 (i386_stopped_by_watchpoint): New function.
7833 (i386_stopped_data_address): New function.
7834 (i386_initial_stuff): Update.
7835 (get_thread_context,set_thread_context,i386_thread_added): Update.
7836 (the_low_target): Add entries for insert_point,
7837 remove_point, stopped_by_watchpoint, stopped_data_address.
7838 * win32-low.c (win32_insert_watchpoint): New function.
7839 (win32_remove_watchpoint): New function.
7840 (win32_stopped_by_watchpoint): New function.
7841 (win32_stopped_data_address): New function.
7842 (win32_target_ops): Add entries for insert_watchpoint,
7843 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7844 * win32-low.h (win32_target_ops): New members insert_point,
7845 remove_point, stopped_by_watchpoint, stopped_data_address.
7846
d993e290
PA
78472009-06-25 Pedro Alves <pedro@codesourcery.com>
7848
7849 * server.c (process_serial_event): Re-return unsupported, not
7850 error, if the type isn't recognized. Re-allow supporting only
7851 insert or remove packets. Also call require_running for
7852 breakpoints. Add missing break statement to default case. Tidy.
7853 * target.h (struct target_ops): Rename insert_watchpoint to
7854 insert_point, and remove_watchpoint to remove_point.
7855
7856 * linux-low.h (struct linux_target_ops): Likewise.
7857 * linux-low.c (linux_insert_watchpoint): Rename to ...
7858 (linux_insert_point): ... this. Adjust.
7859 (linux_remove_watchpoint): Rename to ...
7860 (linux_remove_point): ... this. Adjust.
7861 (linux_target_ops): Adjust.
7862 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7863 (cris_insert_point): ... this.
7864 (cris_remove_watchpoint): Rename to ...
7865 (cris_remove_point): ... this.
7866 (the_low_target): Adjust.
7867
0f54c268
PM
78682009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
7869
7870 * server.c (handle_v_kill): Pass signal_pid to
7871 kill_inferior if multi_process is zero.
7872
c6314022
AR
78732009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
7874
7875 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7876 * target.h (target_ops): Comment for *_watchpoint to make it clear
7877 the functions can get types '0' and '1'.
7878
4463ce24
AR
78792009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
7880
7881 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7882 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7883 * regcache.c (get_regcache): Likewise.
7884 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7885 * win32-low.c (child_fetch_inferior_registers): Remove check for
7886 regno 0.
7887
cf8fd78b
PA
78882009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
7889 Pedro Alves <pedro@codesourcery.com>
7890
7891 * target.h (struct target_ops) <supports_multi_process>: New
7892 callback.
7893 (target_supports_multi_process): New.
7894 * server.c (handle_query): Even if GDB reports support, only
7895 enable multi-process if the target also supports it. Report
7896 multi-process support only if the target backend supports it.
7897 * linux-low.c (linux_supports_multi_process): New function.
7898 (linux_target_ops): Install it as target_supports_multi_process
7899 callback.
7900
47c0c975
DE
79012009-05-24 Doug Evans <dje@google.com>
7902
e09875d4
DE
7903 Global renaming of find_thread_pid to find_thread_ptid.
7904 * server.h (find_thread_ptid): Renamed from find_thread_pid.
7905 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7906 All callers updated.
7907
e27d73f6
DE
7908 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7909 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7910 directly.
7911
47c0c975
DE
7912 * linux-low.c (get_stop_pc): Print pc if debug_threads.
7913 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7914 (linux_resume_one_lwp): Ditto.
7915
2acc282a
DE
79162009-05-23 Doug Evans <dje@google.com>
7917
7918 * linux-low.c (linux_resume_one_lwp): Change type of first arg
7919 from struct inferior_list_entry * to struct lwp_info *.
7920 All callers updated.
7921
9f1036c1
DE
79222009-05-13 Doug Evans <dje@google.com>
7923
7924 * linux-x86-low.c: Don't include assert.h.
7925 (x86_siginfo_fixup): Use fatal, not assert.
7926 (x86_arch_setup): Fix comment.
7927
d0722149
DE
79282009-05-12 Doug Evans <dje@google.com>
7929
7930 Biarch support for i386/amd64 gdbserver.
7931 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7932 Add linux-x86-low.c.
7933 (linux-i386-low.o, linux-x86-64-low.o): Delete.
7934 (linux-x86-low.o): Add.
7935 * linux-x86-64-low.c: Delete.
7936 * linux-i386-low.c: Delete.
7937 * linux-x86-low.c: New file.
7938 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7939 linux-x86-low.o.
7940 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7941 linux-x86-low.o.
7942 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7943 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7944 (linux_child_pid_to_exec_file): New function.
7945 (elf_64_header_p, elf_64_file_p): New functions.
7946 (siginfo_fixup): New function.
7947 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
7948 give target a chance to convert layout.
7949 * linux-low.h (linux_target_ops): New member siginfo_fixup.
7950 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7951
fdeb2a12
DE
79522009-05-07 Doug Evans <dje@google.com>
7953
7954 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7955 (regsets_store_inferior_registers): Ditto.
7956
a6dbe5df
PA
79572009-05-06 Pedro Alves <pedro@codesourcery.com>
7958
7959 PR server/10048
7960
7961 * linux-low.c (must_set_ptrace_flags): Delete.
7962 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7963 of the global.
7964 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
7965 `lwp->must_set_ptrace_flags' instead.
ba42693b 7966 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
7967 (linux_wait_1): ... not here.
7968
5091eb23
DE
79692009-04-30 Doug Evans <dje@google.com>
7970
9f767825
DE
7971 * inferiors.c (started_inferior_callback): New function.
7972 (attached_inferior_callback): New function.
7973 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7974 * server.c (print_started_pid, print_attached_pid): New functions.
7975 (detach_or_kill_for_exit): New function.
7976 (main): Call it instead of for_each_inferior (kill_inferior_callback).
7977 * server.h (have_started_inferiors_p): Declare.
7978 (have_attached_inferiors_p): Declare.
7979
5091eb23
DE
7980 * inferiors.c (remove_process): Fix memory leak, free process.
7981 * linux-low.c (linux_remove_process): New function.
7982 (linux_kill): Call it instead of remove_process.
7983 (linux_detach, linux_wait_1): Ditto.
7984
155c8968
PA
79852009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
7986
7987 * configure.srv: Add x86 Windows CE target.
7988
7fe519cb
UW
79892009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7990
7991 * inferiors.c (get_thread_process): Make global.
7992 * server.h (get_thread_process): Add prototype.
7993 * thread-db.c (find_one_thread): Use get_thread_process
7994 instead of current_process.
7995 (thread_db_get_tls_address): Do not crash if called when
7996 thread layer is not yet initialized.
7997
5472f405
UW
79982009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
7999
8000 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8001 * spu-low.c (current_tid): Rename to ...
8002 (current_ptid): ... this.
8003 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8004 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8005 ptid_get_lwp (current_ptid) instead of current_tid.
8006 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8007 instead of current_tid. Use find_process_pid to verify pid
8008 argument is valid. Pass proper argument to remove_process.
8009 (spu_thread_alive): Compare current_ptid instead of current_tid.
8010 (spu_resume): Likewise.
8011
55ac2b99
PA
80122009-04-02 Pedro Alves <pedro@codesourcery.com>
8013
8014 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8015 variable.
8016
95954743
PA
80172009-04-01 Pedro Alves <pedro@codesourcery.com>
8018
8019 Implement the multiprocess extensions, and add linux multiprocess
8020 support.
8021
8022 * server.h (ULONGEST): Declare.
8023 (struct ptid, ptid_t): New.
8024 (minus_one_ptid, null_ptid): Declare.
8025 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8026 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8027 (struct inferior_list_entry): Change `id' type from unsigned from
8028 to ptid_t.
8029 (struct sym_cache, struct breakpoint, struct
8030 process_info_private): Forward declare.
8031 (struct process_info): Declare.
8032 (current_process): Declare.
8033 (all_processes): Declare.
8034 (initialize_inferiors): Declare.
8035 (add_thread): Adjust to use ptid_t.
8036 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8037 (add_process, remove_process, find_thread_pid): Declare.
8038 (find_inferior_id): Adjust to use ptid_t.
8039 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8040 (multi_process): Declare.
8041 (push_event): Adjust to use ptid_t.
8042 (read_ptid, write_ptid): Declare.
8043 (prepare_resume_reply): Adjust to use ptid_t.
8044 (clear_symbol_cache): Declare.
8045 * inferiors.c (all_processes): New.
8046 (null_ptid, minus_one_ptid): New.
8047 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8048 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8049 (add_thread): Change unsigned long to ptid. Remove gdb_id
8050 parameter. Adjust.
8051 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8052 (gdb_id_to_thread): Rename to ...
8053 (find_thread_pid): ... this. Change unsigned long to ptid.
8054 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8055 (loaded_dll, pull_pid_from_list): Adjust.
8056 (add_process, remove_process, find_process_pid)
8057 (get_thread_process, current_process, initialize_inferiors): New.
8058 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8059 (struct target_waitstatus) <related_pid>: Ditto.
8060 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8061 return type to int.
8062 (struct target_ops) <join>: Add `pid' argument.
8063 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8064 (struct target_ops) <wait>: Add `ptid' field. Change return type
8065 to ptid.
8066 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8067 (mywait): Add `ptid' argument. Change return type to ptid_t.
8068 (target_pid_to_str): Declare.
8069 * target.c (set_desired_inferior): Adjust to use ptids.
8070 (mywait): Add new `ptid' argument. Adjust.
8071 (target_pid_to_str): New.
8072 * mem-break.h (free_all_breakpoints): Declare.
8073 * mem-break.c (breakpoints): Delelete.
8074 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8075 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8076 to use per-process breakpoint list.
8077 (free_all_breakpoints): New.
8078 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8079 (symbol_cache, all_symbols_looked_up): Delete.
8080 (hexchars): New.
8081 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8082 read_ptid): New.
8083 (prepare_resume_reply): Change ptid argument's type from unsigned
8084 long to ptid_t. Adjust. Implement W;process and X;process.
8085 (free_sym_cache, clear_symbol_cache): New.
8086 (look_up_one_symbol): Adjust to per-process symbol cache. *
8087 * server.c (cont_thread, general_thread, step_thread): Change type
8088 to ptid_t.
8089 (attached): Delete.
8090 (multi_process): New.
8091 (last_ptid): Change type to ptid_t.
8092 (struct vstop_notif) <ptid>: Change type to ptid_t.
8093 (queue_stop_reply, push_event): Change `ptid' argument's type to
8094 ptid_t.
8095 (discard_queued_stop_replies): Add `pid' argument.
8096 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8097 changes. Don't reference the `attached' global.
8098 (attach_inferior): Adjust to mywait interface changes.
8099 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8100 features. Handle and report "multiprocess+". Handle
8101 "qAttached:PID".
8102 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8103 changes.
8104 (handle_v_kill): New.
8105 (handle_v_stopped): Adjust to use target_pid_to_str.
8106 (handle_v_requests): Allow multiple attaches and runs when
8107 multiprocess extensions are in effect. Handle "vKill".
8108 (myresume): Adjust to use ptids.
8109 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8110 (handle_status): Adjust to discard_queued_stop_replies interface
8111 change.
8112 (first_thread_of, kill_inferior_callback)
8113 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8114 (main): Call initialize_inferiors. Adjust to use ptids, killing
8115 and detaching from all inferiors. Handle multiprocess packet
8116 variants.
8117 * linux-low.h: Include gdb_proc_service.h.
8118 (struct process_info_private): New.
8119 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8120 <lwpid_of>: Use ptid_get_lwp.
8121 (get_lwp_thread): Adjust.
8122 (struct lwp_info): Add `dead' member.
8123 (find_lwp_pid): Declare.
8124 * linux-low.c (thread_db_active): Delete.
8125 (new_inferior): Adjust comment.
8126 (inferior_pid): Delete.
8127 (linux_add_process): New.
8128 (handle_extended_wait): Adjust.
8129 (add_lwp): Change unsigned long to ptid.
8130 (linux_create_inferior): Add process to processes table. Adjust
8131 to use ptids. Don't set new_inferior here.
8132 (linux_attach_lwp): Rename to ...
8133 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8134 it. Adjust to use ptids.
8135 (linux_attach_lwp): New.
8136 (linux_attach): Add process to processes table. Don't set
8137 new_inferior here.
8138 (struct counter): New.
8139 (second_thread_of_pid_p, last_thread_of_process_p): New.
8140 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8141 multiple processes.
8142 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8143 processes. Remove process from process table.
8144 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8145 to multiple processes.
8146 (any_thread_of): New.
8147 (linux_detach): Add `pid' argument, and handle it. Remove process
8148 from processes table.
8149 (linux_join): Add `pid' argument. Handle it.
8150 (linux_thread_alive): Change unsighed long argument to ptid_t.
8151 Consider dead lwps as not being alive.
8152 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8153 threads we're not interested in.
8154 (same_lwp, find_lwp_pid): New.
8155 (linux_wait_for_lwp): Change `pid' argument's type from int to
8156 ptid_t. Adjust.
8157 (linux_wait_for_event): Rename to ...
8158 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8159 from int to ptid_t. Adjust.
8160 (linux_wait_for_event): New.
8161 (linux_wait_1): Add `ptid' argument. Change return type to
8162 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8163 that exit from the process table.
8164 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8165 Adjust.
8166 (mark_lwp_dead): New.
8167 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8168 stopping all threads, mark its main lwp as dead.
8169 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8170 ptids.
8171 (fetch_register, usr_store_inferior_registers)
8172 (regsets_fetch_inferior_registers)
8173 (regsets_store_inferior_registers, linux_read_memory)
8174 (linux_write_memory): Inline `inferior_pid'.
8175 (linux_look_up_symbols): Adjust to use per-process
8176 `thread_db_active'.
8177 (linux_request_interrupt): Adjust to use ptids.
8178 (linux_read_auxv): Inline `inferior_pid'.
8179 (initialize_low): Don't reference thread_db_active.
8180 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8181 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8182 (ps_getpid): Return the pid of the current inferior.
8183 * thread-db.c (proc_handle, thread_agent): Delete.
8184 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8185 per-process data.
8186 (find_one_thread): Change argument type to ptid_t. Adjust to
8187 per-process data.
8188 (maybe_attach_thread): Adjust to per-process data and ptids.
8189 (thread_db_find_new_threads): Ditto.
8190 (thread_db_init): Ditto.
8191 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8192 processes table. Adjust to use ptids.
8193 (spu_kill, spu_detach): Adjust interface. Remove process from
8194 processes table.
8195 (spu_join, spu_thread_alive): Adjust interface.
8196 (spu_wait): Adjust interface. Remove process from processes
8197 table. Adjust to use ptids.
8198 * win32-low.c (current_inferior_tid): Delete.
8199 (current_inferior_ptid): New.
8200 (debug_event_ptid): New.
8201 (thread_rec): Take a ptid. Adjust.
8202 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8203 (child_delete_thread): Ditto.
8204 (do_initial_child_stuff): Add `attached' argument. Add process to
8205 processes table.
8206 (child_fetch_inferior_registers, child_store_inferior_registers):
8207 Adjust.
8208 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8209 (win32_attach): Pass 1 to do_initial_child_stuff.
8210 (win32_kill): Adjust interface. Remove process from processes
8211 table.
8212 (win32_detach): Ditto.
8213 (win32_join): Adjust interface.
8214 (win32_thread_alive): Take a ptid.
8215 (win32_resume): Adjust to use ptids.
8216 (get_child_debug_event): Ditto.
8217 (win32_wait): Adjust interface. Remove exiting process from
8218 processes table.
8219
bd99dc85
PA
82202009-04-01 Pedro Alves <pedro@codesourcery.com>
8221
8222 Non-stop mode support.
8223
8224 * server.h (non_stop): Declare.
8225 (gdb_client_data, handler_func): Declare.
8226 (delete_file_handler, add_file_handler, start_event_loop):
8227 Declare.
8228 (handle_serial_event, handle_target_event, push_event)
8229 (putpkt_notif): Declare.
8230 * target.h (enum resume_kind): New.
8231 (struct thread_resume): Replace `step' field by `kind' field.
8232 (TARGET_WNOHANG): Define.
8233 (struct target_ops) <wait>: Add `options' argument.
8234 <supports_non_stop, async, start_non_stop>: New fields.
8235 (target_supports_non_stop, target_async): New.
8236 (start_non_stop): Declare.
8237 (mywait): Add `options' argument.
8238 * target.c (mywait): Add `options' argument. Print child exit
8239 notifications here.
8240 (start_non_stop): New.
8241 * server.c (non_stop, own_buf, mem_buf): New globals.
8242 (struct vstop_notif): New.
8243 (notif_queue): New global.
8244 (queue_stop_reply, push_event, discard_queued_stop_replies)
8245 (send_next_stop_reply): New.
8246 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8247 interface changes.
8248 (attach_inferior): In non-stop mode, don't wait for the target
8249 here.
8250 (handle_general_set): Handle QNonStop.
8251 (handle_query): When handling qC, return the current general
8252 thread, instead of the first thread of the list.
8253 (handle_query): If the backend supports non-stop mode, include
8254 QNonStop+ in the qSupported query response.
8255 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8256 and non-stop mode.
8257 (handle_v_attach, handle_v_run): Handle non-stop mode.
8258 (handle_v_stopped): New.
8259 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8260 (myresume): Adjust to use resume_kind. Handle non-stop.
8261 (queue_stop_reply_callback): New.
8262 (handle_status): Handle non-stop mode.
8263 (main): Clear non_stop flag on reconnection. Use the event-loop.
8264 Refactor serial protocol handling from here ...
8265 (process_serial_event): ... to this new function. When GDB
8266 selects any thread, select one here. In non-stop mode, wait until
8267 GDB acks all pending events before exiting.
8268 (handle_serial_event, handle_target_event): New.
8269 * remote-utils.c (remote_open): Install remote_desc in the event
8270 loop.
8271 (remote_close): Remove remote_desc from the event loop.
8272 (putpkt_binary): Rename to...
8273 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8274 (putpkt_binary): New as wrapper around putpkt_binary_1.
8275 (putpkt_notif): New.
8276 (prepare_resume_reply): In non-stop mode, don't change the
8277 general_thread.
8278 * event-loop.c: New.
8279 * Makefile.in (OBJ): Add event-loop.o.
8280 (event-loop.o): New rule.
8281
8282 * linux-low.h (pid_of): Moved here.
8283 (lwpid_of): New.
8284 (get_lwp_thread): Use lwpid_of.
8285 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8286 * linux-low.c (pid_of): Delete.
8287 (inferior_pid): Use lwpid_of.
8288 (linux_event_pipe): New.
8289 (target_is_async_p): New.
8290 (delete_lwp): New.
8291 (handle_extended_wait): Use lwpid_of.
8292 (add_lwp): Don't set lwpid field.
8293 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8294 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8295 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8296 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8297 first. Adjust to linux_wait_for_event interface changes. Use
8298 lwpid_of.
8299 (linux_detach): Don't delete the main lwp here.
8300 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8301 (status_pending_p): Don't consider explicitly suspended lwps.
8302 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8303 pointer. Add OPTIONS argument. Change return type to int. Use
8304 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8305 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8306 pointer. Add status pointer argument. Return a pid instead of a
8307 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8308 changes. In non-stop mode, don't switch to a random thread.
8309 (linux_wait): Rename to...
8310 (linux_wait_1): ... this. Add target_options argument, and handle
8311 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8312 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8313 clean exit and signal exit code. Don't stop all threads in
8314 non-stop mode. In all-stop mode, only stop all threads when
8315 reporting a stop to GDB. Handle explicit thread stop requests.
8316 (async_file_flush, async_file_mark): New.
8317 (linux_wait): New.
8318 (send_sigstop): Use lwpid_of.
8319 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8320 interface changes. In non-stop mode, don't switch to a random
8321 thread.
8322 (linux_resume_one_lwp): Use lwpid_of.
8323 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8324 (linux_resume_one_thread): ... this. Handle resume_stop. In
8325 non-stop mode, don't look for pending flag in all threads.
8326 (resume_status_pending_p): Don't consider explicitly suspended
8327 threads.
8328 (my_waitpid): Reimplement. Emulate __WALL.
8329 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8330 Use lwpid_of.
8331 (sigchld_handler, linux_supports_non_stop, linux_async)
8332 (linux_start_non_stop): New.
8333 (linux_target_ops): Register linux_supports_non_stop, linux_async
8334 and linux_start_non_stop.
8335 (initialize_low): Install SIGCHLD handler.
8336 * thread-db.c (thread_db_create_event, find_one_thread)
8337 (thread_db_get_tls_address): Use lwpid_of.
8338 * win32-low.c (win32_detach): Adjust to use resume_kind.
8339 (win32_wait): Add `options' argument.
8340 * spu-low.c (spu_resume): Adjust to use resume_kind.
8341 (spu_wait): Add `options' argument.
8342
5b1c542e
PA
83432009-04-01 Pedro Alves <pedro@codesourcery.com>
8344
8345 Decouple target code from remote protocol.
8346
8347 * target.h (enum target_waitkind): New.
8348 (struct target_waitstatus): New.
8349 (struct target_ops) <wait>: Return an unsigned long. Take a
8350 target_waitstatus pointer instead of a char pointer.
8351 (mywait): Likewise.
8352 * target.c (mywait): Change prototype to return an unsigned long.
8353 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8354 * server.h (thread_from_wait, old_thread_from_wait): Delete
8355 declarations.
8356 (prepare_resume_reply): Change prototype to take a
8357 target_waitstatus.
8358 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8359 (last_status, last_ptid): New.
8360 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8361 pid instead of a signal.
8362 (attach_inferior): Remove "status" and "signal" parameters.
8363 Adjust.
8364 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8365 not as an address.
8366 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8367 (handle_v_requests, myresume): Remove "status" and "signal"
8368 parameters. Adjust.
8369 (handle_status): New.
8370 (main): Delete local `status'. Adjust.
8371 * remote-utils.c: Include target.h.
8372 (prepare_resume_reply): Change prototype to take a
8373 target_waitstatus. Adjust.
8374
8375 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8376 interface.
8377 * spu-low.c (spu_wait): Adjust.
8378 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8379 Delete.
8380 (win32_wait): Adjust.
8381
2bd7c093
PA
83822009-04-01 Pedro Alves <pedro@codesourcery.com>
8383
8384 * target.h (struct thread_resume): Delete leave_stopped member.
8385 (struct target_ops): Add a `n' argument to the `resume' callback.
8386 * server.c (start_inferior): Adjust.
8387 (handle_v_cont, myresume): Adjust.
8388 * linux-low.c (check_removed_breakpoint): Adjust to resume
8389 interface change, and to removed leave_stopped field.
8390 (resume_ptr): Delete.
8391 (struct thread_resume_array): New.
8392 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8393 resume interface change.
8394 (linux_continue_one_thread, linux_queue_one_thread)
8395 (resume_status_pending_p): Check if the resume field is NULL
8396 instead of checking the leave_stopped member.
8397 (linux_resume): Adjust to the target resume interface change.
8398 * spu-low.c (spu_resume): Adjust to the target resume interface
8399 change.
8400 * win32-low.c (win32_detach, win32_resume): Ditto.
8401
c35fafde
PA
84022009-04-01 Pedro Alves <pedro@codesourcery.com>
8403
8404 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8405 flag.
8406 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8407 pending.
8408 (linux_continue_one_thread): Only preserve the stepping flag if
8409 there's a pending breakpoint.
8410
0a59d50b
PA
84112009-03-31 Pedro Alves <pedro@codesourcery.com>
8412
8413 * server.c (main): After the inferior having exited, call
8414 remote_close before exiting gdbserver.
8415
f04c6d38
TJB
84162009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8417
8418 Fix size of FPSCR in Power 7 processors.
8419 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8420 (PPC_FEATURE_HAS_DFP): New #define.
8421 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8422 size of the FPSCR.
8423
78e5cee6
PA
84242009-03-23 Pedro Alves <pedro@codesourcery.com>
8425
8426 * server.c (handle_query) Whitespace and formatting.
8427
1b3f6016
PA
84282009-03-22 Pedro Alves <pedro@codesourcery.com>
8429
8430 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8431 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8432 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8433 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8434 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8435 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8436 Makefile.in, configure.ac: Fix whitespace throughout.
8437 * configure: Regenerate.
8438
a07b2135
PA
84392009-03-22 Pedro Alves <pedro@codesourcery.com>
8440
8441 * inferiors.c (find_inferior): Make it safe for the callback
8442 function to delete the currently iterated inferior.
8443
67cc2626
PA
84442009-03-22 Pedro Alves <pedro@codesourcery.com>
8445
8446 * Makefile.in (linuw_low_h): Move higher.
8447 (thread-db.o): Depend on $(linux_low_h).
8448
54a0b537
PA
84492009-03-17 Pedro Alves <pedro@codesourcery.com>
8450
8451 Rename "process" to "lwp" throughout.
8452
8453 * linux-low.c (all_processes): Rename to...
8454 (all_lwps): ... this.
8455 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8456 (add_process): Rename to ...
8457 (add_lwp): ... this. Adjust.
8458 (linux_create_inferior): Adjust.
8459 (linux_attach_lwp): Adjust.
8460 (linux_attach): Adjust.
8461 (linux_kill_one_process): Rename to ...
8462 (linux_kill_one_lwp): ... this. Adjust.
8463 (linux_kill): Adjust.
8464 (linux_detach_one_process): Rename to ...
8465 (linux_detach_one_lwp): ... this. Adjust.
8466 (linux_detach): Adjust.
8467 (check_removed_breakpoint): Adjust.
8468 (status_pending_p): Adjust.
8469 (linux_wait_for_process): Rename to ...
8470 (linux_wait_for_lwp): ... this. Adjust.
8471 (linux_wait_for_event): Adjust.
8472 (send_sigstop): Adjust.
8473 (wait_for_sigstop): Adjust.
8474 (stop_all_processes): Rename to ...
8475 (stop_all_lwps): ... this.
8476 (linux_resume_one_process): Rename to ...
8477 (linux_resume_one_lwp): ... this. Adjust.
8478 (linux_set_resume_request, linux_continue_one_thread)
8479 (linux_queue_one_thread, resume_status_pending_p)
8480 (usr_store_inferior_registers, regsets_store_inferior_registers)
8481 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8482 Adjust.
8483 * linux-low.h (get_process): Rename to ...
8484 (get_lwp): ... this. Adjust.
8485 (get_thread_process): Rename to ...
8486 (get_thread_lwp): ... this. Adjust.
8487 (get_process_thread): Rename to ...
8488 (get_lwp_thread): ... this. Adjust.
8489 (struct process_info): Rename to ...
8490 (struct lwp_info): ... this.
8491 (all_processes): Rename to ...
8492 (all_lwps): ... this.
8493 * proc-service.c (ps_lgetregs): Adjust.
8494 * thread-db.c (thread_db_create_event, find_one_thread)
8495 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8496
0b16c5cf
PA
84972009-03-14 Pedro Alves <pedro@codesourcery.com>
8498
8499 * server.c (handle_query): Handle "qAttached".
8500
32de4b9d
NS
85012009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8502
8503 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8504 GPLv3, update license URL.
8505
2aecd87f
DE
85062009-03-01 Doug Evans <dje@google.com>
8507
93efd302 8508 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8509 (server_h): Add gdb_signals.h.
8510 (signals.o): Update.
8511 * server.h (target_signal_from_host,target_signal_to_host_p)
8512 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8513
86b1f9c5
PM
85142009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8515
8516 * remote-utils.c (getpkt): Also generate remote-debug
8517 information if noack_mode is set.
8518
4aa995e1
PA
85192009-02-06 Pedro Alves <pedro@codesourcery.com>
8520
8521 * server.c (handle_query): Report qXfer:siginfo:read and
8522 qXfer:siginfo:write as supported and handle them.
8523 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8524 * linux-low.c (linux_xfer_siginfo): New.
8525 (linux_target_ops): Set it.
8526
62709adf
PA
85272009-01-26 Pedro Alves <pedro@codesourcery.com>
8528
8529 * server.c (gdbserver_usage): Mention --remote-debug.
8530 (main): Accept '--remote-debug' switch.
8531
aef93bd7
DE
85322009-01-18 Doug Evans <dje@google.com>
8533
8534 * regcache.c (new_register_cache): No need to check result of xcalloc.
8535 * server.c (handle_search_memory): Back out calls to xmalloc,
8536 result is checked and error is returned to user upon failure.
8537 (handle_query): Ditto. Add more checks for result of malloc.
8538 (handle_v_cont): Check result of malloc, report error back to
8539 user upon failure.
8540 (handle_v_run): Ditto. Call freeargv.
8541 * server.h (freeargv): Declare.
8542 * utils.c (freeargv): New fn.
8543
54363045
DE
85442009-01-15 Doug Evans <dje@google.com>
8545
f626972c
DE
8546 * gdbreplay.c (perror_with_name): Make arg const char *.
8547 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8548 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8549 * utils.c (perror_with_name): Make arg const char *.
54363045 8550
18aae699
PA
85512009-01-14 Pedro Alves <pedro@codesourcery.com>
8552
8553 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8554 when handling a EXIT_PROCESS_DEBUG_EVENT.
8555
ff703abe
JB
85562009-01-06 Joel Brobecker <brobecker@adacore.com>
8557
8558 * gdbreplay.c (gdbreplay_version): Update copyright year.
8559 * server.c (gdbserver_version): Likewise.
8560
f21cc1a2 85612009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8562
8563 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8564 (handle_extended_wait): Improve comment.
0e21c1ec 8565
bca929d3
DE
85662008-12-13 Doug Evans <dje@google.com>
8567
8568 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8569 * server.h (ATTR_MALLOC): New macro.
8570 (xmalloc,xcalloc,xstrdup): Declare.
8571 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8572 * inferiors.c: Ditto.
8573 * linux-low.c: Ditto.
8574 * mem-break.c: Ditto.
8575 * regcache.c: Ditto.
8576 * remote-utils.c: Ditto.
8577 * server.c: Ditto.
8578 * target.c: Ditto.
8579 * win32-low.c: Ditto.
8580
97438e3f
DE
85812008-12-12 Doug Evans <dje@google.com>
8582
896c7fbb
DE
8583 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8584 in debugging printf.
8585
97438e3f
DE
8586 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8587
e3b886f8
DE
85882008-12-09 Doug Evans <dje@google.com>
8589
8590 * linux-low.h (struct process_info): Delete member tid, unused.
8591 * thread-db.c (find_one_thread): Update.
8592 (maybe_attach_thread): Update.
8593
07e059b5
VP
85942008-12-02 Pedro Alves <pedro@codesourcery.com>
8595
889bf7c5
PA
8596 * target.h (struct target_ops): Add qxfer_osdata member.
8597 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8598 and dirent.h.
8599 (linux_qxfer_osdata): New functions.
8600 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8601 callback.
8602 * server.c (handle_query): Handle "qXfer:osdata:read:".
8603 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8604 (buffer_xml_printf): New functions.
8605 * server.h (struct buffer): New.
8606 (buffer_grow_str, buffer_grow_str0): New macros.
8607 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8608 (buffer_xml_printf): Declare.
07e059b5 8609
4cab47ab
DE
86102008-11-24 Doug Evans <dje@google.com>
8611
8612 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8613
f142445f
DJ
86142008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8615
8616 * server.c (handle_v_run): Always use the supplied argument list.
8617
d0107bb6 86182008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8619
d0107bb6
BW
8620 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8621 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8622
2c4ad781
TJB
86232008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8624
8625 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8626 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8627 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8628 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8629 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8630 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8631 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8632 XML target descriptions.
8633 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8634 when inferior is running on an ISA 2.05 or later processor. Add
8635 special case to return offset for full 64-bit slot of FPSCR when
8636 in 32-bits.
8637
dfb64f85
DJ
86382008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8639
8640 * Makefile.in (SFILES, clean): Added sparc64 files.
8641 (reg-sparc64.o, reg-sparc64.c): New.
8642 * configure.srv (sparc*-*-linux*): New configuration.
8643 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8644 syscall arguments for SPARC.
8645 (regsets_store_inferior_registers): Likewise.
8646 * linux-sparc-low.c: New file.
8647
66b6e1dd
DE
86482008-10-21 Doug Evans <dje@google.com>
8649
8650 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8651 (READLINE_DIR,READLINE_DEP): Delete.
8652 (INTERNAL_CFLAGS): Update.
8653 (LINTFLAGS): Update.
8654
9b710a42
PA
86552008-10-10 Pedro Alves <pedro@codesourcery.com>
8656
8657 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8658 whole argv from the last run, not just argv[0].
8659
5822d809
PA
86602008-09-08 Pedro Alves <pedro@codesourcery.com>
8661
8662 * regcache.c (new_register_cache): Return NULL if the register
8663 cache size isn't known yet.
8664 (free_register_cache): Avoid dereferencing a NULL regcache.
8665
74aac56f
DJ
86662008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8667
8668 * configure.srv: Merge MIPS and MIPS64.
8669
400b20f5
MR
86702008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8671
8672 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8673
677c5bb1
LM
86742008-08-18 Luis Machado <luisgpm@br.ibm.com>
8675
8676 * Makefile.in: Add required vsx dependencies.
8677
8678 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8679 Declare init_registers_powerpc_vsx32l.
8680 Declare init_registers_powerpc_vsx64l.
8681 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8682 (ppc_arch_setup): Check for VSX in hwcap.
8683 (ppc_fill_vsxregset): New function.
8684 (ppc_store_vsxregset): New function.
8685 Add new VSX entry in regset_info target_regsets.
8686
8687 * configure.srv: Add new VSX dependencies.
8688
a6f3e723
SL
86892008-08-12 Pedro Alves <pedro@codesourcery.com>
8690
8691 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8692 (remote_open): Set or clear transport_is_reliable.
8693 (putpkt_binary): Don't expect acks in noack mode.
8694 (getpkt): Don't send ack/nac in noack mode.
8695 * server.c (handle_general_set): Handle QStartNoAckMode.
8696 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8697 qSupported.
8698 (main): Reset noack_mode on every connection.
8699 * server.h (noack_mode): Declare.
8700
a417dc56
RW
87012008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8702
8703 * Makefile.in (GDBREPLAY_OBS): New variable.
8704 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8705
3221518c
UW
87062008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8707 Daniel Jacobowitz <dan@codesourcery.com>
8708
8709 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8710 (usr_store_inferior_registers): Likewise.
8711 (regsets_store_inferior_registers): Likewise.
8712
ec56be1b
PA
87132008-07-31 Rolf Jansen <rj@surtec.com>
8714 Pedro Alves <pedro@codesourcery.com>
8715
8716 * configure.ac: Check for memmem declaration.
8717 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8718 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8719 (disable_packet_qfThreadInfo): Unconditionally compile.
8720 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8721 * configure, config.in: Regenerate.
8722
2fe5e3ff
DE
87232008-07-28 Doug Kwan <dougkwan@google.com>
8724
8725 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8726 (linux_write_memory): Remove declaration of errno.
8727
836acd6d
UW
87282008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8729
8730 * linux-low.c (handle_extended_wait): Do not use "status"
8731 variable uninitialized.
8732
aeba519e
PA
87332008-07-07 Pedro Alves <pedro@codesourcery.com>
8734
8735 * server.c (handle_v_attach): Inhibit reporting dll changes.
8736
db42f210
PA
87372008-06-27 Pedro Alves <pedro@codesourcery.com>
8738
8739 * remote-utils.c (prepare_resume_reply): If requested, don't
8740 output "thread:TID" in the T stop reply.
8741
8742 * server.c (disable_packet_vCont, disable_packet_Tthread)
8743 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8744 (handle_query): If requested, disable support for qC, qfThreadInfo
8745 and qsThreadInfo.
8746 (handle_v_requests): If requested, disable support for vCont.
8747 (gdbserver_show_disableable): New.
8748 (main): Handle --disable-packet and --disable-packet=LIST.
8749
8750 * server.h (disable_packet_vCont, disable_packet_Tthread)
8751 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8752
8e4c5421
CD
87532008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8754
8755 * server.c (gdbserver_usage): Mention --version.
8756
6e23a804
DJ
87572008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8758
8759 * Makefile.in (gdbreplay.o): New rule.
8760
90aa6a40
JM
87612008-06-06 Joseph Myers <joseph@codesourcery.com>
8762
8763 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8764 message, not gdbserver.
8765
c16158bc 87662008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8767 Nathan Sidwell <nathan@codesourcery.com>
8768 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8769
8770 * acinclude.m4: Include ../../config/acx.m4.
8771 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8772 * configure, config.in: Regenerate.
8773 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8774 * server.c (gdbserver_version): Print PKGVERSION.
8775 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8776 (main): Adjust gdbserver_usage calls.
8777 * gdbreplay.c (version, host_name): Add declarations.
8778 (gdbreplay_version, gdbreplay_usage): New.
8779 (main): Accept --version and --help options.
8780
aeb75bf5
DJ
87812008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
8782
8783 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8784 (arm_breakpoint_at): Handle Thumb.
8785 (the_low_target): Add comment.
8786
76b233dd
UW
87872008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
8788
8789 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8790
08388c79
DE
87912008-05-09 Doug Evans <dje@google.com>
8792
a3c83fae
DE
8793 * server.h (decode_search_memory_packet): Declare.
8794 * remote-utils.c (decode_search_memory_packet): New fn.
8795 * server.c (handle_search_memory_1): New fn.
08388c79
DE
8796 (handle_search_memory): New fn.
8797 (handle_query): Process qSearch:memory packets.
8798
bb9c3d36
UW
87992008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
8800
8801 * regcache.c (registers_length): Remove.
8802 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8803 full register packet.
8804 * regcache.h (registers_length): Remove prototype.
8805 * server.h (PBUFSIZ): Define to 16384.
8806
7284e1be
UW
88072008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
8808
8809 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8810 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8811 powerpc-64l.o, and powerpc-altivec64l.o.
8812 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8813 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8814 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8815 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8816 rs6000/power-linux.xml, and rs6000/power64-linux.xml
8817 to srv_xmlfiles.
8818
8819 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8820 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8821 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8822 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8823 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8824 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8825 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8826 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8827 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8828 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8829 (clean): Update.
8830
8831 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8832 (init_registers_powerpc_32l): ... this new prototype.
8833 (init_registers_powerpc_32): Remove, replace by ...
8834 (init_registers_powerpc_altivec32l): ... this new prototype.
8835 (init_registers_powerpc_e500): Remove, replace by ...
8836 (init_registers_powerpc_e500l): ... this new prototype.
8837 (init_registers_ppc64): Remove, replace by ...
8838 (init_registers_powerpc_64l): ... this new prototype.
8839 (init_registers_powerpc_64): Remove, replace by ...
8840 (init_registers_powerpc_altivec64l): ... this new prototype.
8841 (ppc_num_regs): Set to 73.
8842 (PT_ORIG_R3, PT_TRAP): Define if necessary.
8843 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8844 (ppc_cannot_store_register): Handle orig_r3 and trap.
8845 (ppc_arch_setup): Update init_registers_... calls.
8846 (ppc_fill_gregset): Handle orig_r3 and trap.
8847
8848 * inferiors.c (clear_inferiors): Reset current_inferior.
8849
fdc59709
PB
88502008-04-23 Paolo Bonzini <bonzini@gnu.org>
8851
889bf7c5
PA
8852 * acinclude.m4: Add override.m4.
8853 * configure: Regenerate.
fdc59709 8854
c9b2f845
UW
88552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8856
8857 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8858 initial call to init_register_ppc64.
8859
550512b8
UW
88602008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
8861
43aaf8b6
PA
8862 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8863 single powerpc*-*-linux* case.
550512b8
UW
8864 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8865
b6430ec3
UW
88662008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
8867
8868 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 8869 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
8870 from reg_xmlfiles.
8871 * linux-ppc-low.c: Include <elf.h>.
8872 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8873 (ppc_hwcap): New global variable.
8874 (ppc_regmap): Remove __SPE__ #ifdef sections.
8875 (ppc_regmap_e500): New global variable.
8876 (ppc_cannot_store_register): Update __SPE__ special case.
8877 (ppc_get_hwcap): New function.
8878 (ppc_arch_setup): Use it to determine whether inferior supports
8879 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
8880 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8881 Do not access registers if target does not support AltiVec.
8882 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8883 Do not access registers if target does not support SPE.
8884 (target_regsets): Unconditionally include AltiVec and SPE regsets.
8885
52fa2412
UW
88862008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
8887
8888 * linux-low.c (disabled_regsets, num_regsets): New.
8889 (use_regsets_p): Delete.
8890 (linux_wait_for_process): Clear disabled_regsets.
8891 (regsets_fetch_inferior_registers): Check and set it.
8892 (regsets_store_inferior_registers): Likewise.
8893 (linux_fetch_registers, linux_store_registers): Do not use
8894 use_regsets_p.
8895 (initialize_low): Allocate disabled_regsets.
8896
e28b3332
DJ
88972008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
8898
8899 * Makefile.in (LIBOBJS): New.
8900 (OBS): Use LIBOBJS.
8901 (memmem.o): New rule.
8902 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8903 * configure: Regenerated.
8904
4536995d
UW
89052008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
8906
8907 * server.c (handle_query): Never return "unsupported" for
8908 qXfer:features:read queries.
8909
221c031f
UW
89102008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
8911
8912 * server.c (get_features_xml): Fix inverted condition.
8913 (handle_query): Always support qXfer:feature:read.
8914
ccd213ac
DJ
89152008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
8916
8917 * server.c (wrapper_argv): New.
8918 (start_inferior): Handle wrapper_argv. If set, expect an extra
8919 trap.
8920 (gdbserver_usage): Document --wrapper.
8921 (main): Parse --wrapper.
8922
6fe305f7
UW
89232008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8924
8925 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8926 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8927 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8928 (ppc_set_pc): Likewise.
8929 (ppc_arch_setup): New function.
8930 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8931 of collect_register.
889bf7c5 8932 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 8933
5b0a002e
UW
89342008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8935
8936 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8937 instead of linux-ppc64-low.o.
8938 * linux-ppc64-low.c: Remove file.
8939 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8940 (linux-ppc64-low.o): Remove rule.
8941
8942 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8943 (init_registers_powerpc_64): Likewise.
8944 (ppc_regmap): Conditionally define depending on __powerpc64__.
8945 (ppc_cannot_store_register): Do not special-case "fpscr" when
8946 compiled on __powerpc64__.
8947 (ppc_collect_ptrace_register): New function.
8948 (ppc_supply_ptrace_register): New function.
8949 (ppc_breakpoint): Change type to "unsigned int".
8950 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8951 (the_low_target): Conditionally provide initializers for the
889bf7c5 8952 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
8953 collect_ptrace_register and supply_ptrace_register members.
8954
9b4b61c8
UW
89552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8956
8957 * regcache.h (gdbserver_xmltarget): Add extern declaration.
8958 * server.c (gdbserver_xmltarget): Define.
8959 (get_features_xml): Use it to replace "target.xml" and arch_string.
8960
8961 * configure.srv: Remove srv_xmltarget. Add XML files that were
8962 mentioned there to srv_xmlfiles instead. Remove conditional tests
8963 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8964 srv_xmlfiles and srv_regobj to include all possible choices.
8965 * configure.ac (srv_xmltarget): Remove.
8966 (srv_xmlfiles): Do not add "target.xml".
8967 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8968 checks for supplementary target information.
8969 * configure: Regenerate.
8970 * Makefile.in (XML_TARGET): Remove.
8971 (target.xml): Remove rule.
8972 (clean): Do not clean up target.xml.
8973 (.PRECIOUS): Do not mention target.xml.
8974
8975 * target.h (struct target_ops): Remove arch_string member.
8976 * linux-low.c (linux_arch_string): Remove.
8977 (linux_target_ops): Remove arch_string initializer.
8978 * linux-low.h (struct linux_target_ops): Remove arch_string member.
8979 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8980 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8981 * spu-low.c (spu_arch_string): Remove.
8982 (spu_target_ops): Remove arch_string initializer.
8983 * win32-low.c (win32_arch_string): Remove.
8984 (win32_target_ops): Remove arch_string initializer.
8985 * win32-low.h (struct win32_target_ops): Remove arch_string member.
8986 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8987 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8988
ee1a7ae4
UW
89892008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
8990
8991 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8992 by collect_ptrace_register and supply_ptrace_register hooks.
8993 * linux-low.c (fetch_register): Use supply_ptrace_register callback
8994 instead of checking for the_low_target.left_pad_xfer.
8995 (usr_store_inferior_registers): Use collect_ptrace_register callback
8996 instead of checking for the_low_target.left_pad_xfer.
8997
8998 * linux-s390-low.c (s390_collect_ptrace_register): New function.
8999 (s390_supply_ptrace_register): Likewise.
9000 (s390_fill_gregset): Call s390_collect_ptrace_register.
9001 (the_low_target): Update.
9002
9003 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9004 (ppc_supply_ptrace_register): Likewise.
9005 (the_low_target): Update.
9006
9007 * linux-i386-low.c (the_low_target): Update.
9008 * linux-x86-64-low.c (the_low_target): Update.
9009
d61ddec4
UW
90102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9011
9012 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9013 reg-s390.o and reg-s390x.o.
9014
9015 * linux-low.c (new_inferior): New global variable.
9016 (linux_create_inferior, linux_attach): Set it.
9017 (linux_wait_for_process): Call the_low_target.arch_setup after the
9018 target has stopped for the first time.
9019 (initialize_low): Do not call the_low_target.arch_setup.
9020
9021 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9022 (s390_set_pc): Likewise.
9023 (s390_arch_setup): New function.
9024 (the_low_target): Use s390_arch_setup as arch_setup routine.
9025
9026 * regcache.c (realloc_register_cache): New function.
9027 (set_register_cache): Call it for each existing regcache.
9028
d05b4ac3
UW
90292008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9030
9031 * server.h (init_registers): Remove prototype.
9032
9033 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9034 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9035 instead of init_registers ().
9036 * linux-arm-low.c (init_registers_arm): Add prototype.
9037 (init_registers_arm_with_iwmmxt): Likewise.
9038 (the_low_target): Add initializer for arch_setup field.
9039 * linux-cris-low.c (init_registers_cris): Add prototype.
9040 (the_low_target): Add initializer for arch_setup field.
9041 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9042 (the_low_target): Add initializer for arch_setup field.
9043 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9044 (the_low_target): Add initializer for arch_setup field.
9045 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9046 (the_low_target): Add initializer for arch_setup field.
9047 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9048 (the_low_target): Add initializer for arch_setup field.
9049 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9050 (the_low_target): Add initializer for arch_setup field.
9051 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9052 (init_registers_mips64_linux): Likewise.
9053 (the_low_target): Add initializer for arch_setup field.
9054 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9055 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9056 (the_low_target): Add initializer for arch_setup field.
9057 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9058 (init_registers_powerpc_64): Likewise.
9059 (the_low_target): Add initializer for arch_setup field.
9060 * linux-s390-low.c (init_registers_s390): Add prototype.
9061 (init_registers_s390x): Likewise.
9062 (the_low_target): Add initializer for arch_setup field.
9063 * linux-sh-low.c (init_registers_sh): Add prototype.
9064 (the_low_target): Add initializer for arch_setup field.
9065 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9066 (the_low_target): Add initializer for arch_setup field.
9067 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9068 (the_low_target): Add initializer for arch_setup field.
9069
9070 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9071 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9072 instead of init_registers ().
9073 * win32-arm-low.c (init_registers_arm): Add prototype.
9074 (the_low_target): Add initializer for arch_setup field.
9075 * win32-i386-low.c (init_registers_i386): Add prototype.
9076 (the_low_target): Add initializer for arch_setup field.
9077
9078 * spu-low.c (init_registers_spu): Add prototype.
9079 (initialize_low): Call initialie_registers_spu () instead of
9080 initialize_registers ().
9081
fd96d250
PA
90822008-02-19 Pedro Alves <pedro@codesourcery.com>
9083
9084 * server.c (handle_v_requests): When handling the vRun and vAttach
9085 packets, if already debugging a process, don't kill it. Return an
9086 error instead.
9087
d41b6bb4
DJ
90882008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9089
9090 * server.c (handle_query): Correct length check.
9091
5ac588cf
PA
90922008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9093
9094 * win32-low.c (do_initial_child_stuff): Add process handle
9095 parameter. Set current_process_handle and current_process_id from the
9096 parameters. Clear globals.
9097 (win32_create_inferior): Don't set current_process_handle and
9098 current_process_id here. Instead pass them on the call to
9099 do_initial_child_stuff.
9100 (win32_attach): Likewise.
9101 (win32_clear_inferiors): New.
9102 (win32_kill): Don't close the current process handle or the
9103 current thread handle here. Instead call win32_clear_inferiors.
9104 (win32_detach): Don't open a new handle to the process. Call
9105 win32_clear_inferiors.
9106 (win32_join): Don't rely on current_process_handle; open a new
9107 handle using the process id.
9108 (win32_wait): Call win32_clear_inferiors when the inferior process
9109 has exited.
9110
ecd7ecbc
DJ
91112008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9112
9113 * server.c (monitor_show_help): Add "exit".
9114
1525d545
MG
91152008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9116
ecd7ecbc 9117 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9118 (clean): Add reg-xtensa.c.
9119 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9120 * configure.srv (xtensa*-*-linux*) New target.
9121 * linux-xtensa-low.c: New.
9122 * xtensa-xtregs.c: New.
1525d545 9123
59a016f0
PA
91242008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9125
9126 * hostio.c: Don't include errno.h.
9127 (errno_to_fileio_errno): Move to hostio-errno.
9128 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9129 error number outputting to the target->hostio_last_error callback.
9130 (hostio_packet_error): Use FILEIO_EINVAL directly.
9131 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9132 calls to hostio_error.
9133 * hostio-errno.c: New.
9134 * server.h (hostio_last_error_from_errno): Declare.
9135 * target.h (target_ops): Add hostio_last_error member.
9136 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9137 as hostio_last_error handler.
889bf7c5 9138 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9139 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9140 (wince_hostio_last_error): New functions.
9141 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9142 as hostio_last_error handler.
9143 (win32_target_ops) [!_WIN32_WCE]: Register
9144 hostio_last_error_from_errno as hostio_last_error handler.
9145 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9146 (hostio-errno.o): New rule.
9147 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9148 * configure.srv (srv_hostio_err_objs): New variable. Default to
9149 hostio-errno.o.
9150 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9151 * configure: Regenerate.
9152
2d717e4f
DJ
91532008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9154
9155 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9156 (linux_kill, linux_detach): Clean up the process list.
9157 * remote-utils.c (remote_open): Improve port number parsing.
9158 (putpkt_binary, input_interrupt): Only send interrupts if the target
9159 is running.
9160 * server.c (extended_protocol): Make static.
9161 (attached): Define earlier.
9162 (exit_requested, response_needed, program_argv): New variables.
9163 (target_running): New.
9164 (start_inferior): Clear attached here.
9165 (attach_inferior): Set attached here.
9166 (require_running): Define.
9167 (handle_query): Use require_running and target_running. Implement
9168 "monitor exit".
9169 (handle_v_attach, handle_v_run): New.
9170 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9171 (gdbserver_usage): Update.
9172 (main): Redo argument parsing. Handle --debug and --multi. Handle
9173 --attach along with other options or after the port. Save
9174 program_argv. Support no initial program. Resynchronize
9175 communication with GDB after an error. Handle "monitor exit".
9176 Use require_running and target_running. Always allow the extended
9177 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9178 restart in extended mode.
9179 * README: Refer to the GDB manual. Update --attach usage.
9180
7407e2de
AS
91812007-12-20 Andreas Schwab <schwab@suse.de>
9182
9183 * linux-low.c (STACK_SIZE): Define.
9184 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9185 (linux_test_for_tracefork): Likewise.
9186
b65d95c5
DJ
91872007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9188
9189 * linux-low.c (linux_wait_for_event): Update messages. Do not
9190 reinsert auto-delete breakpoints.
9191 * mem-break.c (struct breakpoint): Change return type of handler to
9192 int.
9193 (set_breakpoint_at): Update handler type.
9194 (reinsert_breakpoint_handler): Return 1 instead of calling
9195 delete_breakpoint.
9196 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9197 setting a new one.
9198 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9199 * mem-break.h (set_breakpoint_at): Update handler type.
9200 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9201 * win32-low.c (auto_delete_breakpoint): New.
9202 (get_child_debug_event): Use it.
9203
4e799345
DJ
92042007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9205
9206 * configure.ac: Check for pread and pwrite.
9207 * hostio.c (handle_pread): Fall back to lseek and read.
9208 (handle_pwrite): Fall back to lseek and write.
9209 * config.in, configure: Regenerated.
9210
27524b67
DJ
92112007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9212
9213 * server.c (myresume): Add own_buf argument.
9214 (main): Update calls.
9215
a20d5e98
DJ
92162007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9217
9218 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9219 * remote-utils.c (remote_open): Do not call disable_async_io.
9220 (block_async_io): Delete.
9221 (unblock_async_io): Make static.
9222 (initialize_async_io): New.
9223 * server.c (handle_v_cont): Handle async I/O here.
9224 (myresume): Likewise. Move other common resume tasks here...
9225 (main): ... from here. Call initialize_async_io. Disable async
9226 I/O before the main loop.
9227 * server.h (initialize_async_io): Declare.
9228 (block_async_io, unblock_async_io): Delete prototypes.
9229 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9230
b79d787e
DJ
92312007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9232
9233 * remote-utils.c (readchar): Allow binary data in received messages.
9234
d97903b2
PA
92352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9236
9237 * win32-low.c (attaching): New global.
9238 (win32_create_inferior): Clear the `attaching' global.
9239 (win32_attach): Set the `attaching' global.
9240 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9241 attaching. Only set a breakpoint at the entry point if not
9242 attaching.
9243
311de423
PA
92442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9245
9246 * server.c (main): Don't report dll events on the initial
9247 connection on attaches.
9248
6c2d16d2
PA
92492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9250
9251 * server.c (main): Relax numerical bases supported for the pid of
9252 the --attach command line argument.
9253
5ca906e6
PA
92542007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9255
9256 * win32-low.c (win32_attach): Call OpenProcess before
9257 DebugActiveProcess, not after. Add last error output to error
9258 call.
9259
9c6c8194
PA
92602007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9261
9262 * win32-low.c (win32_get_thread_context)
9263 (win32_set_thread_context): New functions.
9264 (thread_rec): Use win32_get_thread_context.
9265 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9266 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9267 field.
9268
4d5d1aaa
PA
92692007-12-03 Leo Zayas
9270 Pedro Alves <pedro_alves@portugalmail.pt>
9271
9272 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9273 global variables.
9274 (child_add_thread): Minor cleanup.
9275 (child_continue): Resume artificially suspended threads before
9276 calling ContinueDebugEvent.
9277 (suspend_one_thread): New.
9278 (fake_breakpoint_event): New.
9279 (get_child_debug_event): Change return type to int. Check here if
9280 gdb sent an interrupt request. If a soft interrupt was requested,
9281 fake a breakpoint event. Return 0 if there is no event to handle,
9282 and 1 otherwise.
9283 (win32_wait): Don't check here if gdb sent an interrupt request.
9284 Ensure there is a valid event to handle.
9285 (win32_request_interrupt): Add soft interruption method as last
9286 resort.
9287
c436e841
PA
92882007-12-03 Leo Zayas
9289 Pedro Alves <pedro_alves@portugalmail.pt>
9290
9291 * win32-low.h (win32_thread_info): Add descriptions to the
9292 structure members. Replace `suspend_count' counter by a
9293 `suspended' flag.
9294 * win32-low.c (thread_rec): Update condition of when to get the
9295 context from the inferior. Rely on ContextFlags being set if it
9296 has already been retrieved. Only suspend the inferior thread if
9297 we haven't already. Warn if that fails.
9298 (continue_one_thread): s/suspend_count/suspended/. Only call
9299 ResumeThread once. Warn if that fails.
9300
e7b5fa67
PA
93012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9302
9303 * win32-low.c (win32_wait): Don't read from the inferior when it
9304 has already exited.
9305
a385171d
PA
93062007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9307
9308 * Makefile.in (win32_low_h): New variable.
9309 (win32-low.o): Add dependency on $(win32_low_h).
9310 (win32-arm-low.o, win32-i386-low.o): New rules.
9311
f80c84b3
DJ
93122007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9313
9314 * hostio.c: Correct copyright year.
9315
a6b151f1
DJ
93162007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9317
9318 * Makefile.in (OBS): Add hostio.o.
9319 (hostio.o): New rule.
9320 * server.h (handle_vFile): Declare.
9321 * hostio.c: New file.
9322 * server.c (handle_v_requests): Take packet_len and new_packet_len
9323 for binary packets. Call handle_vFile.
9324 (main): Update call to handle_v_requests.
9325
f9387fc3
DJ
93262007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9327
9328 * linux-low.c: Include <sched.h>.
9329
51c2684e
DJ
93302007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9331
9332 * linux-low.c (linux_tracefork_grandchild): New.
9333 (linux_tracefork_child): Use clone.
9334 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9335
75f83163
JB
93362007-10-31 Joel Brobecker <brobecker@adacore.com>
9337
9338 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9339
da5898ce
DJ
93402007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9341
9342 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9343
24a09b5f
DJ
93442007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9345
9346 * inferiors.c (change_inferior_id): Delete.
9347 (add_pid_to_list, pull_pid_from_list): New.
9348 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9349 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9350 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9351 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9352 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9353 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9354 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9355 (using_threads): Always set to 1.
9356 (handle_extended_wait): New.
9357 (add_process): Do not set TID.
9358 (linux_create_inferior): Set must_set_ptrace_flags.
9359 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9360 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9361 (linux_thread_alive): Rename TID argument to LWPID.
9362 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9363 (linux_wait_for_event): Do not use TID or check using_threads. Update
9364 call to dead_thread_notify. Call handle_extended_wait.
9365 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9366 (send_sigstop): Delete sigstop_sent.
9367 (wait_for_sigstop): Avoid TID.
9368 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9369 (linux_test_for_tracefork): New.
9370 (linux_lookup_signals): Use thread_db_active and
9371 linux_supports_tracefork_flag.
9372 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9373 * linux-low.h (get_process_thread): Avoid TID.
9374 (struct process_ifo): Move thread_known and tid to the end. Remove
9375 sigstop_sent.
9376 (linux_attach_lwp, thread_db_init): Update prototypes.
9377 * server.h (change_inferior_id): Delete prototype.
9378 (add_pid_to_list, pull_pid_from_list): New prototypes.
9379 * thread-db.c (thread_db_use_events): New.
9380 (find_first_thread): Rename to...
9381 (find_one_thread): ...this. Update callers and messages. Do not
9382 call fatal. Check thread_db_use_events. Do not call
9383 change_inferior_id or new_thread_notify.
9384 (maybe_attach_thread): Update. Do not call new_thread_notify.
9385 (thread_db_init): Set thread_db_use_events. Check use_events.
9386 * utils.c (fatal, warning): Correct message prefix.
9387
30ed0a8f
DJ
93882007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9389
9390 * Makefile.in (clean): Remove new files.
9391 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9392 (powerpc-64.o, powerpc-64.c): New rules.
9393 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9394 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9395 with SPE.
9396 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9397 SPE targets.
9398 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9399 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9400 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9401 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9402 (target_regsets): Add AltiVec and SPE register sets.
9403 * configure.ac: Check for AltiVec and SPE.
9404 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9405 (ppc_fill_vrregset, ppc_store_vrregset): New.
9406 (target_regsets): Add AltiVec register set.
9407 * configure: Regenerated.
9408
fd462a61
DJ
94092007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9410
9411 * linux-low.c (O_LARGEFILE): Define.
9412 (linux_read_memory): Use /proc/PID/mem.
9413 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9414 * configure, config.in: Regenerated.
9415
69f223ed
DJ
94162007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9417
9418 * linux-low.c (linux_wait_for_event): Do not pass signals while
9419 single-stepping.
9420
aec18585
PA
94212007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9422
9423 * win32-low.c (create_process): New.
9424 (win32_create_inferior): Use create_process instead of
9425 CreateProcess. If create_process failed retry appending an ".exe"
9426 suffix. Store the GetLastError result immediatelly after
9427 create_process calls and use it on the call to error.
9428
34d86ddd
PA
94292007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9430
9431 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9432
5a0e3bd0
JB
94332007-08-23 Joel Brobecker <brobecker@adacore.com>
9434
9435 * configure.ac: Switch license to GPLv3.
9436
f88c79e6
MS
94372007-08-01 Michael Snyder <msnyder@access-company.com>
9438
9439 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9440
6b3d9b83
PA
94412007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9442
9443 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9444 typedef.
9445 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9446 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9447 CloseToolhelp32Snapshot.
9448 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9449 CloseToolhelp32Snapshot.
9450
c588c53c
MS
94512007-07-27 Michael Snyder <michael.snyder@access-company.com>
9452
9453 * server.c (main): Check for inferior exit before main loop.
9454
aa0403d9
PA
94552007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9456
9457 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9458 instead of on tmp_desc.
9459
255e7678
DJ
94602007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9461 Daniel Jacobowitz <dan@codesourcery.com>
9462
9463 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9464 (add_thread): Minor cleanups.
9465 (clear_inferiors): Move lower in the file. Clear the DLL
9466 list.
9467 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9468 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9469 (xml_escape_text): New.
9470 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9471 for qSupported.
9472 (handle_v_cont): Report errors.
9473 (gdbserver_version): Update.
9474 (main): Correct size of own_buf. Do not report initial DLL events.
9475 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9476 (unloaded_dll, xml_escape_text): New.
9477 * win32-low.c (enum target_waitkind): Update comments.
9478 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9479 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9480 (win32_EnumProcessModules, win32_GetModuleInformation)
9481 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9482 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9483 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9484 (win32_Module32First, win32_Module32Next, load_toolhelp)
9485 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9486 (get_child_debug_event): Handle DLL events.
9487 (win32_wait): Likewise.
9488
0d37add9
DJ
94892007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9490
9491 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9492 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9493
45e2715e
PA
94942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9495
9496 * win32-low.c (handle_output_debug_string): Ignore event if not
9497 waiting.
9498
c5674cf1
PA
94992007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9500
9501 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9502
2bbe3cc1
DJ
95032007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9504
9505 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9506
ae13219e
DJ
95072007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9508
9509 * inferiors.c (change_inferior_id): Add comment.
9510 * linux-low.c (check_removed_breakpoint): Add an early
9511 prototype. Improve debug output.
9512 (linux_attach): Doc update.
9513 (linux_detach_one_process, linux_detach): Clean up before releasing
9514 each process.
9515 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9516 * linux-low.h (struct process_info): Doc improvement.
9517 * mem-break.c (delete_all_breakpoints): New.
9518 * mem-break.h (delete_all_breakpoints): New prototype.
9519 * thread-db.c (find_first_thread): New.
9520 (thread_db_create_event): Call it instead of
9521 thread_db_find_new_threads. Clean up unused variables.
9522 (maybe_attach_thread): Remove first thread handling.
9523 (thread_db_find_new_threads): Use find_first_thread.
9524 (thread_db_get_tls_address): Likewise.
9525
4105de34
DJ
95262007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9527
9528 * thread-db.c (thread_db_find_new_threads): Add prototype.
9529 (thread_db_create_event): Check for the main thread before adding
9530 a new thread.
9531 (maybe_attach_thread): Only enable event reporting if TID == 0.
9532 (thread_db_get_tls_address): Check for new threads.
9533
2b876972
DJ
95342007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9535
9536 * linux-low.c (linux_create_inferior): Try execv before execvp.
9537 * spu-low.c (spu_create_inferior): Likewise.
9538
7a245884
DJ
95392007-06-13 Mike Frysinger <vapier@gentoo.org>
9540
9541 * linux-low.c (linux_create_inferior): Change execv to execvp.
9542 * spu-low.c (spu_create_inferior): Likewies.
9543
117ce543
DJ
95442007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9545
9546 * Makefile.in (clean): Clean new files instead of deleted ones.
9547 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9548 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9549 rules.
9550 * configure.srv: Specify XML files and new regformats for MIPS and
9551 MIPS64 GNU/Linux.
9552 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9553 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9554 an entry for the restart register.
9555 (mips_cannot_fetch_register, mips_cannot_store_register)
9556 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9557 register names to match the XML descriptions.
9558 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9559 restart register instead of $0.
9560
0e7f50da
UW
95612007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9562 Markus Deuling <deuling@de.ibm.com>
9563
9564 * remote-utils.c (decode_xfer_write): New function.
9565 * server.h (decode_xfer_write): Add prototype.
9566 * server.c (handle_query): Add PACKET_LEN argument. Support
9567 qXfer:spu:read and qXfer:spu:write packets.
9568 (main): Pass packet_len to handle_query.
9569 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9570 * target.h (target_ops): Add qxfer_spu.
9571
374c1d38
UW
95722007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9573
9574 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9575 accessing non-seekable spufs files.
9576
bb63802a
UW
95772007-05-16 Markus Deuling <deuling@de.ibm.com>
9578
889bf7c5 9579 * server.c (handle_query): Add reply for qC packet.
bb63802a 9580
7390519e
PA
95812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9582 Leo Zayas <lerele@champenstudios@com>
9583
9584 * server.h (check_remote_input_interrupt_request): New function.
9585 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9586 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9587 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9588 (check_remote_input_interrupt_request): New function.
9589 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9590 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9591 winapi_GenerateConsoleCtrlEvent): New typedefs.
9592 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9593 to 250 ms.
9594 (win32_wait): Check for remote interrupt request
9595 with check_remote_input_interrupt_request.
9596 (win32_request_interrupt): New function.
9597 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9598
34b34921
PA
95992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9600
9601 * win32-low.c (debug_registers_changed,
9602 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9603 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9604 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9605 (thread_rec): Get context using the low target.
9606 (child_add_thread): Call thread_added on the low target,
9607 which does the same thing.
9608 (regptr): Delete.
9609 (do_initial_child_stuff): Remove debug registers references.
9610 Set context using the low target. Resume threads after
9611 setting the contexts.
9612 (child_continue): Remove dead variable. Remove debug
9613 registers references.
9614 (child_fetch_inferior_registers): Go through the low target.
9615 (do_child_store_inferior_registers): Remove.
9616 (child_store_inferior_registers): Go through the low target.
9617 (win32_resume): Remove debug registers references.
9618 Set context using the low target.
9619 (handle_exception): Change return type to void. Don't record
9620 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9621 first chance exception.
889bf7c5 9622 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9623 goto loop. Always return after waiting for debug event.
9624 (win32_wait): Convert to switch statement. Handle spurious
9625 events.
9626
9627 * win32-i386-low.c (debug_registers_changed,
9628 debug_registers_used): New.
9629 (initial_stuff): Rename to ...
9630 (i386_initial_stuff): ... this. Clear debug registers
9631 state variables.
9632 (store_debug_registers): Delete.
9633 (i386_get_thread_context): New.
9634 (load_debug_registers): Delete.
9635 (i386_set_thread_context): New.
9636 (i386_thread_added): New.
9637 (single_step): Rename to ...
9638 (i386_single_step): ... this.
9639 (do_fetch_inferior_registers): Rename to ...
9640 (i386_fetch_inferior_register): ... this.
9641 (i386_store_inferior_register): New.
9642 (the_low_target): Adapt to new interface.
9643
9644 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9645 (arm_get_thread_context): New.
9646 (arm_set_thread_context): New.
9647 (regptr): New.
9648 (do_fetch_inferior_registers): Rename to ...
9649 (arm_fetch_inferior_register): ... this.
9650 (arm_store_inferior_register): New.
9651 (arm_wince_breakpoint): Reimplement as unsigned long.
9652 (arm_wince_breakpoint_len): Define.
9653 (the_low_target): Adapt to new interface.
9654
9655 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9656 load_debug_registers. Add get_thread_context, set_thread_context,
9657 thread_added and store_inferior_register. Rename
9658 fetch_inferior_registers to fetch_inferior_register.
9659 (regptr): Remove declaration.
9660
dd6953e1
PA
96612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9662
9663 * linux-low.c (linux_detach): Change return type to int. Return 0.
9664 * spu-low.c (spu_detach): Likewise.
9665
444d6139
PA
96662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9667
9668 * target.h (target_ops): Change return type of detach to int.
9669 Add join.
9670 (join_inferior): New.
9671 * server.c (main): Don't skip detach support on mingw32.
9672 If the inferior doesn't support detaching return error.
9673 Call join_inferior instead of using waitpid.
9674 * linux-low.c (linux_join): New.
9675 (linux_target_op): Add linux_join.
9676 * spu-low.c (spu_join): New.
9677 (spu_target_ops): Add spu_join.
9678 * win32-low.c (win32_detach): Adapt to new interface.
9679 Reopen current_process_handle before detaching. Issue a child
9680 resume before detaching.
9681 (win32_join): New.
9682 (win32_target_op): Add win32_join.
9683
1d5315fe
PA
96842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9685
9686 * win32-low.c (win32-attach): Fix return value.
9687 * target.h (target_ops): Describe ATTACH return values.
9688
bf914831
PA
96892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9690
9691 * win32-low.c (GETPROCADDRESS): Define.
9692 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9693 (winapi_DebugSetProcessKillOnExit): Likewise.
9694 (win32_create_inferior): Force usage of ansi CreateProcessA.
9695 (win32_attach): Use GETPROCADDRESS.
9696 (win32_detach): Likewise.
9697
f72f3e60
PA
96982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9699
9700 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9701
ed50f18f
PA
97022007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9703
9704 * win32-low.c: Commit leftover changes from 2007-03-29.
9705
0c2ead7e
DJ
97062007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9707
9708 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9709 fields short instead of int. Add explicit padding.
9710 (i387_cache_to_fsave): Remove unnecessary casts.
9711 (i387_fsave_to_cache): Doc fix.
9712 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9713
73725ff3
DJ
97142007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9715
9716 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9717 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9718
d99f33d8
PA
97192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9720
9721 * configure.srv (arm*-*-mingw32ce*): Move near the other
9722 arm targets.
9723
68070c10
PA
97242007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9725
2482afc6 9726 * configure.ac: Add errno checking.
68070c10
PA
9727 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9728 sys/file.h and malloc.h.
9729 (AC_CHECK_DECLS): Add perror.
9730 (srv_mingwce): Handle.
2482afc6 9731 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9732 win32-i386-low.o to srv_tgtobj.
9733 (i[34567]86-*-mingw*): Likewise.
9734 (arm*-*-mingw32ce*): Add case.
9735 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9736 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9737 [__MINGW32CE__] (strerror): New function.
9738 [__MINGW32CE__] (errno): Define to GetLastError.
9739 [__MINGW32CE__] (COUNTOF): New macro.
9740 (remote_open): Remove extra close call.
9741 * mem-break.c (delete_breakpoint_at): New function.
9742 * mem-break.h (delete_breakpoint_at): Declare.
9743 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9744 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9745 [USE_WIN32API] (read, write): Add char* casts.
9746 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9747 * server.h: Include wincecompat.h on Windows CE.
9748 [HAVE_ERRNO_H]: Check.
9749 (perror): Declare if not declared.
9750 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9751 (perror_with_name): Remove errno declaration.
9752 * wincecompat.h: New.
9753 * wincecompat.c: New.
9754 * win32-low.h: New.
9755 * win32-arm-low.c: New.
9756 * win32-i386-low.c: New.
9757 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9758 (OUTMSG2): Make it safe.
9759 (_T): New macro.
9760 (COUNTOF): New macro.
9761 (NUM_REGS): Get it from the low target.
9762 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9763 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9764 (thread_rec): Let low target handle debug registers.
9765 (child_add_thread): Likewise.
9766 (child_init_thread_list): Likewise.
9767 (continue_one_thread): Likewise.
9768 (regptr): New.
9769 (do_child_fetch_inferior_registers): Move to ...
9770 * win32-i386-low.c: ... here, and rename to ...
9771 (do_fetch_inferior_registers): ... this.
889bf7c5 9772 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9773 Go through the low target.
9774 (do_child_store_inferior_registers): Use regptr.
9775 (strwinerror): New function.
9776 (win32_create_inferior): Handle Windows CE.
9777 Use strwinerror instead of strerror on Windows error
9778 codes. Add program to the error output.
9779 Don't close the main thread handle on Windows CE.
9780 (win32_attach): Use coredll.dll on Windows CE.
9781 (win32_kill): Close current process and current
9782 thread handles.
9783 (win32_detach): Use coredll.dll on Windows CE.
9784 (win32_resume): Let low target handle debug registers, and
9785 step request.
9786 (handle_exception): Add/Remove initial breakpoint. Avoid
9787 non-existant WSTOPSIG on Windows CE.
9788 (win32_read_inferior_memory): Cast to remove warning.
9789 (win32_arch_string): Go through the low target.
9790 (initialize_low): Call set_breakpoint_data with the low
9791 target's breakpoint.
9792 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9793 FOP_REGNUM, mappings): Move to ...
9794 * win32-i386-low.c: ... here.
9795 * win32-low.c (win32_thread_info): Move to ...
9796 * win32-low.h: ... here.
9797 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9798 win32-arm-low.c and wincecompat.c.
9799 (all:): Add $EXEEXT.
9800 (install-only:): Likewise.
9801 (gdbserver:): Likewise.
9802 (gdbreplay:): Likewise.
9803 * config.in: Regenerate.
9804 * configure: Regenerate.
9805
41093d81
PA
98062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9807
9808 * win32-low.c: Rename typedef thread_info to
9809 win32_thread_info throughout.
9810
544afa54
PA
98112007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
9812
9813 * win32-i386-low.c: Rename to ...
9814 * win32-low.c: ... this.
9815 * configure.srv: Replace win32-i386-low.o with win32-low.o.
9816 * Makefile.in: Likewise.
9817
bce7165d
PA
98182007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
9819
9820 * remote-utils.c (monitor_output): Constify msg parameter.
9821 * server.h (monitor_output): Likewise.
9822 * win32-i386-low.c (handle_output_debug_string): New.
9823 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9824 handle_output_debug_string.
9825 (get_child_debug_event): Likewise.
9826
506c7aa0
DJ
98272007-03-27 Mat Hostetter <mat@lcs.mit.edu>
9828
9829 * server.c (main): Correct strtoul check.
9830
42c81e2a
DJ
98312007-03-27 Jon Ringle <jon@ringle.org>
9832
9833 * linux-low.c: Check __ARCH_HAS_MMU__ also.
9834
9453113a
DJ
98352007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
9836
9837 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9838
64a69107
DJ
98392007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
9840
9841 * terminal.h: Check HAVE_SGTTY_H.
9842
98432007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
9844
9845 * remote-utils.c (remote_open): Print out the assigned port number.
9846
c74d0ad8
DJ
98472007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
9848
9849 * remote-utils.c (monitor_output): New function.
9850 * server.c (debug_threads): Define here.
9851 (monitor_show_help): New function.
9852 (handle_query): Handle qRcmd.
9853 (main): Do not handle 'd' packet.
9854 * server.h (debug_threads, remote_debug, monitor_output): Declare.
9855 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9856 of debug_threads.
9857
de7c3b4a
PA
98582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9859
9860 * Makefile.in (EXEEXT): New.
9861 (clean): Use $(EXEEXT).
9862
ef57601b
PA
98632007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9864
9865 * target.h (target_ops): Rename send_signal to request_interrupt,
9866 and remove enum target_signal parameter.
9867 * linux-low.c (linux_request_interrupt): Rename from
9868 linux_send_signal, and always send SIGINT.
9869 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9870 and always send SIGINT.
9871 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9872 of send_signal.
9873 (input_interrupt): Likewise.
9874
820f2bda
PA
98752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
9876
9877 * server.c (get_features_xml): Check if target implemented
9878 arch_string.
9879 * win32-i386-low.c (win32_arch_string): New.
9880 (win32_target_ops): Add win32_arch_string as arch_string member.
9881
ab39bf24
UW
98822007-02-22 Markus Deuling <deuling@de.ibm.com>
9883
9884 * spu-low.c (spu_arch_string): New.
9885 (spu_target_ops): Add spu_arch_string.
9886
61ff6e04
DJ
98872007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
9888
9889 * remote-utils.c: Remove HAVE_TERMINAL_H check.
9890 * configure.ac: Do not check for terminal.h.
9891 * configure, config.in: Regenerated.
9892
fb1e4ffc
DJ
98932007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
9894
9895 * Makefile.in (OBS): Add $(XML_BUILTIN).
9896 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9897 (clean): Update.
9898 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9899 (arm-with-iwmmxt.c): New.
9900 * config.in, configure: Regenerate.
9901 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
9902 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
9903 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9904 (arm*-*-linux*): Add iWMMXt and regset support.
9905 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9906 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9907 (arm_store_wmmxregset, target_regsets): New.
9908 * server.c (get_features_xml): Take annex argument. Check builtin
9909 XML documents.
9910 (handle_query): Handle multiple annexes.
9911
0f48aa01
DJ
99122007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9913
9914 * remote-utils.c [USE_WIN32API] (read, write): Define.
9915 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9916 write.
9917
23181151
DJ
99182007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9919
9920 * linux-i386-low.c (the_low_target): Set arch_string.
9921 * linux-x86-64-low.c (the_low_target): Likewise.
9922 * linux-low.c (linux_arch_string): New.
9923 (linux_target_ops): Add it.
9924 * linux-low.h (struct linux_target_ops): Add arch_string.
9925 * server.c (write_qxfer_response): Use const void * for DATA.
9926 (get_features_xml): New.
9927 (handle_query): Handle qXfer:features:read. Report it for qSupported.
9928 * target.h (struct target_ops): Add arch_string method.
9929
9d606399
DJ
99302007-01-03 Denis Pilat <denis.pilat@st.com>
9931 Daniel Jacobowitz <dan@codesourcery.com>
9932
9933 * linux-low.c (linux_kill): Handle being called with no threads.
9934 * win32-i386-low.c (win32_kill): Likewise.
9935 (get_child_debug_event): Clear current_process_handle.
9936
99372006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
9938 Daniel Jacobowitz <dan@codesourcery.com>
9939
9940 * remote-utils.c (remote_open): Check the type of specified
9941 serial port devices before opening them.
9942 * server.c (main): Kill the inferior if an error occurs during
9943 the first remote_open.
9944
a5e13d24
DJ
99452006-12-05 Markus Deuling <deuling@de.ibm.com>
9946
9947 * README: Update supported targets.
9948
186947f7
DJ
99492006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
9950
9951 * Makefile.in (clean): Remove reg-mips64.c.
9952 (reg-mips64.c, reg-mips64.o): New rules.
9953 * configure.srv: Handle mips64. Include regset support for mips.
9954 * linux-mips-low.c (union mips_register): New.
9955 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9956 (mips_breakpoint, mips_breakpoint_at): Use int.
9957 (mips_collect_register, mips_supply_register)
9958 (mips_collect_register_32bit, mips_supply_register_32bit)
9959 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9960 (mips_store_fpregset, target_regsets): New.
9961 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9962
a13e2c95
UW
99632006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
9964
9965 * configure.srv: Add target "spu*-*-*".
9966 * Makefile.in (clean): Remove reg-spu.c.
9967 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9968 * spu-low.c: New file.
9969
cb7283db
DJ
99702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9971
9972 * configure.ac: Correct td_thr_tls_get_addr test.
9973 * configure: Regenerated.
9974
89be2091
DJ
99752006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
9976
9977 * linux-low.c (linux_wait_for_event): Reformat. Use the
9978 pass_signals array.
9979 * remote-utils.c (decode_address_to_semicolon): New.
9980 * server.c (pass_signals, handle_general_set): New.
9981 (handle_query): Mention QPassSignals for qSupported.
9982 (main): Call handle_general_set.
9983 * server.h (pass_signals, decode_address_to_semicolon): New.
9984
000ef4f0
DJ
99852006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
9986
9987 * server.c (handle_query): Correct error handling for read_auxv.
9988
b7149293
UW
99892005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
9990
9991 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9992 and srv_linux_thread_db to yes.
9993 * linux-s390-low.c (s390_fill_gregset): New function.
9994 (target_regsets): Define data structure.
9995
dae5f5cf
DJ
99962006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
9997
9998 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9999 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10000 * config.in, configure: Regenerated.
10001 * inferiors.c (gdb_id_to_thread): New function.
10002 (gdb_id_to_thread_id): Use it.
10003 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10004 * linux-low.h (struct process_info): Add th member.
10005 (thread_db_get_tls_address): New prototype.
10006 * remote-utils.c (decode_address): Make non-static.
10007 * server.c (handle_query): Handle qGetTLSAddr.
10008 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10009 * target.h (struct target_ops): Add get_tls_address.
10010 * thread-db.c (maybe_attach_thread): Save the thread handle.
10011 (thread_db_get_tls_address): New.
10012
32ca6d61
DJ
100132006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10014
10015 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10016 (linux_resume_one_process): Take a siginfo_t *. Update all
10017 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10018 (struct pending_signals): Add a siginfo_t.
10019 (linux_wait_for_process): Always set last_status.
10020 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10021 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10022 * linux-low.h (struct process_info): Add last_status.
10023
5ffff7c1
DJ
100242006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10025
10026 * remote-utils.c (try_rle): New function.
10027 (putpkt_binary): Use it.
10028
8695c747
DJ
100292006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10030
10031 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10032 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10033 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10034 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10035 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10036 point registers.
10037
290fadea
RS
100382006-08-08 Richard Sandiford <richard@codesourcery.com>
10039
10040 * server.c (terminal_fd): New variable.
10041 (old_foreground_pgrp): Likewise.
10042 (restore_old_foreground_pgrp): New function.
10043 (start_inferior): Record the terminal file descriptor in terminal_fd
10044 and its original foreground group in old_foreground_pgrp. Register
10045 restore_old_foreground_pgrp with atexit().
10046
9f2e1e63
DJ
100472006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10048
10049 * server.c (handle_query): Correct qPart to qXfer.
10050
b80864fb
DJ
100512006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10052
10053 * configure.ac: Check for more headers which are missing on
10054 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10055 * configure.srv: Add Cygwin and mingw32.
10056 * remote-utils.c: Don't include headers unconditionally which
10057 are missing on mingw32. Include <winsock.h> for mingw32.
10058 (remote_open): Adjust for mingw32 support. Flush
10059 standard error after writing to it.
10060 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10061 (unblock_async_io, enable_async_io, disable_async_io)
10062 (readchar, getpkt): Update for Winsock support.
10063 (prepare_resume_reply): Expect a protocol signal number.
10064 * server.c: Disable <sys/wait.h> on mingw32.
10065 (start_inferior): Adjust for mingw32 support. Flush
10066 standard error after writing to it.
10067 (attach_inferior): Likewise. Use protocol signal
10068 numbers.
10069 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10070 and names.
10071 * win32-i386-low.c: New file.
10072 * Makefile.in (XM_CLIBS): Set.
10073 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10074 (win32-i386-low.o): New dependency rule.
10075 * linux-low.c (linux_wait): Use target signal numbers.
10076 * target.h (struct target_ops): Doc fix.
10077 * server.h (target_signal_to_name): New prototype.
10078 * gdbreplay.c: Don't include headers unconditionally which
10079 are missing on mingw32. Include <winsock.h> for mingw32.
10080 (remote_close, remote_open): Adjust for Winsock support.
10081 * configure, config.in: Regenerated.
10082
0876f84a
DJ
100832006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10084
10085 * server.c (decode_xfer_read, write_qxfer_response): New.
10086 (handle_query): Take a packet length argument. Handle
10087 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10088 the qSupported response.
10089 (main): Update call to handle_query.
10090
01f9e8fa
DJ
100912006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10092
10093 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10094 (putpkt_binary): Renamed from putpkt and adjusted for binary
10095 data.
10096 (putpkt): New wrapper for putpkt_binary.
10097 (readchar): Don't mask off the high bit.
10098 (decode_X_packet): New function.
10099 * server.c (main): Call putpkt_binary if a handler sets the packet
10100 length. Save the length of the incoming packet. Handle 'X'.
10101 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10102
be2a5f71
DJ
101032006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10104
10105 * server.c (handle_query): Handle qSupported.
10106
ea025f5f
DJ
101072006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10108
10109 * remote-utils.c (all_symbols_looked_up): New variable.
10110 (look_up_one_symbol): Check it.
10111 * server.h (look_up_one_symbol): New declaration.
10112 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10113
9308fc88
DJ
101142006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10115
10116 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10117 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10118 (PTRACE_GET_THREAD_AREA): Define.
10119 (ps_get_thread_area): New function.
10120
52fb6437
NS
101212006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10122
10123 * configure.srv (m68k*-*-uclinux*): New target.
10124 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10125 (linux_resume_one_process): Remove extraneous cast.
10126 (linux_read_offsets): New.
10127 (linux_target_op): Add linux_read_offsets on mmuless systems.
10128 * server.c (handle_query): Add qOffsets logic.
10129 * target.h (struct target_ops): Add read_offsets.
10130
21b0f40c
DJ
101312006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10132
10133 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10134 (PTRACE_GET_THREAD_AREA): Define.
10135 (ps_get_thread_area): New function.
10136 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10137 (linux-x86-64-low.o): Update.
10138
0050a760
DJ
101392006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10140
10141 * configure.ac: Remove checks for prfpregset_t.
10142 * gdb_proc_service.h: New file.
10143 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10144 new "gdb_proc_service.h".
10145 * proc-service.c: Likewise.
10146 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10147 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10148 * Makefile.in (gdb_proc_service_h): Updated.
10149 * configure, config.in: Regenerated.
10150
b92a518e
DJ
101512006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10152
10153 * remote-utils.c (prepare_resume_reply): Move declaration
10154 of gdb_id_from_wait to the top of the block.
10155
545587ee
DJ
101562006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10157
10158 * linux-low.c (regsets_store_inferior_registers): Read the regset
10159 from the target before filling it.
10160
9db87ebd
DJ
101612006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10162
10163 * server.c (attach_inferior): Return SIGTRAP for a successful
10164 attach.
10165
dd24457d
DJ
101662006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10167
10168 * Makefile.in (OBS): Add version.o.
10169 (STAGESTUFF): Delete.
10170 (version.o): Add dependencies.
10171 (version.c): Replace rule.
10172 (clean): Remove version.c.
10173 * server.c (gdbserver_version): New.
10174 (gdbserver_usage): Use printf.
10175 (main): Handle --version and --help.
10176 * server.h (version, host_name): Add declarations.
10177
6f0f660e
EZ
101782005-12-23 Eli Zaretskii <eliz@gnu.org>
10179
889bf7c5
PA
10180 * linux-arm-low.c:
10181 * linux-arm-low.c:
10182 * inferiors.c:
10183 * i387-fp.h:
10184 * i387-fp.c:
10185 * gdbreplay.c:
10186 * regcache.c:
10187 * proc-service.c:
10188 * mem-break.h:
10189 * mem-break.c:
10190 * linux-x86-64-low.c:
10191 * linux-sh-low.c:
10192 * linux-s390-low.c:
10193 * linux-ppc64-low.c:
10194 * linux-ppc-low.c:
10195 * linux-mips-low.c:
10196 * linux-m68k-low.c:
10197 * linux-m32r-low.c:
10198 * linux-low.h:
10199 * linux-low.c:
10200 * linux-ia64-low.c:
10201 * linux-i386-low.c:
10202 * linux-crisv32-low.c:
10203 * thread-db.c:
10204 * terminal.h:
10205 * target.h:
10206 * target.c:
10207 * server.h:
10208 * server.c:
10209 * remote-utils.c:
10210 * regcache.h:
10211 * utils.c:
10212 * Makefile.in:
10213 * configure.ac:
6f0f660e
EZ
10214 * gdbserver.1: Add (C) after Copyright. Update the FSF
10215 address.
10216
9d1fb177
DJ
102172005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10218
10219 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10220 (arm_breakpoint_at): Recognize both breakpoints.
10221 (the_low_target): Use the correct breakpoint instruction.
10222
011a70c2
DJ
102232005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10224
10225 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10226 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10227 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10228 (the_low_target): Update.
10229
7fb85e41
AS
102302005-10-25 Andreas Schwab <schwab@suse.de>
10231
10232 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10233
10234 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10235 (ia64_num_regs): Reduce to 462.
10236
3db0444b
DJ
102372005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10238
10239 * acinclude.m4: Correct quoting.
10240 * aclocal.m4: Regenerated.
10241
10242 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10243 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10244 (thread_db_init): Call thread_db_err_str.
10245 * configure.ac: Check for TD_VERSION.
10246 * config.in, configure: Regenerated.
10247
bee0189a
DJ
102482005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10249
10250 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10251
e9d25b98
DJ
102522005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10253
10254 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10255 is not available. Define HAVE_PTRACE_GETREGS if it is.
10256 * config.in, configure: Regenerated.
10257 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10258 * linux-i386-low.c, linux-m68k-low.c: Update to use
10259 HAVE_PTRACE_GETREGS.
10260 * linux-low.c (regsets_fetch_inferior_registers)
10261 (regsets_store_inferior_registers): Only return 0 if we processed
10262 GENERAL_REGS.
10263 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10264 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10265
a06660f7
DJ
102662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10267
10268 * inferiors.c (struct thread_info): Add gdb_id.
10269 (add_thread): Add gdb_id argument.
10270 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10271 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10272 calls to add_thread.
10273 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10274 * server.c (handle_query): Use thread_to_gdb_id.
10275 (handle_v_cont, main): Use gdb_id_to_thread_id.
10276 * server.h (add_thread): Update prototype.
10277 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10278 prototypes.
10279
5a1f5858
DJ
102802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10281
10282 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10283 left-padded registers.
10284 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10285 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10286
e122f1f5
SE
102872005-07-01 Steve Ellcey <sje@cup.hp.com>
10288
10289 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10290 * configure: Regenerate.
10291 * config.in: Regenerate.
10292 * server.h (NEED_DECLARATION_STRERROR):
10293 Replace with !HAVE_DECL_STRERROR.
10294
d592fa2f
DJ
102952005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10296
10297 * linux-low.c (linux_wait, linux_send_signal): Don't test
10298 an unsigned long variable for > 0 if it could be MAX_ULONG.
10299 * server.c (myresume): Likewise.
10300 * target.c (set_desired_inferior): Likewise.
10301
ccbd4912
MK
103022005-06-13 Mark Kettenis <kettenis@gnu.org>
10303
10304 * configure.ac: Simplify and improve check for socklen_t.
10305 * configure, config.in: Regenerate.
10306
f450004a
DJ
103072005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10308
10309 * acconfig.h: Remove.
10310 * configure.ac: Add a test for socklen_t. Use three-argument
10311 AC_DEFINE throughout.
10312 * config.in: Regenerated using autoheader 2.59.
10313 * configure: Regenerated.
10314
10315 * gdbreplay.c (socklen_t): Provide a default.
10316 (remote_open): Use socklen_t.
10317 * remote-utils.c (socklen_t): Provide a default.
10318 (remote_open): Use socklen_t.
10319 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10320 unsigned char.
10321
10322 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10323 char for buffers.
10324 * linux-low.c (linux_read_memory, linux_write_memory)
10325 (linux_read_auxv): Likewise.
10326 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10327 (check_mem_write): Likewise.
10328 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10329 Likewise.
10330 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10331 (registers_from_string, register_data): Likewise.
10332 * server.c (handle_query, main): Likewise.
10333 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10334 (decode_M_packet): Likewise.
10335 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10336 * target.h (struct target_ops): Update read_memory, write_memory,
10337 and read_auxv.
10338 (read_inferior_memory, write_inferior_memory): Update.
10339 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10340 to unsigned char *.
10341 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10342 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10343 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10344 linux-s390-low.c, linux-sh-low.c: Update for changes in
10345 read_inferior_memory and the_low_target->breakpoint.
10346
eee84df1
DJ
103472005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10350 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10351 * configure.srv: Add powerpc64-*-linux*.
10352 * linux-ppc64-low.c: New file.
10353
45b134e5
OF
103542005-05-23 Orjan Friberg <orjanf@axis.com>
10355
10356 * linux-cris-low.c: New file with support for CRIS.
10357 * linux-crisv32-low.c: Ditto for CRISv32.
10358 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10359 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10360 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10361 reg-crisv32.o, and reg-crisv32.c to make rules.
10362 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10363 recognized targets.
10364
48d93c75
UW
103652005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10366
10367 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10368 of sizeof (PTRACE_XFER_TYPE).
10369 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10370
e013ee27
OF
103712005-05-12 Orjan Friberg <orjanf@axis.com>
10372
889bf7c5 10373 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10374 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10375 pointers for hardware watchpoint support.
10376 * linux-low.h (struct linux_target_ops): Ditto.
10377 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10378 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10379 to linux_target_ops.
10380 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10381 reply packet.
10382 * server.c (main): Recognize 'Z' and 'z' packets.
10383
b0ded00b
UW
103842005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10385
10386 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10387 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10388 (the_low_target): Add new members.
10389
8643e2ad
DJ
103902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10391
10392 * proc-service.c (ps_lgetregs): Search all_processes instead of
10393 all_threads.
10394
fc620387
DJ
103952005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10396
10397 * server.c (start_inferior): Change return type to int.
10398 (attach_inferior): Change sigptr to int *.
10399 (handle_v_cont, handle_v_requests): Change signal to int *.
10400 (main): Change signal to int.
10401
104022005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10403
10404 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10405 * configure.srv: Add m32r*-*-linux*.
10406 * linux-m32r-low.c: New file.
10407
e0e76420
DJ
104082005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10409
10410 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10411
a1928bad
DJ
104122005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10413
10414 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10415 Take unsigned long arguments for PIDs.
10416 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10417 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10418 (wait_for_sigstop, linux_resume_one_process)
10419 (regsets_fetch_inferior_registers, linux_send_signal)
10420 (linux_read_auxv): Likewise. Update the types of variables holding
10421 PIDs. Update format string specifiers.
10422 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10423 * remote-utils.c (prepare_resume_reply): Likewise.
10424 * server.c (cont_thread, general_thread, step_thread)
10425 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10426 unsigned long.
10427 (handle_query): Update format specifiers.
10428 (handle_v_cont, main): Use strtoul for thread IDs.
10429 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10430 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10431 (general_thread, step_thread, thread_from_wait)
10432 (old_thread_from_wait): Update.
10433 * target.h (struct thread_resume): Use unsigned long for THREAD.
10434 (struct target_ops): Use unsigned long for arguments to attach and
10435 thread_alive.
10436
dcdb98d2
DJ
104372005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10438
10439 * acinclude.m4: Include bfd/bfd.m4 directly.
10440 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10441 <agriffis@toolchain.org>.
10442 * aclocal.m4, configure: Regenerated.
10443
bec39cab
AC
104442005-01-07 Andrew Cagney <cagney@gnu.org>
10445
10446 * configure.ac: Rename configure.in, require autoconf 2.59.
10447 * configure: Re-generate.
10448
434c4c77
DJ
104492004-12-08 Daniel Jacobowitz <dan@debian.org>
10450
10451 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10452 LIBS when finished.
10453 * aclocal.m4: Regenerated.
10454 * configure: Regenerated.
10455
db1d3e1b
AS
104562004-11-21 Andreas Schwab <schwab@suse.de>
10457
10458 * linux-m68k-low.c (m68k_num_gregs): Define.
10459 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10460 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10461 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10462 (m68k_breakpoint_at): New. Add to the_low_target.
10463
10464 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10465 srv_linux_thread_db to yes.
10466
43360365
JB
104672004-10-20 Joel Brobecker <brobecker@gnat.com>
10468
10469 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10470 (ARCH_SET_FS): Likewise.
10471 (ARCH_GET_FS): Likewise.
10472 (ARCH_GET_GS): Likewise.
10473
fd500816
DJ
104742004-10-16 Daniel Jacobowitz <dan@debian.org>
10475
10476 * linux-i386-low.c (ps_get_thread_area): New.
10477 * linux-x86-64-low.c (ps_get_thread_area): New.
10478 * linux-low.c: Include <sys/syscall.h>.
10479 (linux_kill_one_process): Don't kill the first thread here.
10480 (linux_kill): Kill the first thread here.
10481 (kill_lwp): New function.
10482 (send_sigstop, linux_send_signal): Use it.
10483 * proc-service.c: Clean up #ifdefs.
10484 (fpregset_info): Delete.
10485 (ps_lgetregs): Update and enable implementation.
10486 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10487 implementations.
10488 * remote-utils.c (struct sym_cache, symbol_cache): New.
10489 (input_interrupt): Print a clearer message.
10490 (async_io_enabled): New variable.
10491 (enable_async_io, disable_async_io): Use it. Update comments.
10492 (look_up_one_symbol): Use the symbol cache.
10493 * thread-db.c (thread_db_look_up_symbols): New function.
10494 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10495
f6de3c42
DJ
104962004-10-16 Daniel Jacobowitz <dan@debian.org>
10497
10498 * configure.in: Test for -rdynamic.
10499 * configure: Regenerated.
10500 * Makefile (INTERNAL_LDFLAGS): New.
10501 (gdbserver, gdbreplay): Use it.
10502
2c0fc042
AC
105032004-09-02 Andrew Cagney <cagney@gnu.org>
10504
10505 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10506
075b3282
DJ
105072004-03-23 Daniel Jacobowitz <drow@mvista.com>
10508
10509 * linux-low.c (linux_wait): Clear all_processes list also.
10510
fa6a77dc
DJ
105112004-03-12 Daniel Jacobowitz <drow@mvista.com>
10512
10513 * linux-low.c: Include <errno.h>. Remove extern declaration of
10514 errno.
10515
6d782a97
DJ
105162004-03-12 Daniel Jacobowitz <drow@mvista.com>
10517
10518 * gdbreplay.c, server.h, utils.c: Update copyright years.
10519
3a7fb99b
DJ
105202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10521
10522 * server.c (main): Print child status or termination signal from
10523 variable 'signal', not 'sig'.
10524
c3e735a6
DJ
105252004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10526
10527 * linux-low.c (linux_read_memory): Change return type to
10528 int. Check for and return error from ptrace().
10529 * target.c (read_inferior_memory): Change return type to int. Pass
10530 back return status from the_target->read_memory().
10531 * target.h (struct target_ops): Adapt *read_memory() prototype.
10532 Update comment.
10533 (read_inferior_memory): Adapt prototype.
10534 * server.c (main): Return an error packet if
10535 read_inferior_memory() returns an error.
10536
a59d1c82
DJ
105372004-03-04 Daniel Jacobowitz <drow@mvista.com>
10538
10539 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10540 Unify with other clean targets.
10541
dc3f8883
DJ
105422004-02-29 Daniel Jacobowitz <drow@mvista.com>
10543
10544 * server.c (handle_v_cont): Call set_desired_inferior.
10545
89a208da
DJ
105462004-02-29 Daniel Jacobowitz <drow@mvista.com>
10547
10548 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10549
62ea82f5
DJ
105502004-02-29 Daniel Jacobowitz <drow@mvista.com>
10551
10552 * linux-low.c (linux_wait): Unblock async I/O.
10553 (linux_resume): Block and enable async I/O.
10554 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10555 * server.h (block_async_io, unblock_async_io): Add prototypes.
10556
6910d122
DJ
105572004-02-29 Daniel Jacobowitz <drow@mvista.com>
10558
10559 * remote-utils.c (remote_open): Print a status notice after
10560 opening a TCP port.
10561 * server.c (attach_inferior): Print a status notice after
10562 attaching.
10563
105642004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10565
10566 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10567
c89dc5d4
DJ
105682004-02-26 Daniel Jacobowitz <drow@mvista.com>
10569
10570 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10571 error packet.
10572 * server.c, target.h: Update copyright years.
10573
4b8dad4a
RM
105742004-02-25 Roland McGrath <roland@redhat.com>
10575
10576 * target.h (struct target_ops): New member `read_auxv'.
10577 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10578 * linux-low.c (linux_read_auxv): New function.
10579 (linux_target_ops): Initialize `read_auxv' member to that.
10580
d7446758
JB
105812004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10582
10583 Committed by Jim Blandy <jimb@redhat.com>.
10584
10585 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10586 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10587 instead of GPR_SIZE to distiguish s390 and s390x targets.
10588
5544ad89
DJ
105892004-01-31 Daniel Jacobowitz <drow@mvista.com>
10590
10591 * linux-low.c: Update copyright year.
10592 (check_removed_breakpoint): Clear pending_is_breakpoint.
10593 (linux_set_resume_request, linux_queue_one_thread)
10594 (resume_status_pending_p): New functions.
10595 (linux_continue_one_thread): Use process->resume.
10596 (linux_resume): Only resume threads if there are no pending events.
10597 * linux-low.h (struct process_info): Add resume request
10598 pointer.
10599
2a68b70e
DJ
106002004-01-30 Daniel Jacobowitz <drow@mvista.com>
10601
10602 * regcache.c (new_register_cache): Clear the allocated register
10603 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10604
64386c31
DJ
106052003-10-13 Daniel Jacobowitz <drow@mvista.com>
10606
10607 * linux-low.c (linux_resume): Take a struct thread_resume *
10608 argument.
10609 (linux_wait): Update call.
10610 (resume_ptr): New static variable.
10611 (linux_continue_one_thread): Renamed from
10612 linux_continue_one_process. Use resume_ptr.
10613 (linux_resume): Use linux_continue_one_thread.
10614 * server.c (handle_v_cont, handle_v_requests): New functions.
10615 (myresume): New function.
10616 (main): Handle 'v' case.
10617 * target.h (struct thread_resume): New type.
10618 (struct target_ops): Change argument of "resume" to struct
10619 thread_resume *.
10620 (myresume): Delete macro.
10621
c938e9b0
L
106222003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10623
10624 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10625 (uninstall): Support DESTDIR.
10626
7f313d07
BC
10627Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10628
10629 * configure.srv: Add xscale*linux copy of arm*linux entry.
10630
3b2fc2ea
DJ
106312003-07-24 Daniel Jacobowitz <drow@mvista.com>
10632
10633 * linux-arm-low.c (arm_reinsert_addr): New function.
10634 (the_low_target): Add arm_reinsert_addr.
10635
1c0a559e
MK
106362003-07-08 Mark Kettenis <kettenis@gnu.org>
10637
10638 * mem-break.c: Remove whitespace at end of file.
10639
43d5792c
DJ
106402003-06-28 Daniel Jacobowitz <drow@mvista.com>
10641
10642 * configure.in: Check whether we need to prototype strerror.
10643 * server.h: Optionally prototype strerror.
10644 * gdbreplay.c (perror_with_name): Use strerror.
10645 * linux-low.c (linux_attach_lwp): Use strerror.
10646 * utils.c (perror_with_name): Use strerror.
10647 * config.in, configure: Regenerated.
10648
c8a86edf
DJ
106492003-06-28 Daniel Jacobowitz <drow@mvista.com>
10650
10651 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10652 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10653
73d37363
DJ
106542003-06-20 Daniel Jacobowitz <drow@mvista.com>
10655
10656 * Makefile.in (SFILES): Update.
10657 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10658 low-sun3.c: Remove files.
10659
6ad8ae5c
DJ
106602003-06-17 Daniel Jacobowitz <drow@mvista.com>
10661
10662 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10663 (linux_detach_one_process, linux_detach): New functions.
10664 (linux_target_ops): Add linux_detach.
10665 * server.c (main): Handle 'D' packet.
10666 * target.h (struct target_ops): Add "detach" member.
10667 (detach_inferior): Define.
10668
1581182a
MK
106692003-06-13 Mark Kettenis <kettenis@gnu.org>
10670
10671 From Kelley Cook <kelleycook@wideopenwest.com>:
10672 * configure.srv: Accept i[34567]86 variants.
10673
e5379b03
DJ
106742003-06-05 Daniel Jacobowitz <drow@mvista.com>
10675
10676 * linux-low.c (linux_wait_for_event): Correct comment typos.
10677 (linux_resume_one_process): Call check_removed_breakpoint.
10678 (linux_send_signal): New function.
10679 (linux_target_ops): Add linux_send_signal.
10680 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10681 of kill.
10682 * target.h (struct target_ops): Add send_signal.
10683
2ff29de4
JB
106842003-05-29 Jim Blandy <jimb@redhat.com>
10685
10686 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10687 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10688 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10689 away part of the register's value.
10690
254787d4
DJ
106912003-03-26 Daniel Jacobowitz <drow@mvista.com>
10692
10693 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10694 (linux_wait_for_event, linux_init_signals): Likewise.
10695
94e10508
DJ
106962003-03-17 Daniel Jacobowitz <drow@mvista.com>
10697
10698 * configure.in: Check for stdlib.h.
10699 * configure: Regenerated.
10700 * config.in: Regenerated.
10701
4c0711e0
DJ
107022003-01-04 Andreas Schwab <schwab@suse.de>
10703
10704 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10705
ef66e766
AC
107062003-01-02 Andrew Cagney <ac131313@redhat.com>
10707
10708 * Makefile.in: Remove obsolete code.
10709
a1358604
DJ
107102002-11-20 Daniel Jacobowitz <drow@mvista.com>
10711
10712 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10713 defined(PT_FPR0_HI).
10714
23ce3b1c
DJ
107152002-11-17 Stuart Hughes <seh@zee2.com>
10716
10717 * linux-arm-low.c (arm_num_regs): Increase.
10718 (arm_regmap): Include status register.
10719
107202002-11-17 Daniel Jacobowitz <drow@mvista.com>
10721
10722 * linux-low.c (register_addr): Remove incorrect -1 check.
10723
a9fa9f7d
DJ
107242002-08-29 Daniel Jacobowitz <drow@mvista.com>
10725
10726 * linux-low.c (linux_create_inferior): Call setpgid. Return
10727 the new PID.
10728 (unstopped_p, linux_signal_pid): Remove.
10729 (linux_target_ops): Remove linux_signal_pid.
10730 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10731 global instead of target method.
10732 * target.h (struct target_ops): Remove signal_pid. Update comment
10733 for create_inferior.
10734 * server.c (signal_pid): New variable.
10735 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10736 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10737 (attach_inferior): Set signal_pid.
10738
17574093
DJ
107392002-08-23 Daniel Jacobowitz <drow@mvista.com>
10740
10741 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10742
107432002-08-20 Jim Blandy <jimb@redhat.com>
10744
10745 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10746 default for this.
10747
107482002-08-01 Andrew Cagney <cagney@redhat.com>
10749
10750 * Makefile.in: Make chill references obsolete.
10751
107522002-07-24 Kevin Buettner <kevinb@redhat.com>
10753
10754 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10755 * configure: Regenerate.
10756 * config.in: Regenerate.
10757
107582002-07-09 David O'Brien <obrien@FreeBSD.org>
10759
10760 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10761 (perror_with_name, remote_close, remote_open, expect, play): Static.
10762
107632002-07-04 Michal Ludvig <mludvig@suse.cz>
10764
4b8dad4a 10765 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10766 byte offsets instead of an array of indexes.
10767 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10768
107692002-06-13 Daniel Jacobowitz <drow@mvista.com>
10770
10771 * regcache.c: Add comment.
10772
107732002-06-11 Daniel Jacobowitz <drow@mvista.com>
10774
10775 * thread-db.c: New file.
10776 * proc-service.c: New file.
10777 * acinclude.m4: New file.
10778 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10779 proc-service.o, and thread-db.o.
10780 (linux-low.o): Add USE_THREAD_DB.
10781 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10782 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10783 * aclocal.m4: Regenerated.
10784 * config.in: Regenerated.
10785 * configure: Regenerated.
10786 * configure.in: Check for proc_service.h, sys/procfs.h,
10787 thread_db.h, and linux/elf.h headrs.
10788 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10789 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
10790 Check for -lthread_db and thread support.
10791 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10792 PowerPC, and SuperH.
10793 * i387-fp.c: Constify arguments.
10794 * i387-fp.h: Likewise.
10795 * inferiors.c: (struct thread_info): Renamed from
10796 `struct inferior_info'. Remove PID member. Use generic inferior
10797 list header. All uses updated.
10798 (inferiors, signal_pid): Removed.
10799 (all_threads): New variable.
10800 (get_thread): Define.
10801 (add_inferior_to_list): New function.
10802 (for_each_inferior): New function.
10803 (change_inferior_id): New function.
10804 (add_inferior): Removed.
10805 (remove_inferior): New function.
10806 (add_thread): New function.
10807 (free_one_thread): New function.
10808 (remove_thread): New function.
10809 (clear_inferiors): Use for_each_inferior and free_one_thread.
10810 (find_inferior): New function.
10811 (find_inferior_id): New function.
10812 (inferior_target_data): Update argument type.
10813 (set_inferior_target_data): Likewise.
10814 (inferior_regcache_data): Likewise.
10815 (set_inferior_regcache_data): Likewise.
10816 * linux-low.c (linux_bp_reinsert): Remove.
10817 (all_processes, stopping_threads, using_thrads)
10818 (struct pending_signals, debug_threads, pid_of): New.
10819 (inferior_pid): Replace with macro.
10820 (struct inferior_linux_data): Remove.
10821 (get_stop_pc, add_process): New functions.
10822 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10823 Use add_process and add_thread.
10824 (linux_attach_lwp): New function, based on old linux_attach. Use
10825 add_process and add_thread. Set stop_expected for new threads.
10826 (linux_attach): New function.
10827 (linux_kill_one_process): New function.
10828 (linux_kill): Kill all LWPs.
10829 (linux_thread_alive): Use find_inferior_id.
10830 (check_removed_breakpoints, status_pending_p): New functions.
10831 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10832 Update. Use WNOHANG. Wait for cloned processes also. Update process
10833 struct for the found process.
10834 (linux_wait_for_event): New function.
10835 (linux_wait): Use it. Support LWPs.
10836 (send_sigstop, wait_for_sigstop, stop_all_processes)
10837 (linux_resume_one_process, linux_continue_one_process): New functions.
10838 (linux_resume): Support LWPs.
10839 (REGISTER_RAW_SIZE): Remove.
10840 (fetch_register): Use register_size instead. Call supply_register.
10841 (usr_store_inferior_registers): Likewise. Call collect_register.
10842 Fix recursive case.
10843 (regsets_fetch_inferior_registers): Improve error message.
10844 (regsets_store_inferior_registers): Add debugging.
10845 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10846 (unstopped_p, linux_signal_pid): New functions.
10847 (linux_target_ops): Add linux_signal_pid.
10848 (linux_init_signals): New function.
10849 (initialize_low): Call it. Initialize using_threads.
10850 * regcache.c (inferior_regcache_data): Add valid
10851 flag.
10852 (get_regcache): Fetch registers lazily. Add fetch argument
10853 and update all callers.
10854 (regcache_invalidate_one, regcache_invalidate): New
10855 functions.
10856 (new_register_cache): Renamed from create_register_cache.
10857 Return the new regcache.
10858 (free_register_cache): Change argument to a void *.
10859 (registers_to_string, registers_from_string): Call get_regcache
10860 with fetch flag set.
10861 (register_data): Make static. Pass fetch flag to get_regcache.
10862 (supply_register): Call get_regcache with fetch flag clear.
10863 (collect_register): Call get_regcache with fetch flag set.
10864 (collect_register_as_string): New function.
10865 * regcache.h: Update.
10866 * remote-utils.c (putpkt): Flush after debug output and use
10867 stderr.
10868 Handle input interrupts while waiting for an ACK.
10869 (input_interrupt): Use signal_pid method.
10870 (getpkt): Flush after debug output and use stderr.
10871 (outreg): Use collect_register_as_string.
10872 (new_thread_notify, dead_thread_notify): New functions.
10873 (prepare_resume_reply): Check using_threads. Set thread_from_wait
10874 and general_thread.
10875 (look_up_one_symbol): Flush after debug output.
10876 * server.c (step_thread, server_waiting): New variables.
10877 (start_inferior): Don't use signal_pid. Update call to mywait.
10878 (attach_inferior): Update call to mywait.
10879 (handle_query): Handle qfThreadInfo and qsThreadInfo.
10880 (main): Don't fetch/store registers explicitly. Use
10881 set_desired_inferior. Support proposed ``Hs'' packet. Update
10882 calls to mywait.
10883 * server.h: Update.
10884 (struct inferior_list, struct_inferior_list_entry): New.
10885 * target.c (set_desired_inferior): New.
10886 (write_inferior_memory): Constify.
10887 (mywait): New function.
10888 * target.h: Update.
10889 (struct target_ops): New signal_pid method.
10890 (mywait): Removed macro, added prototype.
10891
10892 * linux-low.h (regset_func): Removed.
10893 (regset_fill_func, regset_store_func): New.
10894 (enum regset_type): New.
10895 (struct regset_info): Add type field. Use new operation types.
10896 (struct linux_target_ops): stop_pc renamed to get_pc.
10897 Add decr_pc_after_break and breakpoint_at.
10898 (get_process, get_thread_proess, get_process_thread)
10899 (strut process_info, all_processes, linux_attach_lwp)
10900 (thread_db_init): New.
10901
10902 * linux-arm-low.c (arm_get_pc, arm_set_pc,
10903 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10904 (the_low_target): Add new members.
10905 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10906 (i386_store_fpxregset): Constify.
10907 (target_regsets): Add new kind identifier.
10908 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
10909 (i386_set_pc): Add debugging.
10910 (i386_breakpoint_at): New function.
10911 (the_low_target): Add new members.
10912 * linux-mips-low.c (mips_get_pc, mips_set_pc)
10913 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10914 (mips_breakpoint_at): New.
10915 (the_low_target): Add new members.
10916 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10917 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10918 (the_low_target): Add new members.
10919 * linux-sh-low.c (sh_get_pc, sh_set_pc)
10920 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10921 (the_low_target): Add new members.
10922 * linux-x86-64-low.c (target_regsets): Add new kind
10923 identifier.
10924
109252002-05-15 Daniel Jacobowitz <drow@mvista.com>
10926
10927 From Martin Pool <mbp@samba.org>:
10928 * server.c (gdbserver_usage): New function.
10929 (main): Call it.
10930
109312002-05-14 Daniel Jacobowitz <drow@mvista.com>
10932
10933 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10934 stop_at -> stop_pc.
10935
109362002-05-04 Andrew Cagney <ac131313@redhat.com>
10937
10938 * Makefile.in: Remove obsolete code.
10939
109402002-04-24 Michal Ludvig <mludvig@suse.cz>
10941
10942 * linux-low.c (regsets_fetch_inferior_registers),
10943 (regsets_store_inferior_registers): Removed cast to int from
10944 ptrace() calls.
10945 * regcache.h: Added declaration of struct inferior_info.
10946
109472002-04-20 Daniel Jacobowitz <drow@mvista.com>
10948
10949 * inferiors.c (struct inferior_info): Add regcache_data.
10950 (add_inferior): Call create_register_cache.
10951 (clear_inferiors): Call free_register_cache.
10952 (inferior_regcache_data, set_inferior_regcache_data): New functions.
10953 * regcache.c (struct inferior_regcache_data): New.
10954 (registers): Remove.
10955 (get_regcache): New function.
10956 (create_register_cache, free_register_cache): New functions.
10957 (set_register_cache): Don't initialize the register cache here.
10958 (registers_to_string, registers_from_string, register_data): Call
10959 get_regcache.
10960 * regcache.h: Add prototypes.
10961 * server.h: Likewise.
10962
109632002-04-20 Daniel Jacobowitz <drow@mvista.com>
10964
10965 * mem-break.c: New file.
10966 * mem-break.h: New file.
10967 * Makefile.in: Add mem-break.o rule; update server.h
10968 dependencies.
10969 * inferiors.c (struct inferior_info): Add target_data
10970 member.
10971 (clear_inferiors): Free target_data member if set.
10972 (inferior_target_data, set_inferior_target_data): New functions.
10973 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10974 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
10975 * linux-low.c (linux_bp_reinsert): New variable.
10976 (struct inferior_linux_data): New.
10977 (linux_create_inferior): Use set_inferior_target_data.
10978 (linux_attach): Likewise. Call add_inferior.
10979 (linux_wait_for_one_inferior): New function.
10980 (linux_wait): Call it.
10981 (linux_write_memory): Add const.
10982 (initialize_low): Call set_breakpoint_data.
10983 * linux-low.h (struct linux_target_ops): Add breakpoint
10984 handling members.
10985 * server.c (attach_inferior): Remove extra add_inferior
10986 call.
10987 * server.h: Include mem-break.h. Update inferior.c
10988 prototypes.
10989 * target.c (read_inferior_memory)
10990 (write_inferior_memory): New functions.
10991 * target.h (read_inferior_memory)
10992 (write_inferior_memory): Change macros to prototypes.
10993 (struct target_ops): Update comments. Add const to write_memory
10994 definition.
10995
109962002-04-11 Daniel Jacobowitz <drow@mvista.com>
10997
10998 * linux-low.c (usr_store_inferior_registers): Support
10999 registers which are allowed to fail to store.
11000 * linux-low.h (linux_target_ops): Likewise.
11001 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11002 (ppc_cannot_store_register): FPSCR may not be storable.
11003
110042002-04-09 Daniel Jacobowitz <drow@mvista.com>
11005
11006 * server.h: Include <string.h> if HAVE_STRING_H.
11007 * ChangeLog: Correct paths in last ChangeLog entry.
11008
110092002-04-09 Daniel Jacobowitz <drow@mvista.com>
11010
11011 * linux-low.h: Remove obsolete prototypes.
11012 (struct linux_target_ops): New.
11013 (extern the_low_target): New.
11014 * linux-low.c (num_regs, regmap): Remove declarations.
11015 (register_addr): Use the_low_target explicitly.
11016 (fetch_register): Likewise.
11017 (usr_fetch_inferior_registers): Likewise.
11018 (usr_store_inferior_registers): Likewise.
11019 * linux-arm-low.c (num_regs): Remove.
11020 (arm_num_regs): Define.
11021 (arm_regmap): Renamed from regmap, made static.
11022 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11023 made static.
11024 (arm_cannot_store_register): Renamed from cannot_store_register,
11025 made static.
11026 (the_low_target): New.
11027 * linux-i386-low.c (num_regs): Remove.
11028 (i386_num_regs): Define.
11029 (i386_regmap): Renamed from regmap, made static.
11030 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11031 made static.
11032 (i386_cannot_store_register): Renamed from cannot_store_register,
11033 made static.
11034 (the_low_target): New.
11035 * linux-ia64-low.c (num_regs): Remove.
11036 (ia64_num_regs): Define.
11037 (ia64_regmap): Renamed from regmap, made static.
11038 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11039 made static.
11040 (ia64_cannot_store_register): Renamed from cannot_store_register,
11041 made static.
11042 (the_low_target): New.
11043 * linux-m68k-low.c (num_regs): Remove.
11044 (m68k_num_regs): Define.
11045 (m68k_regmap): Renamed from regmap, made static.
11046 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11047 made static.
11048 (m68k_cannot_store_register): Renamed from cannot_store_register,
11049 made static.
11050 (the_low_target): New.
11051 * linux-mips-low.c (num_regs): Remove.
11052 (mips_num_regs): Define.
11053 (mips_regmap): Renamed from regmap, made static.
11054 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11055 made static.
11056 (mips_cannot_store_register): Renamed from cannot_store_register,
11057 made static.
11058 (the_low_target): New.
11059 * linux-ppc-low.c (num_regs): Remove.
11060 (ppc_num_regs): Define.
11061 (ppc_regmap): Renamed from regmap, made static.
11062 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11063 made static.
11064 (ppc_cannot_store_register): Renamed from cannot_store_register,
11065 made static.
11066 (the_low_target): New.
11067 * linux-s390-low.c (num_regs): Remove.
11068 (s390_num_regs): Define.
11069 (s390_regmap): Renamed from regmap, made static.
11070 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11071 made static.
11072 (s390_cannot_store_register): Renamed from cannot_store_register,
11073 made static.
11074 (the_low_target): New.
11075 * linux-sh-low.c (num_regs): Remove.
11076 (sh_num_regs): Define.
11077 (sh_regmap): Renamed from regmap, made static.
11078 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11079 made static.
11080 (sh_cannot_store_register): Renamed from cannot_store_register,
11081 made static.
11082 (the_low_target): New.
11083 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11084 (the_low_target): New.
11085
110862002-04-09 Daniel Jacobowitz <drow@mvista.com>
11087
11088 * Makefile.in: Add stamp-h target.
11089 * configure.in: Create stamp-h.
11090 * configure: Regenerated.
11091
110922002-04-09 Daniel Jacobowitz <drow@mvista.com>
11093
11094 * inferiors.c: New file.
11095 * target.c: New file.
11096 * target.h: New file.
11097 * Makefile.in: Add target.o and inferiors.o. Update
11098 dependencies.
11099 * linux-low.c (inferior_pid): New static variable,
11100 moved from server.c.
11101 (linux_create_inferior): Renamed from create_inferior.
11102 Call add_inferior. Return 0 on success instead of a PID.
11103 (linux_attach): Renamed from myattach.
11104 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11105 (linux_thread_alive): Renamed from mythread_alive.
11106 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11107 child dies.
11108 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11109 (regsets_store_inferior_registers): Correct error message.
11110 Add missing ``return 0''.
11111 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11112 (linux_store_registers): Renamed from store_inferior_registers.
11113 (linux_read_memory): Renamed from read_inferior_memory.
11114 (linux_write_memory): Renamed from write_inferior_memory.
11115 (linux_target_ops): New structure.
11116 (initialize_low): Call set_target_ops ().
11117 * remote-utils.c (unhexify): New function.
11118 (hexify): New function.
11119 (input_interrupt): Send signals to ``signal_pid''.
11120 * server.c (inferior_pid): Remove.
11121 (start_inferior): Update create_inferior call.
11122 (attach_inferior): Call add_inferior.
11123 (handle_query): New function.
11124 (main): Call handle_query for `q' packets.
11125 * server.h: Include "target.h". Remove obsolete prototypes.
11126 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11127
111282002-04-09 Daniel Jacobowitz <drow@mvista.com>
11129
11130 * Makefile.in: Add WARN_CFLAGS. Update configury
11131 dependencies.
11132 * configure.in: Check for <string.h>
11133 * configure: Regenerate.
11134 * config.in: Regenerate.
11135 * gdbreplay.c: Include needed system headers.
11136 (remote_open): Remove strchr prototype.
11137 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11138 * regcache.c (supply_register): Change buf argument to const void *.
11139 (supply_register_by_name): Likewise.
11140 (collect_register): Change buf argument to void *.
11141 (collect_register_by_name): Likewise.
11142 * regcache.h: Add missing prototypes.
11143 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11144 * server.c (handle_query): New function.
11145 (attached): New static variable, moved out of main.
11146 (main): Quiet longjmp clobber warnings.
11147 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11148 * utils.c (error): Remove NORETURN.
11149 (fatal): Likewise.
This page took 1.831282 seconds and 4 git commands to generate.