[gdbserver, aarch64] Set usrregs to NULL in regs_info
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c2d65f38
YQ
12015-07-09 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_regmap): Remove.
4 (aarch64_usrregs_info): Remove.
5 (regs_info): Set field usrregs to NULL.
6
b20a6524
MM
72015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8
9 * linux-low.c: Include "rsp-low.h"
10 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
12 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
13 (handle_btrace_enable_pt): New.
14 (handle_btrace_general_set): Support "pt".
15 (handle_btrace_conf_general_set): Support "pt:size".
16
96c97461
PL
172015-06-29 Pierre Langlois <pierre.langlois@arm.com>
18
19 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
20 Z_PACKET_SW_BP.
21
37d66942
PL
222015-06-29 Pierre Langlois <pierre.langlois@arm.com>
23
24 * linux-aarch64-low.c: Remove comment about endianness.
25 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
26 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
27 memcmp.
28
dc06243f
GB
292015-06-24 Gary Benson <gbenson@redhat.com>
30
31 * linux-i386-ipa.c (stdint.h): Do not include.
32 * lynx-i386-low.c (stdint.h): Likewise.
33 * lynx-ppc-low.c (stdint.h): Likewise.
34 * mem-break.c (stdint.h): Likewise.
35 * thread-db.c (stdint.h): Likewise.
36 * tracepoint.c (stdint.h): Likewise.
37 * win32-low.c (stdint.h): Likewise.
38
124e13d9
SM
392015-06-18 Simon Marchi <simon.marchi@ericsson.com>
40
41 * server.c (write_qxfer_response): Update call to
42 remote_escape_output.
43
909c2cda
JK
442015-06-15 Aleksandar Ristovski <aristovski@qnx.com
45 Jan Kratochvil <jan.kratochvil@redhat.com>
46
47 Merge multiple hex conversions.
48 * gdbreplay.c (tohex): Rename to 'fromhex'.
49 (logchar): Use fromhex.
50
24c05f46
JK
512015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
52
53 * server.c (handle_qxfer_libraries): Set `version' attribute for
54 <library-list>.
55
14d2069a
GB
562015-06-10 Gary Benson <gbenson@redhat.com>
57
58 * target.h (struct target_ops) <multifs_open>: New field.
59 <multifs_unlink>: Likewise.
60 <multifs_readlink>: Likewise.
61 * linux-low.c (nat/linux-namespaces.h): New include.
62 (linux_target_ops): Initialize the_target->multifs_open,
63 the_target->multifs_unlink and the_target->multifs_readlink.
64 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
65 * hostio.c (hostio_fs_pid): New static variable.
66 (hostio_handle_new_gdb_connection): New function.
67 (handle_setfs): Likewise.
68 (handle_open): Use the_target->multifs_open as appropriate.
69 (handle_unlink): Use the_target->multifs_unlink as appropriate.
70 (handle_readlink): Use the_target->multifs_readlink as
71 appropriate.
72 (handle_vFile): Handle vFile:setfs packets.
73 * server.c (handle_query): Call hostio_handle_new_gdb_connection
74 after target_handle_new_gdb_connection.
75
4b8b5e72
GB
762015-06-10 Gary Benson <gbenson@redhat.com>
77
78 * configure.ac (AC_CHECK_FUNCS): Add setns.
79 * config.in: Regenerate.
80 * configure: Likewise.
81 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
82 (linux-namespaces.o): New rule.
83 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
84
3ac2e371
GB
852015-06-09 Gary Benson <gbenson@redhat.com>
86
87 * hostio.c (handle_open): Process mode argument with
88 fileio_to_host_mode.
89
ca9b78ce
YQ
902015-06-01 Yao Qi <yao.qi@linaro.org>
91
92 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
93 * linux-x86-low.c: Likewise.
94
bfacd19d
DB
952015-05-28 Don Breazeal <donb@codesourcery.com>
96
97 * linux-low.c (handle_extended_wait): Initialize
98 thread_info.last_resume_kind for new fork children.
99
452003ef
PA
1002015-05-15 Pedro Alves <palves@redhat.com>
101
102 * target.h (target_handle_new_gdb_connection): Rewrite using if
103 wrapped in do/while.
104
1041a03c
JB
1052015-05-14 Joel Brobecker <brobecker@adacore.com>
106
107 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
108 * configure, config.in: Regenerate.
109 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
110 Declare typedef.
111
c269dbdb
DB
1122015-05-12 Don Breazeal <donb@codesourcery.com>
113
114 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
115 PTRACE_EVENT_VFORK_DONE.
116 (linux_low_ptrace_options, extended_event_reported): Add vfork
117 events.
118 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
119 and "vforkdone" for RSP 'T' Stop Reply Packet.
120 * server.h (report_vfork_events): Declare
121 global variable.
122
3a8a0396
DB
1232015-05-12 Don Breazeal <donb@codesourcery.com>
124
125 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
126 (the_low_target) <new_fork>: Initialize new member.
127 * linux-arm-low.c (arm_new_fork): New function.
128 (the_low_target) <new_fork>: Initialize new member.
129 * linux-low.c (handle_extended_wait): Call new target function
130 new_fork.
131 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
132 * linux-mips-low.c (mips_add_watchpoint): New function
133 extracted from mips_insert_point.
134 (the_low_target) <new_fork>: Initialize new member.
135 (mips_linux_new_fork): New function.
136 (mips_insert_point): Call mips_add_watchpoint.
137 * linux-x86-low.c (x86_linux_new_fork): New function.
138 (the_low_target) <new_fork>: Initialize new member.
139
de0d863e
DB
1402015-05-12 Don Breazeal <donb@codesourcery.com>
141
142 * linux-low.c (handle_extended_wait): Implement return value,
143 rename argument 'event_child' to 'event_lwp', handle
144 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
145 (linux_low_ptrace_options): New function.
146 (linux_low_filter_event): Call linux_low_ptrace_options,
147 use different argument fo linux_enable_event_reporting,
148 use return value from handle_extended_wait.
149 (extended_event_reported): New function.
150 (linux_wait_1): Call extended_event_reported and set
151 status to report fork events.
152 (linux_write_memory): Add pid to debug message.
153 (reset_lwp_ptrace_options_callback): New function.
154 (linux_handle_new_gdb_connection): New function.
155 (linux_target_ops): Initialize new structure member.
156 * linux-low.h (struct lwp_info) <waitstatus>: New member.
157 * lynx-low.c: Initialize new structure member.
158 * remote-utils.c (prepare_resume_reply): Implement stop reason
159 "fork" for "T" stop message.
160 * server.c (handle_query): Call handle_new_gdb_connection.
161 * server.h (report_fork_events): Declare global flag.
162 * target.h (struct target_ops) <handle_new_gdb_connection>:
163 New member.
164 (target_handle_new_gdb_connection): New macro.
165 * win32-low.c: Initialize new structure member.
166
ddcbc397
DB
1672015-05-12 Don Breazeal <donb@codesourcery.com>
168
169 * mem-break.c (APPEND_TO_LIST): Define macro.
170 (clone_agent_expr): New function.
171 (clone_one_breakpoint): New function.
172 (clone_all_breakpoints): New function.
173 * mem-break.h: Declare new functions.
174
89245bc0
DB
1752015-05-12 Don Breazeal <donb@codesourcery.com>
176
177 * linux-low.c (linux_supports_fork_events): New function.
178 (linux_supports_vfork_events): New function.
179 (linux_target_ops): Initialize new structure members.
180 (initialize_low): Call linux_check_ptrace_features.
181 * lynx-low.c (lynx_target_ops): Initialize new structure
182 members.
183 * server.c (report_fork_events, report_vfork_events):
184 New global flags.
185 (handle_query): Add new features to qSupported packet and
186 response.
187 (captured_main): Initialize new global variables.
188 * target.h (struct target_ops) <supports_fork_events>:
189 New member.
190 <supports_vfork_events>: New member.
191 (target_supports_fork_events): New macro.
192 (target_supports_vfork_events): New macro.
193 * win32-low.c (win32_target_ops): Initialize new structure
194 members.
195
835205d0
GB
1962015-05-12 Gary Benson <gbenson@redhat.com>
197
198 * server.c (handle_qxfer_exec_file): Use current process
199 if annex is empty.
200
21e94bd9
SL
2012015-05-08 Sandra Loosemore <sandra@codesourcery.com>
202
203 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
204 Remove HAVE_PTRACE_GETREGS conditionals.
205 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
206 instead of PTRACE_GETREGS and PTRACE_SETREGS.
207
45614f15
YQ
2082015-05-08 Yao Qi <yao.qi@linaro.org>
209
210 * linux-low.c (linux_supports_conditional_breakpoints): New
211 function.
212 (linux_target_ops): Install new target method.
213 * lynx-low.c (lynx_target_ops): Install NULL hook for
214 supports_conditional_breakpoints.
215 * nto-low.c (nto_target_ops): Likewise.
216 * spu-low.c (spu_target_ops): Likewise.
217 * win32-low.c (win32_target_ops): Likewise.
218 * server.c (handle_query): Check
219 target_supports_conditional_breakpoints.
220 * target.h (struct target_ops) <supports_conditional_breakpoints>:
221 New field.
222 (target_supports_conditional_breakpoints): New macro.
223
80ad801e
PA
2242015-05-06 Pedro Alves <palves@redhat.com>
225
226 PR server/18081
227 * server.c (start_inferior): If the process exits, mourn it.
228
819843c7
GB
2292015-04-21 Gary Benson <gbenson@redhat.com>
230
231 * hostio.c (fileio_open_flags_to_host): Factored out to
232 fileio_to_host_openflags in common/fileio.c. Single use
233 updated.
234
a2d5a9d7
MF
2352015-04-17 Max Filippov <jcmvbkbc@gmail.com>
236
237 * linux-xtensa-low.c (xtensa_fill_gregset)
238 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
239 XCHAL_HAVE_LOOP.
240
deb44829
MF
2412015-04-17 Max Filippov <jcmvbkbc@gmail.com>
242
243 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
244 (regs_info): Replace usrregs pointer with NULL.
245
e57f1de3
GB
2462015-04-17 Gary Benson <gbenson@redhat.com>
247
248 * target.h (struct target_ops) <pid_to_exec_file>: New field.
249 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
250 * server.c (handle_qxfer_exec_file): New function.
251 (qxfer_packets): Add exec-file entry.
252 (handle_query): Report qXfer:exec-file:read as supported packet.
253
62828379
RN
2542015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
255
256 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
257
b88bb450
GB
2582015-04-09 Gary Benson <gbenson@redhat.com>
259
260 * hostio-errno.c (errno_to_fileio_error): Remove function.
261 Update caller to use remote_fileio_to_fio_error.
262
c8f4bfdd
YQ
2632015-04-09 Yao Qi <yao.qi@linaro.org>
264
265 * linux-low.c (linux_insert_point): Call
266 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
267 (linux_remove_point): Call remove_memory_breakpoint if type is
268 raw_bkpt_type_sw.
269 * linux-x86-low.c (x86_insert_point): Don't call
270 insert_memory_breakpoint.
271 (x86_remove_point): Don't call remove_memory_breakpoint.
272
41f98f02
PA
2732015-04-01 Pedro Alves <palves@redhat.com>
274 Cleber Rosa <crosa@redhat.com>
275
276 * server.c (gdbserver_usage): Reorganize and extend the usage
277 message.
278
2bf6fb9d
PA
2792015-03-24 Pedro Alves <palves@redhat.com>
280
281 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
282 output. Also dump TRAP_TRACE.
283 (linux_low_filter_event): In debug output, distinguish a
284 resume_stop SIGSTOP from a delayed SIGSTOP.
285
369f6daa
GB
2862015-03-24 Gary Benson <gbenson@redhat.com>
287
288 * linux-x86-low.c (x86_linux_new_thread): Moved to
289 nat/x86-linux.c.
290 (x86_linux_prepare_to_resume): Likewise.
291
8e5d4070
GB
2922015-03-24 Gary Benson <gbenson@redhat.com>
293
294 * Makefile.in (x86-linux-dregs.o): New rule.
295 * configure.srv: Add x86-linux-dregs.o to relevant targets.
296 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
297 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
298 (x86_linux_dr_get): Likewise.
299 (x86_linux_dr_set): Likewise.
300 (update_debug_registers_callback): Likewise.
301 (x86_linux_dr_set_addr): Likewise.
302 (x86_linux_dr_get_addr): Likewise.
303 (x86_linux_dr_set_control): Likewise.
304 (x86_linux_dr_get_control): Likewise.
305 (x86_linux_dr_get_status): Likewise.
306 (x86_linux_update_debug_registers): Likewise.
307
2b95d440
GB
3082015-03-24 Gary Benson <gbenson@redhat.com>
309
310 * linux-x86-low.c (x86_linux_update_debug_registers):
311 New function, factored out from...
312 (x86_linux_prepare_to_resume): ...this.
313
14b0bc68
GB
3142015-03-24 Gary Benson <gbenson@redhat.com>
315
316 * linux-x86-low.c (x86_linux_dr_get): Update comments.
317 (x86_linux_dr_set): Likewise.
318 (update_debug_registers_callback): Likewise.
319 (x86_linux_dr_set_addr): Likewise.
320 (x86_linux_dr_get_addr): Likewise.
321 (x86_linux_dr_set_control): Likewise.
322 (x86_linux_dr_get_control): Likewise.
323 (x86_linux_dr_get_status): Likewise.
324 (x86_linux_prepare_to_resume): Likewise.
325
5dfe6ca8
GB
3262015-03-24 Gary Benson <gbenson@redhat.com>
327
328 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
329 Use perror_with_name. Pass string through gettext.
330 (x86_linux_dr_set): Likewise.
331
d33472ad
GB
3322015-03-24 Gary Benson <gbenson@redhat.com>
333
334 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
335 (x86_linux_dr_set_addr): ...this.
336 (x86_dr_low_get_addr): Rename to...
337 (x86_linux_dr_get_addr): ...this.
338 (x86_dr_low_set_control): Rename to...
339 (x86_linux_dr_set_control): ...this.
340 (x86_dr_low_get_control): Rename to...
341 (x86_linux_dr_get_control): ...this.
342 (x86_dr_low_get_status): Rename to...
343 (x86_linux_dr_get_status): ...this.
344 (x86_dr_low): Update with new function names.
345
4b134ca1
GB
3462015-03-24 Gary Benson <gbenson@redhat.com>
347
348 * Makefile.in (x86-linux.o): New rule.
349 * configure.srv: Add x86-linux.o to relevant targets.
350 * linux-low.c (lwp_set_arch_private_info): New function.
351 (lwp_arch_private_info): Likewise.
352 * linux-x86-low.c: Include nat/x86-linux.h.
353 (arch_lwp_info): Removed structure.
354 (update_debug_registers_callback):
355 Use lwp_set_debug_registers_changed.
356 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
357 and lwp_set_debug_registers_changed.
358 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
359
34c703da
GB
3602015-03-24 Gary Benson <gbenson@redhat.com>
361
362 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
363 * linux-arm-low.c (arm_new_thread): Likewise.
364 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
365 * linux-mips-low.c (mips_linux_new_thread): Likewise.
366 * linux-x86-low.c (x86_linux_new_thread): Likewise.
367 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
368
cff068da
GB
3692015-03-24 Gary Benson <gbenson@redhat.com>
370
371 * linux-low.c (ptid_of_lwp): New function.
372 (lwp_is_stopped): Likewise.
373 (lwp_stop_reason): Likewise.
374 * linux-x86-low.c (update_debug_registers_callback):
375 Use lwp_is_stopped.
376 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
377 lwp_stop_reason.
378
b2f7c7e8
GB
3792015-03-24 Gary Benson <gbenson@redhat.com>
380
381 * linux-low.h (linux_stop_lwp): Remove declaration.
382
6d4ee8c6
GB
3832015-03-24 Gary Benson <gbenson@redhat.com>
384
385 * linux-low.h: Include nat/linux-nat.h.
386 * linux-low.c (iterate_over_lwps_args): New structure.
387 (iterate_over_lwps_filter): New function.
388 (iterate_over_lwps): Likewise.
389 * linux-x86-low.c (update_debug_registers_callback):
390 Update signature to what iterate_over_lwps expects.
391 Remove PID check that iterate_over_lwps now performs.
392 (x86_dr_low_set_addr): Use iterate_over_lwps.
393 (x86_dr_low_set_control): Likewise.
394
70a0bb6b
GB
3952015-03-24 Gary Benson <gbenson@redhat.com>
396
397 * linux-x86-low.c (x86_debug_reg_state): New function.
398 (x86_linux_prepare_to_resume): Use the above.
399
7b669087
GB
4002015-03-24 Gary Benson <gbenson@redhat.com>
401
402 * linux-low.c (current_lwp_ptid): New function.
403 * linux-x86-low.c: Include nat/linux-nat.h.
404 (x86_dr_low_get_addr): Use current_lwp_ptid.
405 (x86_dr_low_get_control): Likewise.
406 (x86_dr_low_get_status): Likewise.
407
eef49a3d
PA
4082015-03-20 Pedro Alves <palves@redhat.com>
409
410 * tracepoint.c (cmd_qtstatus): Make "str" const.
411
b2333d22
PA
4122015-03-20 Pedro Alves <palves@redhat.com>
413
414 * server.c (handle_general_set): Make "req_str" const.
415
23f238d3
PA
4162015-03-19 Pedro Alves <palves@redhat.com>
417
418 * linux-low.c (linux_resume_one_lwp): Rename to ...
419 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
420 instead call perror_with_name.
421 (check_ptrace_stopped_lwp_gone): New function.
422 (linux_resume_one_lwp): Reimplement as wrapper around
423 linux_resume_one_lwp_throw that swallows errors if the LWP is
424 gone.
425
91baf43f
PA
4262015-03-19 Pedro Alves <palves@redhat.com>
427
428 * linux-low.c (count_events_callback, select_event_lwp_callback):
429 No longer check whether the thread has resume_stop as last resume
430 kind.
431
8bf3b159
PA
4322015-03-19 Pedro Alves <palves@redhat.com>
433
434 * linux-low.c (count_events_callback, select_event_lwp_callback):
435 Use the lwp's status_pending_p field, not the thread's.
436
b90fc188
PA
4372015-03-19 Pedro Alves <palves@redhat.com>
438
439 * linux-low.c (select_event_lwp_callback): Update comments to
440 no longer mention SIGTRAP.
441
464b0089
GB
4422015-03-18 Gary Benson <gbenson@redhat.com>
443
444 * server.c (handle_query): Do not report vFile:fstat as supported.
445
aa9e327f
GB
4462015-03-11 Gary Benson <gbenson@redhat.com>
447
448 * hostio.c (sys/types.h): New include.
449 (sys/stat.h): Likewise.
450 (common-remote-fileio.h): Likewise.
451 (handle_fstat): New function.
452 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 453
791c0056
GB
4542015-03-11 Gary Benson <gbenson@redhat.com>
455
456 * configure.ac (AC_CHECK_MEMBERS): Add checks for
457 struct stat.st_blocks and struct stat.st_blksize.
458 * configure: Regenerate.
459 * config.in: Likewise.
460 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
461 (OBS): Add common-remote-fileio.o.
462 (common-remote-fileio.o): New rule.
463
9a9df970
PA
4642015-03-09 Pedro Alves <palves@redhat.com>
465
466 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
467 'struct sockaddr' pointer in 'accept' call.
468
9eb1356e
PA
4692015-03-09 Pedro Alves <palves@redhat.com>
470
471 Revert:
472 2015-03-07 Pedro Alves <palves@redhat.com>
473 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
474 or <winsock2.h> here. Instead include "gdb_socket.h".
475 (remote_open): Use union gdb_sockaddr_u.
476 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
477 or <winsock2.h> here. Instead include "gdb_socket.h".
478 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
479 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
480 or <sys/un.h>.
481 (init_named_socket, gdb_agent_helper_thread): Use union
482 gdb_sockaddr_u.
483
aac331e4
PA
4842015-03-07 Pedro Alves <palves@redhat.com>
485
486 * configure.ac (build_warnings): Move
487 -Wdeclaration-after-statement to the C-specific set.
488 * configure: Regenerate.
489
366c75fc
PA
4902015-03-07 Pedro Alves <palves@redhat.com>
491
492 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
493 or <winsock2.h> here. Instead include "gdb_socket.h".
494 (remote_open): Use union gdb_sockaddr_u.
495 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
496 or <winsock2.h> here. Instead include "gdb_socket.h".
497 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
498 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
499 or <sys/un.h>.
500 (init_named_socket, gdb_agent_helper_thread): Use union
501 gdb_sockaddr_u.
502
492d29ea
PA
5032015-03-07 Pedro Alves <palves@redhat.com>
504
505 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
506 instead.
507
60a191ed
YQ
5082015-03-06 Yao Qi <yao.qi@linaro.org>
509
510 * linux-aarch64-low.c (aarch64_insert_point): Use
511 show_debug_regs as a boolean.
512 (aarch64_remove_point): Likewise.
513
f5771b1d
PA
5142015-03-05 Pedro Alves <palves@redhat.com>
515
516 * lynx-low.c (lynx_target_ops): Install NULL hooks for
517 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
518 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
519 * nto-low.c (nto_target_ops): Likewise.
520 * spu-low.c (spu_target_ops): Likewise.
521 * win32-low.c (win32_target_ops): Likewise.
522
3e572f71
PA
5232015-03-04 Pedro Alves <palves@redhat.com>
524
525 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
526 Decide whether a breakpoint triggered based on the SIGTRAP's
527 siginfo.si_code.
528 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
529 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
530 (linux_low_filter_event): Check for breakpoints before checking
531 watchpoints.
532 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
533 siginfo.si_code.
534 (linux_stopped_by_sw_breakpoint)
535 (linux_supports_stopped_by_sw_breakpoint)
536 (linux_stopped_by_hw_breakpoint)
537 (linux_supports_stopped_by_hw_breakpoint): New functions.
538 (linux_target_ops): Install new target methods.
539
1ec68e26
PA
5402015-03-04 Pedro Alves <palves@redhat.com>
541
542 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
543 * server.c (swbreak_feature, hwbreak_feature): New globals.
544 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
545 (captured_main): Clear swbreak_feature and hwbreak_feature.
546 * server.h (swbreak_feature, hwbreak_feature): Declare.
547 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
548 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
549 supports_stopped_by_hw_breakpoint>: New fields.
550 (target_supports_stopped_by_sw_breakpoint)
551 (target_stopped_by_sw_breakpoint)
552 (target_supports_stopped_by_hw_breakpoint)
553 (target_stopped_by_hw_breakpoint): Declare.
554
15c66dd6
PA
5552015-03-04 Pedro Alves <palves@redhat.com>
556
557 enum lwp_stop_reason -> enum target_stop_reason
558 * linux-low.c (check_stopped_by_breakpoint): Adjust.
559 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
560 (linux_wait_1, stuck_in_jump_pad_callback)
561 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
562 (linux_stopped_by_watchpoint):
563 * linux-low.h (enum lwp_stop_reason): Delete.
564 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
565 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
566
98fc70d6
YQ
5672015-03-04 Yao Qi <yao.qi@linaro.org>
568
569 * Makefile.in (SFILES): Add linux-aarch64-low.c.
570
dd2ac174
GB
5712015-03-03 Gary Benson <gbenson@redhat.com>
572
573 * hostio.c (handle_vFile): Fix prefix lengths.
574
d68e53f4
MM
5752015-03-03 Markus Metzger <markus.t.metzger@intel.com>
576
577 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
578 ptr_bits.
579
bf2d68ab
AA
5802015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
581
582 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
583 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
584 (clean): Add "rm -f" for above C files.
585 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
586 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
587 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
588 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
589 * linux-s390-low.c (HWCAP_S390_VX): New macro.
590 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
591 (init_registers_s390x_vx_linux64)
592 (init_registers_s390x_tevx_linux64)
593 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
594 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
595 declarations.
596 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
597 (s390_store_vxrs_high): New functions.
598 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
599 NT_S390_VXRS_HIGH.
600 (s390_arch_setup): Add logic for selecting one of the new target
601 descriptions. Activate the new vector regsets if applicable.
602 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
603 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
604 and init_registers_s390x_tevx_linux64.
605
c966a859
PA
6062015-03-01 Pedro Alves <palves@redhat.com>
607
608 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
609 parameter.
610
4180215b
PA
6112015-02-27 Pedro Alves <palves@redhat.com>
612
613 * linux-x86-low.c (u_debugreg_offset): New function.
614 (x86_linux_dr_get, x86_linux_dr_set): Use it.
615
749bab01
PA
6162015-02-27 Pedro Alves <palves@redhat.com>
617
618 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
619 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
620 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
621 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
622 (ps_lsetfpregs, ps_getpid)
623 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
624 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
625 (ps_lsetxregs, ps_plog): Declare.
626
3c14e5a3
PA
6272015-02-27 Pedro Alves <palves@redhat.com>
628
629 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
630 IP_AGENT_EXPORT_FUNC.
631 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
632 IP_AGENT_EXPORT_FUNC.
633 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
634 (IP_AGENT_EXPORT): Delete.
635 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
636 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
637 (gdb_trampoline_buffer_error, collecting, gdb_collect)
638 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
639 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
640 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
641 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
642 (traceframe_read_count, traceframe_write_count)
643 (traceframes_created, trace_state_variables, get_raw_reg)
644 (get_trace_state_variable_value, set_trace_state_variable_value)
645 (ust_loaded, helper_thread_id, cmd_buf): Use
646 IPA_SYM_EXPORTED_NAME.
647 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
648 (tracepoints) Use IP_AGENT_EXPORT_VAR.
649 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
650 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
651 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
652 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
653 EXTERN_C_PUSH/EXTERN_C_POP.
654 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
655 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
656 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
657 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
658 (traceframe_write_count, traceframe_read_count)
659 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
660 (about_to_request_buffer_space, get_trace_state_variable_value)
661 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
662 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
663 EXTERN_C_PUSH/EXTERN_C_POP.
664 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
665 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
666 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
667 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
668 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
669 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
670 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
671 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
672 Define.
673 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
674 (IP_AGENT_EXPORT_VAR_DECL): Define.
675 (tracing): Declare.
676 (gdb_agent_get_raw_reg): Declare.
677
fe978cb0
PA
6782015-02-27 Tom Tromey <tromey@redhat.com>
679 Pedro Alves <palves@redhat.com>
680
681 Rename symbols whose names are reserved C++ keywords throughout.
682
3bc3d82a
PA
6832015-02-27 Pedro Alves <palves@redhat.com>
684
685 * Makefile.in (COMPILER): New, get it from autoconf.
686 (CXX): Get from autoconf instead.
687 (COMPILE.pre): Use COMPILER.
688 (CC-LD): Rename to ...
689 (CC_LD): ... this. Use COMPILER.
690 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
691 (CXX_FOR_TARGET): Default to g++ instead of gcc.
692 * acinclude.m4: Include build-with-cxx.m4.
693 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
694 Disable -Werror by default if building in C++ mode.
695 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
696 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
697 the C++ compiler. Save/restore CXXFLAGS too.
698 * configure: Regenerate.
699
07697489
PA
7002015-02-27 Pedro Alves <palves@redhat.com>
701
702 * acinclude.m4: Include libiberty.m4.
703 * configure.ac: Call libiberty_INIT.
704 * config.in, configure: Regenerate.
705
9beb7c4e
PA
7062015-02-26 Pedro Alves <palves@redhat.com>
707
708 * linux-low.c (linux_wait_1): When incrementing the PC past a
709 program breakpoint always use the_low_target.breakpoint_len as
710 increment, rather than the maximum between that and
711 the_low_target.decr_pc_after_break.
712
8090aef2
PA
7132015-02-23 Pedro Alves <palves@redhat.com>
714
715 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
716 thread was doing a step-over; always adjust the PC if
717 we stepped over a permanent breakpoint.
718 (linux_wait_1): If we stepped over breakpoint that was on top of a
719 permanent breakpoint, manually advance the PC past it.
720
bc9540e8
PA
7212015-02-23 Pedro Alves <palves@redhat.com>
722
723 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
724 modes.
725 (x86_fill_gregset, x86_store_gregset): Use it when handling
726 $orig_eax.
727
2db9a427
PA
7282015-02-20 Pedro Alves <palves@redhat.com>
729
730 * thread-db.c: Include "nat/linux-procfs.h".
731 (thread_db_init): Skip listing new threads if the kernel supports
732 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
733
afa8d396
PA
7342015-02-20 Pedro Alves <palves@redhat.com>
735
736 * linux-low.c (status_pending_p_callback): Use ptid_match.
737
c9587f88
AT
7382015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
739
740 PR breakpoints/16812
741 * linux-low.c (wstatus_maybe_breakpoint): Remove.
742 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
743 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
744
b05ec7a5
AT
7452015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
746
747 PR breakpoints/15956
748 * tracepoint.c (cmd_qtinit): Add check for current_thread.
749
d33501a5
MM
7502015-02-09 Markus Metzger <markus.t.metzger@intel.com>
751
752 * linux-low.c (linux_low_btrace_conf): Print size.
753 * server.c (handle_btrace_conf_general_set): New.
754 (hanle_general_set): Call handle_btrace_conf_general_set.
755 (handle_query): Report Qbtrace-conf:bts:size as supported.
756
f4abbc16
MM
7572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
758
759 * linux-low.c (linux_low_enable_btrace): Update parameters.
760 (linux_low_btrace_conf): New.
761 (linux_target_ops)<to_btrace_conf>: Initialize.
762 * server.c (current_btrace_conf): New.
763 (handle_btrace_enable): Rename to ...
764 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
765 to target_enable_btrace. Update comment. Update users.
766 (handle_qxfer_btrace_conf): New.
767 (qxfer_packets): Add btrace-conf entry.
768 (handle_query): Report qXfer:btrace-conf:read as supported packet.
769 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
770 (target_ops)<read_btrace_conf>: New.
771 (target_enable_btrace): Update parameters.
772 (target_read_btrace_conf): New.
773
043c3577
MM
7742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
775
776 * server.c (handle_btrace_general_set): Remove call to
777 target_supports_btrace.
778 (supported_btrace_packets): New.
779 (handle_query): Call supported_btrace_packets.
780 * target.h: include btrace-common.h.
781 (btrace_target_info): Removed.
782 (supports_btrace, target_supports_btrace): Update parameters.
783
734b0e4b
MM
7842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
785
786 * Makefile.in (SFILES): Add common/btrace-common.c.
787 (OBS): Add common/btrace-common.o.
788 (btrace-common.o): Add build rules.
789 * linux-low: Include btrace-common.h.
790 (linux_low_read_btrace): Use struct btrace_data. Call
791 btrace_data_init and btrace_data_fini.
792
d6c146e9
PA
7932015-02-06 Pedro Alves <palves@redhat.com>
794
795 * thread-db.c (find_new_threads_callback): Add debug output.
796
20ba1ce6
PA
7972015-02-04 Pedro Alves <palves@redhat.com>
798
799 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
800 (resume_stopped_resumed_lwps): New function.
801 (linux_wait_for_event_filtered): Use it.
802
8cc73a39
SDJ
8032015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
804
805 * Makefile.in (SFILES): Add linux-personality.c.
806 (linux-personality.o): New rule.
807 * configure.srv (srv_linux_obj): Add linux-personality.o to the
808 list of objects to be built.
809 * linux-low.c: Include nat/linux-personality.h.
810 (linux_create_inferior): Remove code to disable address space
811 randomization (moved to ../nat/linux-personality.c). Create
812 cleanup to disable address space randomization.
813
fb23d554
SDJ
8142015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
815
816 * Makefile.in (posix-strerror.o): New rule.
817 (mingw-strerror.o): Likewise.
818 * configure: Regenerated.
819 * configure.ac: Source file ../common/common.host. Initialize new
820 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
821
cdf43629
YQ
8222015-01-14 Yao Qi <yao@codesourcery.com>
823
824 * Makefile.in (SFILES): Add nat/ppc-linux.c.
825 (ppc-linux.o): New rule.
826 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
827 * configure.ac: AC_CHECK_FUNCS(getauxval).
828 * config.in: Re-generated.
829 * configure: Re-generated.
830 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
831 ppc64_64bit_inferior_p
832
514c5338
YQ
8332015-01-14 Yao Qi <yao@codesourcery.com>
834
835 * linux-ppc-low.c: Include "nat/ppc-linux.h".
836 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
837 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
838 (PT_ORIG_R3, PT_TRAP): Likewise.
839 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
840 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
841 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
842
3368c1e5
JB
8432015-01-10 Joel Brobecker <brobecker@adacore.com>
844
845 * i387-fp.c (i387_cache_to_xsave): In look over
846 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
847 zmmh_low_space field by use of zmmh_high_space.
848
582511be
PA
8492015-01-09 Pedro Alves <palves@redhat.com>
850
851 * linux-low.c (step_over_bkpt): Move higher up in the file.
852 (handle_extended_wait): Don't store the stop_pc here.
853 (get_stop_pc): Adjust comments and rename to ...
854 (check_stopped_by_breakpoint): ... this. Record whether the LWP
855 stopped for a software breakpoint or hardware breakpoint.
856 (thread_still_has_status_pending_p): New function.
857 (status_pending_p_callback): Use
858 thread_still_has_status_pending_p. If the event is no longer
859 interesting, resume the LWP.
860 (handle_tracepoints): Add assert.
861 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
862 (wstatus_maybe_breakpoint): New function.
863 (cancel_breakpoint): Delete function.
864 (check_stopped_by_watchpoint): New function, factored out from
865 linux_low_filter_event.
866 (lp_status_maybe_breakpoint): Delete function.
867 (linux_low_filter_event): Remove filter_ptid argument.
868 Leave thread group exits pending here. Store the LWP's stop PC.
869 Always leave events pending.
870 (linux_wait_for_event_filtered): Pull all events out of the
871 kernel, and leave them all pending.
872 (count_events_callback, select_event_lwp_callback): Consider all
873 events.
874 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
875 (select_event_lwp): Only give preference to the stepping LWP in
876 all-stop mode. Adjust comments.
877 (ignore_event): New function.
878 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
879 references to cancel_breakpoints. Adjust to renames. Also give
880 equal priority to all LWPs that have had events in non-stop mode.
881 If reporting a software breakpoint event, unadjust the LWP's PC.
882 (linux_wait): If linux_wait_1 returned an ignored event, retry.
883 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
884 Adjust.
885 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
886 (resume_status_pending_p): Use thread_still_has_status_pending_p.
887 (linux_stopped_by_watchpoint): Adjust.
888 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
889 * linux-low.h (enum lwp_stop_reason): New.
890 (struct lwp_info) <stop_pc>: Adjust comment.
891 <stopped_by_watchpoint>: Delete field.
892 <stop_reason>: New field.
893 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
894 * mem-break.c (software_breakpoint_inserted_here)
895 (hardware_breakpoint_inserted_here): New function.
896 * mem-break.h (software_breakpoint_inserted_here)
897 (hardware_breakpoint_inserted_here): Declare.
898 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
899 (cancel_breakpoints): Delete.
900 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
901 (upload_fast_traceframes): Remove references to
902 cancel_breakpoints.
903
a33e3959
PA
9042015-01-09 Pedro Alves <palves@redhat.com>
905
906 * thread-db.c (find_new_threads_callback): Ignore thread if the
907 kernel thread ID is -1.
908
8784d563
PA
9092015-01-09 Pedro Alves <palves@redhat.com>
910
911 * linux-low.c (linux_attach_fail_reason_string): Move to
912 nat/linux-ptrace.c, and rename.
913 (linux_attach_lwp): Update comment.
914 (attach_proc_task_lwp_callback): New function.
915 (linux_attach): Adjust to rename and use
916 linux_proc_attach_tgid_threads.
917 (linux_attach_fail_reason_string): Delete declaration.
918
76f2b779
JB
9192015-01-01 Joel Brobecker <brobecker@adacore.com>
920
921 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
922 * server.c (gdbserver_version): Likewise.
923
fafcc06a
SDJ
9242014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
925
926 * remote-utils.c: Include ctype.h.
927 (input_interrupt): Explicitly handle the case when the char
928 received is the NUL byte. Improve the printing of non-ASCII
929 characters.
930
beed38b8
JB
9312014-12-16 Joel Brobecker <brobecker@adacore.com>
932
933 * linux-low.c (linux_low_filter_event): Update call to
934 linux_enable_event_reporting following the addition of
935 a new parameter to that function.
936
bf330350
CU
9372014-12-16 Catalin Udma <catalin.udma@freescale.com>
938
939 PR server/17457
940 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
941 (AARCH64_FPCR_REGNO): Likewise.
942 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
943 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
944 (aarch64_store_fpregset): Likewise.
945
5227d625
JB
9462014-12-15 Joel Brobecker <brobecker@adacore.com>
947
948 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
949 Remove FIXME comment about assumption about N.
950
f93b65a0
JB
9512014-12-13 Joel Brobecker <brobecker@adacore.com>
952
953 * configure.ac: If large-file support is disabled in GDBserver,
954 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
955 * configure: Regenerate.
956
e5a9158d
AA
9572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
958
959 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
960 warning upon ENODATA from ptrace.
961 * linux-s390-low.c (s390_store_tdb): New.
962 (s390_regsets): Add regset for NT_S390_TDB.
963
feea5f36
AA
9642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
965
966 * linux-low.c (regsets_store_inferior_registers): Skip regsets
967 without a fill_function.
968 * linux-s390-low.c (s390_fill_last_break): Remove.
969 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
970 (s390_arch_setup): Use regset's size instead of fill_function for
971 loop end condition.
972
098dbe61
AA
9732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
974
975 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
976 the regset's store function when ptrace returned an error.
977 * regcache.c (get_thread_regcache): Invalidate register cache
978 before fetching inferior's registers.
979
28eef672
AA
9802014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
981
982 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
983 while-loop as for-loop.
984 (regsets_store_inferior_registers): Likewise.
985
bdca27a2
YQ
9862014-11-28 Yao Qi <yao@codesourcery.com>
987
988 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
989 * config.in, configure: Re-generate.
990 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
991 is defined.
992
9c232dda
YQ
9932014-11-21 Yao Qi <yao@codesourcery.com>
994
995 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
996 (AC_CHECK_HEADERS): Remove malloc.h.
997 * configure: Re-generated.
998 * config.in: Re-generated.
999 * server.h: Don't include alloca.h and malloc.h.
1000 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1001 Don't include malloc.h.
1002
43968415
JB
10032014-11-17 Joel Brobecker <brobecker@adacore.com>
1004
1005 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1006 corresponding ERRNO check in same block.
1007
40e91bc7
PA
10082014-11-12 Pedro Alves <palves@redhat.com>
1009
1010 * server.c (cont_thread): Update comment.
1011 (start_inferior, attach_inferior): No longer clear cont_thread.
1012 (handle_v_cont): No longer set cont_thread.
1013 (captured_main): Clear cont_thread each time a GDB connects.
1014
c2c118cf
PA
10152014-11-12 Pedro Alves <palves@redhat.com>
1016
1017 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1018 thread, and don't resume all threads if the Hc thread has exited.
1019
78708b7c
PA
10202014-11-12 Pedro Alves <palves@redhat.com>
1021
1022 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1023 the process group instead of to a specific LWP.
1024
a2abc7de
PA
10252014-10-15 Pedro Alves <palves@redhat.com>
1026
1027 PR server/17487
1028 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1029 parameter.
1030 (arm_set_thread_context): Delete.
1031 (the_low_target): Adjust.
1032 * win32-i386-low.c (debug_registers_changed)
1033 (debug_registers_used): Delete.
1034 (update_debug_registers_callback): New function.
1035 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1036 needing to update their debug registers.
1037 (win32_get_current_dr): New function.
1038 (x86_dr_low_get_addr, x86_dr_low_get_control)
1039 (x86_dr_low_get_status): Fetch the debug register from the thread
1040 record's context.
1041 (i386_initial_stuff): Adjust.
1042 (i386_get_thread_context): Remove current_event parameter. Don't
1043 clear debug_registers_changed nor copy DR values to
1044 debug_reg_state.
1045 (i386_set_thread_context): Delete.
1046 (i386_prepare_to_resume): New function.
1047 (i386_thread_added): Mark the thread as needing to update irs
1048 debug registers.
1049 (the_low_target): Remove i386_set_thread_context and install
1050 i386_prepare_to_resume.
1051 * win32-low.c (win32_get_thread_context): Adjust.
1052 (win32_set_thread_context): Use SetThreadContext
1053 directly.
1054 (win32_prepare_to_resume): New function.
1055 (win32_require_context): New function, factored out from ...
1056 (thread_rec): ... this.
1057 (continue_one_thread): Call win32_prepare_to_resume on each thread
1058 we're about to continue.
1059 (win32_resume): Call win32_prepare_to_resume on the event thread.
1060 * win32-low.h (struct win32_thread_info)
1061 <debug_registers_changed>: New field.
1062 (struct win32_target_ops): Change prototype of set_thread_context,
1063 delete set_thread_context and add prepare_to_resume.
1064 (win32_require_context): New declaration.
1065
a442d071
GB
10662014-10-08 Gary Benson <gbenson@redhat.com>
1067
1068 * server.h: Do not include common-exceptions.h.
1069
6f1947e8
GB
10702014-10-08 Gary Benson <gbenson@redhat.com>
1071
1072 * server.h: Do not include cleanups.h.
1073
63b434a4
JH
10742014-09-30 James Hogan <james.hogan@imgtec.com>
1075
1076 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1077 mips64-dsp-linux.c.
1078
c4d9ceb6
YQ
10792014-09-23 Yao Qi <yao@codesourcery.com>
1080
1081 * linux-low.c (lp_status_maybe_breakpoint): New function.
1082 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1083 (count_events_callback): Likewise.
1084 (select_event_lwp_callback): Likewise.
1085 (cancel_breakpoints_callback): Likewise.
1086
89a5711c
DB
10872014-09-19 Don Breazeal <donb@codesourcery.com>
1088
1089 * linux-low.c (handle_extended_wait): Call
1090 linux_ptrace_get_extended_event.
1091 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1092 linux_is_extended_waitstatus.
1093
bffc0964
JB
10942014-09-16 Joel Brobecker <brobecker@adacore.com>
1095
1096 * Makefile.in (CPPFLAGS): Define.
1097 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1098 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1099
0bfdf32f
GB
11002014-09-16 Gary Benson <gbenson@redhat.com>
1101
1102 * inferiors.h (current_inferior): Renamed as...
1103 (current_thread): New variable. All uses updated.
1104 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1105 (maybe_move_out_of_jump_pad): Likewise.
1106 (cancel_breakpoint): Likewise.
1107 (linux_low_filter_event): Likewise.
1108 (wait_for_sigstop): Likewise.
1109 (linux_resume_one_lwp): Likewise.
1110 (need_step_over_p): Likewise.
1111 (start_step_over): Likewise.
1112 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1113 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1114 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1115 and save_inferior as saved_thread.
1116 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1117 saved_thread.
1118 (regcache_invalidate_thread): Likewise.
1119 * remote-utils.c (prepare_resume_reply): Likewise.
1120 * thread-db.c (thread_db_get_tls_address): Likewise.
1121 (disable_thread_event_reporting): Likewise.
1122 (remove_thread_event_breakpoints): Likewise.
1123 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1124 as saved_thread.
1125 * target.h (set_desired_inferior): Renamed as...
1126 (set_desired_thread): New declaration. All uses updated.
1127 * server.c (myresume): Updated comment to reference thread instead
1128 of inferior.
1129 (handle_serial_event): Likewise.
1130 (handle_target_event): Likewise.
1131
361c8ade
GB
11322014-09-12 Tom Tromey <tromey@redhat.com>
1133 Gary Benson <gbenson@redhat.com>
1134
1135 * regcache.h: Include common-regcache.h.
1136 (regcache_read_pc): Don't declare.
1137 * regcache.c (get_thread_regcache_for_ptid): New function.
1138
bd9269f7
GB
11392014-09-11 Tom Tromey <tromey@redhat.com>
1140 Gary Benson <gbenson@redhat.com>
1141
1142 * symbol.c: New file.
1143 * Makefile.in (SFILES): Add symbol.c.
1144 (OBS): Add symbol.o.
1145
f8c1d06b
GB
11462014-09-11 Gary Benson <gbenson@redhat.com>
1147
1148 * target.c (target_stop_ptid, target_continue_ptid): New
1149 functions.
1150
721ec300
GB
11512014-09-11 Tom Tromey <tromey@redhat.com>
1152 Gary Benson <gbenson@redhat.com>
1153
1154 * target.h: Include target/target.h.
1155 * target.c (target_read_memory, target_read_uint32)
1156 (target_write_memory): New functions.
1157
c5e92cca
GB
11582014-09-11 Gary Benson <gbenson@redhat.com>
1159
1160 * server.h (debug_hw_points): Don't declare.
1161 * server.c (debug_hw_points): Don't define. Replace all uses
1162 with show_debug_regs.
1163 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1164 all uses with show_debug_regs.
1165
2e4bb98a
EBM
11662014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1167
1168 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1169 endianness into account.
1170 (ppc_supply_ptrace_register): Likewise.
1171
ac740bc7
JH
11722014-09-03 James Hogan <james.hogan@imgtec.com>
1173
1174 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1175 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1176
97ea6506
GB
11772014-09-03 Gary Benson <gbenson@redhat.com>
1178
1179 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1180 ALL_DEBUG_ADDRESS_REGISTERS.
1181
df7e5265
GB
11822014-09-02 Gary Benson <gbenson@redhat.com>
1183
1184 * i386-low.h: Renamed as...
1185 * x86-low.h: New file. All type, function and variable name
1186 prefixes changed from "i386_" to "x86_". All references updated.
1187 * i386-low.c: Renamed as...
1188 * x86-low.c: New file. All type, function and variable name
1189 prefixes changed from "i386_" to "x86_". All references updated.
1190
ed859da7
GB
11912014-09-02 Gary Benson <gbenson@redhat.com>
1192
1193 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1194 (x86_linux_new_thread): Likewise.
1195
860789c7
GB
11962014-08-29 Gary Benson <gbenson@redhat.com>
1197
1198 * server.h (setjmp.h): Do not include.
1199 (toplevel): Do not declare.
1200 (common-exceptions.h): Include.
1201 (cleanups.h): Likewise.
1202 * server.c (toplevel): Do not define.
1203 (exit_code): New static global.
1204 (detach_or_kill_for_exit_cleanup): New function.
1205 (main): New function. Original main renamed to...
1206 (captured_main): New function.
1207 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1208
ff55e1b5
GB
12092014-08-29 Gary Benson <gbenson@redhat.com>
1210
1211 * Makefile.in (SFILES): Add common/common-exceptions.c.
1212 (OBS): Add common-exceptions.o.
1213 (common-exceptions.o): New rule.
1214 * utils.c (prepare_to_throw_exception): New function.
1215
e9bcb658
GB
12162014-08-29 Gary Benson <gbenson@redhat.com>
1217
1218 * config.in: Regenerate.
1219 * configure: Likewise.
1220
e3180625
GB
12212014-08-29 Gary Benson <gbenson@redhat.com>
1222
1223 * Makefile.in (SFILES): Add common/cleanups.c.
1224 (OBS): cleanups.o.
1225 (cleanups.o): New rule.
1226
e3d6ba5d
GB
12272014-08-29 Gary Benson <gbenson@redhat.com>
1228
1229 * utils.c (internal_vwarning): New function.
1230
7096e886
GB
12312014-08-28 Gary Benson <gbenson@redhat.com>
1232
1233 * utils.h (fatal): Remove declaration.
1234 * utils.c (fatal): Remove function.
1235
14ce3192
GB
12362014-08-28 Gary Benson <gbenson@redhat.com>
1237
1238 * tracepoint.c (gdb_agent_init): Replace fatal with
1239 perror_with_name.
1240 (initialize_tracepoint): Likewise.
1241
50278d59
GB
12422014-08-28 Gary Benson <gbenson@redhat.com>
1243
1244 * remote-utils.c (remote_prepare): Replace fatal with error.
1245
aa96c426
GB
12462014-08-28 Gary Benson <gbenson@redhat.com>
1247
1248 * linux-low.c (linux_async): Replace fatal with warning.
1249 Tidy up and return.
1250 (linux_start_non_stop): Return -1 if linux_async failed.
1251
f7160e97
GB
12522014-08-28 Gary Benson <gbenson@redhat.com>
1253
1254 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1255 gdb_assert.
1256 (i386_dr_low_get_addr): Remove vague comment.
1257 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1258 gdb_assert.
1259
38e08fca
GB
12602014-08-28 Gary Benson <gbenson@redhat.com>
1261
1262 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1263 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1264 internal_error.
1265 (linux_resume_one_lwp): Likewise.
1266 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1267 gdb_assert.
1268 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1269 with internal_error.
1270 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1271 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1272 (find_register_by_name): Replace fatal with internal_error.
1273 (find_regno): Likewise.
1274 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1275 * thread-db.c (thread_db_create_event): Likewise.
1276 (thread_db_load_search): Likewise.
1277 (try_thread_db_load_1): Likewise.
1278 * tracepoint.c (get_jump_space_head): Replace fatal with
1279 internal_error.
1280 (claim_trampoline_space): Likewise.
1281 (have_fast_tracepoint_trampoline_buffer): Likewise.
1282 (cmd_qtstart): Likewise.
1283 (stop_tracing): Likewise.
1284 (fast_tracepoint_collecting): Likewise.
1285 (target_malloc): Likewise.
1286 (download_tracepoint): Likewise.
1287 (download_trace_state_variables): Replace check with gdb_assert.
1288 (upload_fast_traceframes): Replace fatal with internal_error.
1289
34abf635
GB
12902014-08-19 Tom Tromey <tromey@redhat.com>
1291 Gary Benson <gbenson@redhat.com>
1292
1293 * Makefile.in (SFILES): Add common/common-debug.c.
1294 (OBS): Add common-debug.o.
1295 (common-debug.o): New rule.
1296 * debug.h (debug_printf): Don't declare.
1297 * debug.c (debug_printf): Renamed and rewritten as...
1298 (debug_vprintf): New function.
1299
f6e94d78
GB
13002014-08-19 Gary Benson <gbenson@redhat.com>
1301
1302 * utils.h: Do not include print-utils.h.
1303
9239eeab
GB
13042014-08-19 Tom Tromey <tromey@redhat.com>
1305 Gary Benson <gbenson@redhat.com>
1306
1307 * server.h: Add static assertion.
1308 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1309
ef87c8bb
GB
13102014-08-19 Tom Tromey <tromey@redhat.com>
1311 Gary Benson <gbenson@redhat.com>
1312
1313 * Makefile.in (SFILES): Add common/errors.c.
1314 (OBS): Add errors.o.
1315 (IPA_OBS): Add errors-ipa.o.
1316 (errors.o): New rule.
1317 (errors-ipa.o): Likewise.
1318 * utils.h (perror_with_name, error, warning): Don't declare.
1319 * utils.c (warning): Renamed and rewritten as...
1320 (vwarning): New function.
1321 (error): Renamed and rewritten as...
1322 (verror): New function.
1323 (internal_error): Renamed and rewritten as...
1324 (internal_verror): New function.
1325
bb974a24
GB
13262014-08-07 Gary Benson <gbenson@redhat.com>
1327
1328 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1329 * configure: Regenerate.
1330 * config.in: Likewise.
1331 * server.h: Do not include errno.h.
1332 * event-loop.c: Likewise.
1333 * hostio-errno.c: Likewise.
1334 * linux-low.c: Likewise.
1335 * remote-utils.c: Likewise.
1336 * spu-low.c: Likewise.
1337 * utils.c: Likewise.
1338 * gdbreplay.c: Unconditionally include errno.h.
1339
6d3d12eb
GB
13402014-08-07 Gary Benson <gbenson@redhat.com>
1341
1342 * server.h: Do not include string.h.
1343 * event-loop.c: Likewise.
1344 * linux-low.c: Likewise.
1345 * regcache.c: Likewise.
1346 * remote-utils.c: Likewise.
1347 * spu-low.c: Likewise.
1348 * utils.c: Likewise.
1349
dccbb609
GB
13502014-08-07 Gary Benson <gbenson@redhat.com>
1351
1352 * server.h: Do not include gdb_assert.h.
1353
e76df0d0
GB
13542014-08-07 Gary Benson <gbenson@redhat.com>
1355
1356 * server.h: Do not include common-utils.h.
1357
4cb9c816
GB
13582014-08-07 Gary Benson <gbenson@redhat.com>
1359
1360 * server.h: Do not include ptid.h.
1361 * notif.h: Likewise.
1362
3995eeee
GB
13632014-08-07 Gary Benson <gbenson@redhat.com>
1364
1365 * server.h: Do not include gdb_locale.h.
1366
cb9f1a9b
GB
13672014-08-07 Gary Benson <gbenson@redhat.com>
1368
1369 * server.h: Do not include gdb/signals.h.
1370 * win32-low.c: Likewise.
1371
a5fceff8
GB
13722014-08-07 Gary Benson <gbenson@redhat.com>
1373
1374 * server.h: Do not include pathmax.h.
1375
b9391142
GB
13762014-08-07 Gary Benson <gbenson@redhat.com>
1377
1378 * server.h: Do not include libiberty.h.
1379 * linux-bfin-low.c: Likewise.
1380
0e443c87
GB
13812014-08-07 Gary Benson <gbenson@redhat.com>
1382
1383 * server.h: Do not include ansidecl.h.
1384
8ebb3f56
GB
13852014-08-07 Gary Benson <gbenson@redhat.com>
1386
1387 * linux-x86-low.c: Do not include stddef.h.
1388 * lynx-ppc-low.c: Likewise.
1389 * tracepoint.c: Likewise.
1390
8980bdf6
GB
13912014-08-07 Gary Benson <gbenson@redhat.com>
1392
1393 * server.h: Do not include stdarg.h.
1394 * nto-low.c: Likewise.
1395
d7096f71
GB
13962014-08-07 Gary Benson <gbenson@redhat.com>
1397
1398 * server.h: Do not include stdlib.h.
1399 * inferiors.c: Likewise.
1400 * linux-low.c: Likewise.
1401 * regcache.c: Likewise.
1402 * spu-low.c: Likewise.
1403 * tracepoint.c: Likewise.
1404 * utils.c: Likewise.
1405
d02f550d
GB
14062014-08-07 Gary Benson <gbenson@redhat.com>
1407
1408 * server.h: Do not include stdio.h.
1409 * linux-low.c: Likewise.
1410 * remote-utils.c: Likewise.
1411 * spu-low.c: Likewise.
1412 * utils.c: Likewise.
1413 * wincecompat.c: Likewise.
1414
87f6c4e3
GB
14152014-08-06 Gary Benson <gbenson@redhat.com>
1416
1417 * regcache.c (init_register_cache): Move conditionals inside if.
1418
7089dca4
GB
14192014-08-06 Gary Benson <gbenson@redhat.com>
1420
1421 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1422
462f517e
GB
14232014-07-31 Gary Benson <gbenson@redhat.com>
1424
1425 * ax.h: Do not include server.h.
1426 * gdbthread.h: Likewise.
1427 * lynx-low.h: Likewise.
1428 * notif.h: Likewise.
1429
976411d6
GB
14302014-07-30 Gary Benson <gbenson@redhat.com>
1431
1432 * server.h: Include common-defs.h.
1433 Do not include config.h or build-gnulib-gdbserver/config.h.
1434
d41f6d8e
GB
14352014-07-30 Gary Benson <gbenson@redhat.com>
1436
1437 * hostio-errno.c: Move server.h to top of includes list.
1438 * inferiors.c: Likewise.
1439 * linux-x86-low.c: Likewise.
1440 * notif.c: Include server.h.
1441
314c6a35
TT
14422014-07-24 Tom Tromey <tromey@redhat.com>
1443 Gary Benson <gbenson@redhat.com>
1444
1445 * server.h (CORE_ADDR): Now unsigned.
1446
69ff6be5
PA
14472014-07-16 Pedro Alves <palves@redhat.com>
1448
1449 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1450
ce9e3fe7
PA
14512014-07-15 Pedro Alves <palves@redhat.com>
1452
1453 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1454 copy.
1455
e76126e8
PA
14562014-07-11 Pedro Alves <palves@redhat.com>
1457
1458 * linux-low.c (kill_wait_lwp): New function, based on
1459 kill_one_lwp_callback, but use my_waitpid directly.
1460 (kill_one_lwp_callback, linux_kill): Use it.
1461
8e9db26e
PA
14622014-06-23 Pedro Alves <palves@redhat.com>
1463
1464 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1465 before setting DR0..DR3.
1466
698b3e08
GB
14672014-06-20 Gary Benson <gbenson@redhat.com>
1468
1469 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1470 * configure: Regenerated.
1471 * config.in: Likewise.
1472
125f8a3d
GB
14732014-06-20 Gary Benson <gbenson@redhat.com>
1474
1475 * Makefile.in (SFILES): Update locations for files moved
1476 from common to nat.
1477 (object file files): Reordered.
1478
42995dbd
GB
14792014-06-20 Gary Benson <gbenson@redhat.com>
1480
1481 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1482 (i386_dr_low_set_addr): Likewise.
1483 (i386_dr_low_get_addr): Likewise.
1484 (i386_dr_low_can_set_control): Likewise.
1485 (i386_dr_low_set_control): Likewise.
1486 (i386_dr_low_get_control): Likewise.
1487 (i386_dr_low_get_status): Likewise.
1488 (i386_get_debug_register_length): Likewise.
1489 * linux-x86-low.c (i386_dr_low_set_addr):
1490 Changed signature. Made static.
1491 (i386_dr_low_get_addr): Likewise.
1492 (i386_dr_low_set_control): Likewise.
1493 (i386_dr_low_get_control): Likewise.
1494 (i386_dr_low_get_status): Likewise.
1495 (i386_dr_low): New global variable.
1496 * win32-i386-low.c (i386_dr_low_set_addr):
1497 Changed signature. Made static.
1498 (i386_dr_low_get_addr): Likewise.
1499 (i386_dr_low_set_control): Likewise.
1500 (i386_dr_low_get_control): Likewise.
1501 (i386_dr_low_get_status): Likewise.
1502 (i386_dr_low): New global variable.
1503
e1d2394b
MS
15042014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1505
1506 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1507 * Makefile.in (AR, AR_FLAGS): Define.
1508 * configure: Regenerate.
1509
3a8ee006
GB
15102014-06-19 Gary Benson <gbenson@redhat.com>
1511
1512 * Makefile.in (i386-dregs.o): New rule.
1513 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1514 * i386-low.c (target.h): Remove include.
1515 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1516 (DR_CONTROL_SHIFT): Likewise.
1517 (DR_CONTROL_SIZE): Likewise.
1518 (DR_RW_EXECUTE): Likewise.
1519 (DR_RW_WRITE): Likewise.
1520 (DR_RW_READ): Likewise.
1521 (DR_RW_IORW): Likewise.
1522 (DR_LEN_1): Likewise.
1523 (DR_LEN_2): Likewise.
1524 (DR_LEN_4): Likewise.
1525 (DR_LEN_8): Likewise.
1526 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1527 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1528 (DR_ENABLE_SIZE): Likewise.
1529 (DR_LOCAL_SLOWDOWN): Likewise.
1530 (DR_GLOBAL_SLOWDOWN): Likewise.
1531 (DR_CONTROL_RESERVED): Likewise.
1532 (I386_DR_CONTROL_MASK): Likewise.
1533 (I386_DR_VACANT): Likewise.
1534 (I386_DR_LOCAL_ENABLE): Likewise.
1535 (I386_DR_GLOBAL_ENABLE): Likewise.
1536 (I386_DR_DISABLE): Likewise.
1537 (I386_DR_SET_RW_LEN): Likewise.
1538 (I386_DR_GET_RW_LEN): Likewise.
1539 (I386_DR_WATCH_HIT): Likewise.
1540 (i386_wp_op_t): Likewise.
1541 (i386_show_dr): Likewise.
1542 (i386_length_and_rw_bits): Likewise.
1543 (i386_insert_aligned_watchpoint): Likewise.
1544 (i386_remove_aligned_watchpoint): Likewise.
1545 (i386_handle_nonaligned_watchpoint): Likewise.
1546 i386_update_inferior_debug_regs(): Likewise.
1547 (i386_dr_insert_watchpoint): Likewise.
1548 (i386_dr_remove_watchpoint): Likewise.
1549 (i386_dr_region_ok_for_watchpoint): Likewise.
1550 (i386_dr_stopped_data_address): Likewise.
1551 (i386_dr_stopped_by_watchpoint): Likewise.
1552
8f26655c
GB
15532014-06-19 Gary Benson <gbenson@redhat.com>
1554
1555 * i386-low.c (i386_dr_show): Renamed to
1556 i386_show_dr and made static. All uses updated.
1557 (i386_dr_length_and_rw_bits): Renamed to
1558 i386_length_and_rw_bits and made static.
1559 All uses updated.
1560 (i386_dr_insert_aligned_watchpoint): Renamed to
1561 i386_insert_aligned_watchpoint and made static.
1562 All uses updated.
1563 (i386_dr_remove_aligned_watchpoint): Renamed to
1564 i386_remove_aligned_watchpoint and made static.
1565 All uses updated.
1566 (i386_dr_update_inferior_debug_regs): Renamed to
1567 i386_update_inferior_debug_regs and made static.
1568 All uses updated.
1569
b9228891
GB
15702014-06-18 Gary Benson <gbenson@redhat.com>
1571
5171def3
GB
1572 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1573 (i386_dr_low_can_set_control): Likewise.
1574 (i386_get_debug_register_length): Likewise.
1575 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1576 (i386_dr_low_can_set_control): Likewise.
1577 (i386_get_debug_register_length): Likewise.
1578
15792014-06-17 Gary Benson <gbenson@redhat.com>
1580
b9228891
GB
1581 * i386-low.h (i386-dregs.h): New include.
1582 (DR_FIRSTADDR): Now in i386-dregs.h.
1583 (DR_LASTADDR): Likewise.
1584 (DR_NADDR): Likewise.
1585 (DR_STATUS): Likewise.
1586 (DR_CONTROL): Likewise.
1587 (i386_debug_reg_state): Likewise.
1588 (i386_dr_insert_watchpoint): Likewise.
1589 (i386_dr_remove_watchpoint): Likewise.
1590 (i386_dr_region_ok_for_watchpoint): Likewise.
1591 (i386_dr_stopped_data_address): Likewise.
1592 (i386_dr_stopped_by_watchpoint): Likewise.
1593 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1594
4be83cc2
GB
15952014-06-18 Gary Benson <gbenson@redhat.com>
1596
1597 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1598 i386_dr_insert_watchpoint.
1599 (i386_low_remove_watchpoint): Renamed to
1600 i386_dr_remove_watchpoint.
1601 (i386_low_region_ok_for_watchpoint): Renamed to
1602 i386_dr_region_ok_for_watchpoint.
1603 (i386_low_stopped_data_address): Renamed to
1604 i386_dr_stopped_data_address.
1605 (i386_low_stopped_by_watchpoint): Renamed to
1606 i386_dr_stopped_by_watchpoint.
1607 * i386-low.c (i386_show_dr): Renamed to
1608 i386_dr_show and made nonstatic. All uses updated.
1609 (i386_length_and_rw_bits): Renamed to
1610 i386_dr_length_and_rw_bits and made nonstatic.
1611 All uses updated.
1612 (i386_insert_aligned_watchpoint): Renamed to
1613 i386_dr_insert_aligned_watchpoint and made nonstatic.
1614 All uses updated.
1615 (i386_remove_aligned_watchpoint): Renamed to
1616 i386_dr_remove_aligned_watchpoint and made nonstatic.
1617 All uses updated.
1618 (i386_update_inferior_debug_regs): Renamed to
1619 i386_dr_update_inferior_debug_regs and made nonstatic.
1620 All uses updated.
1621 (i386_low_insert_watchpoint): Renamed to
1622 i386_dr_insert_watchpoint. All uses updated.
1623 (i386_low_remove_watchpoint): Renamed to
1624 i386_dr_remove_watchpoint. All uses updated.
1625 (i386_low_region_ok_for_watchpoint): Renamed to
1626 i386_dr_region_ok_for_watchpoint. All uses updated.
1627 (i386_low_stopped_data_address): Renamed to
1628 i386_dr_stopped_data_address. All uses updated.
1629 (i386_low_stopped_by_watchpoint): Renamed to
1630 i386_dr_stopped_by_watchpoint. All uses updated.
1631
131aa0d4
GB
16322014-06-18 Gary Benson <gbenson@redhat.com>
1633
1634 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1635 (i386_dr_low_can_set_control): Likewise.
1636 (i386_insert_aligned_watchpoint): New check.
1637
d9305f7f
GB
16382014-06-18 Gary Benson <gbenson@redhat.com>
1639
1640 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1641 Renamed to state.
1642
e927c9fc
GB
16432014-06-18 Gary Benson <gbenson@redhat.com>
1644
1645 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1646 instead of fatal and error.
1647 (i386_handle_nonaligned_watchpoint): Likewise.
1648
1b6d4134
GB
16492014-06-18 Gary Benson <gbenson@redhat.com>
1650
1651 * i386-low.c (i386_get_debug_register_length): New macro.
1652 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1653 (i386_show_dr): Use debug_printf instead of fprintf. Use
1654 phex to format values.
1655
6e62758f
GB
16562014-06-18 Gary Benson <gbenson@redhat.com>
1657
1658 * i386-low.h: Comment changes.
1659 * i386-low.c: Likewise.
1660
fc6e2f03
GB
16612014-06-18 Gary Benson <gbenson@redhat.com>
1662
1663 * i386-low.c: Whitespace changes.
1664
f9d1eeed
TT
16652014-06-12 Tom Tromey <tromey@redhat.com>
1666
1667 * utils.c (freeargv): Remove.
1668
0b04e523
TT
16692014-06-12 Tom Tromey <tromey@redhat.com>
1670
1671 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1672 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1673 (parse_debug_format_options): Likewise.
1674 (gdbserver_usage): Likewise.
1675 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1676 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1677 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1678 against libiberty.
1679 ($(LIBGNU)): Depend on libiberty.
1680 (all-lib): Recurse into all subdirs.
1681 (install-only): Invoke "install" target in subdirs.
1682 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1683 targets.
1684 * configure: Rebuild.
1685 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1686 for vasprintf, vsnprintf, or gettimeofday.
1687 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1688 srv_tgtobj.
1689
270c9937
JB
16902014-06-05 Joel Brobecker <brobecker@adacore.com>
1691
1692 * development.sh: Delete.
1693 * Makefile.in (config.status): Adjust dependency on development.sh.
1694 * configure.ac: Adjust development.sh source call.
1695 * configure: Regenerate.
1696
0a261ed8
PA
16972014-06-02 Pedro Alves <palves@redhat.com>
1698
1699 * ax.c (gdb_free_agent_expr): New function.
1700 * ax.h (gdb_free_agent_expr): New declaration.
1701 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1702 list.
1703 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1704 static.
1705 (clear_breakpoint_conditions_and_commands): New function.
1706 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1707 (clear_breakpoint_conditions_and_commands): New declaration.
1708
e9dae05e
RR
17092014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1710
1711 * linux-aarch64-low.c (asm/ptrace.h): Include.
1712
5876f503
JK
17132014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1714
1715 Fix TLS access for -static -pthread.
1716 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1717 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1718 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1719
802e8e6d
PA
17202014-05-20 Pedro Alves <palves@redhat.com>
1721
1722 * linux-aarch64-low.c (aarch64_insert_point)
1723 (aarch64_remove_point): No longer check whether the type is
1724 supported here. Adjust to new interface.
1725 (the_low_target): Install aarch64_supports_z_point_type as
1726 supports_z_point_type method.
1727 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1728 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1729 instead of a Z packet char. Adjust.
1730 (arm_supports_z_point_type): New function.
1731 (arm_insert_point, arm_remove_point): Adjust to new interface.
1732 (the_low_target): Install arm_supports_z_point_type.
1733 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1734 (cris_insert_point, cris_remove_point): Adjust to new interface.
1735 Don't check whether the type is supported here.
1736 (the_low_target): Install cris_supports_z_point_type.
1737 * linux-low.c (linux_supports_z_point_type): New function.
1738 (linux_insert_point, linux_remove_point): Adjust to new interface.
1739 * linux-low.h (struct linux_target_ops) <insert_point,
1740 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1741 raw_breakpoint pointer parameter.
1742 <supports_z_point_type>: New method.
1743 * linux-mips-low.c (mips_supports_z_point_type): New function.
1744 (mips_insert_point, mips_remove_point): Adjust to new interface.
1745 Use mips_supports_z_point_type.
1746 (the_low_target): Install mips_supports_z_point_type.
1747 * linux-ppc-low.c (the_low_target): Install NULL as
1748 supports_z_point_type method.
1749 * linux-s390-low.c (the_low_target): Install NULL as
1750 supports_z_point_type method.
1751 * linux-sparc-low.c (the_low_target): Install NULL as
1752 supports_z_point_type method.
1753 * linux-x86-low.c (x86_supports_z_point_type): New function.
1754 (x86_insert_point): Adjust to new insert_point interface. Use
1755 insert_memory_breakpoint. Adjust to new
1756 i386_low_insert_watchpoint interface.
1757 (x86_remove_point): Adjust to remove_point interface. Use
1758 remove_memory_breakpoint. Adjust to new
1759 i386_low_remove_watchpoint interface.
1760 (the_low_target): Install x86_supports_z_point_type.
1761 * lynx-low.c (lynx_target_ops): Install NULL as
1762 supports_z_point_type callback.
1763 * nto-low.c (nto_supports_z_point_type): New.
1764 (nto_insert_point, nto_remove_point): Adjust to new interface.
1765 (nto_target_ops): Install nto_supports_z_point_type.
1766 * mem-break.c: Adjust intro comment.
1767 (struct raw_breakpoint) <raw_type, size>: New fields.
1768 <inserted>: Update comment.
1769 <shlib_disabled>: Delete field.
1770 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1771 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1772 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1773 (raw_bkpt_type_to_target_hw_bp_type): New function.
1774 (find_enabled_raw_code_breakpoint_at): New function.
1775 (find_raw_breakpoint_at): New type and size parameters. Use them.
1776 (insert_memory_breakpoint): New function, based off
1777 set_raw_breakpoint_at.
1778 (remove_memory_breakpoint): New function.
1779 (set_raw_breakpoint_at): Reimplement.
1780 (set_breakpoint): New, based on set_breakpoint_at.
1781 (set_breakpoint_at): Reimplement.
1782 (delete_raw_breakpoint): Go through the_target->remove_point
1783 instead of assuming memory breakpoints.
1784 (find_gdb_breakpoint_at): Delete.
1785 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1786 (find_gdb_breakpoint): New function.
1787 (set_gdb_breakpoint_at): Delete.
1788 (z_type_supported): New function.
1789 (set_gdb_breakpoint_1): New function, loosely based off
1790 set_gdb_breakpoint_at.
1791 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1792 (delete_gdb_breakpoint_at): Delete.
1793 (delete_gdb_breakpoint_1): New function, loosely based off
1794 delete_gdb_breakpoint_at.
1795 (delete_gdb_breakpoint): New function.
1796 (clear_gdb_breakpoint_conditions): Rename to ...
1797 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1798 breakpoint.
1799 (add_condition_to_breakpoint): Make static.
1800 (add_breakpoint_condition): Take a struct breakpoint pointer
1801 instead of an address. Adjust.
1802 (gdb_condition_true_at_breakpoint): Rename to ...
1803 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1804 z_type parameter.
1805 (gdb_condition_true_at_breakpoint): Reimplement.
1806 (add_breakpoint_commands): Take a struct breakpoint pointer
1807 instead of an address. Adjust.
1808 (gdb_no_commands_at_breakpoint): Rename to ...
1809 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1810 parameter. Return true if no breakpoint was found. Change debug
1811 output.
1812 (gdb_no_commands_at_breakpoint): Reimplement.
1813 (run_breakpoint_commands): Rename to ...
1814 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1815 and change return type to boolean.
1816 (run_breakpoint_commands): New function.
1817 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1818 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1819 breakpoint. Go through the_target->remove_point instead of
1820 assuming memory breakpoint.
1821 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1822 software and hardware breakpoints.
1823 (reinsert_raw_breakpoint): Go through the_target->insert_point
1824 instead of assuming memory breakpoint.
1825 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1826 software and hardware breakpoints.
1827 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1828 Check both software and hardware breakpoints.
1829 (validate_inserted_breakpoint): Assert the breakpoint is a
1830 software breakpoint. Set the inserted flag to -1 instead of
1831 setting shlib_disabled.
1832 (delete_disabled_breakpoints): Adjust.
1833 (validate_breakpoints): Only validate software breakpoints.
1834 Adjust to inserted flag change.
1835 (check_mem_read, check_mem_write): Skip breakpoint types other
1836 than software breakpoints. Adjust to inserted flag change.
1837 * mem-break.h (enum raw_bkpt_type): New enum.
1838 (raw_breakpoint, struct process_info): Forward declare.
1839 (Z_packet_to_target_hw_bp_type): Delete declaration.
1840 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1841 (set_gdb_breakpoint, delete_gdb_breakpoint)
1842 (clear_breakpoint_conditions): New declarations.
1843 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1844 (breakpoint_inserted_here): Update comment.
1845 (add_breakpoint_condition, add_breakpoint_commands): Replace
1846 address parameter with a breakpoint pointer parameter.
1847 (gdb_breakpoint_here): Update comment.
1848 (delete_gdb_breakpoint_at): Delete.
1849 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1850 * server.c (process_point_options): Take a struct breakpoint
1851 pointer instead of an address. Adjust.
1852 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1853 delete_gdb_breakpoint.
1854 * spu-low.c (spu_target_ops): Install NULL as
1855 supports_z_point_type method.
1856 * target.h: Include mem-break.h.
1857 (struct target_ops) <prepare_to_access_memory>: Update comment.
1858 <supports_z_point_type>: New field.
1859 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1860 instead of a char. Also take a raw breakpoint pointer.
1861 * win32-arm-low.c (the_low_target): Install NULL as
1862 supports_z_point_type.
1863 * win32-i386-low.c (i386_supports_z_point_type): New function.
1864 (i386_insert_point, i386_remove_point): Adjust to new interface.
1865 (the_low_target): Install i386_supports_z_point_type.
1866 * win32-low.c (win32_supports_z_point_type): New function.
1867 (win32_insert_point, win32_remove_point): Adjust to new interface.
1868 (win32_target_ops): Install win32_supports_z_point_type.
1869 * win32-low.h (struct win32_target_ops):
1870 <supports_z_point_type>: New method.
1871 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1872 instead of a char. Also take a raw breakpoint pointer.
1873
932539e3
PA
18742014-05-20 Pedro Alves <palves@redhat.com>
1875
1876 * mem-break.h: Include break-common.h.
1877 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1878 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1879 (Z_packet_to_target_hw_bp_type): New declaration.
1880 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1881 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1882 (Z_PACKET_ACCESS_WP): Delete macros.
1883 (Z_packet_to_hw_type): Delete function.
1884 * i386-low.h: Don't include break-common.h here.
1885 (Z_packet_to_hw_type): Delete declaration.
1886 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1887 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1888 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1889 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1890 * linux-aarch64-low.c: Don't include break-common.h here.
1891 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1892 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1893 (Z_packet_to_target_hw_bp_type): Delete function.
1894 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1895 function.
1896 (mips_insert_point, mips_remove_point): Use
1897 Z_packet_to_target_hw_bp_type.
1898
4ff0d3d8
PA
18992014-05-20 Pedro Alves <palves@redhat.com>
1900
1901 * linux-aarch64-low.c: Include break-common.h.
1902 (enum target_point_type): Delete.
1903 (Z_packet_to_point_type): Rename to ...
1904 (Z_packet_to_target_hw_bp_type): ... this, and return a
1905 target_hw_bp_type instead.
1906 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1907 instead of an enum target_point_type.
1908 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1909 breakpoint type.
1910 (aarch64_dr_state_insert_one_point)
1911 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1912 (aarch64_handle_aligned_watchpoint)
1913 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1914 Take an enum target_hw_bp_type instead of an enum
1915 target_point_type.
1916 (aarch64_supports_z_point_type): New function.
1917 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1918 use Z_packet_to_target_hw_bp_type.
1919
786dc519
JB
19202014-05-20 Joel Brobecker <brobecker@adacore.com>
1921
1922 * configure.ac: Only use -Werror by default when DEVELOPMENT
1923 is true.
1924 * configure: Regenerate.
1925
9e0aa64f
JK
19262014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1927
1928 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1929 * linux-x86-low.c (X86_64_USER_REGS): New.
1930 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1931
2b577b92
YQ
19322014-04-28 Yao Qi <yao@codesourcery.com>
1933
1934 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1935 name.
1936
94611da2
PA
19372014-04-25 Pedro Alves <palves@redhat.com>
1938
1939 PR server/16255
1940 * linux-low.c (linux_attach_fail_reason_string): New function.
1941 (linux_attach_lwp): Delete.
1942 (linux_attach_lwp_1): Rename to ...
1943 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1944 argument. Remove "initial" parameter. Return int instead of
1945 void. Don't error or warn here.
1946 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1947 failure to attach to the tgid. Call warning when failing to
1948 attach to an lwp.
1949 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1950 argument. Remove "initial" parameter. Return int instead of
1951 void. Don't error or warn here.
1952 (linux_attach_fail_reason_string): New declaration.
1953 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1954 interface change. Use linux_attach_fail_reason_string.
1955
01f9f808
MS
19562014-04-24 Michael Sturm <michael.sturm@mintel.com>
1957 Walfred Tedeschi <walfred.tedeschi@intel.com>
1958
1959 * Makefile.in: Added rules to handle new files
1960 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1961 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1962 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1963 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1964 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1965 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1966 x32-avx512-linux.o.
1967 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1968 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1969 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1970 i386/x32-avx512.xml.
1971 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1972 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1973 i386/x32-avx512-linux.xml.
1974 * i387-fp.c (num_avx512_k_registers): New constant for number
1975 of K registers.
1976 (num_avx512_zmmh_low_registers): New constant for number of
1977 lower ZMM registers (0-15).
1978 (num_avx512_zmmh_high_registers): New constant for number of
1979 higher ZMM registers (16-31).
1980 (num_avx512_ymmh_registers): New contant for number of higher
1981 YMM registers (ymm16-31 added by avx521 on x86_64).
1982 (num_avx512_xmm_registers): New constant for number of higher
1983 XMM registers (xmm16-31 added by AVX512 on x86_64).
1984 (struct i387_xsave): Add space for AVX512 registers.
1985 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1986 Add code to handle AVX512 registers.
1987 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1988 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1989 prototypei from generated file.
1990 (tdesc_amd64_avx512_linux): Likewise.
1991 (init_registers_x32_avx512_linux): Likewise.
1992 (tdesc_x32_avx512_linux): Likewise.
1993 (init_registers_i386_avx512_linux): Likewise.
1994 (tdesc_i386_avx512_linux): Likewise.
1995 (x86_64_regmap): Add AVX512 registers.
1996 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1997 mask.
1998 (initialize_low_arch): Add code to initialize AVX512 registers.
1999
51aa91f9
PA
20002014-04-23 Pedro Alves <palves@redhat.com>
2001
2002 * mem-break.c (find_gdb_breakpoint_at): Make static.
2003 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2004
a4165e94
PA
20052014-04-23 Pedro Alves <palves@redhat.com>
2006
2007 * i386-low.c: Don't include break-common.h here.
2008 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2009 prototype to take target_hw_bp_type as argument instead of a Z
2010 packet char.
2011 * i386-low.h: Include break-common.h here.
2012 (Z_packet_to_hw_type): Declare.
2013 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2014 prototypes.
2015 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2016 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2017 (x86_remove_point): Convert the packet number to a
2018 target_hw_bp_type before calling i386_low_remove_watchpoint.
2019 * win32-i386-low.c (i386_insert_point): Convert the packet number
2020 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2021 (i386_remove_point): Convert the packet number to a
2022 target_hw_bp_type before calling i386_low_remove_watchpoint.
2023
b8acf843
PA
20242014-04-23 Pedro Alves <palves@redhat.com>
2025
2026 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2027
d708bcd1
PA
20282014-04-10 Pedro Alves <palves@redhat.com>
2029
2030 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2031 Check if the condition or command is NULL before checking if the
2032 breakpoint is known. On success, return true.
2033 * mem-break.h (add_breakpoint_condition): Document return.
2034 (add_breakpoint_commands): Add describing comment.
2035 * server.c (skip_to_semicolon): New function.
2036 (process_point_options): Use it.
2037
2eec7d5b
PA
20382014-04-09 Pedro Alves <palves@redhat.com>
2039
2040 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2041 to lwpid_of.
2042
fa96cb38
PA
20432014-02-27 Pedro Alves <palves@redhat.com>
2044
2045 PR 12702
2046 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2047 macros.
2048 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2049 output.
2050 (last_thread_of_process_p): Take a PID argument instead of a
2051 thread pointer.
2052 (linux_wait_for_lwp): Delete.
2053 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2054 functions.
2055 (linux_low_filter_event): New function, party factored out from
2056 linux_wait_for_event.
2057 (linux_wait_for_event): Rename to ...
2058 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2059 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2060 sigsuspend. Check for zombie leaders.
2061 (linux_wait_for_event): Reimplement as wrapper around
2062 linux_wait_for_event_filtered.
2063 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2064 a normal or signal exit is seen, it's the whole process exiting.
2065 (wait_for_sigstop): No longer a for_each_inferior callback.
2066 Rewrite on top of linux_wait_for_event_filtered.
2067 (stop_all_lwps): Call wait_for_sigstop directly.
2068 * server.c (resume, handle_target_event): Handle
2069 TARGET_WAITKIND_NO_RESUMED.
2070
d763de10
JB
20712014-02-26 Joel Brobecker <brobecker@adacore.com>
2072
2073 * win32-low.c (psapi_get_dll_name,
2074 * win32_CreateToolhelp32Snapshot): Delete.
2075 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2076 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2077 Delete.
2078 (handle_load_dll): Add function description.
2079 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2080
850a0f76
JB
20812014-02-26 Joel Brobecker <brobecker@adacore.com>
2082
2083 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2084 Add comment.
2085 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2086 base address when calling win32_add_one_solib.
2087 (handle_load_dll): Delete local variable load_addr.
2088 Remove 0x1000 offset applied to DLL base address when calling
2089 win32_add_one_solib.
2090 (handle_unload_dll): Add comment.
2091
f25b3fc3
JB
20922014-02-26 Joel Brobecker <brobecker@adacore.com>
2093
2094 * win32-low.c (win32_add_all_dlls): Renames
2095 win32_ensure_ntdll_loaded. Rewrite function documentation.
2096 Adjust implementation to always load all DLLs.
2097 Add 0x1000 offset to DLL base address when calling
2098 win32_add_one_solib.
2099 (child_initialization_done): New static global.
2100 (do_initial_child_stuff): Set child_initialization_done to
2101 zero during child initialization, and 1 after. Replace call
2102 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2103 Add comment.
2104 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2105 (handle_unload_dll): Add function documentation.
2106 (get_child_debug_event): Ignore load and unload DLL events
2107 during child initialization.
2108
d86d4aaf
DE
21092014-02-20 Doug Evans <dje@google.com>
2110
3bc32da3 2111 Remove global all_lwps.
d86d4aaf
DE
2112 * inferiors.h (ptid_of): Move here from linux-low.h.
2113 (pid_of, lwpid_of): Ditto.
2114 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2115 parameter is a struct thread_info * now.
2116 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2117 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2118 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2119 directly.
2120 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2121 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2122 * linux-arm-low.c (update_registers_callback): Update, "entry"
2123 parameter is a struct thread_info * now.
2124 Fetch lwpid from current_inferior directly.
2125 (arm_insert_point): Pass &all_threads to find_inferior instead of
2126 &all_lwps.
2127 (arm_remove_point): Ditto.
2128 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2129 (arm_prepare_to_resume): Fetch pid from thread.
2130 (arm_read_description): Fetch lwpid from current_inferior directly.
2131 * linux-low.c (all_lwps): Delete.
2132 (delete_lwp): Delete call to remove_inferior.
2133 (handle_extended_wait): Fetch lwpid from thread.
2134 (add_lwp): Don't set lwp->entry.id. Remove call to
2135 add_inferior_to_list.
2136 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2137 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2138 (kill_one_lwp_callback): Ditto.
2139 (linux_kill): Don't dereference NULL pointer.
2140 Fetch ptid,lwpid from thread.
2141 (get_detach_signal): Fetch ptid from thread.
2142 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2143 Simplify call to regcache_invalidate_thread.
2144 (delete_lwp_callback): Update, "entry" parameter is a
2145 struct thread_info * now. Fetch pid from thread.
2146 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2147 (status_pending_p_callback): Update, "entry" parameter is a
2148 struct thread_info * now. Fetch ptid from thread.
2149 (find_lwp_pid): Update, "entry" parameter is a
2150 struct thread_info * now.
2151 (linux_wait_for_lwp): Fetch pid from thread.
2152 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2153 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2154 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2155 (dequeue_one_deferred_signal): Ditto.
2156 (cancel_breakpoint): Fetch ptid from current_inferior.
2157 (linux_wait_for_event): Pass &all_threads to find_inferior,
2158 not &all_lwps. Fetch ptid, lwpid from thread.
2159 (count_events_callback): Update, "entry" parameter is a
2160 struct thread_info * now.
2161 (select_singlestep_lwp_callback): Ditto.
2162 (select_event_lwp_callback): Ditto.
2163 (cancel_breakpoints_callback): Ditto.
2164 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2165 not &all_lwps.
2166 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2167 (unsuspend_one_lwp): Update, "entry" parameter is a
2168 struct thread_info * now.
2169 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2170 not &all_lwps.
2171 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2172 Fetch lwpid from thread, not lwp.
2173 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2174 Pass &all_threads to find_inferior, not &all_lwps.
2175 (send_sigstop): Fetch lwpid from thread, not lwp.
2176 (send_sigstop_callback): Update, "entry" parameter is a
2177 struct thread_info * now.
2178 (suspend_and_send_sigstop_callback): Ditto.
2179 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2180 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2181 struct thread_info * now.
2182 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2183 from thread, lwp.
2184 (lwp_running): Update, "entry" parameter is a
2185 struct thread_info * now.
2186 (stop_all_lwps): Fetch ptid from thread.
2187 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2188 (linux_resume_one_lwp): Fetch lwpid from thread.
2189 (linux_set_resume_request): Update, "entry" parameter is a
2190 struct thread_info * now. Fetch pid, lwpid from thread.
2191 (resume_status_pending_p): Update, "entry" parameter is a
2192 struct thread_info * now.
2193 (need_step_over_p): Ditto. Fetch lwpid from thread.
2194 (start_step_over): Fetch lwpid from thread.
2195 (linux_resume_one_thread): Update, "entry" parameter is a
2196 struct thread_info * now. Fetch lwpid from thread.
2197 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2198 (proceed_one_lwp): Update, "entry" parameter is a
2199 struct thread_info * now. Fetch lwpid from thread.
2200 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2201 struct thread_info * now.
2202 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2203 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2204 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2205 directly.
2206 (regsets_store_inferior_registers): Ditto.
2207 (fetch_register, store_register): Ditto.
2208 (linux_read_memory, linux_write_memory): Ditto.
2209 (linux_request_interrupt): Ditto.
2210 (linux_read_auxv): Ditto.
2211 (linux_xfer_siginfo): Ditto.
2212 (linux_qxfer_spu): Ditto.
2213 (linux_qxfer_libraries_svr4): Ditto.
2214 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2215 moved to inferiors.h.
2216 (get_lwp): Delete.
2217 (get_thread_lwp): Update.
2218 (struct lwp_info): Delete member "entry". Simplify comment for
2219 member "thread".
2220 (all_lwps): Delete.
2221 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2222 current_inferior directly.
2223 (update_watch_registers_callback): Update, "entry" parameter is a
2224 struct thread_info * now. Fetch pid from thread.
2225 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2226 (mips_insert_point): Fetch lwpid from current_inferior.
2227 Pass &all_threads to find_inferior, not &all_lwps.
2228 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2229 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2230 directly.
2231 (mips_stopped_data_address): Ditto.
2232 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2233 directly.
2234 * linux-tile-low.c (tile_arch_setup): Ditto.
2235 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2236 (update_debug_registers_callback): Update, "entry" parameter is a
2237 struct thread_info * now. Fetch pid from thread.
2238 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2239 Pass &all_threads to find_inferior, not &all_lwps.
2240 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2241 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2242 Pass &all_threads to find_inferior, not &all_lwps.
2243 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2244 (i386_dr_low_get_status): Ditto.
2245 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2246 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2247 (x86_linux_read_description): Ditto.
2248 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2249
3b8361aa
DE
22502014-02-20 Doug Evans <dje@google.com>
2251
2252 * inferiors.c (get_first_inferior): Fix buglet.
2253
f7667f0d
DE
22542014-02-19 Doug Evans <dje@google.com>
2255
2256 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2257 * inferiors.c (add_thread): Change result type to struct thread_info *.
2258 All callers updated.
2259 (add_lwp): Call add_thread here instead of in callers.
2260 All callers updated.
2261 * linux-low.h (get_lwp_thread): Rewrite.
2262 (struct lwp_info): New member "thread".
2263
b3312d80
DE
22642014-02-19 Doug Evans <dje@google.com>
2265
2266 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2267 All callers updated.
2268
ecc6f45c
DE
22692014-02-19 Doug Evans <dje@google.com>
2270
2271 * inferiors.c (add_thread): Fix whitespace.
2272
649ebbca
DE
22732014-02-19 Doug Evans <dje@google.com>
2274
2275 * dll.c (clear_dlls): Replace accessing list implemention details
2276 with API function.
2277 * gdbthread.h (get_first_thread): Declare.
2278 * inferiors.c (for_each_inferior_with_data): New function.
2279 (get_first_thread): New function.
2280 (find_thread_ptid): Simplify.
2281 (get_first_inferior): New function.
2282 (clear_list): Delete.
2283 (one_inferior_p): New function.
2284 (clear_inferior_list): New function.
2285 (clear_inferiors): Update.
2286 * inferiors.h (for_each_inferior_with_data): Declare.
2287 (clear_inferior_list): Declare.
2288 (one_inferior_p): Declare.
2289 (get_first_inferior): Declare.
2290 * linux-low.c (linux_wait_for_event): Replace accessing list
2291 implemention details with API function.
2292 * server.c (target_running): Ditto.
2293 (accumulate_file_name_length): New function.
2294 (emit_dll_description): New function.
2295 (handle_qxfer_libraries): Replace accessing list implemention
2296 details with API function.
2297 (handle_qxfer_threads_worker): New function.
2298 (handle_qxfer_threads_proper): Replace accessing list implemention
2299 details with API function.
2300 (handle_query): Ditto.
2301 (visit_actioned_threads_callback_ftype): New typedef.
2302 (visit_actioned_threads_data): New struct.
2303 (visit_actioned_threads): Rewrite to be find_inferior callback.
2304 (resume): Call find_inferior.
2305 (handle_status): Replace accessing list implemention
2306 details with API function.
2307 (process_serial_event): Replace accessing list implemention details
2308 with API function.
2309 * target.c (set_desired_inferior): Replace accessing list implemention
2310 details with API function.
2311 * tracepoint.c (same_process_p): New function.
2312 (gdb_agent_about_to_close): Replace accessing list implemention
2313 details with API function.
2314 * win32-low.c (child_delete_thread): Replace accessing list
2315 implemention details with API function.
2316 (match_dll_by_basename): New function.
2317 (dll_is_loaded_by_basename): New function.
2318 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2319 details call to dll_is_loaded_by_basename.
2320
80894984
DE
23212014-02-19 Doug Evans <dje@google.com>
2322
2323 * dll.h (struct dll_info): Add comment.
2324 * gdbthread.h (struct thread_info): Add comment.
2325 (current_ptid): Simplify.
2326 * inferiors.c (add_process): Update.
2327 (remove_process): Update.
2328 * inferiors.h (struct process_info): Rename member "head" to "entry".
2329 * linux-low.c (delete_lwp): Update.
2330 (add_lwp): Update.
2331 (last_thread_of_process_p): Update.
2332 (kill_one_lwp_callback, linux_kill): Update.
2333 (status_pending_p_callback): Update.
2334 (wait_for_sigstop): Update. Simplify read of ptid.
2335 (start_step_over): Update.
2336 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2337 (get_lwp_thread): Update.
2338 (struct lwp_info): Rename member "head" to "entry".
2339 * regcache.h (inferior_list_entry): Delete.
2340 * server.c (kill_inferior_callback): Update.
2341 (detach_or_kill_inferior_callback): Update.
2342 (print_started_pid): Update.
2343 (print_attached_pid): Update.
2344 (process_serial_event): Simplify read of ptid.
2345 * thread-db.c (thread_db_create_event): Update.
2346 (thread_db_get_tls_address): Update.
2347 * win32-low.c (current_inferior_ptid): Simplify.
2348
46917d26
TT
23492014-02-19 Tom Tromey <tromey@redhat.com>
2350
2351 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2352 argument.
2353 (target_supports_btrace): Update.
2354
0759a81e
YQ
23552014-02-14 Yao Qi <yao@codesourcery.com>
2356
2357 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2358 (rsp-low-ipa.o): New target.
2359
a7191e8b
TT
23602014-02-12 Tom Tromey <tromey@redhat.com>
2361
2362 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2363 convert_ascii_to_int.
2364 * regcache.c (registers_to_string): Likewise.
2365 * remote-utils.c (decode_M_packet): Likewise.
2366 * server.c (process_serial_event): Likewise.
2367
ff0e980e
TT
23682014-02-12 Tom Tromey <tromey@redhat.com>
2369
2370 * server.c (handle_query, handle_v_run): Use hex2bin, not
2371 unhexify.
2372 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2373
e9371aff
TT
23742014-02-12 Tom Tromey <tromey@redhat.com>
2375
2376 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2377 convert_int_to_ascii.
2378 * regcache.c (registers_to_string, collect_register_as_string):
2379 Likewise.
2380 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2381 Likewise.
2382 * server.c (process_serial_event): Likewise.
2383 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2384 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2385
971dc0b8
TT
23862014-02-12 Tom Tromey <tromey@redhat.com>
2387
2388 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2389 bin2hex, not hexify.
2390 * tracepoint.c (cmd_qtstatus): Likewise.
2391
0a822afb
TT
23922014-02-12 Tom Tromey <tromey@redhat.com>
2393
2394 * remote-utils.c (monitor_output): Pass explicit length to
2395 hexify.
2396
9c3d6531
TT
23972014-02-12 Tom Tromey <tromey@redhat.com>
2398
2399 * tracepoint.c: Include rsp-low.h.
2400 * server.c: Include rsp-low.h.
2401 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2402 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2403 declare.
2404 * remote-utils.c: Include rsp-low.h.
2405 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2406 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2407 (convert_int_to_ascii, convert_ascii_to_int): Move to
2408 common/rsp-low.c.
2409 * regcache.c: Include rsp-low.h.
2410 * ax.c: Include rsp-low.h.
2411 * Makefile.in (SFILES): Add common/rsp-low.c.
2412 (OBS): Add rsp-low.o.
2413 (rsp-low.o): New target.
2414
01fd3ea5
TT
24152014-02-12 Tom Tromey <tromey@redhat.com>
2416
2417 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2418 Include print-utils.h.
2419 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2420 (plongest, thirty_two, phex_nz): Remove.
2421 * Makefile.in (SFILES): Add common/print-utils.c.
2422 (OBS): Add print-utils.o.
2423 (print-utils-ipa.o): New target.
2424 (print-utils.o): New target.
2425 (IPA_OBJS): Add print-utils-ipa.o.
2426
e99dc820
TT
24272014-02-06 Tom Tromey <tromey@redhat.com>
2428
2429 * Makefile.in (SFILES): Fix indentation.
2430
ee1e2d4f
DE
24312014-02-05 Doug Evans <dje@google.com>
2432
2433 * linux-low.c (linux_wait_for_event): Improve comment.
2434 (linux_wait_1): Keep current_inferior in sync with event_child.
2435
f5a02773
DE
24362014-01-22 Doug Evans <dje@google.com>
2437
2438 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2439
87ce2a04
DE
24402014-01-22 Doug Evans <dje@google.com>
2441
2442 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2443 * configure: Regenerate.
2444 * config.in: Regenerate.
2445 * Makefile.in (SFILES): Add debug.c.
2446 (OBS): Add debug.o.
2447 * debug.c: New file.
2448 * debug.h: New file.
2449 * linux-aarch64-low.c (*): Update all debugging printfs to use
2450 debug_printf instead of fprintf.
2451 * linux-arm-low.c (*): Ditto.
2452 * linux-cris-low.c (*): Ditto.
2453 * linux-crisv32-low.c (*): Ditto.
2454 * linux-m32r-low.c (*): Ditto.
2455 * linux-sparc-low.c (*): Ditto.
2456 * linux-x86.c (*): Ditto.
2457 * linux-low.c (*): Ditto.
2458 (linux_wait_1): Add calls to debug_enter, debug_exit.
2459 (linux_wait): Remove redundant debugging printf.
2460 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2461 (linux_resume, unstop_all_lwps): Ditto.
2462 * mem-break.c (*): Update all debugging printfs to use
2463 debug_printf instead of fprintf.
2464 * remote-utils.c (*): Ditto.
2465 * thread-db.c (*): Ditto.
2466 * server.c #include <ctype.h>, "gdb_vecs.h".
2467 (debug_threads): Moved to debug.c.
2468 (*): Update all debugging printfs to use debug_printf instead of
2469 fprintf.
2470 (start_inferior): Replace call to fflush with call to debug_flush.
2471 (monitor_show_help): Mention set debug-format.
2472 (parse_debug_format_options): New function.
2473 (handle_monitor_command): Handle "monitor set debug-format".
2474 (gdbserver_usage): Mention --debug-format.
2475 (main): Parse --debug-format.
2476 * server.h (debug_threads): Declaration moved to debug.h.
2477 #include "debug.h".
2478 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2479 trace_debug_1 that uses debug_printf.
2480 (tracepoint_look_up_symbols): Update all debugging printfs to use
2481 debug_printf instead of fprintf.
2482
e671835b
BS
24832014-01-20 Baruch Siach <baruch@tkos.co.il>
2484
2485 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2486 sys/ptrace.h.
2487
b5737fa9
PA
24882014-01-17 Pedro Alves <palves@redhat.com>
2489
ea38d2a9 2490 PR build/16445
c7faa97a
PA
2491 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2492 defined after including gdb_proc_service.h.
b5737fa9 2493
40ed484e
DE
24942014-01-16 Doug Evans <dje@google.com>
2495
2496 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2497 (match_dll): Use it.
2498
969c39fb
MM
24992014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2500
2501 * target.h (target_ops) <read_btrace>: Change parameters and
2502 return type to allow error reporting.
2503 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2504 trace reading errors on.
2505 * linux-low.c (linux_low_read_btrace): Pass trace reading
2506 errors on.
2507 (linux_low_disable_btrace): New.
2508
ab7f45ba
DE
25092014-01-15 Doug Evans <dje@google.com>
2510
2511 * inferiors.c (thread_id_to_gdb_id): Delete.
2512 * inferiors.h (thread_id_to_gdb_id): Delete.
2513
66af0f44
EZ
25142014-01-13 Eli Zaretskii <eliz@gnu.org>
2515
2516 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2517 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2518 versions.
2519
9939e131
PA
25202014-01-08 Pedro Alves <palves@redhat.com>
2521
2522 * server.c (handle_status): Don't discard previous queued stop
2523 replies or thread's pending status here.
2524 (main) <disconnection>: Do it here instead.
2525
b7ea362b
PA
25262014-01-08 Pedro Alves <palves@redhat.com>
2527
2528 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2529 * server.c (visit_actioned_threads, handle_pending_status): New
2530 function.
2531 (handle_v_cont): Factor out parts to ...
2532 (resume): ... this new function. If in all-stop, and a thread
2533 being resumed has a pending status, report it without actually
2534 resuming.
2535 (myresume): Adjust to use the new 'resume' function.
2536 (clear_pending_status_callback, set_pending_status_callback)
2537 (find_status_pending_thread_callback): New functions.
2538 (handle_status): Handle the case of multiple threads having
2539 interesting statuses to report. Report threads' real last signal
2540 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2541 with an interesting thread to report the status for, instead of
2542 always reporting the status of the first thread.
2543
28498c42
JB
25442014-01-01 Joel Brobecker <brobecker@adacore.com>
2545
2546 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2547 * gdbreplay.c (gdbreplay_version): Likewise.
2548
f45c82da
YZ
25492013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2550
2551 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2552 iov.iov_len with the real length in use.
2553
379a5e2d
JB
25542013-12-13 Joel Brobecker <brobecker@adacore.com>
2555
2556 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2557 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2558 for all targets that use win32-low.c.
2559 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2560 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2561
4210d83e
PA
25622013-12-13 Pedro Alves <palves@redhat.com>
2563
2564 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2565 if equal to TARGET_WAITKIND_LOADED.
2566 * win32-low.c (cached_status): New static global.
2567 (win32_wait): Add declaration.
2568 (do_initial_child_stuff): Flush all initial pending debug events
2569 up to the initial breakpoint.
2570 (win32_wait): If CACHED_STATUS was set, return that instead
2571 of doing a real wait. Remove the code resuming the execution
2572 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2573 during the initial phase. Also remove the code changing
2574 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2575 TARGET_WAITKIND_STOPPED.
2576
e7f0d979
YQ
25772013-12-11 Yao Qi <yao@codesourcery.com>
2578
2579 * notif.c (handle_notif_ack): Return 0 if no notification
2580 matches.
2581
ebcf782c
DE
25822013-11-20 Doug Evans <dje@google.com>
2583
2584 * linux-low.c (linux_set_resume_request): Fix comment.
2585
20ad9378
DE
25862013-11-20 Doug Evans <dje@google.com>
2587
2588 * linux-low.c (resume_status_pending_p): Tweak comment.
2589
a196ebeb
WT
25902013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2591
2592 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2593 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2594 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2595 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2596 (srv_amd64_regobj): Add amd64-mpx.o.
2597 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2598 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2599 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2600 * i387-fp.c (num_pl_bnd_register) Added constant.
2601 (num_pl_bnd_cfg_registers) Added constant.
2602 (struct i387_xsave) Added reserved area and MPX fields.
2603 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2604 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2605 function.
2606 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2607 (init_registers_amd64_mpx_linux): Declare new function.
2608 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2609 (x86_64_regmap): Add MPX registers.
2610 (x86_linux_read_description): Add MPX case.
2611 (initialize_low_arch): Initialize MPX targets.
2612
0080a2f6
TT
26132013-11-18 Tom Tromey <tromey@redhat.com>
2614
2615 * configure: Rebuild.
2616 * configure.ac: Don't check for stdlib.h.
2617 * gdbreplay.c: Unconditionally include stdlib.h.
2618
2978b111
TT
26192013-11-18 Tom Tromey <tromey@redhat.com>
2620
2621 * config.in: Rebuild.
2622 * configure: Rebuild.
2623 * configure.ac: Don't use AC_HEADER_DIRENT.
2624
a3d08894
TT
26252013-11-18 Tom Tromey <tromey@redhat.com>
2626
2627 * server.h: Don't check HAVE_STRING_H.
2628 * gdbreplay.c: Don't check HAVE_STRING_H.
2629 * configure: Rebuild.
2630
0a5dd17d
TT
26312013-11-18 Tom Tromey <tromey@redhat.com>
2632
2633 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2634 LIBGNU.
2635
1bd2f0ba
TT
26362013-11-08 Tom Tromey <tromey@redhat.com>
2637
2638 * configure, config.in: Rebuild.
2639 * configure.ac: Remove unused configury.
2640
3266f10b
TT
26412013-11-08 Tom Tromey <tromey@redhat.com>
2642
2643 * acinclude.m4: Include common.m4, codeset.m4.
2644 * configure, config.in: Rebuild.
2645 * configure.ac: Use GDB_AC_COMMON.
2646
6682d959
AA
26472013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2648
2649 * linux-s390-low.c (HWCAP_S390_TE): New define.
2650 (s390_arch_setup): Consider the TE field in the HWCAP for
2651 determining 'have_regset_tdb'.
2652
fd0a4d76
SDJ
26532013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2654
2655 PR gdb/16014
2656 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2657 call to sizeof.
2658
1a3d890b
PA
26592013-10-02 Pedro Alves <palves@redhat.com>
2660
2661 * server.c (process_serial_event): Don't output "GDBserver
2662 exiting" if GDB is connected through stdio.
2663 * target.c (mywait): Likewise, be silent if GDB is connected
2664 through stdio.
2665
97ad4581
JB
26662013-10-01 Joel Brobecker <brobecker@adacore.com>
2667
2668 * lynx-low.c (lynx_add_threads_after_attach): New function.
2669 (lynx_attach): Remove call to add_thread. Add call to
2670 lynx_add_threads_after_attach instead.
2671
5b4e221c
MF
26722013-09-28 Mike Frysinger <vapier@gentoo.org>
2673
2674 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2675 * config.in, configure: Regenerated.
2676
ee47b2f8
YQ
26772013-09-18 Yao Qi <yao@codesourcery.com>
2678
2679 PR server/15959
2680 * server.c (start_inferior): Clear 'resume_info'.
2681
d6707650 26822013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2683
d6707650
JW
2684 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2685 for each register.
2686
9243dd0e 26872013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2688
9243dd0e
JW
2689 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2690 linux-tile-low.o to srv_tgtobj.
2691
c623a6ef
WN
26922013-09-16 Will Newton <will.newton@linaro.org>
2693
2694 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2695 out regs.
2696
fb71d39e
PA
26972013-09-06 Pedro Alves <palves@redhat.com>
2698
2699 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2700 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2701 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2702 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2703 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2704 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2705
8e7e9910
PA
27062013-09-06 Pedro Alves <palves@redhat.com>
2707
2708 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2709 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2710
7c3a12ca
PA
27112013-09-06 Pedro Alves <palves@redhat.com>
2712
2713 * linux-amd64-ipa.c: Include tracepoint.h.
2714 * linux-i386-ipa.c: Include tracepoint.h.
2715
8eb3d7b6
RW
27162013-09-06 Ricard Wanderlof <ricardw@axis.com>
2717
2718 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2719 (ps_get_thread_area): New function.
2720
eddddb9d
RW
27212013-09-06 Ricard Wanderlof <ricardw@axis.com>
2722
2723 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2724 (initialize_low_arch): Call init_registers_crisv32 rather than
2725 init_register_crisv32.
2726
533b0600
PA
27272013-09-05 Pedro Alves <palves@redhat.com>
2728
2729 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2730 to ...
2731 * hostio.h: ... this new file.
2732 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2733 win32-low.c: Include hostio.h.
2734
0ce3d3b5
PA
27352013-09-05 Pedro Alves <palves@redhat.com>
2736
2737 * server.h (gdb_client_data, handler_func, callback_handler_func)
2738 (delete_file_handler, add_file_handler, append_callback_event)
2739 (delete_callback_event, start_event_loop, initialize_event_loop):
2740 Move to event-loop.h and include it.
2741 * event-loop.h: New file.
2742
799cdc37
PA
27432013-09-05 Pedro Alves <palves@redhat.com>
2744
2745 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2746 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2747 (loaded_dll, unloaded_dll): Move to ...
2748 * dll.h: ... this new file.
2749 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2750
6a6bbd9d
PA
27512013-09-05 Pedro Alves <palves@redhat.com>
2752
2753 * server.h (current_process, get_thread_process, all_processes)
2754 (add_inferior_to_list, for_each_inferior, current_inferior)
2755 (remove_inferior, add_process, remove_process, find_process_pid)
2756 (have_started_inferiors_p, have_attached_inferiors_p)
2757 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2758 (clear_inferiors, find_inferior, find_inferior_id)
2759 (inferior_target_data, set_inferior_target_data)
2760 (inferior_regcache_data, set_inferior_regcache_data): Move to
2761 inferiors.h, and include it.
2762 * inferiors.h: New file.
2763
f699aaba
PA
27642013-09-05 Pedro Alves <palves@redhat.com>
2765
2766 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2767 Move ...
2768 * ax.h: ... here.
2769
c144c7a0
PA
27702013-09-05 Pedro Alves <palves@redhat.com>
2771
2772 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2773 tracepoint.h.
2774 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2775 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2776 (handle_tracepoint_general_set, handle_tracepoint_query)
2777 (tracepoint_finished_step, tracepoint_was_hit)
2778 (release_while_stepping_state_list, current_traceframe)
2779 (in_readonly_region, traceframe_read_mem)
2780 (fetch_traceframe_registers, traceframe_read_sdata)
2781 (traceframe_read_info, struct fast_tpoint_collect_status)
2782 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2783 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2784 (supply_fast_tracepoint_registers)
2785 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2786 (ipa_tdesc, claim_trampoline_space)
2787 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2788 (agent_mem_read, agent_get_trace_state_variable_value)
2789 (agent_set_trace_state_variable_value, agent_tsv_read)
2790 (agent_mem_read_string, get_raw_reg_func_addr)
2791 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2792 * tracepoint.h: ... this new file.
2793
ff42e6ab
PA
27942013-09-05 Pedro Alves <palves@redhat.com>
2795
2796 * server.h (perror_with_name, error, fatal, warning, paddress)
2797 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2798 include it.
2799 * utils.h: New file.
2800
541af0f4
PA
28012013-09-05 Pedro Alves <palves@redhat.com>
2802
2803 * server.h (remote_debug, noack_mode, transport_is_reliable)
2804 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2805 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2806 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2807 (write_enn, initialize_async_io, enable_async_io)
2808 (disable_async_io, check_remote_input_interrupt_request)
2809 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2810 (dead_thread_notify, prepare_resume_reply)
2811 (decode_address_to_semicolon, decode_address, decode_m_packet)
2812 (decode_M_packet, decode_X_packet, decode_xfer_write)
2813 (decode_search_memory_packet, unhexify, hexify)
2814 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2815 (look_up_one_symbol, relocate_instruction)
2816 (monitor_output): Move to remote-utils.h, and include it.
2817 * remote-utils.h: New file.
2818
eebdf26b
PA
28192013-09-05 Pedro Alves <palves@redhat.com>
2820
2821 * server.h (_): Delete.
2822
3aafd2ff
PA
28232013-09-02 Pedro Alves <palves@redhat.com>
2824
2825 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2826 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2827 allocated.
2828 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2829
cee83bcb
PM
28302013-09-02 Pierre Muller <muller@sourceware.org>
2831
2832 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2833 or WriteProcessMemory complete successfully and handle
2834 ERROR_PARTIAL_COPY error.
2835
9a13b2fa
PA
28362013-09-02 Pedro Alves <palves@redhat.com>
2837
2838 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2839 error instead of EIO.
2840
602e3198
JK
28412013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2842
2843 PR server/15604
2844 * linux-low.c: Include filestuff.h.
2845 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2846 * lynx-low.c: Include filestuff.h.
2847 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2848 * server.c: Include filestuff.h.
2849 (main): Call notice_open_fds.
2850 * spu-low.c: Include filestuff.h.
2851 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2852
96d7229d
LM
28532013-08-22 Luis Machado <lgustavo@codesourcery.com>
2854
2855 * Makefile.in: Explain why ../target and ../nat are not
2856 listed as include file search paths.
2857 (linux-waitpid.o): New object file rule.
2858 * configure.srv (srv_native_linux_obj): New variable.
2859 Replace all occurrences of linux native object files with
2860 $srv_native_linux_obj.
2861 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2862 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2863 (linux_enable_event_reporting): Remove declaration.
2864 (my_waitpid): Moved to common/linux-waitpid.c.
2865 (linux_wait_for_event): Pass ptid when calling
2866 linux_enable_event_reporting.
2867 (linux_supports_tracefork_flag): Remove.
2868 (linux_enable_event_reporting): Likewise.
2869 (linux_tracefork_grandchild): Remove.
2870 (STACK_SIZE): Moved to common/linux-ptrace.c.
2871 (linux_tracefork_child): Remove.
2872 (linux_test_for_tracefork): Remove.
2873 (linux_look_up_symbols): Call linux_supports_traceclone.
2874 (initialize_low): Remove call to linux_test_for_tracefork.
2875 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2876 common/linux-ptrace.h.
2877 (PTRACE_TYPE_ARG4): Likewise.
2878 Include linux-ptrace.h.
2879
32940073
PA
28802013-08-21 Pedro Alves <palves@redhat.com>
2881
2882 * config.in: Renegerate.
2883
33b60d58 28842013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2885
33b60d58
LM
2886 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2887 (SFILES): Remove $(srcdir)/common/target-common.c and
2888 add $(srcdir)/target/waitstatus.c.
2889 (OBS): Remove target-common.o and add waitstatus.o.
2890 (server_h): Remove $(srcdir)/../common/target-common.h and
2891 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2892 and $(srcdir)/../target/waitstatus.h.
2893 (target-common.o): Remove.
2894 (waitstatus.o): New target object file.
2895 * target.h: Do not include target-common.h and
2896 include target/resume.h, target/wait.h and
2897 target/waitstatus.h.
2898
b8e1b30e
LM
28992013-08-13 Luis Machado <lgustavo@codesourcery.com>
2900
2901 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2902 to PTRACE_TYPE_ARG3.
2903 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2904 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2905 PTRACE_TYPE_ARG4.
2906 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2907 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2908
7a60ad40
YQ
29092013-07-27 Jie Zhang <jie@codesourcery.com>
2910 Daniel Jacobowitz <dan@codesourcery.com>
2911 Yao Qi <yao@codesourcery.com>
2912
2913 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2914 (mips-linux-watch.o): New rule.
2915 (mips_linux_watch_h): New variable.
2916 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2917 srv_tgtobj.
2918 * linux-mips-low.c: Include mips-linux-watch.h.
2919 (struct arch_process_info, struct arch_lwp_info): New.
2920 (update_watch_registers_callback): New function.
2921 (mips_linux_new_process, mips_linux_new_thread) New functions.
2922 (mips_linux_prepare_to_resume, mips_insert_point): New
2923 functions.
2924 (mips_remove_point, mips_stopped_by_watchpoint): New
2925 functions.
2926 (rsp_bp_type_to_target_hw_bp_type): New function.
2927 (mips_stopped_data_address): New function.
2928 (the_low_target): Add watchpoint support functions.
2929
de6f69ad
YQ
29302013-07-27 Yao Qi <yao@codesourcery.com>
2931
2932 * i386-low.c: Include break-common.h.
2933 (enum target_hw_bp_type): Remove.
2934
3360c0bf
LM
29352013-07-24 Luis Machado <lgustavo@codesourcery.com>
2936
2937 * Makefile.in (SFILES): /common/target-common.c.
2938 (OBS): Add target-common.o.
2939 (server_h): Add $(srcdir)/../common/target-common.h.
2940 (target-common.o): New target.
2941 * server.c (queue_stop_reply_callback): Free
2942 status string after use.
2943 * target.c (target_waitstatus_to_string): Remove.
2944 * target.h: Include target-common.h.
2945 (resume_kind): Likewise.
2946 (target_waitkind): Likewise.
2947 (target_waitstatus): Likewise.
2948 (TARGET_WNOHANG): Likewise.
2949
bd885420
YQ
29502013-07-04 Yao Qi <yao@codesourcery.com>
2951
2952 * Makefile.in (host_alias): Use @host_noncanonical@.
2953 (target_alias): Use @target_noncanonical@.
2954 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2955 ACX_NONCANONICAL_HOST.
2956 * configure: Regenerated.
2957
2958 Revert:
2959 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2960
2961 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2962 * configure: Rebuild.
2963 * Makefile.in (version_host, version_target): Get from configure.
2964 (version.c): Use $(version_host) and $(version_target).
2965
17ef446e
PA
29662013-07-03 Pedro Alves <palves@redhat.com>
2967
2968 * Makefile.in (config.status): Depend on development.sh.
2969 * acinclude.m4: Include libmcheck.m4.
2970 * configure: Regenerate.
2971
7a9a7487
MG
29722013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2973
2974 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2975 attribute inside the parentheses.
2976 (winapi_DebugSetProcessKillOnExit): Ditto.
2977 (winapi_DebugBreakProcess): Ditto.
2978 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2979
49b64de6
MG
29802013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2981
2982 * notif.h (notif_event): Add a dummy member to avoid compiler
2983 errors.
2984
d5749ee7
PA
29852013-07-01 Pedro Alves <palves@redhat.com>
2986
2987 * hostio.c (HOSTIO_PATH_MAX): Define.
2988 (require_filename, handle_open, handle_unlink, handle_readlink):
2989 Use it.
2990
d8d2a3ee
PA
29912013-07-01 Pedro Alves <palves@redhat.com>
2992
2993 * server.h: Include "pathmax.h".
2994 * linux-low.c: Don't include sys/param.h.
2995 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2996 MAXPATHLEN.
2997 * win32-low.c: Don't include sys/param.h.
2998 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2999
bc7dea8d
PA
30002013-07-01 Pedro Alves <palves@redhat.com>
3001
3002 * event-loop.c: Don't check HAVE_UNISTD_H before including
3003 <unistd.h>.
3004 * gdbreplay.c: Likewise.
3005 * remote-utils.c: Likewise.
3006 * server.c: Likewise.
3007 * configure.ac: Don't check for unistd.h.
3008 * configure: Regenerate.
3009
d6c2da54
TT
30102013-06-28 Tom Tromey <tromey@redhat.com>
3011
3012 * Makefile.in (version.c): Use version.in, not
3013 common/version.in.
3014
257b6bec
MG
30152013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3016
3017 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3018 * configure: Rebuild.
3019 * Makefile.in (version_host, version_target): Get from configure.
3020 (version.c): Use $(version_host) and $(version_target).
3021
86ebe149
DK
30222013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3023
3024 Fix trace-status to output user name without trailing colon.
3025 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3026
f30aa5af
DK
30272013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3028
3029 Fix trace-status to output proper start-time and stop-time.
3030 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3031 output start time and stop time in hex as gdb expects.
3032
28a93511
YQ
30332013-06-26 Pedro Alves <pedro@codesourcery.com>
3034
3035 * tracepoint.c (build_traceframe_info_xml): Output trace state
3036 variables present in the trace buffer.
3037
01208463
TT
30382013-06-24 Tom Tromey <tromey@redhat.com>
3039
3040 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3041 create-version.sh.
3042 (version.o): Remove.
3043 * gdbreplay.c: Include version.h.
3044 (version, host_name): Don't declare.
3045 * server.h: Include version.h.
3046 (version, host_name): Don't declare.
3047
760256f9
PA
30482013-06-12 Pedro Alves <palves@redhat.com>
3049
3050 * linux-x86-low.c (linux_is_elf64): Delete global.
3051 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3052 with local linux_pid_exe_is_elf_64_file use.
3053
030031ee
PA
30542013-06-11 Pedro Alves <palves@redhat.com>
3055
3056 * linux-low.c (regset_disabled, disable_regset): New functions.
3057 (regsets_fetch_inferior_registers)
3058 (regsets_store_inferior_registers): Use them.
3059 (initialize_regsets_info); Don't allocate the disabled_regsets
3060 array here.
3061 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3062 comment.
3063
5da6eb0a
PA
30642013-06-11 Pedro Alves <palves@redhat.com>
3065
3066 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3067 xmalloc.
3068
7e5aaa09
PA
30692013-06-11 Pedro Alves <palves@redhat.com>
3070
3071 * linux-x86-low.c (initialize_low_arch): Call
3072 init_registers_x32_avx_linux.
3073
d878444c
JK
30742013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3075
3076 Fix compatibility with Android Bionic.
3077 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3078 it is not empty.
3079
3aee8918
PA
30802013-06-07 Pedro Alves <palves@redhat.com>
3081
5f2b57b5 3082 PR server/14823
3aee8918
PA
3083 * Makefile.in (OBS): Add tdesc.o.
3084 (IPA_OBJS): Add tdesc-ipa.o.
3085 (tdesc-ipa.o): New rule.
3086 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3087 interface.
3088 * linux-low.c (new_inferior): Delete.
3089 (disabled_regsets, num_regsets): Delete.
3090 (linux_add_process): Adjust to set the new per-process
3091 new_inferior flag.
3092 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3093 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3094 was a stop. When calling arch_setup, switch the current inferior
3095 to the thread that got an event.
3096 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3097 (regsets_fetch_inferior_registers)
3098 (regsets_store_inferior_registers): New regsets_info parameter.
3099 Adjust to use it.
3100 (linux_register_in_regsets): New regs_info parameter. Adjust to
3101 use it.
3102 (register_addr, fetch_register, store_register): New usrregs_info
3103 parameter. Adjust to use it.
3104 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3105 parameter regs_info. Adjust to use it.
3106 (linux_fetch_registers): Get the current inferior's regs_info, and
3107 adjust to use it.
3108 (linux_store_registers): Ditto.
3109 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3110 (initialize_low): Don't initialize the target_regsets here. Call
3111 initialize_low_arch.
3112 * linux-low.h (target_regsets): Delete declaration.
3113 (struct regsets_info): New.
3114 (struct usrregs_info): New.
3115 (struct regs_info): New.
3116 (struct process_info_private) <new_inferior>: New field.
3117 (struct linux_target_ops): Delete the num_regs, regmap, and
3118 regset_bitmap fields. New field regs_info.
3119 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3120 * i387-fp.c (num_xmm_registers): Delete.
3121 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3122 calls to new interface.
3123 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3124 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3125 Infer the number of xmm registers from the regcache's target
3126 description.
3127 * i387-fp.h (num_xmm_registers): Delete.
3128 * inferiors.c (add_thread): Don't install the thread's regcache
3129 here.
3130 * proc-service.c (gregset_info): Fetch the current inferior's
3131 regs_info. Adjust to use it.
3132 * regcache.c: Include tdesc.h.
3133 (register_bytes, reg_defs, num_registers)
3134 (gdbserver_expedite_regs): Delete.
3135 (get_thread_regcache): If the thread doesn't have a regcache yet,
3136 create one, instead of aborting gdbserver.
3137 (regcache_invalidate_one): Rename to ...
3138 (regcache_invalidate_thread): ... this.
3139 (regcache_invalidate_one): New.
3140 (regcache_invalidate): Only invalidate registers of the current
3141 process.
3142 (init_register_cache): Add target_desc parameter, and use it.
3143 (new_register_cache): Ditto. Assert the target description has a
3144 non zero registers_size.
3145 (regcache_cpy): Add assertions. Adjust.
3146 (realloc_register_cache, set_register_cache): Delete.
3147 (registers_to_string, registers_from_string): Adjust.
3148 (find_register_by_name, find_regno, find_register_by_number)
3149 (register_cache_size): Add target_desc parameter, and use it.
3150 (free_register_cache_thread, free_register_cache_thread_one)
3151 (regcache_release, register_cache_size): New.
3152 (register_size): Add target_desc parameter, and use it.
3153 (register_data, supply_register, supply_register_zeroed)
3154 (supply_regblock, supply_register_by_name, collect_register)
3155 (collect_register_as_string, collect_register_by_name): Adjust.
3156 * regcache.h (struct target_desc): Forward declare.
3157 (struct regcache) <tdesc>: New field.
3158 (init_register_cache, new_register_cache): Add target_desc
3159 parameter.
3160 (regcache_invalidate_thread): Declare.
3161 (regcache_invalidate_one): Delete declaration.
3162 (regcache_release): Declare.
3163 (find_register_by_number, register_cache_size, register_size)
3164 (find_regno): Add target_desc parameter.
3165 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3166 declarations.
3167 * remote-utils.c: Include tdesc.h.
3168 (outreg, prepare_resume_reply): Adjust.
3169 * server.c: Include tdesc.h.
3170 (gdbserver_xmltarget): Delete declaration.
3171 (get_features_xml, process_serial_event): Adjust.
3172 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3173 declare.
3174 (struct process_info) <tdesc>: New field.
3175 (ipa_tdesc): Declare.
3176 * tdesc.c: New file.
3177 * tdesc.h: New file.
3178 * tracepoint.c: Include tdesc.h.
3179 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3180 (get_context_regcache): Adjust to pass ipa_tdesc down.
3181 (do_action_at_tracepoint): Adjust to get the register cache size
3182 from the context regcache's description.
3183 (traceframe_walk_blocks): Adjust to get the register cache size
3184 from the current trace frame's description.
3185 (traceframe_get_pc): Adjust to get current trace frame's
3186 description and pass it down.
3187 (gdb_collect): Adjust to get the register cache size from the
3188 IPA's description.
3189 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3190 (gdbserver_xmltarget): Delete.
3191 (initialize_low_tracepoint): Set the ipa's target description.
3192 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3193 (initialize_low_tracepoint): Set the ipa's target description.
3194 * linux-x86-low.c: Include tdesc.h.
3195 [__x86_64__] (is_64bit_tdesc): New.
3196 (ps_get_thread_area, x86_get_thread_area): Use it.
3197 (i386_cannot_store_register): Rename to ...
3198 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3199 (i386_cannot_fetch_register): Rename to ...
3200 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3201 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3202 to new interface.
3203 (target_regsets): Rename to ...
3204 (x86_regsets): ... this.
3205 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3206 interface.
3207 (x86_siginfo_fixup): Use is_64bit_tdesc.
3208 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3209 (tdesc_x32_avx_linux, tdesc_x32_linux)
3210 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3211 Declare.
3212 (x86_linux_update_xmltarget): Delete.
3213 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3214 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3215 (AMD64_LINUX_USER64_CS): New.
3216 (x86_linux_read_description): New, based on
3217 x86_linux_update_xmltarget.
3218 (same_process_callback): New.
3219 (x86_arch_setup_process_callback): New.
3220 (x86_linux_update_xmltarget): New.
3221 (x86_regsets_info): New.
3222 (amd64_linux_regs_info): New.
3223 (i386_linux_usrregs_info): New.
3224 (i386_linux_regs_info): New.
3225 (x86_linux_regs_info): New.
3226 (x86_arch_setup): Reimplement.
3227 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3228 (x86_emit_ops): Ditto.
3229 (the_low_target): Adjust. Install x86_linux_regs_info,
3230 x86_cannot_fetch_register, and x86_cannot_store_register.
3231 (initialize_low_arch): New.
3232 * linux-ia64-low.c (tdesc_ia64): Declare.
3233 (ia64_fetch_register): Adjust.
3234 (ia64_usrregs_info, regs_info): New globals.
3235 (ia64_regs_info): New function.
3236 (the_low_target): Adjust.
3237 (initialize_low_arch): New function.
3238 * linux-sparc-low.c (tdesc_sparc64): Declare.
3239 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3240 Adjust.
3241 (sparc_arch_setup): New function.
3242 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3243 (the_low_target): Adjust.
3244 (initialize_low_arch): New function.
3245 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3246 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3247 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3248 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3249 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3250 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3251 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3252 (tdesc_powerpc_isa205_vsx64l): Declare.
3253 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3254 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3255 (ppc_set_pc, ppc_get_hwcap): Adjust.
3256 (ppc_usrregs_info): Forward declare.
3257 (!__powerpc64__) ppc_regmap_adjusted: New global.
3258 (ppc_arch_setup): Adjust to the current process'es target
3259 description.
3260 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3261 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3262 (ppc_store_evrregset): Adjust.
3263 (target_regsets): Rename to ...
3264 (ppc_regsets): ... this, and make static.
3265 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3266 (ppc_regs_info): New function.
3267 (the_low_target): Adjust.
3268 (initialize_low_arch): New function.
3269 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3270 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3271 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3272 (tdesc_s390x_linux64v2): Declare.
3273 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3274 (s390_fill_gregset, s390_store_last_break): Adjust.
3275 (target_regsets): Rename to ...
3276 (s390_regsets): ... this, and make static.
3277 (s390_get_pc, s390_set_pc): Adjust.
3278 (s390_get_hwcap): New target_desc parameter, and use it.
3279 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3280 (s390_arch_setup): Adjust to set the current process'es target
3281 description. Don't adjust the regmap.
3282 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3283 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3284 (regs_info_3264): New globals.
3285 (s390_regs_info): New function.
3286 (the_low_target): Adjust.
3287 (initialize_low_arch): New function.
3288 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3289 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3290 [__mips64] (init_registers_mips_linux)
3291 (init_registers_mips_dsp_linux): Delete defines.
3292 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3293 (have_dsp): New global.
3294 (mips_read_description): New, based on mips_arch_setup.
3295 (mips_arch_setup): Reimplement.
3296 (get_usrregs_info): New function.
3297 (mips_cannot_fetch_register, mips_cannot_store_register)
3298 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3299 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3300 (target_regsets): Rename to ...
3301 (mips_regsets): ... this, and make static.
3302 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3303 (dsp_regs_info, regs_info): New globals.
3304 (mips_regs_info): New function.
3305 (the_low_target): Adjust.
3306 (initialize_low_arch): New function.
3307 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3308 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3309 Declare.
3310 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3311 (arm_read_description): New, with bits factored from
3312 arm_arch_setup.
3313 (arm_arch_setup): Reimplement.
3314 (target_regsets): Rename to ...
3315 (arm_regsets): ... this, and make static.
3316 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3317 (arm_regs_info): New function.
3318 (the_low_target): Adjust.
3319 (initialize_low_arch): New function.
3320 * linux-m68k-low.c (tdesc_m68k): Declare.
3321 (target_regsets): Rename to ...
3322 (m68k_regsets): ... this, and make static.
3323 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3324 (m68k_regs_info): New function.
3325 (m68k_arch_setup): New function.
3326 (the_low_target): Adjust.
3327 (initialize_low_arch): New function.
3328 * linux-sh-low.c (tdesc_sharch): Declare.
3329 (target_regsets): Rename to ...
3330 (sh_regsets): ... this, and make static.
3331 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3332 (sh_regs_info, sh_arch_setup): New functions.
3333 (the_low_target): Adjust.
3334 (initialize_low_arch): New function.
3335 * linux-bfin-low.c (tdesc_bfin): Declare.
3336 (bfin_arch_setup): New function.
3337 (bfin_usrregs_info, regs_info): New globals.
3338 (bfin_regs_info): New function.
3339 (the_low_target): Adjust.
3340 (initialize_low_arch): New function.
3341 * linux-cris-low.c (tdesc_cris): Declare.
3342 (cris_arch_setup): New function.
3343 (cris_usrregs_info, regs_info): New globals.
3344 (cris_regs_info): New function.
3345 (the_low_target): Adjust.
3346 (initialize_low_arch): New function.
3347 * linux-cris-low.c (tdesc_crisv32): Declare.
3348 (cris_arch_setup): New function.
3349 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3350 (cris_regs_info): New function.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * linux-m32r-low.c (tdesc_m32r): Declare.
3354 (m32r_arch_setup): New function.
3355 (m32r_usrregs_info, regs_info): New globals.
3356 (m32r_regs_info): Adjust.
3357 (initialize_low_arch): New function.
3358 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3359 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3360 (tic6x_usrregs_info): Forward declare.
3361 (tic6x_read_description): New function, based on ...
3362 (tic6x_arch_setup): ... this. Reimplement.
3363 (target_regsets): Rename to ...
3364 (tic6x_regsets): ... this, and make static.
3365 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3366 (tic6x_regs_info): New function.
3367 (the_low_target): Adjust.
3368 (initialize_low_arch): New function.
3369 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3370 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3371 (target_regsets): Rename to ...
3372 (xtensa_regsets): ... this, and make static.
3373 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3374 globals.
3375 (xtensa_arch_setup, xtensa_regs_info): New functions.
3376 (the_low_target): Adjust.
3377 (initialize_low_arch): New function.
3378 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3379 (nios2_arch_setup): Set the current process'es tdesc.
3380 (target_regsets): Rename to ...
3381 (nios2_regsets): ... this.
3382 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3383 (nios2_regs_info): New function.
3384 (the_low_target): Adjust.
3385 (initialize_low_arch): New function.
a261b8f5
PA
3386 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3387 (aarch64_arch_setup): Set the current process'es tdesc.
3388 (target_regsets): Rename to ...
3389 (aarch64_regsets): ... this.
3390 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3391 (aarch64_regs_info): New function.
3392 (the_low_target): Adjust.
3393 (initialize_low_arch): New function.
3aee8918
PA
3394 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3395 globals.
3396 (target_regsets): Rename to ...
3397 (tile_regsets): ... this.
3398 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3399 (tile_regs_info): New function.
3400 (tile_arch_setup): Set the current process'es tdesc.
3401 (the_low_target): Adjust.
3402 (initialize_low_arch): New function.
3403 * spu-low.c (tdesc_spu): Declare.
3404 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3405 * win32-arm-low.c (tdesc_arm): Declare.
3406 (arm_arch_setup): New function.
3407 (the_low_target): Install arm_arch_setup instead of
3408 init_registers_arm.
3409 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3410 (init_windows_x86): Rename to ...
3411 (i386_arch_setup): ... this. Set `win32_tdesc'.
3412 (the_low_target): Adjust.
3413 * win32-low.c (win32_tdesc): New global.
3414 (child_add_thread): Don't create the thread cache here.
3415 (do_initial_child_stuff): Set the new process'es tdesc.
3416 * win32-low.h (struct target_desc): Forward declare.
3417 (win32_tdesc): Declare.
3418 * lynx-i386-low.c (tdesc_i386): Declare global.
3419 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3420 * lynx-low.c (lynx_tdesc): New global.
3421 (lynx_add_process): Set the new process'es tdesc.
3422 * lynx-low.h (struct target_desc): Forward declare.
3423 (lynx_tdesc): Declare global.
3424 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3425 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3426 * nto-low.c (nto_tdesc): New global.
3427 (do_attach): Set the new process'es tdesc.
3428 * nto-low.h (struct target_desc): Forward declare.
3429 (nto_tdesc): Declare.
3430 * nto-x86-low.c (tdesc_i386): Declare.
3431 (nto_x86_arch_setup): Set `nto_tdesc'.
3432
b1fbec62
GB
34332013-06-04 Gary Benson <gbenson@redhat.com>
3434
3435 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3436 to qSupported response when appropriate.
3437 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3438 with nonzero-length annex.
3439 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3440 arguments supplied in annex.
3441
d1ec4ce7
DE
34422013-05-31 Doug Evans <dje@google.com>
3443
ac44adcb 3444 PR server/15594
d1ec4ce7
DE
3445 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3446 64 bits in 64-cross-32 environment.
3447
9b25f2d3
PA
34482013-05-28 Pedro Alves <palves@redhat.com>
3449
3450 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3451 (aarch64-without-fpu.c): Delete rule.
3452 * configure.srv (aarch64*-*-linux*): Remove references to
3453 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3454 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3455 declaration.
3456
6740dc9c
PA
34572013-05-24 Pedro Alves <palves@redhat.com>
3458
3459 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3460 instead of strchr/decode_address. Error if the range isn't split
3461 with a ','. Don't assume there's be a ':' in the action.
3462
c2d6af84
PA
34632013-05-23 Yao Qi <yao@codesourcery.com>
3464 Pedro Alves <palves@redhat.com>
3465
3466 * linux-low.c (lwp_in_step_range): New function.
3467 (linux_wait_1): If the thread was range stepping and stopped
3468 outside the stepping range, report the stop to GDB. Otherwise,
3469 continue stepping. Add range stepping debug output.
3470 (linux_set_resume_request): Copy the step range from the resume
3471 request to the lwp.
3472 (linux_supports_range_stepping): New.
3473 (linux_target_ops) <supports_range_stepping>: Set to
3474 linux_supports_range_stepping.
3475 * linux-low.h (struct linux_target_ops)
3476 <supports_range_stepping>: New field.
3477 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3478 * linux-x86-low.c (x86_supports_range_stepping): New.
3479 (the_low_target) <supports_range_stepping>: Set to
3480 x86_supports_range_stepping.
3481 * server.c (handle_v_cont): Handle 'r' action.
3482 (handle_v_requests): Append ";r" if the target supports range
3483 stepping.
3484 * target.h (struct thread_resume) <step_range_start,
3485 step_range_end>: New fields.
3486 (struct target_ops) <supports_range_stepping>:
3487 New field.
3488 (target_supports_range_stepping): New macro.
3489
58794e1a
JB
34902013-05-17 Joel Brobecker <brobecker@adacore.com>
3491
3492 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3493 confusion in comment.
3494
d631c5a7
JB
34952013-05-17 Joel Brobecker <brobecker@adacore.com>
3496
3497 * lynx-low.c (struct process_info_private): New type.
3498 (lynx_add_process): New function.
3499 (lynx_create_inferior, lynx_attach): Replace calls to
3500 add_process by calls to lynx_add_process.
3501 (lynx_resume): If PTID is null, then try using
3502 current_process()->private->last_wait_event_ptid.
3503 Add comments.
3504 (lynx_clear_inferiors): Delete. The contents of that function
3505 has been inlined in lynx_mourn;
3506 (lynx_wait_1): Save the ptid in the process's private data.
3507 (lynx_mourn): Free the process' private data. Replace call
3508 to lynx_clear_inferiors by call to clear_inferiors.
3509
96f7a20f
YQ
35102013-05-17 Yao Qi <yao@codesourcery.com>
3511
3512 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3513 the right place.
3514
db0dfaa0
LM
35152013-05-16 Luis Machado <lgustavo@codesourcery.com>
3516
3517 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3518 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3519 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3520 PT_TEXT_END_ADDR guards. Update comments.
3521 (linux_target_op) <read_offsets>: Conditionally define to
3522 linux_read_offsets if the target is UCLIBC and if it defines
3523 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3524
68f5f838
SL
35252013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3526 Andrew Jenner <andrew@codesourcery.com>
3527
3528 * Makefile.in (SFILES): Add linux-nios2-low.c.
3529 (clean): Add action to delete nios2-linux.c.
3530 (nios2-linux.c): New rule.
3531 * configure.srv: Add nios2*-*-linux*.
3532 * linux-nios2-low.c: New.
3533
1ebff1fd
HAQ
35342013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3535
3536 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3537
f6150862
HZ
35382013-04-25 Hui Zhu <hui@codesourcery.com>
3539
3540 PR gdb/15186
f6150862
HZ
3541 * ax.c (ax_printf): Add fflush.
3542
614c279d
TT
35432013-04-22 Tom Tromey <tromey@redhat.com>
3544
3545 * Makefile.in (SFILES): Add filestuff.c.
3546 (OBS): Add filestuff.o.
3547 (filestuff.o): New target.
3548 * config.in, configure: Rebuild.
3549 * configure.ac: Check for fdwalk, pipe2.
3550
7d4e5717
PA
35512013-04-17 Pedro Alves <palves@redhat.com>
3552
3553 * configure.ac (USE_THREAD_DB): Delete variable.
3554 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3555 Don't AC_SUBST USE_THREAD_DB.
3556 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3557 * config.in, configure: Regenerate.
3558
d5c93e41
PA
35592013-04-16 Pedro Alves <palves@redhat.com>
3560
3561 * linux-low.h (struct lwp_info) <thread_known>: Move under
3562 the USE_THREAD_DB #ifdef.
3563
04f5fe89
PA
35642013-04-16 Pedro Alves <palves@redhat.com>
3565
3566 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3567 (linux-low.o): Delete rule.
3568 * linux-low.h: Always include "gdb_thread_db.h" instead of
3569 conditionally including thread_db.h.
3570 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3571 HAVE_THREAD_DB_H.
3572
480b27bf
JK
35732013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3574
3575 * Makefile.in (install-only): Fix make install regression.
3576
43662968
JK
35772013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3578
3579 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3580 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3581 installation.
3582 * gdbserver.1: Remove.
3583
3e74e146
PA
35842013-03-22 Pedro Alves <palves@redhat.com>
3585
3586 * linux-low.c (handle_extended_wait): Don't call
3587 linux_enable_event_reporting.
3588
a8347a2a
TT
35892013-03-15 Tony Theodore <tonyt@logyst.com>
3590
3591 PR build/9098:
3592 * Makefile.in (SHELL): Use @SHELL@.
3593
eeb56fa7
SDJ
35942013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3595
3596 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3597 compiler warning.
3598
4fa7e2ff
JB
35992013-03-13 Joel Brobecker <brobecker@adacore.com>
3600
3601 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3602 Remove extraneous NULL element.
3603
8ddb1965
YQ
36042013-03-13 Yao Qi <yao@codesourcery.com>
3605
3606 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3607 'V' block in trace frame.
3608
9accd112
MM
36092013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3610
3611 * target.h (struct target_ops): Add btrace ops.
3612 (target_supports_btrace): New macro.
3613 (target_enable_btrace): New macro.
3614 (target_disable_btrace): New macro.
3615 (target_read_btrace): New macro.
3616 * gdbthread.h (struct thread_info): Add btrace field.
3617 * server.c: Include btrace-common.h.
3618 (handle_btrace_general_set): New function.
3619 (handle_btrace_enable): New function.
3620 (handle_btrace_disable): New function.
3621 (handle_general_set): Call handle_btrace_general_set.
3622 (handle_qxfer_btrace): New function.
3623 (struct qxfer qxfer_packets[]): Add btrace entry.
3624 * inferiors.c (remove_thread): Disable btrace.
3625 * linux-low: Include linux-btrace.h.
3626 (linux_low_enable_btrace): New function.
3627 (linux_low_read_btrace): New function.
3628 (linux_target_ops): Add btrace ops.
3629 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3630 Add srv_linux_btrace=yes.
3631 (x86_64-*-linux*): Add linux-btrace.o.
3632 Add srv_linux_btrace=yes.
3633 * configure.ac: Define HAVE_LINUX_BTRACE.
3634 * config.in: Regenerated.
3635 * configure: Regenerated.
3636
5cc22e4c
MM
36372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3638
3639 * server.c (handle_qxfer): Preserve error message if -3 is
3640 returned.
3641 (qxfer): Document the -3 return value.
3642
7c97f91e
MM
36432013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3644
3645 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3646 (linux_btrace_h): New variable.
3647 (linux-btrace.o): New rule.
3648
be9a119c 36492013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3650 Hafiz Abid Qadeer <abidh@codesourcery.com>
3651
3652 * tracepoint.c (trace_buffer_size): New global.
3653 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3654 (init_trace_buffer): Change to one-argument function. Allocate
3655 trace buffer memory.
3656 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3657 handle QTBuffer:size packet.
3658 (cmd_bigqtbuffer_size): New function.
3659 (initialize_tracepoint): Call init_trace_buffer with
3660 DEFAULT_TRACE_BUFFER_SIZE.
3661 * server.c (handle_query): Add QTBuffer:size in the
3662 supported packets.
3663
e64f7499
YQ
36642013-03-07 Yao Qi <yao@codesourcery.com>
3665
3666 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3667 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3668 of -1.
3669 (cmd_qtsp): Adjust condition. Do post increment.
3670 Set cur_action and cur_step_action back to 0.
3671
f0ae6fc3
PA
36722013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3673
3674 PR server/15236
3675 * linux-low.c (linux_write_memory): Return early success if LEN is
3676 zero.
3677
b5b0b0af
CV
36782013-03-05 Corinna Vinschen <vinschen@redhat.de>
3679
334ad4a8 3680 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3681
589bc927
TT
36822013-02-28 Tom Tromey <tromey@redhat.com>
3683
3684 * configure.ac: Invoke AC_SYS_LARGEFILE.
3685 * configure, config.in: Rebuild.
3686
dfe07582
CV
36872013-02-28 Corinna Vinschen <vinschen@redhat.com>
3688
3689 * win32-low.c: Throughout, fix format strings and casts of
3690 printf-like functions to avoid type related warnings on all
3691 platforms.
3692 (get_child_debug_event): Print dwDebugEventCode as hex since
3693 that's how it's usually documented.
3694
736cd585
YQ
36952013-02-28 Yao Qi <yao@codesourcery.com>
3696
3697 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3698 pulongest.
3699
e1f58301
JW
37002013-02-27 Jiong Wang <jiwang@tilera.com>
3701
3702 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3703 (reg-tilegx32.c): New rule.
3704 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3705 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3706 different register info initializer according to elf class.
3707 (init_registers_tilgx32): New function. The tilegx32 register info
3708 initializer.
3709 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3710 (tile_store_gregset): Likewise.
3711
d171ca78
YQ
37122013-02-27 Yao Qi <yao@codesourcery.com>
3713
3714 * server.c (process_point_options): Print debug message when
3715 debug_threads is true.
3716
282bbdf3
YQ
37172013-02-26 Yao Qi <yao@codesourcery.com>
3718
3719 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3720
aca22551
PA
37212013-02-19 Pedro Alves <palves@redhat.com>
3722 Kai Tietz <ktietz@redhat.com>
3723
3724 PR gdb/15161
3725
3726 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3727 instead of strtoul to extract address from packet.
3728 (process_serial_event) <'z'>: Likewise.
3729
4f3cee1c
YQ
37302013-02-18 Yao Qi <yao@codesourcery.com>
3731
3732 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3733
8e1d55a3
PA
37342013-02-14 Pedro Alves <palves@redhat.com>
3735
3736 Plug memory leak.
3737
3738 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3739 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3740
458820da
PA
37412013-02-14 Pedro Alves <palves@redhat.com>
3742
3743 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3744
baea0dae
PA
37452013-02-14 Pedro Alves <palves@redhat.com>
3746
3747 * tracepoint.c (save_string): Delete.
3748 (add_tracepoint_action): Use savestring instead of save_string.
3749
0b1afbb3
PA
37502013-02-12 Pedro Alves <palves@redhat.com>
3751
3752 * linux-xtensa-low.c: Ditto.
3753 * xtensa-xtregs.c: Ditto.
3754
8a4ac37e
PA
37552013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3756
3757 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3758 thread_db.
3759
148de6bb
MS
37602013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3761
3762 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3763 aarch64_num_wp_regs and aarch64_num_bp_regs to
3764 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3765
55fac6e0
MS
37662013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3767
3768 * linux-aarch64-low.c (ps_get_thread_area): Replace
3769 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3770
176eb98c
MS
37712013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3772 Marcus Shawcroft <marcus.shawcroft@arm.com>
3773 Nigel Stephens <nigel.stephens@arm.com>
3774 Yufeng Zhang <yufeng.zhang@arm.com>
3775
3776 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3777 (aarch64.c, aarch64-without-fpu.c): New targets.
3778 * configure.srv (aarch64*-*-linux*): New.
3779 * linux-aarch64-low.c: New file.
3780
56f7af9c
MS
37812013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3782
43aaf8b6 3783 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3784 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3785 (dequeue_one_deferred_signal, linux_resume_one_thread)
3786 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3787 (linux_tracefork_grandchild, linux_test_for_tracefork)
3788 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3789 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3790 where the argument is 0.
3791
60f662b0
YQ
37922013-01-25 Yao Qi <yao@codesourcery.com>
3793
3794 * event-loop.c: Include "queue.h".
3795 (gdb_event_p): New typedef.
3796 (struct gdb_event) <next_event>: Remove.
3797 (event_queue): Change to QUEUE(gdb_event_p).
3798 (async_queue_event): Remove.
3799 (gdb_event_xfree): New.
3800 (initialize_event_loop): New.
3801 (process_event): Use API from QUEUE.
3802 (wait_for_event): Likewise.
3803 * server.c (main): Call initialize_event_loop.
3804 * server.h (initialize_event_loop): Declare.
3805
5ae4861a
YQ
38062013-01-18 Yao Qi <yao@codesourcery.com>
3807
3808 * ax.h (struct eval_agent_expr_context): New.
3809 (gdb_eval_agent_expr): Update declaration.
3810 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3811 TFRAME. Add new argument CTX.
3812 * server.h (struct eval_agent_expr_context): Declare.
3813 (agent_mem_read, agent_tsv_read): Update declaration.
3814 (agent_mem_read_string): Likewise.
3815 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3816 (add_traceframe_block): Add new argument TPOINT.
3817 Increase TPOINT->traceframe_usage.
3818 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3819 eval_tracepoint_agent_expr.
3820 (condition_true_at_tracepoint): Likewise.
3821 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3822 (agent_mem_read_string, agent_tsv_read): Likewise.
3823
85e00e85
YQ
38242013-01-16 Yao Qi <yao@codesourcery.com>
3825
3826 * linux-low.c (linux_resume_one_lwp): Don't check
3827 'lwp->bp_reinsert != 0'.
3828
4039cf45
JB
38292013-01-07 Joel Brobecker <brobecker@adacore.com>
3830 Pedro Alves <palves@redhat.com>
3831
3832 * lynx-low.c (ptrace_request_to_str): Define a temporary
3833 macro and use it to simplify this function's implementation.
3834
9044dee2
JB
38352013-01-07 Joel Brobecker <brobecker@adacore.com>
3836
3837 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3838 sets errno.
3839
e6352c8f
JB
38402013-01-07 Joel Brobecker <brobecker@adacore.com>
3841
3842 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3843
50681a27
JB
38442013-01-07 Joel Brobecker <brobecker@adacore.com>
3845
3846 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3847
3f6e77ef
JB
38482013-01-07 Joel Brobecker <brobecker@adacore.com>
3849
3850 * lynx-low.c (lynx_resume): Use the resume_info parameter
3851 to determine the ptid for the lynx_ptrace call, unless
3852 it is equal to minus_one_ptid, in which case we use the
3853 ptid of the current_inferior.
3854 (lynx_wait_1): After having received a thread create/exit
3855 event, resume the inferior's execution using the signaling
3856 thread's ptid, rather than the old ptid.
3857
7fda33ae
JB
38582013-01-07 Joel Brobecker <brobecker@adacore.com>
3859
3860 * lynx-low.c (lynx_resume): Delete variable ret.
3861
b9786c74
JB
38622013-01-01 Joel Brobecker <brobecker@adacore.com>
3863
3864 * gdbreplay.c (gdbreplay_version): Update copyright year.
3865 * server.c (gdbserver_version): Likewise.
3866
8b93d60f
JB
38672012-12-17 Joel Brobecker <brobecker@adacore.com>
3868
3869 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3870 new thread.
3871
037335a7
JB
38722012-12-17 Joel Brobecker <brobecker@adacore.com>
3873
3874 * lynx-low.c (ptrace_request_to_str): Add handling for
3875 PTRACE_GETTRACESIG.
3876
52d4cbd8
JB
38772012-12-17 Joel Brobecker <brobecker@adacore.com>
3878
3879 * lynx-low.c (lynx_attach): Delete variable new_process.
3880
ab8f6ca9
JB
38812012-12-17 Joel Brobecker <brobecker@adacore.com>
3882
3883 * lynx-low.c (lynx_create_inferior): Delete variable
3884 new_process.
3885
78cbc024
JB
38862012-12-17 Joel Brobecker <brobecker@adacore.com>
3887
3888 * lynx-low.c (ptrace_request_to_str): Do not handle
3889 PTRACE_GETTHREADLIST if this macro does not exist.
3890
14a00470
YQ
38912012-12-15 Yao Qi <yao@codesourcery.com>
3892
3893 * Makefile.in (OBS): Add notif.o.
3894 * notif.c, notif.h: New.
3895 * server.c: Include "notif.h".
3896 (struct vstop_notif) <next>: Remove.
3897 <base>: New field.
3898 (queue_stop_reply): Update.
3899 (push_event, send_next_stop_reply): Remove.
3900 (discard_queued_stop_replies): Update.
3901 (notif_stop): New variable.
3902 (handle_v_stopped): Remove.
3903 (handle_v_requests): Don't call handle_v_stopped. Call
3904 handle_ack_notif instead.
3905 (queue_stop_reply_callback): Call notif_event_enque instead
3906 of queue_stop_reply.
3907 (handle_status): Don't call send_next_stop_reply, call
3908 notif_write_event instead.
3909 (kill_inferior_callback): Likewise.
3910 (detach_or_kill_inferior_callback): Likewise.
3911 (main): Call initialize_notif.
3912 (process_serial_event): Call QUEUE_is_empty.
3913 (handle_target_event): Call notif_push instead of push event.
3914 * server.h (push_event): Remove declaration.
3915
61c125b9
TT
39162012-12-10 Tom Tromey <tromey@redhat.com>
3917
3918 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3919 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3920 macros.
3921 (.c.o): Rewrite.
3922 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3923 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3924 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3925 (amd64-linux-ipa.o, ax.o): Rewrite.
3926 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3927 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3928 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3929 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3930 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3931 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3932 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3933 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3934 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3935 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3936 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3937 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3938 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3939 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3940 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3941 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3942 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3943 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3944 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3945 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3946 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3947 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3948 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3949 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3950 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3951 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3952 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3953 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3954 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3955 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3956 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3957 (reg-tilegx.o): Remove.
3958 (all_object_files): New macro.
3959 Include .deps files.
3960 * aclocal.m4, configure: Rebuild.
3961 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3962 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3963 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3964
e90e9ad9
TT
39652012-12-05 Tom Tromey <tromey@redhat.com>
3966
3967 PR gdb/14917:
3968 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3969
02d403bf 39702012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3971
3972 * configure.ac: Check for linux/perf_event.h.
3973 * config.in: Regenerated.
3974 * configure: Regenerated.
3975
0270a750
PA
39762012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3977
3978 * hostio.c (handle_readlink): Decrease buffer size
3979 parameter passed to readlink by one byte.
3980
8c29b58e
YQ
39812012-11-26 Yao Qi <yao@codesourcery.com>
3982
3983 * configure.ac (build_warnings): Append '-Wempty-body'.
3984 * configure: Regenerated.
3985 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3986 body.
3987
8bdce1ff
PM
39882012-11-15 Pierre Muller <muller@sourceware.org>
3989
3990 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3991 * config.in: Regenerate.
3992 * configure: Regenerate.
3993 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3994 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3995 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3996 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3997 header.
3998 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3999 instead of <sys/wait.h> header.
4000 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4001
02d403bf 40022012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4003
4004 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4005 (various make rules): Remove -DGDBSERVER
4006
fbd5db48
YQ
40072012-11-09 Yao Qi <yao@codesourcery.com>
4008
4009 * spu-low.c (current_ptid): Move it to ..
4010 * gdbthread.h: ... here. New.
4011 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4012 * server.c (myresume, process_serial_event): Likewise.
4013 * thread-db.c (thread_db_find_new_threads): Likewise.
4014 * tracepoint.c (run_inferior_command): Likewise.
4015
b3dc46ff
AB
40162012-10-01 Andrew Burgess <aburgess@broadcom.com>
4017
4018 * server.c (handle_search_memory_1): Include access length in
4019 warning message.
4020
07c04788
HPN
40212012-09-05 Michael Brandt <michael.brandt@axis.com>
4022
4023 * linux-crisv32-low.c: Fix compile errors.
4024
918d227b
YQ
40252012-09-04 Yao Qi <yao@codesourcery.com>
4026
4027 * tracepoint.c (cmd_qtsv): Adjust debug message.
4028 Don't check CUR_TPOINT.
4029
18c1b81a
YQ
40302012-08-28 Yao Qi <yao@codesourcery.com>
4031
4032 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4033 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4034 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4035 Remove declarations of xmalloc, xreallloc, xstrdup and
4036 freeargv.
4037 * Makefile.in (libiberty_h): New.
4038 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4039 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4040
dc82f37b
YQ
40412012-08-23 Yao Qi <yao@codesourcery.com>
4042
4043 * server.h: Remove declaration of 'xsnprintf'.
4044
406b1477
KS
40452012-08-22 Keith Seitz <keiths@redhat.com>
4046
4047 * server.h: Include build-gnulib-gbserver/config.h.
4048 * gdbreplay.c: Likewise.
4049
e6712ff1
DE
40502012-08-08 Doug Evans <dje@google.com>
4051
4052 * Makefile.in (SFILES): Add gdb_vecs.c.
4053 (OBS): Add gdb_vecs.o.
4054 (gdb_vecs_h, host_defs_h): New variables.
4055 (thread-db.o): Add $(gdb_vecs_h) dependency.
4056 (gdb_vecs.o): New rule.
4057 * thread-db.c: #include "gdb_vecs.h".
4058 (thread_db_load_search): Use a vector to iterate over path elements.
4059 Handle text appearing after "$pdir".
4060
4061 * configure.ac: Add check for strstr.
4062 * config.in: Regenerate.
4063 * configure: Regenerate.
4064
7c3270ae
UW
40652012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4066
4067 * hostio.c (handle_pread): If pread fails, fall back to attempting
4068 lseek/read.
4069 (handle_pwrite): Likewise for pwrite.
4070
b62e2b27
UW
40712012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4072
4073 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4074 between unsupported TYPE and unimplementable ADDR/LEN combination.
4075 (arm_insert_point): Act on new return value.
4076
78a99e91
PA
40772012-07-31 Pedro Alves <palves@redhat.com>
4078
4079 * server.c (process_point_options): Only skip tokens if we find
4080 one that is unrecognized. Don't treat 'X' specially while
4081 skipping unrecognized tokens.
4082
fcf303ab
UW
40832012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4084
4085 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4086 to 4-byte-align HW breakpoint addresses for Thumb.
4087
7255706c
YQ
40882012-07-27 Yao Qi <yao@codesourcery.com>
4089
4090 PR remote/14161.
4091
4092 * server.h: Declare gdb_agent_about_to_close.
4093 * target.c (kill_inferior): Include "agent.h".
4094 New. Send command 'kill'.
4095 * target.h (kill_inferior): Removed macro.
4096 * tracepoint.c (gdb_agent_about_to_close): New.
4097 (gdb_agent_helper_thread): Handle command 'close'.
4098 Wait endlessly until the inferior stops.
4099 Install gdb_agent_remove_socket to atexit hook.
4100 (agent_socket_name): New static variable.
4101 (gdb_agent_socket_init): Replace local variable 'name' with
4102 'agent_socket_name'.
4103 (gdb_agent_remove_socket): New.
4104
5a3f286f
YQ
41052012-07-27 Yao Qi <yao@codesourcery.com>
4106
4107 * server.c (process_point_options): Stop at 'X' when parsing.
4108
961bd387
ME
41092012-07-19 Michael Eager <eager@eagercon.com>
4110
a261b8f5 4111 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4112 to hw_execute.
4113 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4114 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4115 hardware breakpoint.
4116
aa7c7447
JK
41172012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4118
4119 * gdbserver/linux-low.c (initialize_low): Call
4120 linux_ptrace_init_warnings.
4121
7f216e7c
DE
41222012-07-02 Doug Evans <dje@google.com>
4123
4124 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4125 pointer to int.
4126
d3ce09f5
SS
41272012-07-02 Stan Shebs <stan@codesourcery.com>
4128
4129 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4130 (ax.o): Add it to build rule.
4131 (ax-ipa.o): Ditto.
4132 (OBS): Add format.o.
4133 (IPA_OBS): Add format.o.
4134 * server.c (handle_query): Claim support for breakpoint commands.
4135 (process_point_options): Add command case.
4136 (process_serial_event): Leave running if there are printfs in
4137 effect.
4138 * mem-break.h (any_persistent_commands): Declare.
4139 (add_breakpoint_commands): Declare.
4140 (gdb_no_commands_at_breakpoint): Declare.
4141 (run_breakpoint_commands): Declare.
4142 * mem-break.c (struct point_command_list): New struct.
4143 (struct breakpoint): New field command_list.
4144 (any_persistent_commands): New function.
4145 (add_commands_to_breakpoint): New function.
4146 (add_breakpoint_commands): New function.
4147 (gdb_no_commands_at_breakpoint): New function.
4148 (run_breakpoint_commands): New function.
4149 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4150 locally.
4151 * ax.c: Include format.h.
4152 (ax_printf): New function.
4153 (gdb_eval_agent_expr): Add printf opcode.
4154
2f8f6aed
YQ
41552012-06-13 Yao Qi <yao@codesourcery.com>
4156
4157 * server.c (start_inferior): Remove duplicated writes to fields
4158 'last_resume_kind' and 'last_status' of 'current_inferior'.
4159
0c9070b3
YQ
41602012-06-12 Yao Qi <yao@codesourcery.com>
4161 Pedro Alves <palves@redhat.com>
4162
4163 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4164 comment.
4165 * server.c (handle_v_cont): Extend comment.
4166
c52daf70
YQ
41672012-06-11 Yao Qi <yao@codesourcery.com>
4168
4169 * linux-low.c (linux_attach): Add 'static'.
4170
d38bbb0a
YQ
41712012-06-06 Yao Qi <yao@codesourcery.com>
4172
4173 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4174
89dc0afd
JK
41752012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4176
4177 Fix gcc -flto compilation warning.
4178 * server.c (main): Make variable multi_mode and attach volatile.
4179
75f62ce7
TJB
41802012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4181
4182 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4183 if the platform doesn't know about it.
4184
65f479b6
PA
41852012-05-30 Jeff Kenton <jkenton@tilera.com>
4186
4187 * Makefile.in (SFILES): Add linux-tile-low.c.
4188 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4189 * configure.srv: Handle tilegx-*-linux*.
4190 * linux-tile-low.c: New file.
4191
0c5bf5a9
JK
41922012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4193
4194 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4195
a493e3e2
PA
41962012-05-24 Pedro Alves <palves@redhat.com>
4197
4198 PR gdb/7205
4199
43aaf8b6 4200 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4201
2ea28649
PA
42022012-05-24 Pedro Alves <palves@redhat.com>
4203
4204 PR gdb/7205
4205
4206 Replace target_signal with gdb_signal throughout.
4207
8d409d16
MR
42082012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4209
4210 * linux-low.c (linux_store_registers): Avoid the copying sequence
4211 when no data has been retrieved by ptrace.
4212
23512c01
MGD
42132012-05-22 Will Deacon <will.deacon@arm.com>
4214
4215 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4216 Include asm/ptrace.h.
4217 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4218 already defined.
4219
4934b29e
MR
42202012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4221
4222 * linux-low.c (linux_store_registers): Don't re-retrieve data
4223 with ptrace that has already been obtained from /proc. Always
4224 copy any data retrieved with ptrace to the buffer supplied.
4225
bde24c0a
PA
42262012-05-11 Yao Qi <yao@codesourcery.com>
4227 Pedro Alves <palves@redhat.com>
4228
4229 * linux-low.c (enum stopping_threads_kind): New.
4230 (stopping_threads): Change type to `enum stopping_threads_kind'.
4231 (handle_extended_wait): If stopping and suspending threads, leave
4232 the new_lwp suspended too.
4233 (linux_wait_for_event): Adjust.
4234 (stop_all_lwps): Set `stopping_threads' to
4235 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4236 whether we're suspending threads or just stopping them. Assert no
4237 recursion happens.
4238
623b6bdf
YQ
42392012-04-29 Yao Qi <yao@codesourcery.com>
4240
4241 * server.h: Move some code to ...
4242 * gdbthread.h: ... here. New.
4243 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4244 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4245 (nto-low.o, win32-low.o): Likewise.
4246 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4247 * regcache.c, remote-utils.c, server.c: Likewise.
4248 * target.c, tracepoint.c, win32-low.c: Likewise.
4249
f15f9948
TJB
42502012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4251
4252 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4253 (PTRACE_ARG4_TYPE): Likewise.
4254 (PTRACE_XFER_TYPE): Likewise.
4255 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4256 ptrace to PTRACE_ARG3_TYPE.
4257 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4258 (PTRACE_ARG4_TYPE): Likewise.
4259 (PTRACE_XFER_TYPE): Likewise.
4260 (linux_detach_one_lwp): Cast fourth argument of
4261 ptrace to long then PTRACE_ARG4_TYPE.
4262 (regsets_fetch_inferior_registers): Cast third argument of
4263 ptrace to long then PTRACE_ARG3_TYPE.
4264 (regsets_store_inferior_registers): Likewise.
4265
38ea300a
PA
42662012-04-20 Pedro Alves <palves@redhat.com>
4267
4268 * configure: Regenerate.
4269
c971b7fa
PA
42702012-04-19 Pedro Alves <palves@redhat.com>
4271
43aaf8b6 4272 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4273 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4274 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4275 (all, install-only, uninstall, clean-info, all-lib, clean): No
4276 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4277 (maintainer-clean realclean distclean): Use subdir_do.
4278 (subdir_do): New.
4279 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4280 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4281 * acinclude.m4: Include acx_configure_dir.m4.
4282 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4283 calls. Call AC_PROG_RANLIB. Configure gnulib using
4284 ACX_CONFIGURE_DIR.
4285 (GNULIB): New.
4286 (GNULIB_STDINT_H): Adjust.
4287 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4288 * gdbreplay.c: Include build-gnulib/config.h.
4289 * server.h: Likewise.
4290 * aclocal.m4: Regenerate.
4291 * config.in: Regenerate.
4292 * configure: Regenerate.
c971b7fa 4293
809277f8
PA
42942012-04-19 Pedro Alves <palves@redhat.com>
4295
4296 * Makefile.in (LIBGNU, INCGNU): Adjust.
4297 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4298 (all, install-only, uninstall, clean-info, all-lib, clean)
4299 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4300 * configure.ac: Adjust AC_OUTPUT output.
4301 * aclocal.m4: Regenerate.
4302 * configure: Regenerate.
4303
fd9bb8b8
PA
43042012-04-19 Pedro Alves <palves@redhat.com>
4305
4306 * Makefile.in (generated_files): New.
4307 (server_h): Remove the explicit dependency on config.h, and depend
4308 on $generated_files.
4309
1c298c66
PA
43102012-04-19 Pedro Alves <palves@redhat.com>
4311
4312 * Makefile.in (INCGNU): Add -Ignulib.
4313
57c4b50b
PA
43142012-04-19 Pedro Alves <palves@redhat.com>
4315
4316 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4317 (INCGNU): ... this, and spell out -I here.
4318 (GNULIB_LIB): Rename to ...
4319 (LIBGNU): ... this.
4320 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4321
1030e047
PA
43222012-04-19 Pedro Alves <palves@redhat.com>
4323
4324 * config.in: Regenerate.
4325
447d4319
PA
43262012-04-19 Pedro Alves <palves@redhat.com>
4327
4328 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4329 * server.h (memmem): Remove declaration.
4330 * config.in: Regenerate.
4331 * configure: Regenerate.
4332
aad9eab9
YQ
43332012-04-19 Yao Qi <yao@codesourcery.com>
4334
4335 * Makefile.in (SFILES): Add common/vec.c.
4336 (OBS): Add vec.o.
4337 (vec.o): New rule.
4338
3e10640f
YQ
43392012-04-19 Yao Qi <yao@codesourcery.com>
4340
4341 * remote-utils.c (prepare_resume_reply): Replace with macro
4342 target_core_of_thread.
4343 * server.c (handle_qxfer_threads_proper): Likewise.
4344 * target.h (traget_core_of_thread): New macro.
4345
71622373
PA
43462012-04-18 Pedro Alves <palves@redhat.com>
4347
4348 * aclocal.m4: Regenerate.
4349 * configure: Regenerate.
4350
80d26939
YQ
43512012-04-16 Yao Qi <yao@codesourcery.com>
4352
4353 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4354 duplicated on address.
4355
42476b70
YQ
43562012-04-16 Yao Qi <yao@codesourcery.com>
4357
4358 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4359 (struct tracepoint_action_ops) <send>: New field.
4360 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4361 (agent_expr_send, x_tracepoint_action_send): New.
4362 (l_tracepoint_action_send): New.
4363 (cmd_qtdp): Download and install tracepoint
4364 according to `use_agent'.
4365 (run_inferior_command): Add one more parameter `len'.
4366 Update callers.
4367 (tracepoint_send_agent): New.
4368 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4369
7bc83639
YQ
43702012-04-16 Yao Qi <yao@codesourcery.com>
4371
4372 * tracepoint.c (download_tracepoints): Moved to ...
4373 (cmd_qtstart): ... here.
4374
5f18041e
YQ
43752012-04-14 Yao Qi <yao@codesourcery.com>
4376
4377 * tracepoint.c: Include inttypes.h.
4378 (struct collect_memory_action): Use sized types.
4379 (struct tracepoint): Likewise.
4380 (cmd_qtdp, stop_tracing): Update print specifiers.
4381 (cmd_qtp, response_tracepoint): Likewise.
4382 (collect_data_at_tracepoint): Likewise.
4383 (collect_data_at_step): Likewise.
4384
55a8c076
YQ
43852012-04-14 Yao Qi <yao@codesourcery.com>
4386
4387 Import gnulib module inttypes.
4388 * aclocal.m4, config.in, configure: Regenerated.
4389
dc750257
YQ
43902012-04-14 Yao Qi <yao@codesourcery.com>
4391
4392 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4393 Makefile and config.status at last.
4394
0ab5faf9
YQ
43952012-04-13 Yao Qi <yao@codesourcery.com>
4396
4397 * tracepoint.c: Include stdint.h unconditionally.
4398
18f5fd81
TJB
43992012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4400
4401 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4402 on BFD_HAVE_SYS_PROCFS_TYPE.
4403 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4404 * configure: Regenerate.
4405 * config.in: Likewise.
4406
4d47af5c
L
44072012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4408
4409 * Makefile.in (clean): Also remove x32.c x32-linux.c
4410 x32-avx.c x32-avx-linux.c.
4411 (x32.o): New target.
4412 (x32.c): Likewise.
4413 (x32-linux.o): Likewise.
4414 (x32-linux.c): Likewise.
4415 (x32-avx.o): Likewise.
4416 (x32-avx.c): Likewise.
4417 (x32-avx-linux.o): Likewise.
4418 (x32-avx-linux.c): Likewise.
4419
4420 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4421 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4422 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4423 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4424 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4425 i386/x32-avx-linux.xml.
4426
4427 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4428 (init_registers_x32_avx_linux): Likwise.
4429 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4430 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4431
ecedbe58
PA
44322012-04-13 Pedro Alves <palves@redhat.com>
4433
4434 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4435 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4436 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4437 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4438 the sub-make.
4439
c92b5177
L
44402012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4441
4442 * linux-x86-low.c (compat_x32_clock_t): New.
4443 (compat_x32_siginfo_t): Likewise.
4444 (compat_x32_siginfo_from_siginfo): Likewise.
4445 (siginfo_from_compat_x32_siginfo): Likewise.
4446 (linux_is_elf64): Likewise.
4447 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4448 and siginfo_from_compat_x32_siginfo for x32.
4449 (x86_arch_setup): Set linux_is_elf64.
4450
214d508e
L
44512012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4452
4453 PR gdb/13969
4454 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4455 e_machine field.
4456 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4457 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4458 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4459 compatible with process.
4460
c9a1864a
YQ
44612012-04-12 Yao Qi <yao@codesourcery.com>
4462
4463 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4464 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4465 (install-only, install-info, clean): Handle sub dir gnulib.
4466 (all-lib, am--refresh): New targets.
4467 (memmem.o): Remove target.
4468 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4469 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4470 (AC_REPLACE_FUNCS): Remove memmem.
4471 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4472 (AC_OUTPUT): Generate Makefile in gnulib/.
4473 * aclocal.m4, config.in, configure: Regenerated.
4474
367ba2c2
MR
44752012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4476
4477 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4478
9d236627
PA
44792012-04-05 Pedro Alves <palves@redhat.com>
4480
4481 -Werror=strict-aliasing
4482
4483 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4484 pointer.
4485
111217b3
PA
44862012-04-04 Pedro Alves <palves@redhat.com>
4487
4488 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4489 (sparc_store_gregset_from_stack, sparc_store_gregset)
4490 (sparc_breakpoint_at): Fix formatting.
4491
8365dcf5
TJB
44922012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4493
4494 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4495 are available.
4496 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4497 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4498 * config.in: Regenerate.
4499 * configure: Likewise.
4500
689cc2ae
PA
45012012-03-29 Pedro Alves <palves@redhat.com>
4502
4503 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4504 Correct ptrace arguments.
4505
c14dfd32
PA
45062012-03-28 Pedro Alves <palves@redhat.com>
4507
4508 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4509 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4510 (IA64_FR1_REGNUM): New defines.
4511 (ia64_fetch_register): New.
4512 (the_low_target): Install it.
4513 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4514 field.
4515 * linux-low.c (linux_fetch_registers): Try the
4516 the_low_target.fetch_register hook first.
4517
4518 * linux-arm-low.c (the_low_target): Adjust.
4519 * linux-bfin-low.c (the_low_target): Adjust.
4520 * linux-cris-low.c (the_low_target): Adjust.
4521 * linux-crisv32-low.c (the_low_target): Adjust.
4522 * linux-m32r-low.c (the_low_target): Adjust.
4523 * linux-m68k-low.c (the_low_target): Adjust.
4524 * linux-mips-low.c (the_low_target): Adjust.
4525 * linux-ppc-low.c (the_low_target): Adjust.
4526 * linux-s390-low.c (the_low_target): Adjust.
4527 * linux-sh-low.c (the_low_target): Adjust.
4528 * linux-sparc-low.c (the_low_target): Adjust.
4529 * linux-tic6x-low.c (the_low_target): Adjust.
4530 * linux-x86-low.c (the_low_target): Adjust.
4531 * linux-xtensa-low.c (the_low_target): Adjust.
4532
63c88e13
PA
45332012-03-26 Pedro Alves <palves@redhat.com>
4534
4535 * server.c (handle_qxfer_libraries): Don't bail early if
4536 the_target->qxfer_libraries_svr4 is not NULL.
4537
fb723180
PA
45382012-03-26 Pedro Alves <palves@redhat.com>
4539
4540 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4541
0afae3cf
PA
45422012-03-23 Pedro Alves <palves@redhat.com>
4543
4544 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4545 "library-list-svr4" element's start tag when the the DSO list is
4546 empty.
4547
485f1ee4
PA
45482012-03-23 Pedro Alves <palves@redhat.com>
4549
4550 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4551 a variable whose type size is the same as the inferior's pointer
4552 size.
4553
a5362b9a
TS
45542012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4555
4556 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4557 struct siginfo.
4558 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4559 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4560 * linux-low.h: Include <signal.h>.
4561 (struct siginfo): Remove forward declaration.
4562 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4563 struct siginfo.
4564
d226c142
MF
45652012-03-21 Mike Frysinger <vapier@gentoo.org>
4566
4567 * .gitignore: Ignore more files.
4568
122f36ef
PA
45692012-03-19 Pedro Alves <palves@redhat.com>
4570 Jan Kratochvil <jan.kratochvil@redhat.com>
4571
4572 * server.c (cont_thread, general_thread): Add describing comments.
4573 (start_inferior): Clear `cont_thread'.
4574 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4575 of a process.
4576
fc3e5175
YQ
45772012-03-15 Yao Qi <yao@codesourcery.com>
4578
4579 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4580 handling to ...
4581 (cmd_qtdp): ... here.
4582
8d0d92cd
YQ
45832012-03-15 Yao Qi <yao@codesourcery.com>
4584
4585 * tracepoint.c (struct tracepoint_action_ops): New.
4586 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4587 (m_tracepoint_action_download): New.
4588 (r_tracepoint_action_download): New.
4589 (x_tracepoint_action_download): New.
4590 (l_tracepoint_action_download): New.
4591 (add_tracepoint_action): Install `action->ops' according type.
4592 (download_tracepoint_1): Move code `download' function pointer
4593 of various tracepoint_action_ops.
4594
87b0bb13
JK
45952012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4596
4597 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4598 linux_ptrace_attach_warnings.
4599
5f572dec
JK
46002012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4601
4602 * Makefile.in (linux-ptrace.o): New.
4603 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4604 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4605 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4606 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4607 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4608 of these targets.
4609 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4610
f4647387
YQ
46112012-03-08 Yao Qi <yao@codesourcery.com>
4612 Pedro Alves <palves@redhat.com>
4613
4614 Fix PR server/13392.
4615 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4616 offset of JMP insn.
4617 * tracepoint.c (remove_tracepoint): New.
4618 (cmd_qtdp): Call remove_tracepoint when failed to install.
4619
9b224c5e
PA
46202012-03-07 Pedro Alves <palves@redhat.com>
4621
4622 * linux-low.c (get_detach_signal): New.
4623 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4624 Pass on pending signals to PTRACE_DETACH. Check the result of the
4625 ptrace call.
4626 * server.c (program_signals, program_signals_p): New.
4627 (handle_general_set): Handle QProgramSignals.
4628 * server.h (program_signals, program_signals_p): Declare.
4629
e237a7e2
JK
46302012-03-05 Pedro Alves <palves@redhat.com>
4631 Jan Kratochvil <jan.kratochvil@redhat.com>
4632
4633 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4634 New comment why.
4635
5808517f
YQ
46362012-03-03 Yao Qi <yao@codesourcery.com>
4637
4638 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4639 agent_look_up_symbols.
4640
58b4daa5
YQ
46412012-03-03 Yao Qi <yao@codesourcery.com>
4642
4643 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4644 (linux-x86-low.o): Likewise.
4645 * server.h: Remove in_process_agent_loaded.
4646 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4647 common/agent.c.
4648 Update callers.
4649
8ffcbaaf
YQ
46502012-03-03 Yao Qi <yao@codesourcery.com>
4651
4652 * tracepoint.c (gdb_agent_capability): New global.
4653 (in_process_agent_loaded_ust): Renamed to
4654 `in_process_agent_supports_ust'.
4655 Update callers.
4656 (in_process_agent_supports_ust): Call agent_capability_check.
4657 (clear_installed_tracepoints): Assert that agent supports
4658 agent.
4659
d1feda86
YQ
46602012-03-03 Yao Qi <yao@codesourcery.com>
4661
4662 * linux-low.c (linux_supports_agent): New.
4663 (linux_target_ops): Initialize field `supports_agent' with
4664 linux_supports_agent.
4665 * target.h (struct target_ops) <supports_agent>: New.
4666 (target_supports_agent): New macro.
4667 * server.c (handle_general_set): Handle packet 'QAgent'.
4668 (handle_query): Send `QAgent+'.
4669 * Makefile.in (server.o): Depends on agent.h.
4670
2fa291ac
YQ
46712012-03-03 Yao Qi <yao@codesourcery.com>
4672
4673 * Makefile.in (OBS): Add agent.o.
4674 Add new rule for agent.o.
4675 Track dependence of tracepoint.c on agent.h.
4676 * tracepoint.c (run_inferior_command_1):
4677 (run_inferior_command): Call agent_run_command.
4678 (gdb_ust_connect_sync_socket): Deleted. Move it to
4679 common/agent.c.
4680 (resume_thread, stop_thread): Likewise.
4681 (gdb_ust_socket_init): Renamed to ...
4682 (gdb_agent_socket_init): ... New.
4683 (gdb_ust_thread): Renamed to ...
4684 (gdb_agent_helper_thread): ... New.
4685 (gdb_ust_init): Move some code to ...
4686 (gdb_agent_init): ... here. New.
4687 [HAVE_UST]: Call gdb_ust_init.
4688 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4689 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4690 * config.in, configure: Regenerated.
4691
05044653
PA
46922012-03-02 Pedro Alves <palves@redhat.com>
4693
4694 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4695 * linux-low.c (struct simple_pid_list): New.
4696 (stopped_pids): New a struct simple_pid_list pointer.
4697 (add_to_pid_list, pull_pid_from_list): New.
4698 (handle_extended_wait): Don't assume the first signal new children
4699 report is SIGSTOP. Adjust call to pull_pid_from_list.
4700 (linux_wait_for_lwp): Adjust.
4701
8d00225b
YQ
47022012-03-02 Yao Qi <yao@codesourcery.com>
4703
4704 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4705 debug log.
4706
19560ba5
YQ
47072012-03-02 Yao Qi <yao@codesourcery.com>
4708
4709 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4710 `stop_pc' and `tpoint'. Update caller.
4711
1faeff08
MR
47122012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4713
4714 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4715 * linux-low.c (use_linux_regsets): New macro.
4716 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4717 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4718 (linux_register_in_regsets): New function.
4719 (usr_fetch_inferior_registers): Skip registers covered by
4720 regsets.
4721 (usr_store_inferior_registers): Likewise.
4722 (usr_fetch_inferior_registers): New macro.
4723 (usr_store_inferior_registers): Likewise.
4724 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4725 (linux_store_registers): Likewise.
4726 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4727 prototype.
4728 (init_registers_mips64_dsp_linux): Likewise.
4729 (init_registers_mips_linux): New macro.
4730 (init_registers_mips_dsp_linux): Likewise.
4731 (mips_dsp_num_regs): Likewise.
4732 (DSP_BASE, DSP_CONTROL): New fallback macros.
4733 (mips_base_regs): New macro.
4734 (mips_regmap): Use it. Fix the size.
4735 (mips_dsp_regmap): New variable.
4736 (mips_dsp_regset_bitmap): Likewise.
4737 (mips_arch_setup): New function.
4738 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4739 than mips_regmap.
4740 (mips_cannot_store_register): Likewise.
4741 (the_low_target): Update .arch_setup, .num_regs and .regmap
4742 initializers. Add .regset_bitmap initializer.
4743 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4744 initializer.
4745 * linux-bfin-low.c (the_low_target): Likewise.
4746 * linux-cris-low.c (the_low_target): Likewise.
4747 * linux-crisv32-low.c (the_low_target): Likewise.
4748 * linux-ia64-low.c (the_low_target): Likewise.
4749 * linux-m32r-low.c (the_low_target): Likewise.
4750 * linux-m68k-low.c (the_low_target): Likewise.
4751 * linux-ppc-low.c (the_low_target): Likewise.
4752 * linux-s390-low.c (the_low_target): Likewise.
4753 * linux-sh-low.c (the_low_target): Likewise.
4754 * linux-sparc-low.c (the_low_target): Likewise.
4755 * linux-tic6x-low.c (the_low_target): Likewise.
4756 * linux-x86-low.c (the_low_target): Likewise.
4757 * linux-xtensa-low.c (the_low_target): Likewise.
4758 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4759 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4760 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4761 srv_xmlfiles.
4762 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4763 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4764
c03e6ccc
YQ
47652012-02-29 Yao Qi <yao@codesourcery.com>
4766 Pedro Alves <palves@redhat.com>
4767
4768 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4769 `step_over_finished' is true.
4770
644cebc9
PA
47712012-02-27 Pedro Alves <palves@redhat.com>
4772
4773 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4774 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4775
c14d7ab2
PA
47762012-02-27 Pedro Alves <palves@redhat.com>
4777
4778 PR server/9684
4779 * linux-low.c (pid_is_stopped): New.
4780 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4781
412c89dd
LM
47822012-02-25 Luis Machado <lgustavo@codesourcery.com>
4783
4784 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4785 of conditions.
4786
b745defe
MR
47872012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4788
4789 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4790
9f3a5c85
LM
47912012-02-24 Luis Machado <lgustavo@codesourcery>
4792
4793 * server.c (handle_query): Advertise support for target-side
4794 breakpoint condition evaluation.
4795 (process_point_options): New function.
4796 (process_serial_event): When inserting a breakpoint, check for
4797 a target-side condition that should be evaluated.
4798
4799 * mem-break.c: Include regcache.h and ax.h.
4800 (point_cond_list_t): New data structure.
4801 (breakpoint) <cond_list>: New field.
4802 (find_gdb_breakpoint_at): Make non-static.
4803 (delete_gdb_breakpoint_at): Clear any target-side
4804 conditions.
4805 (clear_gdb_breakpoint_conditions): New function.
4806 (add_condition_to_breakpoint): Likewise.
4807 (add_breakpoint_condition): Likewise.
4808 (gdb_condition_true_at_breakpoint): Likewise.
4809 (gdb_breakpoint_here): Return result directly instead
4810 of going through a local variable.
4811
4812 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4813 (clear_gdb_breakpoint_conditions): Likewise.
4814 (add_breakpoint_condition): Likewise.
4815 (gdb_condition_true_at_breakpoint): Likewise.
4816
4817 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4818 (need_step_over_p): Take target-side breakpoint condition into
4819 consideration.
4820
5e1dc496
LM
48212012-02-24 Luis Machado <lgustavo@codesourcery>
4822
4823 * server.h: Include tracepoint.h.
4824 (agent_mem_read, agent_get_trace_state_variable_value,
4825 agent_set_trace_state_variable_value,
4826 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4827 get_set_tsv_func_addr): New prototypes.
4828
4829 * ax.h: New include file.
4830 * ax.c: New source file.
4831
4832 * tracepoint.c: Include ax.h.
4833 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4834 agent_expr, eval_result_type): Move to ax.h.
4835 (parse_agent_expr): Rename to ...
4836 (gdb_parse_agent_expr): ... this, make it non-static and move
4837 to ax.h.
4838 (unparse_agent_expr) Rename to ...
4839 (gdb_unparse_agent_expr): ... this, make it non-static and move
4840 to ax.h.
4841 (eval_agent_expr): Rename to ...
4842 (eval_tracepoint_agent_expr): ... this.
4843 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4844 forward declarations.
4845 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4846 (agent_get_trace_state_variable_value): New function.
4847 (agent_set_trace_state_variable_value): New function.
4848 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4849 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4850 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4851 (condition_true_at_tracepoint): Likewise.
4852 (parse_agent_expr): Rename to ...
4853 (gdb_parse_agent_expr): ... this and move to ax.c.
4854 (unparse_agent_expr): Rename to ...
4855 (gdb_unparse_agent_expr): ... this and move to ax.c.
4856 (gdb_agent_op_name): Move to ax.c.
4857 (eval_agent_expr): Rename to ...
4858 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4859 and move to ax.c.
4860 (eval_tracepoint_agent_expr): New function.
4861 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4862 non-static.
5e1dc496
LM
4863 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4864 ax.c.
4865 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4866 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4867 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4868 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4869 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4870 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4871 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4872 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4873 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4874 (compile_bytecodes): Remove forward declaration.
4875 (is_goto_target): Move to ax.c.
4876 (compile_bytecodes): Move to ax.c and call
4877 agent_get_trace_state_variable_value (...) and
4878 agent_set_trace_state_variable_value (...).
4879
4880 * Makefile.in: Update ax.c and IPA dependencies.
4881
277e4e52
PA
48822012-02-24 Pedro Alves <palves@redhat.com>
4883
4884 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4885 (cmd_bigqtbuffer_circular): ... this. Only handle
4886 'QTBuffer:circular:'.
4887 (handle_tracepoint_general_set): Adjust.
4888
bf4c19f7
YQ
48892012-02-16 Yao Qi <yao@codesourcery.com>
4890
4891 * inferiors.c: Move code to ...
4892 * dll.c: .... here. New.
4893 * server.h: Declare clear_dlls.
4894 * Makefile.in (SFILES): Add dll.c.
4895 (OBS): Add dll.o
4896 (dll.o): New rule.
4897
d73f2619
YQ
48982012-02-11 Yao Qi <yao@codesourcery.com>
4899
4900 * server.c: (handle_monitor_command): Add a new parameter
4901 `own_buf'.
4902 (handle_query): Update caller.
4903
f8255c2a
JB
49042012-02-09 Joel Brobecker <brobecker@adacore.com>
4905
4906 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4907 * configure, config.in: Regenerate.
4908 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4909 is not defined.
4910
da84f473
PA
49112012-02-02 Pedro Alves <palves@redhat.com>
4912
4913 Try SIGKILL first, then PTRACE_KILL.
4914 * linux-low.c (linux_kill_one_lwp): New.
4915 (linux_kill_one_lwp): Rename to ...
4916 (kill_one_lwp_callback): ... this. Use the new
4917 linux_kill_one_lwp.
4918
e886a173
PA
49192012-02-02 Pedro Alves <palves@redhat.com>
4920
4921 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4922 inferior.
4923
be07f1a2
PA
49242012-01-27 Pedro Alves <palves@redhat.com>
4925
4926 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4927 (elf_64_file_p): Make static.
4928 (linux_pid_exe_is_elf_64_file): New.
4929 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4930 Delete declarations.
4931 (linux_pid_exe_is_elf_64_file): Declare.
4932 * linux-x86-low.c (x86_arch_setup): Use
4933 linux_pid_exe_is_elf_64_file.
4934
d8301ad1
JK
49352012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4936
4937 * linux-low.c (linux_wait_for_event_1): Rename to ...
4938 (linux_wait_for_event): ... here and merge it with former
4939 linux_wait_for_event - new variable wait_ptid, use it.
4940 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4941
01b17894
PA
49422012-01-23 Pedro Alves <palves@redhat.com>
4943
4944 * server.c (main): Avoid yet another case of infinite loop while
4945 detaching/killing after a longjmp.
4946
e825046f
JK
49472012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4948
4949 Code cleanup.
4950 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4951
b9e7b9c3
UW
49522012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4953
4954 * hostio.c (handle_readlink): New function.
4955 (handle_vFile): Call it to handle "vFile:readlink" packets.
4956
901f9912
UW
49572012-01-20 Pedro Alves <palves@redhat.com>
4958 Ulrich Weigand <ulrich.weigand@linaro.org>
4959
4960 * server.c (handle_v_requests): Only support vAttach and vRun to
4961 start multiple processes when in extended protocol mode.
4962
fc1ab1a0
PA
49632012-01-17 Pedro Alves <palves@redhat.com>
4964
4965 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4966 memalign plus mprotect to allocate the scratch buffer.
4967
7d5d4e98
PA
49682012-01-13 Pedro Alves <palves@redhat.com>
4969
4970 * server.c (attach_inferior): Clear `cont_thread'.
4971
f128d5e9
PA
49722012-01-13 Pedro Alves <palves@redhat.com>
4973
4974 * server.c (main): Avoid infinite loop while detaching/killing
4975 after a longjmp.
4976
06db92f0
DE
49772012-01-09 Doug Evans <dje@google.com>
4978
4979 * server.c (start_inferior): Set last_ptid in --wrapper case.
4980
32d92999
YQ
49812012-01-06 Yao Qi <yao@codesourcery.com>
4982
4983 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4984 defined.
4985 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4986
5e0a92a9
YQ
49872012-01-04 Yao Qi <yao@codesourcery.com>
4988
4989 * tracepoint.c (cmd_qtdp): Print debug message
4990 for static tracepoint.
4991
ae639e8c
YQ
49922012-01-04 Yao Qi <yao@codesourcery.com>
4993
4994 * tracepoint.c (trace_vdebug): Differentiate debug message
4995 between gdbserver and IPA.
4996
f72429c5
YQ
49972012-01-03 Yao Qi <yao@codesourcery.com>
4998
4999 * tracepoint.c (tracepoint_was_hit): Don't collect for
5000 static tracepoint.
5001
12c3e59c
JB
50022012-01-02 Joel Brobecker <brobecker@adacore.com>
5003
5004 * terminal.h: Reformat copyright header.
5005
67827812
JB
50062012-01-02 Joel Brobecker <brobecker@adacore.com>
5007
5008 * server.c (gdbserver_version): Update copyright year.
5009 * gdbreplay.c (gdbreplay_version): Likewise.
5010
3e52c33d
JK
50112011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5012
5013 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5014
5015 Revert:
5016 2011-12-18 Hui Zhu <teawater@gmail.com>
5017 * linux-low.c (linux_create_inferior): Save return value to ret.
5018
66f1260e
HZ
50192011-12-18 Hui Zhu <teawater@gmail.com>
5020
5021 * linux-low.c (linux_create_inferior): Save return value to ret.
5022
e77616d7
DE
50232011-12-16 Doug Evans <dje@google.com>
5024
e7b06c57
DE
5025 * linux-low.c (linux_create_inferior): If stdio connection,
5026 redirect stdin from /dev/null, stdout to stderr.
5027 * remote-utils.c (remote_is_stdio): New static global.
5028 (remote_connection_is_stdio): New function.
5029 (remote_prepare): Handle stdio connection.
5030 (remote_open): Ditto.
5031 (remote_close): Don't close stdin for stdio connections.
5032 (read_prim,write_prim): New functions. Replace all calls to
5033 read/write to these.
5034 * server.c (main): Watch for "-" argument. Move call to
5035 remote_prepare before start_inferior.
5036 * server.h (STDIO_CONNECTION_NAME): New macro.
5037 (remote_connection_is_stdio): Declare.
5038
e77616d7
DE
5039 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5040 in debugging output.
5041
82067193
YQ
50422011-12-15 Yao Qi <yao@codesourcery.com>
5043
5044 * tracepoint.c: Include sys/syscall.h.
5045 (gdb_ust_thread): Remove preprocessor conditional.
5046
82bfbe7e
PA
50472011-12-14 Pedro Alves <pedro@codesourcery.com>
5048
5049 * linux-low.c (linux_detach_one_lwp): Call
5050 the_low_target.prepare_to_resume before detaching.
5051
712c6575
YQ
50522011-12-14 Yao Qi <yao@codesourcery.com>
5053
5054 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5055 of write.
5056
d54d1edf
YQ
50572011-12-14 Yao Qi <yao@codesourcery.com>
5058
5059 * i386-low.c (i386_low_stopped_data_address): Initialize local
5060 variable `control'.
5061
6210a125
PA
50622011-12-13 Pedro Alves <pedro@codesourcery.com>
5063
5064 PR remote/13492
5065
5066 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5067 DR_CONTROL unless necessary. Extend comments.
5068 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5069 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5070
2ece8244
YQ
50712011-12-13 Yao Qi <yao@codesourcery.com>
5072
5073 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5074 macros.
5075 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5076
784867a5
JK
50772011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5078
5079 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5080 Print new debug message for such case.
5081
6bf36717
JK
50822011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5083
5084 Fix overlapping memcpy.
5085 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5086 the read_inferior_memory transfer.
5087 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5088 write_inferior_memory transfer.
5089 (set_fast_tracepoint_jump): New variable buf. Use it for the
5090 read_inferior_memory and write_inferior_memory transfers.
5091 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5092 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5093 Use it for the write_inferior_memory transfer.
5094 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5095 buffers.
5096
50275556
MR
50972011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5098
5099 * linux-low.c (fetch_register, store_register): Make code
5100 consistent, fix formatting.
5101
7325beb4
MR
51022011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5103
5104 * linux-low.c (usr_store_inferior_registers): Factor out code
5105 to handle individual registers into...
5106 (store_register): ... this new function.
5107
c642a434
UW
51082011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5109
5110 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5111 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5112 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5113 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5114 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5115 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5116 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5117 (srv_xmlfiles): Add new XML files.
5118
5119 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5120 and <sys/uio.h>.
5121 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5122 (init_registers_s390_linux32v1): Add prototype.
5123 (init_registers_s390_linux32v2): Likewise.
5124 (init_registers_s390_linux64v1): Likewise.
5125 (init_registers_s390_linux64v2): Likewise.
5126 (init_registers_s390x_linux64v1): Likewise.
5127 (init_registers_s390x_linux64v2): Likewise.
5128 (s390_num_regs): Increment to 52.
5129 (s390_regmap): Add orig_r2 register.
5130 (s390_num_regs_3264): Increment to 68.
5131 (s390_regmap_3264): Add orig_r2 register.
5132 (s390_collect_ptrace_register): Handle orig_r2 register.
5133 (s390_supply_ptrace_register): Likewise.
5134 (s390_fill_last_break): New function.
5135 (s390_store_last_break): Likewise.
5136 (s390_fill_system_call): New function.
5137 (s390_store_system_call): Likewise.
5138 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5139 register sets.
5140 (s390_check_regset): New function.
5141 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5142 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5143 Update target_regsets for available register sets.
5144
2268b414
JK
51452011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5146 Jan Kratochvil <jan.kratochvil@redhat.com>
5147
5148 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5149 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5150 New.
5151 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5152 * linux-low.h (struct process_info_private): New member r_debug.
5153 * server.c (handle_qxfer_libraries): Call
5154 the_target->qxfer_libraries_svr4.
5155 (handle_qxfer_libraries_svr4): New function.
5156 (qxfer_packets): New entry "libraries-svr4".
5157 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5158 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5159 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5160 PACKET_qXfer_libraries_svr4.
5161
d6db1fab
UW
51622011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5163
5164 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5165 PSW address/mask between 8-byte and 16-byte formats.
5166 (s390_supply_ptrace_register): Likewise.
5167 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5168 basic addressing mode bit.
5169
242f5f1c
SS
51702011-11-24 Stan Shebs <stan@codesourcery.com>
5171
5172 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5173
f196051f
SS
51742011-11-17 Stan Shebs <stan@codesourcery.com>
5175
5176 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5177 (tracing_start_time): New global.
5178 (tracing_stop_time): New global.
5179 (tracing_user_name): New global.
5180 (tracing_notes): New global.
5181 (tracing_stop_note): New global.
5182 (cmd_qtstart): Set traceframe_usage, start_time.
5183 (stop_tracing): Set stop_time.
5184 (cmd_qtstatus): Report additional status.
5185 (cmd_qtp): New function.
5186 (handle_tracepoint_query): Call it.
5187 (cmd_qtnotes): New function.
5188 (handle_tracepoint_general_set): Call it.
5189 (get_timestamp): Rename from tsv_get_timestamp.
5190
405f8e94
SS
51912011-11-14 Stan Shebs <stan@codesourcery.com>
5192 Kwok Cheung Yeung <kcy@codesourcery.com>
5193
5194 * linux-x86-low.c (small_jump_insn): New.
5195 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5196 trampoline and error message, build a trampoline and issue a small
5197 jump instruction to it.
5198 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5199 trampoline and error message.
5200 (x86_get_min_fast_tracepoint_insn_len): New.
5201 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5202 * linux-low.h (struct linux_target_ops): Add arguments to
5203 install_fast_tracepoint_jump_pad operation, add new operation.
5204 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5205 arguments.
5206 (linux_get_min_fast_tracepoint_insn_len): New function.
5207 (linux_target_op): Add new operation.
5208 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5209 (gdb_trampoline_buffer_end): Ditto.
5210 (gdb_trampoline_buffer_error): Ditto.
5211 (struct ipa_sym_addresses): Add fields for new IPA variables.
5212 (symbol_list): Add entries for new IPA variables.
5213 (struct tracepoint): Add fields to hold the address range of the
5214 trampoline used by the tracepoint.
5215 (trampoline_buffer_head): New static variable.
5216 (trampoline_buffer_tail): Ditto.
5217 (claim_trampoline_space): New function.
5218 (have_fast_tracepoint_trampoline_buffer): New function.
5219 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5220 structure.
5221 (install_fast_tracepoint): Ditto, also add error buffer argument.
5222 (cmd_qtminftpilen): New function.
5223 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5224 (fast_tracepoint_from_trampoline_address): New function.
5225 (fast_tracepoint_collecting): Handle trampoline as part of jump
5226 pad space.
5227 (set_trampoline_buffer_space): New function.
5228 (initialize_tracepoint): Initialize new IPA variables.
5229 * target.h (struct target_ops): Add arguments to
5230 install_fast_tracepoint_jump_pad operation, add new
5231 get_min_fast_tracepoint_insn_len operation.
5232 (target_get_min_fast_tracepoint_insn_len): New.
5233 (install_fast_tracepoint_jump_pad): Add arguments.
5234 * server.h (IPA_BUFSIZ): Define.
5235 * linux-i386-ipa.c: Include extra header files.
5236 (initialize_fast_tracepoint_trampoline_buffer): New function.
5237 (initialize_low_tracepoint): Call it.
5238 * server.h (set_trampoline_buffer_space): Declare.
5239 (claim_trampoline_space): Ditto.
5240 (have_fast_tracepoint_trampoline_buffer): Ditto.
5241
1e4d1764
YQ
52422011-11-14 Yao Qi <yao@codesourcery.com>
5243
5244 * server.c (handle_query): Handle InstallInTrace for qSupported.
5245 * tracepoint.c (add_tracepoint): Sort list.
5246 (install_tracepoint, download_tracepoint): New.
5247 (cmd_qtdp): Call them to install and download tracepoints.
5248 (sort_tracepoints): Removed.
5249 (cmd_qtstart): Update.
5250
5c73ff4e
YQ
52512011-11-14 Yao Qi <yao@codesourcery.com>
5252
5253 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5254 * mem-break.h: Declare.
5255 * tracepoint.c (cmd_qtstart): Move some code to ...
5256 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5257 New.
5258 (download_tracepoints): Move some code to ...
5259 (download_tracepoint_1): ... here. New.
5260
86a30030
YQ
52612011-11-08 Yao Qi <yao@codesourcery.com>
5262
5263 * remote-utils.c (relocate_instruction): A comment fix.
5264
8d26e50c
JB
52652011-11-07 Joel Brobecker <brobecker@adacore.com>
5266
5267 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5268 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5269 dr_status_mirror and dr_control_mirror from debug_reg_state.
5270 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5271 (i386_initial_stuff): Remove use of deleted globals.
5272 (i386_get_thread_context, i386_set_thread_context,
5273 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5274 from debug_reg_state.
5275
a59306a3
YQ
52762011-11-05 Yao Qi <yao@codesourcery.com>
5277
5278 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5279 address as TPOINT's.
5280
3065dfb6
SS
52812011-11-02 Stan Shebs <stan@codesourcery.com>
5282
5283 * tracepoint.c (agent_mem_read_string): New function.
5284 (eval_agent_expr): Call it for tracenz.
5285 * server.c (handle_query): Report support for tracenz.
5286
fd0d8c7c
YQ
52872011-11-02 Yao Qi <yao@codesourcery.com>
5288
5289 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5290
609086b1
YQ
52912011-11-02 Yao Qi <yao@codesourcery.com>
5292
5293 * target.h: Fix a typo in comment.
5294
b9fd1791
PA
52952011-10-31 Pedro Alves <pedro@codesourcery.com>
5296
5297 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5298 clobber the breakpoints' shadows with fast tracepoint jumps.
5299 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5300 * target.c (write_inferior_memory): Also pass MYADDR down to
5301 check_mem_write.
5302
03583c20
UW
53032011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5304
5305 * configure.ac: Check support for personality routine.
5306 * configure: Regenerate.
5307 * config.in: Likewise.
5308 * linux-low.c: Include <sys/personality.h>.
5309 Define ADDR_NO_RANDOMIZE if necessary.
5310 (linux_create_inferior): Disable address space randomization when
5311 forking inferior, if requested.
5312 (linux_supports_disable_randomization): New function.
5313 (linux_target_ops): Install it.
5314 * server.h (disable_randomization): Declare.
5315 * server.c (disable_randomization): New global variable.
5316 (handle_general_set): Handle QDisableRandomization.
5317 (handle_query): Likewise for qSupported.
5318 (main): Support --disable-randomization and --no-disable-randomization
5319 command line arguments.
5320 * target.h (struct target_ops): Add supports_disable_randomization.
5321 (target_supports_disable_randomization): New macro.
5322
723b724b
MF
53232011-09-29 Mike Frysinger <vapier@gentoo.org>
5324
5325 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5326 ifdef check.
5327 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5328 [!PT_GETDSBT] (target_loadmap): New definition.
5329 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5330 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5331 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5332 and PT_GETDSBT to LINUX_LOADMAP.
5333 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5334 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5335
55329a5c 53362011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5337
5338 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5339 (arm_linux_hwbp_cap): New static variable.
5340 (arm_linux_get_hwbp_cap): Replace by ...
5341 (arm_linux_init_hwbp_cap): ... this new function.
5342 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5343 (arm_linux_get_hw_watchpoint_count): Likewise.
5344 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5345 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5346 (arm_prepare_to_resume): Use perror_with_name instead of error.
5347
55329a5c 53482011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5349
5350 * linux-arm-low.c: Include <signal.h>.
5351 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5352 (struct arm_linux_hwbp_cap): New data type.
5353 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5354 (struct arm_linux_hw_breakpoint): New data type.
5355 (MAX_BPTS, MAX_WPTS): Define.
5356 (struct arch_process_info, struct arch_lwp_info): New data types.
5357 (arm_linux_get_hwbp_cap): New function.
5358 (arm_linux_get_hw_breakpoint_count): Likewise.
5359 (arm_linux_get_hw_watchpoint_count): Likewise.
5360 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5361 (arm_hwbp_control_initialize): Likewise.
5362 (arm_hwbp_control_is_enabled): Likewise.
5363 (arm_hwbp_control_is_initialized): Likewise.
5364 (arm_hwbp_control_disable): Likewise.
5365 (arm_linux_hw_breakpoint_equal): Likewise.
5366 (arm_linux_hw_point_initialize): Likewise.
5367 (struct update_registers_data): New data structure.
5368 (update_registers_callback: New function.
5369 (arm_insert_point): Likewise.
5370 (arm_remove_point): Likewise.
5371 (arm_stopped_by_watchpoint): Likewise.
5372 (arm_stopped_data_address): Likewise.
5373 (arm_new_process): Likewise.
5374 (arm_new_thread): Likewise.
5375 (arm_prepare_to_resume): Likewise.
5376 (the_low_target): Register arm_insert_point, arm_remove_point,
5377 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5378 arm_new_thread, and arm_prepare_to_resume.
5379
6b9801d4
SS
53802011-09-15 Stan Shebs <stan@codesourcery.com>
5381
5382 * server.h (struct emit_ops): Add compare-goto fields.
5383 * tracepoint.c (gdb_agent_op_sizes): New table.
5384 (emit_eq_goto): New function.
5385 (emit_ne_goto): New function.
5386 (emit_lt_goto): New function.
5387 (emit_le_goto): New function.
5388 (emit_gt_goto): New function.
5389 (emit_ge_goto): New function.
5390 (is_goto_target): New function.
5391 (compile_bytecodes): Recognize special cases of compare-goto
5392 combinations and call specialized emitters for them.
5393 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5394 (amd64_emit_ne_goto): New function.
5395 (amd64_emit_lt_goto): New function.
5396 (amd64_emit_le_goto): New function.
5397 (amd64_emit_gt_goto): New function.
5398 (amd64_emit_ge_goto): New function.
5399 (amd64_emit_ops): Add the new functions.
5400 (i386_emit_eq_goto): New function.
5401 (i386_emit_ne_goto): New function.
5402 (i386_emit_lt_goto): New function.
5403 (i386_emit_le_goto): New function.
5404 (i386_emit_gt_goto): New function.
5405 (i386_emit_ge_goto): New function.
5406 (i386_emit_ops): Add the new functions.
5407
bf15cbda
SS
54082011-09-08 Stan Shebs <stan@codesourcery.com>
5409
5410 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5411 (i386_emit_epilogue): Restore %ebx.
5412
943ca1dd
JZ
54132011-08-31 Jie Zhang <jzhang918@gmail.com>
5414
5415 * server.c (step_thread): Remove definition.
5416 (process_serial_event): Don't handle Hs.
5417 * server.h (step_thread): Remove declaration.
5418 * target.c (set_desired_inferior): Remove use of step_thread.
5419
e3deef73
LM
54202011-08-24 Luis Machado <lgustavo@codesourcery.com>
5421
5422 * linux-low.c: Include linux-procfs.h.
5423 (linux_attach_lwp_1): Update comments.
5424 (linux_attach): Scan for existing threads when attaching to a
5425 process that is the tgid.
5426 * Makefile.in: Update dependencies.
5427
13da1c97
LM
54282011-08-24 Luis Machado <lgustavo@codesourcery.com>
5429
5430 * configure.srv: Add linux-procfs.o dependencies.
5431
881127c9
YQ
54322011-08-14 Yao Qi <yao@codesourcery.com>
5433
5434 * target.h (struct target_ops): Fix indent.
5435 * win32-low.c (win32_target_ops): Fix comment.
5436
58dbd541
YQ
54372011-08-14 Andrew Jenner <andrew@codesourcery.com>
5438 Yao Qi <yao@codesourcery.com>
5439
5440 * Makefile.in (clean): Remove tic6x-*.c files.
5441 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5442 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5443 (tic6x-c64xp-linux.c): Likewise.
5444 * configure.srv: Add support for tic6x-*-uclinux.
5445 * linux-tic6x-low.c: New.
5446 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5447
78d85199
YQ
54482011-08-14 Andrew Stubbs <ams@codesourcery.com>
5449 Yao Qi <yao@codesourcery.com>
5450
5451 * target.h (struct target_ops): Add read_loadmap.
5452 * linux-low.c (struct target_loadseg): New type.
5453 (struct target_loadmap): New type.
5454 (linux_read_loadmap): New function.
5455 (linux_target_ops): Add linux_read_loadmap.
5456 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5457 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5458 to NULL.
78d85199 5459
a959a88d
EZ
54602011-08-05 Eli Zaretskii <eliz@gnu.org>
5461
5462 * win32-low.c: Include <stdint.h>.
5463
1ced966e
PA
54642011-07-22 Pedro Alves <pedro@codesourcery.com>
5465
5466 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5467 to the inferior here.
5468 (i386_remove_aligned_watchpoint): Ditto.
5469 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5470 fit part of the watchpoint in the debug registers.
5471 (i386_update_inferior_debug_regs): New.
5472 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5473 registers, and only update the inferior on success.
5474 (i386_low_remove_watchpoint): Ditto.
5475
d26e3629
KY
54762011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5477
5478 * linux-low.c (compare_ints, unique, list_threads, show_process,
5479 linux_core_of_thread): Delete.
5480 (linux_target_ops): Change linux_core_of_thread to
5481 linux_common_core_of_thread.
5482 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5483 * utils.c (malloc_failure): Change type of argument.
5484 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5485 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5486 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5487 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5488 (IPA_OBJS): Add common-utils-ipa.o.
5489 (ptid_h, linux_osdata_h): New macros.
5490 (server_h): Add common/common-utils.h, common/xml-utils.h,
5491 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5492 common/ptid.h.
5493 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5494 ptid.o, buffer.o): New rules.
5495 (linux-low.o): Add common/linux-osdata.h as a dependency.
5496 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5497 * configure.ac: Add AC_HEADER_DIRENT check.
5498 * config.in: Regenerate.
5499 * configure: Regenerate.
5500 * remote-utils.c (xml_escape_text): Delete.
5501 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5502 buffer_xml_printf): Move to common/buffer.c.
5503 * server.c (main): Remove call to initialize_inferiors.
5504 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5505 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5506 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5507 internal_error, gdb_assert, gdb_assert_fail): Delete.
5508 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5509 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5510 common/buffer.h.
5511 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5512 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5513 initialize_inferiors): Delete.
5514
2275a1a7
PA
55152011-07-20 Pedro Alves <pedro@codesourcery.com>
5516
5517 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5518 symbol error.
5519
0a5b1e09
PA
55202011-05-31 Pedro Alves <pedro@codesourcery.com>
5521
5522 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5523 assertion.
5524 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5525
6938fd34
YQ
55262011-05-26 Yao Qi <yao@codesourcery.com>
5527
5528 * Makefile.in (thread-db.o): Track dependence to
5529 common/gdb_thread_db.h.
5530 * thread-db.c: include gdb_thread_db.h from right place.
5531
b481f9e0
TT
55322011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5533
5534 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5535 __FILE__ and __LINE__ to internal_error.
5536
98a5dd13
DE
55372011-05-13 Doug Evans <dje@google.com>
5538
5539 * thread-db.c (try_thread_db_load_from_sdir): New function.
5540 (try_thread_db_load_from_dir): New function.
5541 (thread_db_load_search): Handle $sdir, ignore $pdir.
5542 Remove trying of system directories if search of
5543 libthread-db-search-path fails, that is now done via $sdir.
5544
d248b706
KY
55452011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5546
5547 * server.c (handle_query): Add EnableDisableTracepoints to the list
5548 of supported features.
43aaf8b6 5549 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5550 tracepoints.
43aaf8b6
PA
5551 (cmd_qtenable_disable): New.
5552 (cmd_qtstart): Install tracepoints even if disabled.
5553 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5554 receiving a QTEnable or QTDisable packet.
5555 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5556 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5557 tracepoints.
5558 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5559
84e578fb
DE
55602011-05-10 Doug Evans <dje@google.com>
5561
5562 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5563
71f55dd8
DE
55642011-05-04 Doug Evans <dje@google.com>
5565
5566 * linux-low.c (linux_join): Skip process lookup.
5567 * spu-low.c (spu_join): Ditto.
5568 * server.c (join_inferiors_callback): Delete.
5569 (process_serial_event): For 'D' packet (detach) call join_inferior
5570 directly.
5571
4d393d60
JM
55722011-05-04 Joseph Myers <joseph@codesourcery.com>
5573
5574 * README: Don't mention xscale*-*-linux*.
5575 * configure.srv (xscale*-*-linux*): Don't handle target.
5576
b00ad6ff
NF
55772011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5578
5579 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5580 casting pointers.
5581 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5582 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5583 (i386_emit_void_call_2): Likewise.
5584
af96c192
YQ
55852011-04-26 Yao Qi <yao@codesourcery.com>
5586
43aaf8b6
PA
5587 * linux-low.c: Move common macros to linux-ptrace.h.
5588 Include linux-ptrace.h.
af96c192
YQ
5589 * Makefile.in (linux_ptrace_h): New.
5590 (linux-low.o): Depends on linux-ptrace.h.
5591
03f2bd59
JK
55922011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5593
5594 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5595 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5596 (remote_prepare): New function with most of the TCP code from ...
5597 (remote_open): ... here. Detect PORT here unconditionally. Move also
5598 setting transport_is_reliable.
5599 * server.c (run_once): New variable.
5600 (gdbserver_usage): Document it.
5601 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5602 the first run if RUN_ONCE.
5603 * server.h (run_once, remote_prepare): New declarations.
5604
7a9dd1b2
TT
56052011-04-19 Tom Tromey <tromey@redhat.com>
5606
5607 * win32-low.c (handle_load_dll): Remove duplicate "the".
5608
81239425
PM
56092011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5610
5611 Remove support for old Cygwin 1.5 versions.
5612 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5613 function to avoid warning.
5614 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5615 warning.
5616
9e0627f1
PM
56172011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5618
5619 * gdbserver/server.h (Macro _): Define it if not available.
5620
588eebee
MS
56212011-03-14 Michael Snyder <msnyder@vmware.com>
5622
348af9f7 5623 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5624
43f70d4c
JB
56252011-03-10 Joel Brobecker <brobecker@adacore.com>
5626
5627 * Makefile.in (maintainer-clean realclean distclean): Remove
5628 "make ... subdir_do" command.
5629
348af9f7
MS
56302011-03-10 Michael Snyder <msnyder@vmware.com>
5631
5632 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5633
5634 * server.c (handle_v_run): Free alloced buffer on early return.
5635
e637a4f5
YQ
56362011-03-09 Yao Qi <yao@codesourcery.com>
5637
5638 Revert:
5639 2011-03-04 Yao Qi <yao@codesourcery.com>
5640
5641 * Makefile.in: Remove GNU make feature --directory.
5642
5643 2011-03-05 Yao Qi <yao@codesourcery.com>
5644
5645 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5646 (subdir_do): New make target. Copied from gdb/Makefile.
5647 (maintainer-clean, realclean, distclean, clean): Call corresponding
5648 make targets in common/Makefile.
5649
5650 2011-02-11 Yao Qi <yao@codesourcery.com>
5651
5652 * configure.ac: Call AC_PROG_RANLIB.
5653 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5654 * configure: Regenerate.
5655
e6edda56
JK
56562011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5657
5658 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5659
e5141119
JB
56602011-03-06 Yao Qi <yao@codesourcery.com>
5661
5662 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5663
64794aa4
JB
56642011-03-05 Yao Qi <yao@codesourcery.com>
5665
5666 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5667 (subdir_do): New make target. Copied from gdb/Makefile.
5668 (maintainer-clean, realclean, distclean, clean): Call corresponding
5669 make targets in common/Makefile.
5670
7a762829
YQ
56712011-03-04 Yao Qi <yao@codesourcery.com>
5672
5673 * Makefile.in: Remove GNU make feature --directory.
5674
348af9f7
MS
56752011-03-04 Michael Snyder <msnyder@vmware.com>
5676
5677 * server.c (queue_stop_reply): Call xmalloc not malloc.
5678
56792011-03-02 Michael Snyder <msnyder@vmware.com>
5680
5681 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5682
9f72fee2
MS
56832011-02-28 Michael Snyder <msnyder@vmware.com>
5684
588eebee
MS
5685 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5686 (cmd_qtframe): Ditto.
5687 (cmd_qtbuffer): Ditto.
5688 (cmd_bigqtbuffer): Ditto.
5689
9f72fee2
MS
5690 * utils.c (decimal2str): Initialize 'width' to nine, then
5691 don't mess with it.
5692
8040bd49
UW
56932011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5694
5695 * hostio.c (require_data): Free *data, not data.
5696
7e52cbd0
JK
56972011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5698
5699 * hostio.c (require_data): Use free, not xfree.
5700
9130f83e
MS
57012011-02-27 Michael Snyder <msnyder@vmware.com>
5702
4b812f4e
MS
5703 * server.c (handle_query): Discard unused value.
5704
9130f83e
MS
5705 * hostio.c (require_data): Free malloc memory before returning
5706 error.
5707
69d37113
MS
57082011-02-26 Michael Snyder <msnyder@vmware.com>
5709
5710 * linux-low.c (list_threads): Call closedir for dirent.
5711
35f5825a
MS
57122011-02-27 Michael Snyder <msnyder@vmware.com>
5713
2a589cef
MS
5714 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5715 a case statement falls through.
5716
0adea5f7
MS
5717 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5718
35f5825a
MS
5719 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5720 in comparison.
5721
238f1c74
MS
57222011-02-26 Michael Snyder <msnyder@vmware.com>
5723
5724 * utils.c (decimal2str): Eliminate dead code and dead param.
5725 (pulongest): Drop dead param from call to decimal2str.
5726 (plongest): Ditto.
5727
633ff500
JB
57282011-02-24 Joel Brobecker <brobecker@adacore.com>
5729
5730 Revert the following patch (not approved yet):
5731 2011-02-21 Hui Zhu <teawater@gmail.com>
5732 * tracepoint.c (tp_printf): New function.
5733 (eval_agent_expr): Handle gdb_agent_op_printf.
5734
f9c6ff72
HZ
57352011-02-21 Hui Zhu <teawater@gmail.com>
5736
5737 * tracepoint.c (tp_printf): New function.
5738 (eval_agent_expr): Handle gdb_agent_op_printf.
5739
94d5e490
TT
57402011-02-18 Tom Tromey <tromey@redhat.com>
5741
5742 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5743 (tracepoint.o): Likewise.
5744 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5745 (gdb_agent_op_names): Likewise.
5746
c7f96d2b
TT
57472011-02-18 Tom Tromey <tromey@redhat.com>
5748
5749 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5750 gdb_agent_op_rot>: New constants.
5751 (gdb_agent_op_names): Add pick and roll.
5752 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5753 cases.
5754
0feedb2c
JK
57552011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5756
5757 * aclocal.m4: Regenerated with aclocal-1.11.1.
5758
b3b9301e
PA
57592011-02-14 Pedro Alves <pedro@codesourcery.com>
5760
5761 * server.c (handle_qxfer_traceframe_info): New.
5762 (qxfer_packets): Register "traceframe-info".
5763 (handle_query): Report support for qXfer:traceframe-info:read+.
5764 * tracepoint.c (match_blocktype): New.
5765 (traceframe_find_block_type): Rename to ...
5766 (traceframe_walk_blocks): ... this. Add callback filter argument,
5767 and use it.
5768 (traceframe_find_block_type): New, reimplemented on top of
5769 traceframe_walk_blocks.
5770 (build_traceframe_info_xml): New.
5771 (traceframe_read_info): New.
5772 * server.h (traceframe_read_info): Declare.
5773
4f3e6fb7
YQ
57742011-02-11 Yao Qi <yao@codesourcery.com>
5775
5776 * configure.ac: Call AC_PROG_RANLIB.
5777 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5778 * configure: Regenerate.
5779
764880b7
PA
57802011-02-07 Pedro Alves <pedro@codesourcery.com>
5781
5782 * server.c (gdb_read_memory): Change return semantics to allow
5783 partial transfers.
5784 (handle_search_memory_1): Adjust.
5785 (process_serial_event) <'m' packet>: Handle partial transfers.
5786 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5787
1c79eb8a
PA
57882011-01-28 Pedro Alves <pedro@codesourcery.com>
5789
5790 * regcache.c (init_register_cache): Initialize
5791 regcache->register_status.
5792 (free_register_cache): Release regcache->register_status.
5793 (regcache_cpy): Copy register_status.
5794 (registers_to_string): Print 'x's for unavailable registers.
5795 (supply_register): Mark the register's status valid or
5796 unavailable, depending on whether a buffer was passed in or not.
5797 (supply_register_zeroed): New.
5798 (supply_regblock): Mark the registers' status valid or
5799 unavailable, depending on whether a buffer was passed in or not.
5800 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5801 (struct regcache): New `register_status' field.
5802 (supply_register_zeroed): Declare.
5803 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5804 supply_register_zeroed, rather than passing a NULL buffer to
5805 supply_register.
5806 * tracepoint.c (fetch_traceframe_registers): Update comment.
5807
85724a0e
PA
58082011-01-28 Pedro Alves <pedro@codesourcery.com>
5809
5810 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5811 buffer explicit.
5812
d08aafef
PA
58132011-01-25 Pedro Alves <pedro@codesourcery.com>
5814
5815 * server.h (decode_xfer_write): Change prototype.
5816 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5817 and don't extract the annex here.
5818 * server.c (decode_xfer_read): Remove `annex' parameter,
5819 and don't extract the annex here.
5820 (decode_xfer): New.
5821 (struct qxfer): New.
5822 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5823 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5824 (handle_qxfer_statictrace): New functions, abstracted out from
5825 handle_query, and made to use the struct qxfer interface.
5826 (handle_threads_qxfer_proper): Rename to ...
5827 (handle_qxfer_threads_proper): ... this.
5828 (handle_threads_qxfer): Rename to ...
5829 (handle_qxfer_threads): ... this. Adjust.
5830 (qxfer_packets): New array.
5831 (handle_qxfer): New function.
5832 (handle_query): Use handle_qxfer.
5833
493e2a69
MS
58342011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5835
5836 * gdbreplay.c: Shorten lines of >= 80 columns.
5837 * linux-low.c: Ditto.
5838 * linux-ppc-low.c: Ditto.
5839 * linux-s390-low.c: Ditto.
5840 * linux-sparc-low.c: Ditto.
5841 * linux-x86-low.c: Ditto.
5842 * linux-xtensa-low.c: Ditto.
5843 * mem-break.c: Ditto.
5844 * nto-low.c: Ditto.
5845 * regcache.h: Ditto.
5846 * remote-utils.c: Ditto.
5847 * server.c: Ditto.
5848 * server.h: Ditto.
5849 * thread-db.c: Ditto.
5850 * tracepoint.c: Ditto.
5851 * utils.c: Ditto.
5852 * win32-low.h: Ditto.
5853
44944448
JB
58542011-01-05 Joel Brobecker <brobecker@adacore.com>
5855
5856 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5857 update.
5858
71ce852c
JB
58592011-01-01 Joel Brobecker <brobecker@adacore.com>
5860
5861 * server.c (gdbserver_version): Update copyright year in version
5862 output.
5863 * gdbreplay.c (gdbreplay_version): Ditto.
5864
eb826dc6
MF
58652010-12-29 Jie Zhang <jie.zhang@analog.com>
5866
5867 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5868 * linux-bfin-low.c: New file.
5869 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5870 PT_DATA_ADDR for BFIN targets.
5871 * Makefile.in (SFILES): Add linux-bfin-low.c.
5872 (clean): Remove reg-bfin.c.
5873 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5874 * README: Mention supported Blackfin targets.
5875
39ab222a
MF
58762010-12-23 Mike Frysinger <vapier@gentoo.org>
5877
5878 * .gitignore: New file.
5879
a1f2ce7d
MF
58802010-11-16 Mike Frysinger <vapier@gentoo.org>
5881
5882 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5883
f474844c
JZ
58842010-10-22 Jie Zhang <jie@codesourcery.com>
5885
5886 * Makefile.in: Add FLAGS_TO_PASS variable.
5887 (install): Remove dependency of install-only and recursively
5888 invoke make for install-only.
5889
f1048712
DE
58902010-10-04 Doug Evans <dje@google.com>
5891
5892 * Makefile.in (uninstall): Use $(DESTDIR).
5893
b53a1623
PA
58942010-09-24 Pedro Alves <pedro@codesourcery.com>
5895
e6ee044d
PA
5896 PR gdb/11842
5897
b53a1623
PA
5898 * linux-x86-low.c (compat_siginfo_from_siginfo)
5899 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5900 si_code is < 0. Check for si_code == SI_TIMER before checking for
5901 si_code < 0.
5902
fa1bd1e4
JB
59032010-09-13 Joel Brobecker <brobecker@adacore.com>
5904
5905 * lynx-i386-low.c: New file.
5906 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5907
47fac8f8
JB
59082010-09-13 Joel Brobecker <brobecker@adacore.com>
5909
5910 * lynx-low.c (ptrace_request_to_str): Remove handling for
5911 request values that have been removed in LynxOS 5.x.
5912
1adfc54d
JB
59132010-09-13 Joel Brobecker <brobecker@adacore.com>
5914
5915 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5916 <ptrace.h>
5917
c2a66c29
NS
59182010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5919
5920 * configure.ac: Add --enable-inprocess-agent option.
5921 * configure: Rebuilt.
5922
32fcada3
YQ
59232010-09-06 Yao Qi <yao@codesourcery.com>
5924
5925 * linux-low.c (linux_kill): Remove unused variable.
5926 (linux_stabilize_threads): Likewise.
5927 * server.c (start_inferior): Likewise.
5928 (queue_stop_reply_callback): Likewise.
5929 * tracepoint.c (do_action_at_tracepoint): Likewise.
5930
0cccb683
YQ
59312010-09-06 Yao Qi <yao@codesourcery.com>
5932
5933 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5934 on return.
5935
423ec54c
JK
59362010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5937
5938 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5939
12ac6819
PA
59402010-09-06 Pedro Alves <pedro@codesourcery.com>
5941
5942 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5943 "$(IPA_DEPFILES)".
5944
8ed54b31
JB
59452010-09-01 Joel Brobecker <brobecker@adacore.com>
5946
5947 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5948 gdbserver/lynx-ppc-low.c: New files.
5949 * Makefile.in (lynx_low_h): New variable.
5950 (lynx-low.o, lynx-ppc-low.o): New rules.
5951 * configure.ac: On LynxOS, link with -lnetinet.
5952 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5953 * configure: regenerate.
5954
bb0116a4
JB
59552010-09-01 Joel Brobecker <brobecker@adacore.com>
5956
5957 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5958 * configure.ac: Add check for vasprintf and vsnprintf.
5959 * configure, config.in: Regenerate.
5960 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5961
a778ab81 59622010-09-01 Joel Brobecker <brobecker@adacore.com>
5963
5964 * gdbreplay.c: Move include of alloca.h up, next to include of
5965 malloc.h.
5966 * server.h: Add include of malloc.h.
5967 * mem-break.c: Remove include of malloc.h.
5968 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5969
8b034a19 59702010-09-01 Joel Brobecker <brobecker@adacore.com>
5971
5972 * Makefile.in (memmem.o): Build with -Wno-error.
5973
59742010-09-01 Joel Brobecker <brobecker@adacore.com>
5975
5976 * utils.c (xsnprintf): Make non-static.
5977 * server.h: Add xsnprintf declaration.
5978 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5979 replace calls to snprintf by calls to xsnprintf throughout.
5980
59812010-09-01 Joel Brobecker <brobecker@adacore.com>
5982
5983 * configure.ac: Add configure check for alloca.
5984 * configure, config.in: Regenerate.
5985 * server.h: Include alloca.h if it exists.
5986 * gdbreplay.c: Include alloca.h if it exists.
5987
1a981360
PA
59882010-08-28 Pedro Alves <pedro@codesourcery.com>
5989
5990 * linux-low.c (__SIGRTMIN): Define if not already defined.
5991 (linux_create_inferior): Check for __ANDROID__ rather than
5992 __SIGRTMIN.
5993 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5994 are already deferred.
5995 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5996 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5997 stopped and already has a pending signal to report.
5998 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5999 a pending signal to report or is moving out of a jump pad.
6000 (linux_init_signals): Check for __ANDROID__ rather than
6001 __SIGRTMIN.
6002
b4d51a55
PA
60032010-08-28 Pedro Alves <pedro@codesourcery.com>
6004
6005 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6006 debug_threads check. Avoid a linear search when not doing debug
6007 output.
6008
ec48365d
PA
60092010-08-27 Pedro Alves <pedro@codesourcery.com>
6010
6011 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6012 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6013 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6014 (process_event): Change local fd's type to gdb_fildes_t.
6015 (create_file_handler): Adjust prototype.
6016 (delete_file_handler): Adjust prototype.
6017 (handle_file_event): Adjust prototype. Use pfildes.
6018 (create_file_event): Adjsut prototype.
6019 * remote-utils.c (remote_desc, listen_desc): Change type to
6020 gdb_fildes_t.
6021 * server.h: New gdb_fildes_t typedef.
6022 [USE_WIN32API]: Include winsock2.h.
6023 (delete_file_handler, add_file_handler): Adjust prototypes.
6024 (pfildes): Declare.
6025 * utils.c (pfildes): New.
6026
854d88f0
PA
60272010-08-27 Pedro Alves <pedro@codesourcery.com>
6028
6029 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6030 * configure: Regenerate.
6031
0146f85b
PA
60322010-08-27 Pedro Alves <pedro@codesourcery.com>
6033
6034 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6035 (linux_done_accessing_memory): ... this.
6036 (linux_target_ops): Adjust.
6037 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6038 * nto-low.c (nto_target_ops): Adjust comment.
6039 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6040 * spu-low.c (spu_target_ops): Adjust comment.
6041 * target.h (target_ops): Rename unprepare_to_access_memory field
6042 to done_accessing_memory.
6043 (unprepare_to_access_memory): Rename to ...
6044 (done_accessing_memory): ... this.
6045
90d74c30
PA
60462010-08-26 Pedro Alves <pedro@codesourcery.com>
6047
6048 * linux-low.c (linux_prepare_to_access_memory): New.
6049 (linux_unprepare_to_access_memory): New.
6050 (linux_target_ops): Install them.
6051 * server.c (read_memory): Rename to ...
6052 (gdb_read_memory): ... this. Use
6053 prepare_to_access_memory/prepare_to_access_memory.
6054 (write_memory): Rename to ...
6055 (gdb_write_memory): ... this. Use
6056 prepare_to_access_memory/prepare_to_access_memory.
6057 (handle_search_memory_1): Adjust.
6058 (process_serial_event): Adjust.
6059 * target.h (struct target_ops): New fields
6060 prepare_to_access_memory and unprepare_to_access_memory.
6061 (prepare_to_access_memory, unprepare_to_access_memory): New.
6062 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6063 prepare_to_access_memory/prepare_to_access_memory.
6064 * nto-low.c (nto_target_ops): Adjust.
6065 * spu-low.c (spu_target_ops): Adjust.
6066 * win32-low.c (win32_target_ops): Adjust.
6067
fd467969
PA
60682010-08-26 Pedro Alves <pedro@codesourcery.com>
6069
6070 * Makefile.in (WARN_CFLAGS): Get it from configure.
6071 (WERROR_CFLAGS): New.
6072 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6073 * configure.ac: Introduce --enable-werror, which adds -Werror to
6074 the compiler command line. Enabled by default. Disable with
6075 --disable-werror. Add -Wdeclaration-after-statement
6076 Wpointer-arith and -Wformat-nonliteral to warning flags.
6077 * configure: Regenerate.
6078
331e2f5f
PA
60792010-08-26 Pedro Alves <pedro@codesourcery.com>
6080
6081 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6082
e581f2b4
PA
60832010-08-26 Pedro Alves <pedro@codesourcery.com>
6084
6085 * gdbreplay.c (remote_error): New.
6086 (gdbchar): New.
6087 (expect): Use gdbchar. Check for error reading from GDB.
6088 Clarify sync error output.
6089 (play): Check for errors writing to GDB.
6090 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6091 * remote-utils.c (getpkt): Check for errors writing to the remote
6092 descriptor.
6093
3c11dd79
PA
60942010-08-25 Pedro Alves <pedro@codesourcery.com>
6095
6096 * linux-low.c (linux_wait_1): Move non-debugging code out of
6097 `debug_threads' control.
6098
d20a8ad9
PA
60992010-08-25 Pedro Alves <pedro@codesourcery.com>
6100
6101 * linux-low.c (linux_wait_1): Don't set last_status here.
6102 * server.c (push_event, queue_stop_reply_callback): Assert we're
6103 not pushing a TARGET_WAITKIND_IGNORE event.
6104 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6105 (myresume, handle_target_event): Set the thread's last_resume_kind
6106 and last_status from the target returned status.
6107
964e4306
PA
61082010-08-25 Pedro Alves <pedro@codesourcery.com>
6109
6110 PR threads/10729
6111
6112 * linux-x86-low.c (update_debug_registers_callback): New.
6113 (i386_dr_low_set_addr): Use it.
6114 (i386_dr_low_get_addr): New.
6115 (i386_dr_low_set_control): Use update_debug_registers_callback.
6116 (i386_dr_low_get_control): New.
6117 (i386_dr_low_get_status): Adjust.
6118 * linux-low.c (linux_stop_lwp): New.
6119 * linux-low.h (linux_stop_lwp): Declare.
6120
6121 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6122 argument instead of a i386_debug_reg_state.
6123 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6124 a i386_debug_reg_state.
6125 (i386_insert_aligned_watchpoint): Adjust.
6126 (i386_remove_aligned_watchpoint): Adjust.
6127 (i386_low_stopped_data_address): Read the debug registers from the
6128 inferior instead of from the mirrors.
6129 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6130 (i386_dr_low_get_addr): Declare.
6131 (i386_dr_low_get_control): Declare.
6132 (i386_dr_low_get_status): Change prototype.
6133
6134 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6135 (i386_dr_low_get_addr): New.
6136 (i386_dr_low_get_control): New.
6137 (i386_dr_low_get_status): Adjust prototype. Return
6138 dr_status_mirror.
6139 (i386_initial_stuff): Clear dr_status_mirror and
6140 dr_control_mirror.
6141 (i386_get_thread_context): Adjust.
6142 (i386_set_thread_context): Adjust.
6143 (i386_thread_added): Adjust.
6144
5f21a75b
PA
61452010-08-24 Pedro Alves <pedro@codesourcery.com>
6146
6147 * linux-low.h (linux_thread_area): Delete declaration.
6148
3e4c1235
TS
61492010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6150
6151 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6152 after its termination.
6153
1971b033
PA
61542010-08-09 Pedro Alves <pedro@codesourcery.com>
6155
6156 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6157 (gdb_wants_all_stopped): Delete.
6158 (linux_wait_1): Don't call them.
6159 * server.c (handle_v_cont): Tag all threads as want-stopped.
6160 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6161 stopped as "client-wants-stopped".
6162
310444ac
PA
61632010-07-31 Pedro Alves <pedro@codesourcery.com>
6164
6165 * Makefile.in (signals_h): New.
6166 (server_h): Depend on it.
6167 (server.o): Don't depend on $(signals_def).
6168 (signals.o): Depend on $(signals_def).
6169
a19cae16
JK
61702010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6171
6172 * Makefile.in (signals_def): New.
6173 (server_h): Append include/gdb/signals.h and signals_def.
6174 (server.o): Append signals_def.
6175
30d50328
JK
61762010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6177
6178 * server.c (handle_target_event): Use target_signal_to_host for
6179 resume_info.sig initialization.
6180 * target.h (struct thread_resume) <sig>: New comment.
6181
5c3216e2
OS
61822010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6183
c6f46ca0
OS
6184 * server.c (handle_query): strcpy() the returned string from paddress()
6185 instead of sprintf().
5c3216e2
OS
6186 * utils.c (paddress): Return phex_nz().
6187
6bd31874
JB
61882010-07-07 Joel Brobecker <brobecker@adacore.com>
6189
6190 * server.c (handle_v_cont): Call mourn_inferior if process
6191 just exited.
6192 (myresume): Likewise.
6193
0fb4aa4b
PA
61942010-07-01 Pedro Alves <pedro@codesourcery.com>
6195
6196 Static tracepoints, and integration with UST.
6197
6198 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6199 * mem-break.c (uninsert_all_breakpoints)
6200 (reinsert_all_breakpoints): New.
6201 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6202 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6203 (gdb_agent_ust_loaded, helper_thread_id)
6204 (gdb_agent_helper_thread_id): New macros.
6205 (struct ipa_sym_addresses): Add addr_ust_loaded,
6206 addr_helper_thread_id, addr_cmd_buf.
6207 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6208 (in_process_agent_loaded_ust): New.
6209 (write_e_ust_not_loaded): New.
6210 (maybe_write_ipa_ust_not_loaded): New.
6211 (struct collect_static_trace_data_action): New.
6212 (enum tracepoint_type) <static_tracepoint>: New.
6213 (struct tracepoint) <handle>: Mention static tracepoints.
6214 (struct static_tracepoint_ctx): New.
6215 (CMD_BUF_SIZE): New.
6216 (add_tracepoint_action): Handle static tracepoint actions.
6217 (unprobe_marker_at): New.
6218 (clear_installed_tracepoints): Handle static tracepoints.
6219 (cmd_qtdp): Handle static tracepoints.
6220 (probe_marker_at): New.
6221 (cmd_qtstart): Handle static tracepoints.
6222 (response_tracepoint): Handle static tracepoints.
6223 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6224 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6225 (get_context_regcache): Handle static tracepoints.
6226 (do_action_at_tracepoint): Handle static tracepoint actions.
6227 (traceframe_find_block_type): Handle static trace data blocks.
6228 (traceframe_read_sdata): New.
6229 (download_tracepoints): Download static tracepoint actions.
6230 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6231 (GDB_PROBE_NAME): New.
6232 (ust_ops): New.
6233 (GET_UST_SYM): New.
6234 (USTF): New.
6235 (dlsym_ust): New.
6236 (ust_marker_to_static_tracepoint): New.
6237 (gdb_probe): New.
6238 (collect_ust_data_at_tracepoint): New.
6239 (gdb_ust_probe): New.
6240 (UNIX_PATH_MAX, SOCK_DIR): New.
6241 (gdb_ust_connect_sync_socket): New.
6242 (resume_thread, stop_thread): New.
6243 (run_inferior_command): New.
6244 (init_named_socket): New.
6245 (gdb_ust_socket_init): New.
6246 (cstr_to_hexstr): New.
6247 (next_st): New.
6248 (first_marker, next_marker): New.
6249 (response_ust_marker): New.
6250 (cmd_qtfstm, cmd_qtsstm): New.
6251 (unprobe_marker_at, probe_marker_at): New.
6252 (cmd_qtstmat, gdb_ust_thread): New.
6253 (gdb_ust_init): New.
6254 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6255 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6256 (ST_REGENTRY): New.
6257 (x86_64_st_collect_regmap): New.
6258 (X86_64_NUM_ST_COLLECT_GREGS): New.
6259 (AMD64_RIP_REGNUM): New.
6260 (supply_static_tracepoint_registers): New.
6261 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6262 (ST_REGENTRY): New.
6263 (i386_st_collect_regmap): New.
6264 (i386_NUM_ST_COLLECT_GREGS): New.
6265 (supply_static_tracepoint_registers): New.
6266 * server.c (handle_query): Handle qXfer:statictrace:read.
6267 <qSupported>: Report support for StaticTracepoints, and
6268 qXfer:statictrace:read features.
6269 * server.h (traceframe_read_sdata)
6270 (supply_static_tracepoint_registers): Declare.
6271 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6272 (unpack_varlen_hex): Include in IPA build.
6273 * Makefile.in (ustlibs, ustinc): New.
6274 (IPA_OBJS): Add remote-utils-ipa.o.
6275 ($(IPA_LIB)): Link -ldl and -lpthread.
6276 (UST_CFLAGS): New.
6277 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6278 * config.in, configure: Regenerate.
6279
9e4344e5
PA
62802010-06-20 Ian Lance Taylor <iant@google.com>
6281 Pedro Alves <pedro@codesourcery.com>
6282
6283 * linux-x86-low.c (always_true): Delete.
6284 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6285 trying to fool the compiler with always_true.
6286
c6beb2cb
PA
62872010-06-20 Pedro Alves <pedro@codesourcery.com>
6288
6289 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6290 conditions in gdbserver.
6291
d2ed6730
UW
62922010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6293
6294 * spu-low.c (spu_read_memory): Wrap around local store limit.
6295 (spu_write_memory): Likewise.
6296
4e29fb54
PA
62972010-06-15 Pedro Alves <pedro@codesourcery.com>
6298
6299 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6300 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6301 LONGEST uses.
6302 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6303 uses.
6304 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6305 uses with LONGEST uses.
6306
6a271cae
PA
63072010-06-14 Stan Shebs <stan@codesourcery.com>
6308 Pedro Alves <pedro@codesourcery.com>
6309
6310 Bytecode compiler.
6311
6312 * linux-x86-low.c: Include limits.h.
6313 (add_insns): New.
6314 (always_true): New.
6315 (EMIT_ASM): New.
6316 (EMIT_ASM32): New.
6317 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6318 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6319 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6320 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6321 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6322 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6323 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6324 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6325 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6326 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6327 (amd64_emit_void_call_2): New.
6328 (amd64_emit_ops): New.
6329 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6330 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6331 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6332 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6333 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6334 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6335 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6336 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6337 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6338 (i386_emit_stack_adjust, i386_emit_int_call_1)
6339 (i386_emit_void_call_2): New.
6340 (i386_emit_ops): New.
6341 (x86_emit_ops): New.
6342 (the_low_target): Install x86_emit_ops.
6343 * server.h (struct emit_ops): New.
6344 (get_raw_reg_func_addr): Declare.
6345 (current_insn_ptr, emit_error): Declare.
6346 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6347 (set_trace_state_variable_value): New defines.
6348 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6349 addr_get_trace_state_variable_value and
6350 addr_set_trace_state_variable_value.
6351 (symbol_list): New fields for get_raw_reg,
6352 get_trace_state_variable_value and set_trace_state_variable_value.
6353 (condfn): New typedef.
6354 (struct tracepoint): New field `compiled_cond'.
6355 (do_action_at_tracepoint): Clear compiled_cond.
6356 (get_trace_state_variable_value, set_trace_state_variable_value):
6357 Export in the IPA.
6358 (condition_true_at_tracepoint): If there's a compiled condition,
6359 run that.
6360 (current_insn_ptr, emit_error): New globals.
6361 (struct bytecode_address): New.
6362 (get_raw_reg_func_addr): New.
6363 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6364 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6365 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6366 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6367 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6368 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6369 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6370 (compile_tracepoint_condition, compile_bytecodes): New.
6371 * target.h (emit_ops): Forward declare.
6372 (struct target_ops): New field emit_ops.
6373 (target_emit_ops): New.
6374 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6375 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6376 * linux-low.c (linux_emit_ops): New.
6377 (linux_target_ops): Install it.
6378 * linux-low.h (struct linux_target_ops): New field emit_ops.
6379
92b72907
UW
63802010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6381
6382 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6383 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6384
fa593d66
PA
63852010-06-01 Pedro Alves <pedro@codesourcery.com>
6386 Stan Shebs <stan@codesourcery.com>
6387
6388 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6389 (all): Depend on $(extra_libraries).
6390 (install-only): Install the IPA.
6391 (IPA_OBJS, IPA_LIB): New.
6392 (clean): Remove the IPA lib.
6393 (IPAGENT_CFLAGS): New.
6394 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6395 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6396 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6397 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6398 * configure.ac: Check for atomic builtins support in the compiler.
6399 (IPA_DEPFILES, extra_libraries): Define.
6400 * configure.srv (ipa_obj): Add description.
6401 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6402 (i[34567]86-*-linux*): Set ipa_obj.
6403 (x86_64-*-linux*): Set ipa_obj.
6404 * linux-low.c (stabilizing_threads): New.
6405 (supports_fast_tracepoints): New.
6406 (linux_detach): Stabilize threads before detaching.
6407 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6408 the lwp is either not stabilizing, or is moving out of a jump pad.
6409 (linux_fast_tracepoint_collecting): New.
6410 (maybe_move_out_of_jump_pad): New.
6411 (enqueue_one_deferred_signal): New.
6412 (dequeue_one_deferred_signal): New.
6413 (linux_wait_for_event_1): If moving out of a jump pad, defer
6414 pending signals to later.
6415 (linux_stabilize_threads): New.
6416 (linux_wait_1): Check if threads need moving out of jump pads, and
6417 do it if so.
6418 (stuck_in_jump_pad_callback): New.
6419 (move_out_of_jump_pad_callback): New.
6420 (lwp_running): New.
6421 (linux_resume_one_lwp): Handle moving out of jump pads.
6422 (linux_set_resume_request): Dequeue deferred signals.
6423 (need_step_over_p): Also step over fast tracepoint jumps.
6424 (start_step_over): Also uninsert fast tracepoint jumps.
6425 (finish_step_over): Also reinsert fast tracepoint jumps.
6426 (linux_install_fast_tracepoint_jump): New.
6427 (linux_target_ops): Install linux_stabilize_threads and
6428 linux_install_fast_tracepoint_jump_pad.
6429 * linux-low.h (linux_target_ops) <get_thread_area,
6430 install_fast_tracepoint_jump_pad>: New fields.
6431 (struct lwp_info) <collecting_fast_tracepoint,
6432 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6433 (linux_get_thread_area): Declare.
6434 * linux-x86-low.c (jump_insn): New.
6435 (x86_get_thread_area): New.
6436 (append_insns): New.
6437 (push_opcode): New.
6438 (amd64_install_fast_tracepoint_jump_pad): New.
6439 (i386_install_fast_tracepoint_jump_pad): New.
6440 (x86_install_fast_tracepoint_jump_pad): New.
6441 (the_low_target): Install x86_get_thread_area and
6442 x86_install_fast_tracepoint_jump_pad.
6443 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6444 (struct fast_tracepoint_jump): New.
6445 (fast_tracepoint_jump_insn): New.
6446 (fast_tracepoint_jump_shadow): New.
6447 (find_fast_tracepoint_jump_at): New.
6448 (fast_tracepoint_jump_here): New.
6449 (delete_fast_tracepoint_jump): New.
6450 (set_fast_tracepoint_jump): New.
6451 (uninsert_fast_tracepoint_jumps_at): New.
6452 (reinsert_fast_tracepoint_jumps_at): New.
6453 (set_breakpoint_at): Use write_inferior_memory.
6454 (uninsert_raw_breakpoint): Use write_inferior_memory.
6455 (check_mem_read): Mask out fast tracepoint jumps.
6456 (check_mem_write): Mask out fast tracepoint jumps.
6457 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6458 (set_fast_tracepoint_jump): Declare.
6459 (delete_fast_tracepoint_jump)
6460 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6461 (reinsert_fast_tracepoint_jumps_at): Declare.
6462 * regcache.c: Don't compile many functions when building the
6463 in-process agent library.
6464 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6465 the register buffer in the heap.
6466 (free_register_cache): If the register buffer isn't owned by the
6467 regcache, don't free it.
6468 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6469 pre-existing register caches.
6470 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6471 type.
6472 (convert_ascii_to_int): : Constify `from' parameter type.
6473 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6474 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6475 the needed buffer in-place.
6476 (relocate_instruction): New.
6477 * server.c (handle_query) <qSymbols>: If the target supports
6478 tracepoints, give it a chance of looking up symbols. Report
6479 support for fast tracepoints.
6480 (handle_status): Stabilize threads.
6481 (process_serial_event): Adjust.
6482 * server.h (struct fast_tracepoint_jump): Forward declare.
6483 (struct process_info) <fast_tracepoint_jumps>: New field.
6484 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6485 (decode_X_packet, decode_M_packet): Adjust.
6486 (relocate_instruction): Declare.
6487 (in_process_agent_loaded): Declare.
6488 (tracepoint_look_up_symbols): Declare.
6489 (struct fast_tpoint_collect_status): Declare.
6490 (fast_tracepoint_collecting): Declare.
6491 (force_unlock_trace_buffer): Declare.
6492 (handle_tracepoint_bkpts): Declare.
6493 (initialize_low_tracepoint)
6494 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6495 * target.h (struct target_ops) <stabilize_threads,
6496 install_fast_tracepoint_jump_pad>: New fields.
6497 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6498 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6499 [HAVE_STDINT_H]: Include stdint.h.
6500 (trace_debug_1): Rename to ...
6501 (trace_vdebug): ... this.
6502 (trace_debug): Rename to ...
6503 (trace_debug_1): ... this. Add `level' parameter.
6504 (trace_debug): New.
6505 (ATTR_USED, ATTR_NOINLINE): New.
6506 (IP_AGENT_EXPORT): New.
6507 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6508 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6509 (about_to_request_buffer_space, trace_buffer_is_full)
6510 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6511 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6512 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6513 (traceframe_write_count, traceframes_created)
6514 (trace_state_variables)
6515 New renaming defines.
6516 (struct ipa_sym_addresses): New.
6517 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6518 (symbol_list): New.
6519 (ipa_sym_addrs): New.
6520 (all_tracepoint_symbols_looked_up): New.
6521 (in_process_agent_loaded): New.
6522 (write_e_ipa_not_loaded): New.
6523 (maybe_write_ipa_not_loaded): New.
6524 (tracepoint_look_up_symbols): New.
6525 (debug_threads) [IN_PROCESS_AGENT]: New.
6526 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6527 (UNKNOWN_SIDE_EFFECTS): New.
6528 (stop_tracing): New.
6529 (flush_trace_buffer): New.
6530 (stop_tracing_bkpt): New.
6531 (flush_trace_buffer_bkpt): New.
6532 (read_inferior_integer): New.
6533 (read_inferior_uinteger): New.
6534 (read_inferior_data_pointer): New.
6535 (write_inferior_data_pointer): New.
6536 (write_inferior_integer): New.
6537 (write_inferior_uinteger): New.
6538 (struct collect_static_trace_data_action): Delete.
6539 (enum tracepoint_type): New.
6540 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6541 <actions_str, step_actions, step_actions_str>: Only include in
6542 GDBserver.
fa593d66
PA
6543 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6544 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6545 (tracepoints): Use IP_AGENT_EXPORT.
6546 (last_tracepoint): Don't include in the IPA.
6547 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6548 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6549 (alloced_trace_state_variables): New.
6550 (trace_state_variables): Use IP_AGENT_EXPORT.
6551 (traceframe_t): Delete unused variable.
6552 (circular_trace_buffer): Don't include in the IPA.
6553 (trace_buffer_start): Delete.
6554 (struct trace_buffer_control): New.
6555 (trace_buffer_free): Delete.
6556 (struct ipa_trace_buffer_control): New.
6557 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6558 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6559 New.
6560 (trace_buffer_ctrl): New.
6561 (TRACE_BUFFER_CTRL_CURR): New.
6562 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6563 Reimplement as macros.
6564 (trace_buffer_wrap): Delete.
6565 (traceframe_write_count, traceframe_read_count)
6566 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6567 (struct tracepoint_hit_ctx) <type>: New field.
6568 (struct fast_tracepoint_ctx): New.
6569 (memory_barrier): New.
6570 (cmpxchg): New.
6571 (record_tracepoint_error): Update atomically in the IPA.
6572 (clear_inferior_trace_buffer): New.
6573 (about_to_request_buffer_space): New.
6574 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6575 updating the same buffer.
6576 (add_tracepoint): Default the tracepoint's type to trap
6577 tracepoint, and orig_size to -1.
6578 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6579 internal variables.
6580 (create_trace_state_variable): New parameter `gdb'. Handle it.
6581 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6582 (cmd_qtdp): Handle fast tracepoints.
6583 (cmd_qtdv): Adjust.
6584 (max_jump_pad_size): New.
6585 (gdb_jump_pad_head): New.
6586 (get_jump_space_head): New.
6587 (claim_jump_space): New.
6588 (sort_tracepoints): New.
6589 (MAX_JUMP_SIZE): New.
6590 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6591 IPA.
6592 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6593 support. Upload fast traceframes, and delete internal IPA
6594 breakpoints.
6595 (stop_tracing_handler): New.
6596 (flush_trace_buffer_handler): New.
6597 (cmd_qtstop): Upload fast tracepoints.
6598 (response_tracepoint): Handle fast tracepoints.
6599 (tracepoint_finished_step): Upload fast traceframes. Set the
6600 tracepoint hit context's tracepoint type.
6601 (handle_tracepoint_bkpts): New.
6602 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6603 type. Add comment about fast tracepoints.
6604 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6605 non-existing action_str field.
6606 (get_context_regcache): Handle fast tracepoints.
6607 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6608 to the regcache.
6609 (fast_tracepoint_from_jump_pad_address): New.
6610 (fast_tracepoint_from_ipa_tpoint_address): New.
6611 (collecting_t): New.
6612 (force_unlock_trace_buffer): New.
6613 (fast_tracepoint_collecting): New.
6614 (collecting): New.
6615 (gdb_collect): New.
6616 (write_inferior_data_ptr): New.
6617 (target_tp_heap): New.
6618 (target_malloc): New.
6619 (download_agent_expr): New.
6620 (UALIGN): New.
6621 (download_tracepoints): New.
6622 (download_trace_state_variables): New.
6623 (upload_fast_traceframes): New.
6624 (IPA_FIRST_TRACEFRAME): New.
6625 (IPA_NEXT_TRACEFRAME_1): New.
6626 (IPA_NEXT_TRACEFRAME): New.
6627 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6628 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6629 (gdb_jump_pad_buffer_end): New.
6630 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6631 (initialize_tracepoint): Adjust.
6632 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6633 buffer. Initialize the low module.
6634 * utils.c (PREFIX, TOOLNAME): New.
6635 (malloc_failure): Use PREFIX.
6636 (error): In the IPA, an error causes an exit.
6637 (fatal, warning): Use PREFIX.
6638 (internal_error): Use TOOLNAME.
6639 (NUMCELLS): Increase to 10.
6640 * configure, config.in: Regenerate.
6641
d149dd1d
PA
66422010-06-01 Pedro Alves <pedro@codesourcery.com>
6643
6644 * server.c (handle_query) <qSupported>: Do two passes over the
6645 qSupported string to avoid nesting strtok.
6646
f6528abd
JK
66472010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6648
6649 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6650 (CDEPS): New.
6651 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6652 -Wl,--dynamic-list.
6653 * configure: Regenerate.
6654 * proc-service.list: New.
6655
ca2a87a0
JK
66562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6657
6658 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6659 New comment.
6660
363a6e9f
OS
66612010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6662
6663 * gdbreplay.c (remote_open): Check error return from socket() call by
6664 its equality to -1 not by it being negative.
6665 * remote-utils.c (remote_open): Likewise.
6666
d23b6cb1
PA
66672010-05-23 Pedro Alves <pedro@codesourcery.com>
6668
6669 * config.h: Regenerate.
6670
28d3cf85
MK
66712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6672
6673 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6674 doesn't provide PTRACE_GET_THREAD_AREA.
6675
fea36a59
MK
66762010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6677
6678 * linux-m68k-low.c: Include <asm/ptrace.h>
6679 (ps_get_thread_area): Implement.
6680
24b066ba
DE
66812010-05-03 Doug Evans <dje@google.com>
6682
6683 * event-loop.c (struct callback_event): New struct.
6684 (callback_list): New global.
6685 (append_callback_event, delete_callback_event): New functions.
6686 (process_callback): New function.
6687 (start_event_loop): Call it.
6688 * remote-utils.c (NOT_SCHEDULED): Define.
6689 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6690 moved out of readchar.
6691 (readchar): Rewrite. Call reschedule before returning.
6692 (reset_readchar): New function.
6693 (remote_close): Call it.
6694 (process_remaining, reschedule): New functions.
6695 * server.h (callback_handler_func): New typedef.
6696 (append_callback_event, delete_callback_event): Declare.
6697
9836d6ea
PA
66982010-05-03 Pedro Alves <pedro@codesourcery.com>
6699
6700 * proc-service.c (ps_pglobal_lookup): Use
6701 thread_db_look_up_one_symbol.
6702 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6703 parameter. Use it instead of all_symbols_looked_up.
6704 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6705 field.
6706 (all_symbols_looked_up): Don't declare.
6707 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6708 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6709 field.
6710 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6711 Set all_symbols_looked_up here.
6712 (thread_db_look_up_one_symbol): New.
6713 (thread_db_get_tls_address): Adjust.
6714 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6715 thread_db object on the heap, and tentatively set it in the
6716 process structure.
6717 (thread_db_init): Don't set all_symbols_looked_up here.
6718 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6719
7984d532
PA
67202010-05-03 Pedro Alves <pedro@codesourcery.com>
6721
6722 * linux-low.c (linux_kill, linux_detach): Adjust.
6723 (status_pending_p_callback): Remove redundant statement. Check
6724 for !TARGET_WAITIKIND_IGNORE, instead of
6725 TARGET_WAITKIND_STOPPED.
6726 (handle_tracepoints): Make sure LWP is locked. Adjust.
6727 (linux_wait_for_event_1): Adjust.
6728 (linux_cancel_breakpoints): New.
6729 (unsuspend_one_lwp): New.
6730 (unsuspend_all_lwps): New.
6731 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6732 (send_sigstop_callback): Change return type to int, add new
6733 `except' parameter and handle it.
6734 (suspend_and_send_sigstop_callback): New.
6735 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6736 pass them down. If SUSPEND, also increment the lwp's suspend
6737 count.
6738 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6739 (need_step_over_p): Don't consider suspended LWPs.
6740 (start_step_over): Adjust.
6741 (proceed_one_lwp): Change return type to int, add new `except'
6742 parameter and handle it.
6743 (unsuspend_and_proceed_one_lwp): New.
6744 (proceed_all_lwps): Use find_inferior instead of
6745 for_each_inferior.
6746 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6747 also decrement the suspend count of LWPs. Pass `except' down,
6748 instead of hacking its suspend count.
6749 (linux_pause_all): Add `freeze' parameter. Adjust.
6750 (linux_unpause_all): New.
6751 (linux_target_ops): Install linux_unpause_all.
6752 * server.c (handle_status): Adjust.
6753 * target.h (struct target_ops): New fields `unpause_all' and
6754 `cancel_breakpoints'. Add new parameter to `pause_all'.
6755 (pause_all): Add new `freeze' parameter.
6756 (unpause_all): New.
6757 (cancel_breakpoints): New.
6758 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6759 cancel breakpoints.
6760 (cmd_qtstart): Pause threads.
6761 (stop_tracing): Pause threads, and cancel breakpoints.
6762 * win32-low.c (win32_target_ops): Adjust.
6763
e471f25b
PA
67642010-05-03 Pedro Alves <pedro@codesourcery.com>
6765
6766 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6767 the inferior right away from here...
6768 (linux_wait_1): ... to here, and adjust to check the thread's
6769 last_resume_kind instead of the lwp's step or stop_expected flags.
6770
1915ef4f
PA
67712010-05-02 Pedro Alves <pedro@codesourcery.com>
6772
6773 * README: Use consistent `GDB' and `GDBserver' spellings.
6774
f9e39928
PA
67752010-05-02 Pedro Alves <pedro@codesourcery.com>
6776
6777 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6778 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6779 (linux_detach_one_lwp): Assume the lwp is stopped.
6780 (any_thread_of): Delete.
6781 (linux_detach): Stop all lwps here. Don't blindly delete all
6782 breakpoints.
6783 (delete_lwp_callback): New.
6784 (linux_mourn): Delete all lwps of the process that is gone.
6785 (linux_wait_1): Don't delete the last lwp of the process here.
6786 * mem-break.h (mark_breakpoints_out): Declare.
6787 * mem-break.c (mark_breakpoints_out): New.
6788 (free_all_breakpoints): Use it.
6789 * server.c (handle_target_event): If the process is gone, mark
6790 breakpoints out.
6791 * thread-db.c (struct thread_db) <create_bp>: New field.
6792 (thread_db_enable_reporting): Fix prototype. Store a thread event
6793 breakpoint reference in the thread_db struct.
6794 (thread_db_load_search): Clear the thread_db object.
6795 (try_thread_db_load_1): Ditto.
6796 (switch_to_process): New.
6797 (disable_thread_event_reporting): Use it.
6798 (remove_thread_event_breakpoints): New.
6799 (thread_db_detach, thread_db_mourn): Use it.
6800
1e7fc18c
PA
68012010-05-01 Pedro Alves <pedro@codesourcery.com>
6802
6803 * linux-low.c (linux_enable_event_reporting): New.
6804 (linux_wait_for_event_1, handle_extended_wait): Use it.
6805
02fc4de7
PA
68062010-04-30 Pedro Alves <pedro@codesourcery.com>
6807
6808 * linux-low.c (linux_kill_one_lwp, linux_kill)
6809 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6810 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6811 SIGSTOP even if the LWP is stopped.
6812 (send_sigstop_callback): New.
6813 (stop_all_lwps): Use send_sigstop_callback instead.
6814 (linux_resume_one_thread): Adjust.
6815 (proceed_one_lwp): Still proceed an LWP that the client has
6816 requested to stop, if we haven't reported it as stopped yet. Make
6817 sure that LWPs the client want stopped, have a pending SIGSTOP.
6818
bc3b5632
DE
68192010-04-26 Doug Evans <dje@google.com>
6820
ae1ada35
DE
6821 * server.c (handle_general_set): Make static.
6822
bc3b5632
DE
6823 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6824 Print received char after testing for error/eof instead of before.
6825 (input_interrupt): Tweak comment.
6826
65730243
DE
68272010-04-23 Doug Evans <dje@google.com>
6828
6829 * server.c (start_inferior): Print inferior argv if --debug.
6830
a8ae7dc0
AR
68312010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6832
6833 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6834 * nto-x86-low.c: Include server.h
6835
1c07cc19
PM
68362010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6837
6838 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6839 be consistent with other sources of this directory.
6840 (init_registers_amd64): Correct name of source file of this function
6841 in the comment.
6842
e0a61e09
PM
68432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6844
6845 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6846 64-bit executables.
6847
54709339
PM
68482010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6849
6850 * win32-i386-low.c: Add 64-bit support.
6851 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6852 (init_registers_amd64): Declare.
6853 (mappings): Add 64-bit version of array.
6854 (init_windows_x86): New function.
6855 (the_low_target): Change init_arch field to init_windows_x86.
6856
e8f0053d
PM
68572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6858
6859 * win32-low.c: Adapt to support also 64-bit architecture.
6860 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6861 (get_image_name): Use SIZE_T type for local variable `done'.
6862 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6863 (toolhelp_get_dll_name): Idem.
6864 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6865 Use uintptr_t typecast to avoid warning.
6866 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6867 (handle_exception): Use phex_nz to avoid warning.
6868 (win32_wait): Remove unused local variable `process'.
6869
c481e77e
PM
68702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6871
6872 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6873 `amd64-avx.o'.
6874
12ea4b69
PM
68752010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6876
6877 * configure.ac: Use `ws2_32' library for srv_mingw.
6878 * configure: Regenerate.
6879 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6880 * remote-utils.c: Likewise.
6881
f6d1620c
L
68822010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6883
6884 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6885 if __x86_64__ is defined.
6886
8e642873
PM
68872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6888
6889 * configure: Regenerate.
6890
711e434b
PM
68912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6892
6893 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6894 * target.h (target_ops): New get_tib_address field.
6895 * win32-low.h (win32_thread_info): Add thread_local_base field.
6896 * win32-low.c (child_add_thread): Add tlb argument.
6897 Set thread_local_base field to TLB.
6898 (get_child_debug_event): Adapt to child_add_thread change.
6899 (win32_get_tib_address): New function.
6900 (win32_target_ops): Set get_tib_address field to
6901 win32_get_tib_address.
6902 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6903
505106cd
PA
69042010-04-12 Pedro Alves <pedro@codesourcery.com>
6905
505106cd
PA
6906 * linux-low.c (linux_mourn): Also remove the process.
6907 * server.c (handle_target_event): Don't remove the process here.
6908 * nto-low.c (nto_mourn): New.
6909 (nto_target_ops): Install it.
6910 * spu-low.c (spu_mourn): New.
6911 (spu_target_ops): Install it.
6912 * win32-low.c (win32_mourn): New.
6913 (win32_target_ops): Install it.
6914
e8470a06
PA
69152010-04-12 Pedro Alves <pedro@codesourcery.com>
6916
6917 * server.h (buffer_xml_printf): Remove redundant `;'.
6918
45ba0d02
PA
69192010-04-12 Pedro Alves <pedro@codesourcery.com>
6920
6921 * regcache.c (set_register_cache): Invalidate regcaches before
6922 changing the register cache layout.
6923 (regcache_invalidate_one): Allow a NULL regcache.
6924 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6925 regcaches before changing the register cache layout or the target
6926 regsets.
6927
59e04013
L
69282010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6929
6930 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6931 variable warning on Linux/x86-64.
6932
8336d594
PA
69332010-04-11 Pedro Alves <pedro@codesourcery.com>
6934
6935 GDBserver disconnected tracing support.
6936
6937 * linux-low.c (linux_remove_process): Delete.
6938 (add_lwp): Don't set last_resume_kind here.
6939 (linux_kill): Use `mourn'.
6940 (linux_detach): Use `thread_db_detach', and `mourn'.
6941 (linux_mourn): New.
6942 (linux_attach_lwp_1): Adjust comment.
6943 (linux_attach): last_resume_kind moved the thread_info; adjust.
6944 (status_pending_p_callback): Adjust.
6945 (linux_wait_for_event_1): Adjust.
6946 (count_events_callback, select_singlestep_lwp_callback)
6947 (select_event_lwp_callback, cancel_breakpoints_callback)
6948 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6949 (proceed_one_lwp): Adjust.
6950 (linux_async): Add debug output.
6951 (linux_thread_stopped): New.
6952 (linux_pause_all): New.
6953 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6954 linux_pause_all.
6955 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6956 (thread_db_free): Delete declaration.
6957 (thread_db_detach, thread_db_mourn): Declare.
6958 * thread-db.c (thread_db_init): Use thread_db_mourn.
6959 (thread_db_free): Delete, split in two.
6960 (disable_thread_event_reporting): New.
6961 (thread_db_detach): New.
6962 (thread_db_mourn): New.
6963
6964 * server.h (struct thread_info) <last_resume_kind>: New field.
6965 <attached>: Add comment.
6966 <gdb_detached>: New field.
6967 (handler_func): Change return type to int.
6968 (handle_serial_event, handle_target_event): Ditto.
6969 (gdb_connected): Declare.
6970 (tracing): Delete.
6971 (disconnected_tracing): Declare.
6972 (stop_tracing): Declare.
6973
6974 * server.c (handle_query) <qSupported>: Report support for
6975 disconnected tracing.
6976 (queue_stop_reply_callback): Account for running threads.
6977 (gdb_wants_thread_stopped): New.
6978 (gdb_wants_all_threads_stopped): New.
6979 (gdb_reattached_process): New.
6980 (handle_status): Clear the `gdb_detached' flag of all processes.
6981 In all-stop, stop all threads.
6982 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6983 (process_serial_event): If the remote connection breaks, or if an
6984 exit was forced with "monitor exit", force an event loop exit.
6985 Handle disconnected tracing on detach.
6986 (handle_serial_event): Adjust.
6987 (handle_target_event): If GDB isn't connected, forward events back
6988 to the inferior, unless the last process exited, in which case,
6989 exit gdbserver. Adjust interface.
6990
6991 * remote-utils.c (remote_open): Don't block in accept. Instead
6992 register an event loop source on the listen socket file
6993 descriptor. Refactor bits into ...
6994 (listen_desc): ... this new global.
6995 (gdb_connected): ... this new function.
6996 (enable_async_notification): ... this new function.
6997 (handle_accept_event): ... this new function.
6998 (remote_close): Clear remote_desc.
6999
7000 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7001
7002 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7003 New fields.
7004 (mourn_inferior): Define.
7005 (target_process_qsupported): Avoid the dangling else problem.
7006 (thread_stopped): Define.
7007 (pause_all): Define.
7008 (target_waitstatus_to_string): Declare.
7009 * target.c (target_waitstatus_to_string): New.
7010
7011 * tracepoint.c (tracing): Make extern.
7012 (disconnected_tracing): New.
7013 (stop_tracing): Make extern. Handle tracing stops due to GDB
7014 disconnecting.
7015 (cmd_qtdisconnected): New.
7016 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7017 (handle_tracepoint_general_set): Handle QTDisconnected.
7018
7019 * event-loop.c (event_handler_func): Change return type to int.
7020 (process_event): Bail out if the event handler wants the event
7021 loop to stop.
7022 (handle_file_event): Ditto.
7023 (start_event_loop): Bail out if the event handler wants the event
7024 loop to stop.
7025
7026 * nto-low.c (nto_target_ops): Adjust.
7027 * spu-low.c (spu_wait): Don't remove the process here.
7028 (spu_target_ops): Adjust.
7029 * win32-low.c (win32_wait): Don't remove the process here.
7030 (win32_target_ops): Adjust.
7031
5d267c4c
PA
70322010-04-11 Pedro Alves <pedro@codesourcery.com>
7033
7034 * regcache.c (realloc_register_cache): Invalidate inferior's
7035 regcache before recreating it.
7036
623ccd72
PA
70372010-04-09 Pedro Alves <pedro@codesourcery.com>
7038
7039 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7040
219f2f23
PA
70412010-04-09 Stan Shebs <stan@codesourcery.com>
7042 Pedro Alves <pedro@codesourcery.com>
7043
7044 * server.h (LONGEST): New.
7045 (struct thread_info) <while_stepping>: New field.
7046 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7047 Declare.
7048 (initialize_tracepoint, handle_tracepoint_general_set)
7049 (handle_tracepoint_query, tracepoint_finished_step)
7050 (tracepoint_was_hit, release_while_stepping_state_list):
7051 (current_traceframe): Declare.
7052 * server.c (handle_general_set): Handle tracepoint packets.
7053 (read_memory): New.
7054 (write_memory): New.
7055 (handle_search_memory_1): Use read_memory.
7056 (handle_query): Report support for conditional tracepoints, trace
7057 state variables, and tracepoint sources. Handle tracepoint
7058 queries.
7059 (main): Initialize the tracepoints module.
7060 (process_serial_event): Handle traceframe reads/writes.
7061
7062 * linux-low.c (handle_tracepoints): New.
7063 (linux_wait_1): Call it.
7064 (linux_resume_one_lwp): Handle while-stepping.
7065 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7066 (linux_target_ops): Install them.
7067 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7068 New field.
7069 * linux-x86-low.c (x86_supports_tracepoints): New.
7070 (the_low_target). Install it.
7071
7072 * mem-break.h (delete_breakpoint): Declare.
7073 * mem-break.c (delete_breakpoint): Make external.
7074
7075 * target.h (struct target_ops): Add `supports_tracepoints',
7076 `read_pc', and `write_pc' fields.
7077 (target_supports_tracepoints): Define.
7078 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7079 (phex_nz): New.
7080
7081 * regcache.h (struct regcache) <registers_owned>: New field.
7082 (init_register_cache, regcache_cpy): Declare.
7083 (regcache_read_pc, regcache_write_pc): Declare.
7084 (register_cache_size): Declare.
7085 (supply_regblock): Declare.
7086 * regcache.c (init_register_cache): New.
7087 (new_register_cache): Use it.
7088 (regcache_cpy): New.
7089 (register_cache_size): New.
7090 (supply_regblock): New.
7091 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7092
219f2f23
PA
7093 * tracepoint.c: New.
7094
7095 * Makefile.in (OBS): Add tracepoint.o.
7096 (tracepoint.o): New rule.
7097
3a13a53b
L
70982010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7099
7100 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7101 (i386-mmx.o): New.
7102 (i386-mmx.c): Likewise.
7103 (i386-mmx-linux.o): Likewise.
7104 (i386-mmx-linux.c): Likewise.
7105
7106 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7107 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7108 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7109 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7110
7111 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7112 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7113 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7114
1570b33e
L
71152010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7116
7117 * Makefile.in (clean): Updated.
7118 (i386-avx.o): New.
7119 (i386-avx.c): Likewise.
7120 (i386-avx-linux.o): Likewise.
7121 (i386-avx-linux.c): Likewise.
7122 (amd64-avx.o): Likewise.
7123 (amd64-avx.c): Likewise.
7124 (amd64-avx-linux.o): Likewise.
7125 (amd64-avx-linux.c): Likewise.
7126
7127 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7128 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7129 (srv_amd64_regobj): Add amd64-avx.o.
7130 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7131 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7132 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7133 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7134 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7135 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7136 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7137
7138 * i387-fp.c: Include "i386-xstate.h".
7139 (i387_xsave): New.
7140 (i387_cache_to_xsave): Likewise.
7141 (i387_xsave_to_cache): Likewise.
7142 (x86_xcr0): Likewise.
7143
7144 * i387-fp.h (i387_cache_to_xsave): Likewise.
7145 (i387_xsave_to_cache): Likewise.
7146 (x86_xcr0): Likewise.
7147
7148 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7149 * linux-crisv32-low.c (target_regsets): Likewise.
7150 * linux-m68k-low.c (target_regsets): Likewise.
7151 * linux-mips-low.c (target_regsets): Likewise.
7152 * linux-ppc-low.c (target_regsets): Likewise.
7153 * linux-s390-low.c (target_regsets): Likewise.
7154 * linux-sh-low.c (target_regsets): Likewise.
7155 * linux-sparc-low.c (target_regsets): Likewise.
7156 * linux-xtensa-low.c (target_regsets): Likewise.
7157
7158 * linux-low.c: Include <sys/uio.h>.
7159 (regsets_fetch_inferior_registers): Support nt_type.
7160 (regsets_store_inferior_registers): Likewise.
7161 (linux_process_qsupported): New.
7162 (linux_target_ops): Add linux_process_qsupported.
7163
7164 * linux-low.h (regset_info): Add nt_type.
7165 (linux_target_ops): Add process_qsupported.
7166
7167 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7168 and <sys/uio.h>.
7169 (init_registers_i386_avx_linux): New.
7170 (init_registers_amd64_avx_linux): Likewise.
7171 (xmltarget_i386_linux_no_xml): Likewise.
7172 (xmltarget_amd64_linux_no_xml): Likewise.
7173 (PTRACE_GETREGSET): Likewise.
7174 (PTRACE_SETREGSET): Likewise.
7175 (x86_fill_xstateregset): Likewise.
7176 (x86_store_xstateregset): Likewise.
7177 (use_xml): Likewise.
7178 (x86_linux_update_xmltarget): Likewise.
7179 (x86_linux_process_qsupported): Likewise.
7180 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7181 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7182 init_registers_i386_linux here. Call
7183 x86_linux_update_xmltarget.
7184 (the_low_target): Add x86_linux_process_qsupported.
7185
7186 * server.c (handle_query): Call target_process_qsupported.
7187
7188 * target.h (target_ops): Add process_qsupported.
7189 (target_process_qsupported): New.
7190
fc7238bb
PA
71912010-04-03 Pedro Alves <pedro@codesourcery.com>
7192
7193 * inferiors.c (add_thread): Set last_status kind to
7194 TARGET_WAITKIND_IGNORE.
7195 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7196 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7197 (linux_wait_1): Move `thread' local definition to block that uses
7198 it. Don't NULL initialize `event_child'.
7199 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7200 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7201 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7202
bdabb078
PA
72032010-04-01 Pedro Alves <pedro@codesourcery.com>
7204
7205 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7206 an extended waitstatus, or by a watchpoint.
7207 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7208 thread was stepping or has been stopped by a watchpoint.
7209
d3bbe7a0
PA
72102010-04-01 Pedro Alves <pedro@codesourcery.com>
7211
7212 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7213 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7214 of another, then delete the previous, and validate all
7215 breakpoints.
7216 (validate_inserted_breakpoint): New.
7217 (delete_disabled_breakpoints): New.
7218 (validate_breakpoints): New.
7219 (check_mem_read): Validate breakpoints before trusting their
7220 shadow. Delete disabled breakpoints.
7221 (check_mem_write): Validate breakpoints before trusting they
7222 should be inserted. Delete disabled breakpoints.
7223 * mem-break.h (validate_breakpoints):
7224 * server.c (handle_query): Validate breakpoints when we see a
7225 qSymbol query.
7226
8b07ae33
PA
72272010-04-01 Pedro Alves <pedro@codesourcery.com>
7228
7229 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7230 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7231 if we could tell there's a GDB breakpoint at stop_pc.
7232 (need_step_over_p): Don't do a step over if we find a GDB
7233 breakpoint at the resume PC.
7234
7235 * mem-break.c (struct raw_breakpoint): New.
7236 (enum bkpt_type): New type `gdb_breakpoint'.
7237 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7238 fields. New field `raw'.
7239 (find_raw_breakpoint_at): New.
7240 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7241 breakpoint instead.
7242 (set_breakpoint_at): Adjust.
7243 (delete_raw_breakpoint): New.
7244 (release_breakpoint): New.
7245 (delete_breakpoint): Rename to...
7246 (delete_breakpoint_1): ... this. Add proc parameter. Use
7247 release_breakpoint. Return ENOENT.
7248 (delete_breakpoint): Reimplement.
7249 (find_breakpoint_at): Delete.
7250 (find_gdb_breakpoint_at): New.
7251 (delete_breakpoint_at): Delete.
7252 (set_gdb_breakpoint_at): New.
7253 (delete_gdb_breakpoint_at): New.
7254 (gdb_breakpoint_here): New.
7255 (set_reinsert_breakpoint): Use release_breakpoint.
7256 (uninsert_breakpoint): Rename to ...
7257 (uninsert_raw_breakpoint): ... this.
7258 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7259 (reinsert_raw_breakpoint): Change parameter type to
7260 raw_breakpoint.
7261 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7262 instead.
7263 (check_breakpoints): Adjust. Use release_breakpoint.
7264 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7265 (breakpoint_inserted_here): Ditto.
7266 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7267 Don't trust the breakpoint's shadow if it is not inserted.
7268 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7269 (delete_all_breakpoints): Adjust.
7270 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7271 use delete_breakpoint_1.
7272
7273 * mem-break.h (breakpoints_supported): Delete declaration.
7274 (set_gdb_breakpoint_at): Declare.
7275 (gdb_breakpoint_here): Declare.
7276 (delete_breakpoint_at): Delete.
7277 (delete_gdb_breakpoint_at): Declare.
7278
7279 * server.h (struct raw_breakpoint): Forward declare.
7280 (struct process_info): New field `raw_breakpoints'.
7281
7282 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7283 breakpoints.
7284
6bf5e0ba
PA
72852010-03-24 Pedro Alves <pedro@codesourcery.com>
7286
7287 * linux-low.c (status_pending_p_callback): Fix comment.
7288 (linux_wait_for_event_1): Move most of the internal breakpoint
7289 handling from here...
7290 (linux_wait_1): ... to here.
7291 (count_events_callback): New.
7292 (select_singlestep_lwp_callback): New.
7293 (select_event_lwp_callback): New.
7294 (cancel_breakpoints_callback): New.
7295 (select_event_lwp): New.
7296 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7297 priority to all LWPs that have had events that should be reported
7298 to the client. Cancel breakpoints when about to reporting the
7299 event to the client, not while stopping lwps. No longer cancel
7300 finished single-steps here.
7301 (cancel_finished_single_step): Delete.
7302 (cancel_finished_single_steps): Delete.
7303
414a389f
PA
73042010-03-24 Pedro Alves <pedro@codesourcery.com>
7305
7306 * mem-break.c (enum bkpt_type): New.
7307 (struct breakpoint): New field `type'.
7308 (set_breakpoint_at): Change return type to struct breakpoint
7309 pointer. Set type to `other_breakpoint' by default.
7310 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7311 in the breakpoint list.
7312 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7313 (reinsert_breakpoint): Rename to ...
7314 (reinsert_raw_breakpoint): ... this.
7315 (reinsert_breakpoints_at): Adjust.
7316 * mem-break.h (struct breakpoint): Declare.
7317 (set_breakpoint_at): Change return type to struct breakpoint
7318 pointer.
7319
2280c721
PA
73202010-03-24 Pedro Alves <pedro@codesourcery.com>
7321
7322 * server.c (handle_query): Assign, not compare.
7323
d50171e4
PA
73242010-03-24 Pedro Alves <pedro@codesourcery.com>
7325
7326 Teach linux gdbserver to step-over-breakpoints.
7327
7328 * linux-low.c (can_hardware_single_step): New.
7329 (supports_breakpoints): New.
7330 (handle_extended_wait): If stopping threads, read the stop pc of
7331 the new cloned LWP.
7332 (get_pc): New.
7333 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7334 low target doesn't support retrieving the PC.
7335 (add_lwp): Set last_resume_kind to resume_continue.
7336 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7337 (linux_attach): Don't clear stop_expected. Set the lwp's
7338 last_resume_kind to resume_stop.
7339 (linux_detach_one_lwp): Don't check for removed breakpoints.
7340 (check_removed_breakpoint): Delete.
7341 (status_pending_p): Rename to ...
7342 (status_pending_p_callback): ... this. Don't check for removed
7343 breakpoints. Don't consider threads that are stopped from GDB's
7344 perspective.
7345 (linux_wait_for_lwp): Always read the stop_pc here.
7346 (cancel_breakpoint): New.
7347 (step_over_bkpt): New global.
7348 (linux_wait_for_event_1): Implement stepping over breakpoints.
7349 (gdb_wants_lwp_stopped): New.
7350 (gdb_wants_all_stopped): New.
7351 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7352 single-step traps here. Store the thread's last reported target
7353 wait status.
7354 (send_sigstop): Don't clear stop_expected. Always set it,
7355 instead.
7356 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7357 (cancel_finished_single_step): New.
7358 (cancel_finished_single_steps): New.
7359 (wait_for_sigstop): Don't cancel finished single-step traps here.
7360 (linux_resume_one_lwp): Don't check for removed breakpoints.
7361 Don't set `step' on non-hardware step archs.
7362 (linux_set_resume_request): Ignore resume_stop requests if already
7363 stopping or stopped. Set the lwp's last_resume_kind.
7364 (resume_status_pending_p): Don't check for removed breakpoints.
7365 (need_step_over_p): New.
7366 (start_step_over): New.
7367 (finish_step_over): New.
7368 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7369 requests. Clear the thread's last reported target waitstatus.
7370 Don't use the `suspended' flag. Don't consider pending breakpoints.
7371 (linux_resume): Start a step-over if necessary.
7372 (proceed_one_lwp): New.
7373 (proceed_all_lwps): New.
7374 (unstop_all_lwps): New.
7375 * linux-low.h (struct lwp_info): Rewrite comment for the
7376 `suspended' flag. Add the `stop_pc' field. Delete the
7377 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7378 Add `'last_resume_kind' and `need_step_over' fields.
7379 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7380 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7381 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7382 (set_raw_breakpoint_at): New.
7383 (set_breakpoint_at): Rewrite to use it.
7384 (reinsert_breakpoint_handler): Delete.
7385 (set_reinsert_breakpoint): New.
7386 (reinsert_breakpoint_by_bp): Delete.
7387 (delete_reinsert_breakpoints): New.
7388 (uninsert_breakpoint): Rewrite.
7389 (uninsert_breakpoints_at): New.
7390 (reinsert_breakpoint): Rewrite.
7391 (reinsert_breakpoints_at): New.
7392 (check_breakpoints): Rewrite.
7393 (breakpoint_here): New.
7394 (breakpoint_inserted_here): New.
7395 (check_mem_read): Adjust.
7396 * mem-break.h (breakpoints_supported, breakpoint_here)
7397 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7398 (reinsert_breakpoint_by_bp): Delete declaration.
7399 (delete_reinsert_breakpoints): Declare.
7400 (reinsert_breakpoint): Delete declaration.
7401 (reinsert_breakpoints_at): Declare.
7402 (uninsert_breakpoint): Delete declaration.
7403 (uninsert_breakpoints_at): Declare.
7404 (check_breakpoints): Adjust prototype.
7405 * server.h: Adjust include order.
7406 (struct thread_info): Declare here. Add a `last_status' field.
7407
30ba68cb
MS
74082010-03-23 Michael Snyder <msnyder@vmware.com>
7409
7410 * server.c (crc32): New function.
7411 (handle_query): Add handling for 'qCRC:' request.
7412
b9a881c2
PA
74132010-03-23 Pedro Alves <pedro@codesourcery.com>
7414
7415 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7416 lwp had been stopped by a watchpoint.
7417
e92d13d5
PA
74182010-03-16 Pedro Alves <pedro@codesourcery.com>
7419
7420 * server.h (internal_error): Declare.
7421 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7422 * utils.c (internal_error): New function.
7423
64daa791
AS
74242010-03-15 Andreas Schwab <schwab@redhat.com>
7425
7426 * configure.srv: Fix typo setting srv_regobj.
7427
f52cd8cd
PA
74282010-03-15 Pedro Alves <pedro@codesourcery.com>
7429
7430 * linux-low.c (fetch_register): Avoid passing a non string literal
7431 format to `error'.
7432 (usr_store_inferior_registers): Ditto.
7433
93ae6fdc
PA
74342010-03-14 Pedro Alves <pedro@codesourcery.com>
7435
7436 * linux-low.c (linux_write_memory): Bail out early if peeking
7437 memory failed.
7438
c3adc08c
PA
74392010-03-14 Pedro Alves <pedro@codesourcery.com>
7440
7441 * linux-low.h (struct lwp_info): New fields
7442 `stopped_by_watchpoint' and `stopped_data_address'.
7443 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7444 here, and cache them in the lwp object.
7445 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7446 directly.
7447 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7448 field.
7449 (linux_stopped_by_watchpoint): Rewrite.
7450 (linux_stopped_data_address): Rewrite.
7451
bce522a2
PA
74522010-03-06 Simo Melenius <simo.melenius@iki.fi>
7453
7454 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7455 switching the current inferior, not before.
7456
90884b2b
L
74572010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7458
7459 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7460 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7461 i386-linux.c and amd64-linux.c.
7462 (reg-i386.o): Removed.
7463 (reg-i386.c): Likewise.
7464 (reg-i386-linux.o): Likewise.
7465 (reg-i386-linux.c): Likewise.
7466 (reg-x86-64.o): Likewise.
7467 (reg-x86-64.c): Likewise.
7468 (reg-x86-64-linux.o): Likewise.
7469 (reg-x86-64-linux.c): Likewise.
7470 (i386.o): New.
7471 (i386.c): Likewise.
7472 (i386-linux.o): Likewise.
7473 (i386-linux.c): Likewise.
7474 (amd64.o): Likewise.
7475 (amd64.c): Likewise.
7476 (amd64-linux.o): Likewise.
7477 (amd64-linux.c): Likewise.
7478
7479 * configure.srv (srv_i386_regobj): New.
7480 (srv_i386_linux_regobj): Likewise.
7481 (srv_amd64_regobj): Likewise.
7482 (srv_amd64_linux_regobj): Likewise.
7483 (srv_i386_32bit_xmlfiles): Likewise.
7484 (srv_i386_64bit_xmlfiles): Likewise.
7485 (srv_i386_xmlfiles): Likewise.
7486 (srv_amd64_xmlfiles): Likewise.
7487 (srv_i386_linux_xmlfiles): Likewise.
7488 (srv_amd64_linux_xmlfiles): Likewise.
7489 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7490 srv_xmlfiles to $srv_i386_xmlfiles.
7491 (i[34567]86-*-mingw32ce*): Likewise.
7492 (i[34567]86-*-mingw*): Likewise.
7493 (i[34567]86-*-nto*): Likewise.
7494 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7495 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7496 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7497 (x86_64-*-linux*): Likewise.
7498
7499 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7500 (init_registers_amd64_linux): New.
7501 (x86_arch_setup): Replace init_registers_x86_64_linux with
7502 init_registers_amd64_linux.
7503
193f13e6
MK
75042010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7505
7506 * configure.ac: Check for libdl. If it is not available link against
7507 static libthread_db.
7508 * configure: Regenerate.
7509
85d721b8
PA
75102010-02-22 Pedro Alves <pedro@codesourcery.com>
7511
7512 PR9605
7513
7514 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7515 handing a read watchpoint.
7516 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7517
6076632b
DE
75182010-02-12 Doug Evans <dje@google.com>
7519
7520 * linux-low.c (linux_supports_tracefork_flag): Document.
7521 (linux_look_up_symbols): Add comment.
7522
3327ccf7
L
75232010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7524
7525 * regcache.c (supply_register): Clear regcache if buf is NULL.
7526
0718675c 75272010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7528 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7529
7530 * inferiors.c (find_inferior): Add function documentation.
7531 (unloaded_dll): Handle the case where the unloaded dll has not
7532 been previously registered in the dll list.
7533
177321bd
DJ
75342010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7535
7536 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7537 (thumb2_breakpoint): New.
7538 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7539
2b009048
DJ
75402010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7541
7542 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7543 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7544 breakpoints.
7545
3be029c7
PA
75462010-01-21 Pedro Alves <pedro@codesourcery.com>
7547
7548 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7549
18f5de3b
JK
75502010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7551
7552 * linux-s390-low.c (s390_collect_ptrace_register)
7553 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7554
3743bb4f
DE
75552010-01-21 Doug Evans <dje@google.com>
7556
14ce3065
DE
7557 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7558 (PTRACE_ARG4_TYPE): New macro.
7559 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7560 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7561 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7562 (usr_store_inferior_registers): Ditto.
7563 (linux_read_memory, linux_write_memory): Ditto.
7564 (linux_test_for_tracefork): Ditto.
7565
3743bb4f
DE
7566 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7567 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7568
8b315be5
PA
75692010-01-21 Pedro Alves <pedro@codesourcery.com>
7570
7571 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7572 target.
7573
85492558
PA
75742010-01-21 Pedro Alves <pedro@codesourcery.com>
7575
7576 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7577 prototype to take a regcache. Adjust.
7578
442ea881
PA
75792010-01-20 Pedro Alves <pedro@codesourcery.com>
7580
7581 * regcache.h (struct thread_info): Forward declare.
7582 (struct regcache): New.
7583 (new_register_cache): Adjust prototype.
7584 (get_thread_regcache): Declare.
7585 (free_register_cache): Adjust prototype.
7586 (registers_to_string, registers_from_string): Ditto.
7587 (supply_register, supply_register_by_name, collect_register)
7588 (collect_register_as_string, collect_register_by_name): Ditto.
7589 * regcache.c (struct inferior_regcache_data): Delete.
7590 (get_regcache): Rename to ...
7591 (get_thread_regcache): ... this. Adjust. Switch inferior before
7592 fetching registers.
7593 (regcache_invalidate_one): Adjust.
7594 (regcache_invalidate): Fix prototype.
7595 (new_register_cache): Return the new register cache.
7596 (free_register_cache): Change prototype.
7597 (realloc_register_cache): Adjust.
7598 (registers_to_string): Change prototype to take a regcache. Adjust.
7599 (registers_from_string): Ditto.
7600 (register_data): Ditto.
7601 (supply_register): Ditto.
7602 (supply_register_by_name): Ditto.
7603 (collect_register): Ditto.
7604 (collect_register_as_string): Ditto.
7605 (collect_register_by_name): Ditto.
7606 * server.c (process_serial_event): Adjust.
7607 * linux-low.h (regset_fill_func, regset_store_func): Change
7608 prototype.
7609 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7610 Change prototype.
7611 * linux-low.c (get_stop_pc): Adjust.
7612 (check_removed_breakpoint): Adjust.
7613 (linux_wait_for_event): Adjust.
7614 (linux_resume_one_lwp): Adjust.
7615 (fetch_register): Add regcache parameter. Adjust.
7616 (usr_store_inferior_registers): Ditto.
7617 (regsets_fetch_inferior_registers): Ditto.
7618 (regsets_store_inferior_registers): Ditto.
7619 (linux_fetch_registers, linux_store_registers): Ditto.
7620 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7621 regcache. Adjust.
43aaf8b6
PA
7622 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7623 Ditto.
442ea881
PA
7624 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7625 prototype to take a regcache.
7626 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7627 * remote-utils.c (convert_ascii_to_int, outreg)
7628 (prepare_resume_reply): Change prototype to take a regcache.
7629 Adjust.
7630 * target.h (struct target_ops) <fetch_registers, store_registers>:
7631 Change prototype to take a regcache.
7632 (fetch_inferior_registers, store_inferior_registers): Change
7633 prototype to take a regcache. Adjust.
7634 * proc-service.c (ps_lgetregs): Adjust.
7635 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7636 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7637 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7638 take a regcache. Adjust.
7639 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7640 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7641 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7642 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7643 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7644 (cris_cannot_fetch_register):
7645 (cris_breakpoint_at): Change prototype to take a regcache.
7646 Adjust.
7647 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7648 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7649 to take a regcache. Adjust.
7650 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7651 Adjust.
7652 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7653 take a regcache. Adjust.
7654 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7655 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7656 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7657 * linux-mips-low.c (mips_get_pc):
7658 (mips_set_pc): Change prototype to take a regcache. Adjust.
7659 (mips_reinsert_addr): Adjust.
7660 (mips_collect_register): Change prototype to take a regcache.
7661 Adjust.
7662 (mips_supply_register):
7663 (mips_collect_register_32bit, mips_supply_register_32bit)
7664 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7665 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7666 * linux-ppc-low.c (ppc_supply_ptrace_register)
7667 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7668 (parse_spufs_run): Adjust.
7669 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7670 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7671 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7672 take a regcache. Adjust.
7673 * linux-s390-low.c (s390_collect_ptrace_register)
7674 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7675 (s390_set_pc): Change prototype to take a regcache. Adjust.
7676 (s390_arch_setup): Adjust.
7677 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7678 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7679 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7680 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7681 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7682 regcache. Adjust.
7683 (sparc_breakpoint_at): Adjust.
7684 * linux-xtensa-low.c (xtensa_fill_gregset):
7685 (xtensa_store_gregset):
7686 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7687 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7688 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7689 prototype to take a regcache. Adjust.
7690 * win32-arm-low.c (arm_fetch_inferior_register)
7691 (arm_store_inferior_register): Change prototype to take a
7692 regcache. Adjust.
7693 * win32-i386-low.c (i386_fetch_inferior_register)
7694 (i386_store_inferior_register): Change prototype to take a
7695 regcache. Adjust.
7696 * win32-low.c (child_fetch_inferior_registers)
7697 (child_store_inferior_registers): Change prototype to take a
7698 regcache. Adjust.
7699 (win32_wait): Adjust.
7700 (win32_fetch_inferior_registers): Change prototype to take a
7701 regcache. Adjust.
7702 (win32_store_inferior_registers): Adjust.
7703 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7704 store_inferior_register>: Change prototype to take a regcache.
7705
60c3d7b0
DE
77062010-01-20 Doug Evans <dje@google.com>
7707
7708 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7709 #ifdef.
7710 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7711 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7712
dc146f7c
VP
77132010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7714
7715 * linux-low.c (linux_core_of_thread): New.
7716 (compare_ints, show_process, list_threads): New.
7717 (linux_qxfer_osdata): Report threads and cores.
7718 (linux_target_op): Register linux_core_of_thread.
7719 * remote-utils.c (prepare_resume_reply): Report the core.
7720 (buffer_xml_printf): Support %d specifier.
7721 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7722 New.
7723 (handle_query): Handle qXfer:threads. Announce availability
7724 thereof.
7725 * target.h (struct target_ops): New field core_of_thread.
7726
7803799a
UW
77272010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7728
7729 * Makefile.in (clean): Remove new generated files.
7730 (reg-s390.o, reg-s390.c): Remove rules.
7731 (reg-s390x.o, reg-s390x.c): Likewise.
7732 (s390-linux32.o, s390-linux32.c): Add rules.
7733 (s390-linux64.o, s390-linux64.c): Likewise.
7734 (s390x-linux64.o, s390x-linux64.c): Likewise.
7735 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7736 * linux-s390-low.c: Include <elf.h>.
7737 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7738 (init_registers_s390): Remove prototype.
7739 (init_registers_s390x): Likewise.
7740 (init_registers_s390_linux32): Add prototype.
7741 (init_registers_s390_linux64): Likewise.
7742 (init_registers_s390x_linux64): Likewise.
7743 (s390_num_regs_3264): New define.
7744 (s390_regmap_3264): New global variable.
7745 (s390_cannot_fetch_register): Remove obsolete check.
7746 (s390_cannot_store_register): Likewise.
7747 (s390_collect_ptrace_register): Handle upper/lower register halves.
7748 (s390_supply_ptrace_register): Likewise.
7749 (s390_fill_gregset): Update to register number changes.
7750 (s390_get_hwcap): New routine.
7751 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7752 Install appropriate regmap and register set.
7753
6e7ffa39
JB
77542010-01-01 Joel Brobecker <brobecker@adacore.com>
7755
7756 * server.c (gdbserver_version): Update copyright year to 2010.
7757 * gdbreplay.c (gdbreplay_version): Likewise.
7758
957f3f49
DE
77592009-12-28 Doug Evans <dje@google.com>
7760
7761 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7762 elf/external.h. Include <elf.h> instead but only if necessary.
7763
ca5c370d
PA
77642009-12-28 Pedro Alves <pedro@codesourcery.com>
7765
7766 * linux-low.c (linux_remove_process): Remove `detaching'
7767 parameter. Don't release/detach from thread_db here.
7768 (linux_kill): Release/detach from thread_db here, ...
7769 (linux_detach): ... and here, before actually detaching.
7770 (linux_wait_1): ... and here, when a process exits.
7771 * thread-db.c (any_thread_of): New.
7772 (thread_db_free): Switch the current inferior to a thread of the
7773 passed in process.
7774
4ee62156
DE
77752009-12-21 Doug Evans <dje@google.com>
7776
d90e6a88
DE
7777 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7778
c5f62d5f
DE
7779 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7780 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7781 warning ifndef __NR_tkill. Move setting of errno there too.
7782 Delete unnecessary resetting of errno after syscall.
7783 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7784
10e86dd7
DE
7785 * configure.ac: Check for dladdr.
7786 * config.in: Regenerate.
7787 * configure: Regenerate.
7788 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7789 (try_thread_db_load): Update.
7790
4ee62156
DE
7791 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7792
00f515da
DE
77932009-12-18 Doug Evans <dje@google.com>
7794
e9464885
DE
7795 * event-loop.c: Include unistd.h if it exists.
7796
07d4f67e
DE
7797 * linux-low.c (my_waitpid): Move definition away from being in
7798 between linux_tracefork_child/linux_test_for_tracefork.
7799
00f515da
DE
7800 * gdb_proc_service.h (psaddr_t): Fix type.
7801 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7802 signature to match glibc.
7803
1de1badb
DE
78042009-12-16 Doug Evans <dje@google.com>
7805
7806 * linux-low.c (linux_read_memory): Fix argument to read.
7807
aeeb81d1
PA
78082009-11-26 Pedro Alves <pedro@codesourcery.com>
7809
7810 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7811 events, don't leave current_inferior pointing at null.
7812
10357975
PA
78132009-11-26 Pedro Alves <pedro@codesourcery.com>
7814
7815 * win32-low.c (LOG): Delete.
7816 (OUTMSG): Output to stderr.
7817 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7818 on compile time LOG macro.
7819 (win32_wait): Fix debug output.
7820
cf6e3471
PA
78212009-11-26 Pedro Alves <pedro@codesourcery.com>
7822
7823 * win32-low.c (win32_add_one_solib): If the dll name is
7824 "ntdll.dll", prepend the system directory to the dll path.
7825
0c85e18e
MK
78262009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7827
7828 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7829
9ac544ce 78302009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7831 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7832
7833 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7834 * configure.ac: Check for __mcoldfire__ and set
7835 gdb_cv_m68k_is_coldfire.
7836 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7837 reg-cf.o and reg-m68k.o.
7838 * configure: Regenerated.
7839
fd7dd3e6
PA
78402009-11-16 Pedro Alves <pedro@codesourcery.com>
7841
7842 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7843 Pass it to thread_db_free.
7844 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7845 proper `detaching' argument to linux_remove_process.
7846 * linux-low.h (thread_db_free): Add `detaching' parameter.
7847 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7848 to thread_db_free.
7849 (thread_db_free): Add `detaching' parameter. Only
7850 call td_ta_clear_event if detaching from process.
7851
75aa492e
MK
78522009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7853
7854 * thread-db.c (thread_db_free): Fix typo.
7855
21e1bee4
PP
78562009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7857
7858 PR gdb/10838
7859 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7860
8838b45e
NS
78612009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7862
7863 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7864 with an i686 compiler.
7865 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7866 needed.
7867 * configure: Rebuilt.
7868
8a35fb51
SL
78692009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7870
7871 PR gdb/10783
7872
7873 * server.c (handle_search_memory_1): Correct read_addr initialization
7874 in loop for searching subsequent chunks.
7875
96f15937
PP
78762009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7877
7878 * configure.ac: New --with-libthread-db option.
7879 * thread-db.c: Allow direct dependence on libthread_db.
7880 (thread_db_free): Adjust.
7881 * config.in: Regenerate.
7882 * configure: Likewise.
889bf7c5 7883
5f7d1694
PP
78842009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7885
7886 PR gdb/10757
7887 * thread-db.c (attach_thread): New function.
7888 (maybe_attach_thread): Return success/failure.
7889 (find_new_threads_callback): Adjust.
889bf7c5
PA
7890 (thread_db_find_new_threads): Loop until no new threads.
7891
88e3b899
PA
78922009-10-13 Pedro Alves <pedro@codesourcery.com>
7893
7894 * proc-service.c (ps_lgetregs): Formatting.
7895
cdbfd419
PP
78962009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7897
7898 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7899 * configure.ac: Adjust.
7900 * linux-low.h (struct process_info_private): Move members to struct
7901 thread_db.
7902 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7903 * linux-low.c (linux_remove_process): Adjust.
7904 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7905 * server.c (handle_query): Move code ...
7906 (handle_monitor_command): ... here. New function.
7907 * target.h (struct target_ops): New member.
7908 * thread-db.c (struct thread_db): New.
7909 (libthread_db_search_path): New variable.
7910 (thread_db_create_event, thread_db_enable_reporting)
7911 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7912 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7913 (try_thread_db_load_1, dladdr_to_soname): New functions.
7914 (try_thread_db_load, thread_db_load_search): New functions.
7915 (thread_db_init): Search for libthread_db.
7916 (thread_db_free): New function.
7917 (thread_db_handle_monitor_command): Likewise.
7918 * config.in: Regenerate.
7919 * configure: Regenerate.
889bf7c5 7920
4168d2d6
UW
79212009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7922
7923 * spu-low.c (spu_kill): Wait for inferior to terminate.
7924 Call clear_inferiors.
7925 (spu_detach): Call clear_inferiors.
7926
81ecdfbb
RW
79272009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7928
7929 * aclocal.m4: Regenerate.
7930 * config.in: Likewise.
7931 * configure: Likewise.
7932
0b9ff2c0
UW
79332009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7934
7935 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7936 (parse_spufs_run): New function.
7937 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7938 (ppc_breakpoint_at): Handle SPU breakpoints.
7939
efcbbd14
UW
79402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7941
7942 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7943 (SPUFS_MAGIC): Define.
7944 (spu_enumerate_spu_ids): New function.
7945 (linux_qxfer_spu): New function.
7946 (linux_target_ops): Install linux_qxfer_spu.
7947
f4d9bade
UW
79482009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7949
7950 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7951 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7952 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7953 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7954 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7955 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7956 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7957 (init_registers_powerpc_cell32l): Add prototype.
7958 (init_registers_powerpc_cell64l): Likewise.
7959 (ppc_arch_setup): Detect Cell/B.E. architecture.
7960
96e946ca
RW
79612009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7962
7963 * Makefile.in (datarootdir): New variable.
7964
58d6951d
DJ
79652009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7966
7967 * linux-low.c (linux_write_memory): Update debugging output.
7968 * Makefile.in (clean): Add new descriptions.
7969 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7970 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7971 * configure.srv: Add new files for arm*-*-linux*.
7972 * linux-arm-low.c: Add new declarations.
7973 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7974 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7975 (HWCAP_VFPv3D16): New.
7976 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7977 instead of __IWMMXT__.
7978 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7979 (arm_arch_setup): New.
7980 (target_regsets): Remove #ifdef. Add VFP regset.
7981 (the_low_target): Use arm_arch_setup.
7982
12b42a12
DJ
79832009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7984
7985 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7986 the main thread again.
7987
ac8c974e
AR
79882009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7989
7990 Adding Neutrino gdbserver.
7991 * configure: Regenerated.
7992 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7993 * configure.srv (i[34567]86-*-nto*): New target.
7994 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7995 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7996 (nto_comctrl) [__QNX__]: New function.
7997 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7998
4424e0c3 79992009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8000
8001 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8002 srv_tgtobj.
8003
912cf4ba
PA
80042009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8005 Pedro Alves <pedro@codesourcery.com>
8006
8007 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8008 don't support CONTEXT_EXTENDED_REGISTERS.
8009 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8010 (the_low_target): Install them.
8011 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8012 failing with ERROR_PIPE_NOT_CONNECTED.
8013
aa5ca48f
DE
80142009-06-30 Doug Evans <dje@google.com>
8015 Pierre Muller <muller@ics.u-strasbg.fr>
8016
8017 Add h/w watchpoint support to x86-linux, win32-i386.
8018 * Makefile.in (SFILES): Add i386-low.c
8019 (i386_low_h): Define.
8020 (i386-low.o): Add dependencies.
8021 (linux-x86-low.o): Add i386-low.h dependency.
8022 (win32-i386-low.o): Ditto.
8023 * i386-low.c: New file.
8024 * i386-low.h: New file.
8025 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8026 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8027 * linux-low.c (linux_add_process): Initialize arch_private.
8028 (linux_remove_process): Free arch_private.
8029 (add_lwp): Initialize arch_private.
8030 (delete_lwp): Free arch_private.
8031 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8032 provided.
8033 * linux-low.h (process_info_private): New member arch_private.
8034 (lwp_info): New member arch_private.
8035 (linux_target_ops): New members new_process, new_thread,
8036 prepare_to_resume.
8037 (ptid_of): New macro.
8038 * linux-x86-low.c: Include stddef.h, i386-low.h.
8039 (arch_process_info): New struct.
8040 (arch_lwp_info): New struct.
8041 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8042 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8043 (i386_dr_low_get_status): New function.
8044 (x86_insert_point, x86_remove_point): New functions.
8045 (x86_stopped_by_watchpoint): New function.
8046 (x86_stopped_data_address): New function.
8047 (x86_linux_new_process, x86_linux_new_thread): New functions.
8048 (x86_linux_prepare_to_resume): New function.
8049 (the_low_target): Add entries for insert_point, remove_point,
8050 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8051 prepare_to_resume.
8052 * server.c (debug_hw_points): New global.
8053 (monitor_show_help): Document set debug-hw-points.
8054 (handle_query): Process "set debug-hw-points".
8055 * server.h (debug_hw_points): Declare.
8056 (paddress): Declare.
8057 * utils.c (NUMCELLS, CELLSIZE): New macros.
8058 (get_sell, xsnprintf, paddress): New functions.
8059 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8060 remove_point, stopped_by_watchpoint, stopped_data_address.
8061 * win32-i386-low.c: Include i386-low.h.
8062 (debug_reg_state): Replaces dr.
8063 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8064 (i386_dr_low_get_status): New function.
8065 (i386_insert_point, i386_remove_point): New functions.
8066 (i386_stopped_by_watchpoint): New function.
8067 (i386_stopped_data_address): New function.
8068 (i386_initial_stuff): Update.
8069 (get_thread_context,set_thread_context,i386_thread_added): Update.
8070 (the_low_target): Add entries for insert_point,
8071 remove_point, stopped_by_watchpoint, stopped_data_address.
8072 * win32-low.c (win32_insert_watchpoint): New function.
8073 (win32_remove_watchpoint): New function.
8074 (win32_stopped_by_watchpoint): New function.
8075 (win32_stopped_data_address): New function.
8076 (win32_target_ops): Add entries for insert_watchpoint,
8077 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8078 * win32-low.h (win32_target_ops): New members insert_point,
8079 remove_point, stopped_by_watchpoint, stopped_data_address.
8080
d993e290
PA
80812009-06-25 Pedro Alves <pedro@codesourcery.com>
8082
8083 * server.c (process_serial_event): Re-return unsupported, not
8084 error, if the type isn't recognized. Re-allow supporting only
8085 insert or remove packets. Also call require_running for
8086 breakpoints. Add missing break statement to default case. Tidy.
8087 * target.h (struct target_ops): Rename insert_watchpoint to
8088 insert_point, and remove_watchpoint to remove_point.
8089
8090 * linux-low.h (struct linux_target_ops): Likewise.
8091 * linux-low.c (linux_insert_watchpoint): Rename to ...
8092 (linux_insert_point): ... this. Adjust.
8093 (linux_remove_watchpoint): Rename to ...
8094 (linux_remove_point): ... this. Adjust.
8095 (linux_target_ops): Adjust.
8096 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8097 (cris_insert_point): ... this.
8098 (cris_remove_watchpoint): Rename to ...
8099 (cris_remove_point): ... this.
8100 (the_low_target): Adjust.
8101
0f54c268
PM
81022009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8103
8104 * server.c (handle_v_kill): Pass signal_pid to
8105 kill_inferior if multi_process is zero.
8106
c6314022
AR
81072009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8108
8109 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8110 * target.h (target_ops): Comment for *_watchpoint to make it clear
8111 the functions can get types '0' and '1'.
8112
4463ce24
AR
81132009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8114
8115 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8116 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8117 * regcache.c (get_regcache): Likewise.
8118 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8119 * win32-low.c (child_fetch_inferior_registers): Remove check for
8120 regno 0.
8121
cf8fd78b
PA
81222009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8123 Pedro Alves <pedro@codesourcery.com>
8124
8125 * target.h (struct target_ops) <supports_multi_process>: New
8126 callback.
8127 (target_supports_multi_process): New.
8128 * server.c (handle_query): Even if GDB reports support, only
8129 enable multi-process if the target also supports it. Report
8130 multi-process support only if the target backend supports it.
8131 * linux-low.c (linux_supports_multi_process): New function.
8132 (linux_target_ops): Install it as target_supports_multi_process
8133 callback.
8134
47c0c975
DE
81352009-05-24 Doug Evans <dje@google.com>
8136
e09875d4
DE
8137 Global renaming of find_thread_pid to find_thread_ptid.
8138 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8139 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8140 All callers updated.
8141
e27d73f6
DE
8142 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8143 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8144 directly.
8145
47c0c975
DE
8146 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8147 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8148 (linux_resume_one_lwp): Ditto.
8149
2acc282a
DE
81502009-05-23 Doug Evans <dje@google.com>
8151
8152 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8153 from struct inferior_list_entry * to struct lwp_info *.
8154 All callers updated.
8155
9f1036c1
DE
81562009-05-13 Doug Evans <dje@google.com>
8157
8158 * linux-x86-low.c: Don't include assert.h.
8159 (x86_siginfo_fixup): Use fatal, not assert.
8160 (x86_arch_setup): Fix comment.
8161
d0722149
DE
81622009-05-12 Doug Evans <dje@google.com>
8163
8164 Biarch support for i386/amd64 gdbserver.
8165 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8166 Add linux-x86-low.c.
8167 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8168 (linux-x86-low.o): Add.
8169 * linux-x86-64-low.c: Delete.
8170 * linux-i386-low.c: Delete.
8171 * linux-x86-low.c: New file.
8172 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8173 linux-x86-low.o.
8174 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8175 linux-x86-low.o.
8176 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8177 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8178 (linux_child_pid_to_exec_file): New function.
8179 (elf_64_header_p, elf_64_file_p): New functions.
8180 (siginfo_fixup): New function.
8181 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8182 give target a chance to convert layout.
8183 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8184 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8185
fdeb2a12
DE
81862009-05-07 Doug Evans <dje@google.com>
8187
8188 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8189 (regsets_store_inferior_registers): Ditto.
8190
a6dbe5df
PA
81912009-05-06 Pedro Alves <pedro@codesourcery.com>
8192
8193 PR server/10048
8194
8195 * linux-low.c (must_set_ptrace_flags): Delete.
8196 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8197 of the global.
8198 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8199 `lwp->must_set_ptrace_flags' instead.
ba42693b 8200 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8201 (linux_wait_1): ... not here.
8202
5091eb23
DE
82032009-04-30 Doug Evans <dje@google.com>
8204
9f767825
DE
8205 * inferiors.c (started_inferior_callback): New function.
8206 (attached_inferior_callback): New function.
8207 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8208 * server.c (print_started_pid, print_attached_pid): New functions.
8209 (detach_or_kill_for_exit): New function.
8210 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8211 * server.h (have_started_inferiors_p): Declare.
8212 (have_attached_inferiors_p): Declare.
8213
5091eb23
DE
8214 * inferiors.c (remove_process): Fix memory leak, free process.
8215 * linux-low.c (linux_remove_process): New function.
8216 (linux_kill): Call it instead of remove_process.
8217 (linux_detach, linux_wait_1): Ditto.
8218
155c8968
PA
82192009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8220
8221 * configure.srv: Add x86 Windows CE target.
8222
7fe519cb
UW
82232009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8224
8225 * inferiors.c (get_thread_process): Make global.
8226 * server.h (get_thread_process): Add prototype.
8227 * thread-db.c (find_one_thread): Use get_thread_process
8228 instead of current_process.
8229 (thread_db_get_tls_address): Do not crash if called when
8230 thread layer is not yet initialized.
8231
5472f405
UW
82322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8233
8234 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8235 * spu-low.c (current_tid): Rename to ...
8236 (current_ptid): ... this.
8237 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8238 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8239 ptid_get_lwp (current_ptid) instead of current_tid.
8240 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8241 instead of current_tid. Use find_process_pid to verify pid
8242 argument is valid. Pass proper argument to remove_process.
8243 (spu_thread_alive): Compare current_ptid instead of current_tid.
8244 (spu_resume): Likewise.
8245
55ac2b99
PA
82462009-04-02 Pedro Alves <pedro@codesourcery.com>
8247
8248 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8249 variable.
8250
95954743
PA
82512009-04-01 Pedro Alves <pedro@codesourcery.com>
8252
8253 Implement the multiprocess extensions, and add linux multiprocess
8254 support.
8255
8256 * server.h (ULONGEST): Declare.
8257 (struct ptid, ptid_t): New.
8258 (minus_one_ptid, null_ptid): Declare.
8259 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8260 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8261 (struct inferior_list_entry): Change `id' type from unsigned from
8262 to ptid_t.
8263 (struct sym_cache, struct breakpoint, struct
8264 process_info_private): Forward declare.
8265 (struct process_info): Declare.
8266 (current_process): Declare.
8267 (all_processes): Declare.
8268 (initialize_inferiors): Declare.
8269 (add_thread): Adjust to use ptid_t.
8270 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8271 (add_process, remove_process, find_thread_pid): Declare.
8272 (find_inferior_id): Adjust to use ptid_t.
8273 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8274 (multi_process): Declare.
8275 (push_event): Adjust to use ptid_t.
8276 (read_ptid, write_ptid): Declare.
8277 (prepare_resume_reply): Adjust to use ptid_t.
8278 (clear_symbol_cache): Declare.
8279 * inferiors.c (all_processes): New.
8280 (null_ptid, minus_one_ptid): New.
8281 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8282 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8283 (add_thread): Change unsigned long to ptid. Remove gdb_id
8284 parameter. Adjust.
8285 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8286 (gdb_id_to_thread): Rename to ...
8287 (find_thread_pid): ... this. Change unsigned long to ptid.
8288 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8289 (loaded_dll, pull_pid_from_list): Adjust.
8290 (add_process, remove_process, find_process_pid)
8291 (get_thread_process, current_process, initialize_inferiors): New.
8292 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8293 (struct target_waitstatus) <related_pid>: Ditto.
8294 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8295 return type to int.
8296 (struct target_ops) <join>: Add `pid' argument.
8297 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8298 (struct target_ops) <wait>: Add `ptid' field. Change return type
8299 to ptid.
8300 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8301 (mywait): Add `ptid' argument. Change return type to ptid_t.
8302 (target_pid_to_str): Declare.
8303 * target.c (set_desired_inferior): Adjust to use ptids.
8304 (mywait): Add new `ptid' argument. Adjust.
8305 (target_pid_to_str): New.
8306 * mem-break.h (free_all_breakpoints): Declare.
8307 * mem-break.c (breakpoints): Delelete.
8308 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8309 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8310 to use per-process breakpoint list.
8311 (free_all_breakpoints): New.
8312 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8313 (symbol_cache, all_symbols_looked_up): Delete.
8314 (hexchars): New.
8315 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8316 read_ptid): New.
8317 (prepare_resume_reply): Change ptid argument's type from unsigned
8318 long to ptid_t. Adjust. Implement W;process and X;process.
8319 (free_sym_cache, clear_symbol_cache): New.
8320 (look_up_one_symbol): Adjust to per-process symbol cache. *
8321 * server.c (cont_thread, general_thread, step_thread): Change type
8322 to ptid_t.
8323 (attached): Delete.
8324 (multi_process): New.
8325 (last_ptid): Change type to ptid_t.
8326 (struct vstop_notif) <ptid>: Change type to ptid_t.
8327 (queue_stop_reply, push_event): Change `ptid' argument's type to
8328 ptid_t.
8329 (discard_queued_stop_replies): Add `pid' argument.
8330 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8331 changes. Don't reference the `attached' global.
8332 (attach_inferior): Adjust to mywait interface changes.
8333 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8334 features. Handle and report "multiprocess+". Handle
8335 "qAttached:PID".
8336 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8337 changes.
8338 (handle_v_kill): New.
8339 (handle_v_stopped): Adjust to use target_pid_to_str.
8340 (handle_v_requests): Allow multiple attaches and runs when
8341 multiprocess extensions are in effect. Handle "vKill".
8342 (myresume): Adjust to use ptids.
8343 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8344 (handle_status): Adjust to discard_queued_stop_replies interface
8345 change.
8346 (first_thread_of, kill_inferior_callback)
8347 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8348 (main): Call initialize_inferiors. Adjust to use ptids, killing
8349 and detaching from all inferiors. Handle multiprocess packet
8350 variants.
8351 * linux-low.h: Include gdb_proc_service.h.
8352 (struct process_info_private): New.
8353 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8354 <lwpid_of>: Use ptid_get_lwp.
8355 (get_lwp_thread): Adjust.
8356 (struct lwp_info): Add `dead' member.
8357 (find_lwp_pid): Declare.
8358 * linux-low.c (thread_db_active): Delete.
8359 (new_inferior): Adjust comment.
8360 (inferior_pid): Delete.
8361 (linux_add_process): New.
8362 (handle_extended_wait): Adjust.
8363 (add_lwp): Change unsigned long to ptid.
8364 (linux_create_inferior): Add process to processes table. Adjust
8365 to use ptids. Don't set new_inferior here.
8366 (linux_attach_lwp): Rename to ...
8367 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8368 it. Adjust to use ptids.
8369 (linux_attach_lwp): New.
8370 (linux_attach): Add process to processes table. Don't set
8371 new_inferior here.
8372 (struct counter): New.
8373 (second_thread_of_pid_p, last_thread_of_process_p): New.
8374 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8375 multiple processes.
8376 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8377 processes. Remove process from process table.
8378 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8379 to multiple processes.
8380 (any_thread_of): New.
8381 (linux_detach): Add `pid' argument, and handle it. Remove process
8382 from processes table.
8383 (linux_join): Add `pid' argument. Handle it.
8384 (linux_thread_alive): Change unsighed long argument to ptid_t.
8385 Consider dead lwps as not being alive.
8386 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8387 threads we're not interested in.
8388 (same_lwp, find_lwp_pid): New.
8389 (linux_wait_for_lwp): Change `pid' argument's type from int to
8390 ptid_t. Adjust.
8391 (linux_wait_for_event): Rename to ...
8392 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8393 from int to ptid_t. Adjust.
8394 (linux_wait_for_event): New.
8395 (linux_wait_1): Add `ptid' argument. Change return type to
8396 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8397 that exit from the process table.
8398 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8399 Adjust.
8400 (mark_lwp_dead): New.
8401 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8402 stopping all threads, mark its main lwp as dead.
8403 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8404 ptids.
8405 (fetch_register, usr_store_inferior_registers)
8406 (regsets_fetch_inferior_registers)
8407 (regsets_store_inferior_registers, linux_read_memory)
8408 (linux_write_memory): Inline `inferior_pid'.
8409 (linux_look_up_symbols): Adjust to use per-process
8410 `thread_db_active'.
8411 (linux_request_interrupt): Adjust to use ptids.
8412 (linux_read_auxv): Inline `inferior_pid'.
8413 (initialize_low): Don't reference thread_db_active.
8414 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8415 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8416 (ps_getpid): Return the pid of the current inferior.
8417 * thread-db.c (proc_handle, thread_agent): Delete.
8418 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8419 per-process data.
8420 (find_one_thread): Change argument type to ptid_t. Adjust to
8421 per-process data.
8422 (maybe_attach_thread): Adjust to per-process data and ptids.
8423 (thread_db_find_new_threads): Ditto.
8424 (thread_db_init): Ditto.
8425 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8426 processes table. Adjust to use ptids.
8427 (spu_kill, spu_detach): Adjust interface. Remove process from
8428 processes table.
8429 (spu_join, spu_thread_alive): Adjust interface.
8430 (spu_wait): Adjust interface. Remove process from processes
8431 table. Adjust to use ptids.
8432 * win32-low.c (current_inferior_tid): Delete.
8433 (current_inferior_ptid): New.
8434 (debug_event_ptid): New.
8435 (thread_rec): Take a ptid. Adjust.
8436 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8437 (child_delete_thread): Ditto.
8438 (do_initial_child_stuff): Add `attached' argument. Add process to
8439 processes table.
8440 (child_fetch_inferior_registers, child_store_inferior_registers):
8441 Adjust.
8442 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8443 (win32_attach): Pass 1 to do_initial_child_stuff.
8444 (win32_kill): Adjust interface. Remove process from processes
8445 table.
8446 (win32_detach): Ditto.
8447 (win32_join): Adjust interface.
8448 (win32_thread_alive): Take a ptid.
8449 (win32_resume): Adjust to use ptids.
8450 (get_child_debug_event): Ditto.
8451 (win32_wait): Adjust interface. Remove exiting process from
8452 processes table.
8453
bd99dc85
PA
84542009-04-01 Pedro Alves <pedro@codesourcery.com>
8455
8456 Non-stop mode support.
8457
8458 * server.h (non_stop): Declare.
8459 (gdb_client_data, handler_func): Declare.
8460 (delete_file_handler, add_file_handler, start_event_loop):
8461 Declare.
8462 (handle_serial_event, handle_target_event, push_event)
8463 (putpkt_notif): Declare.
8464 * target.h (enum resume_kind): New.
8465 (struct thread_resume): Replace `step' field by `kind' field.
8466 (TARGET_WNOHANG): Define.
8467 (struct target_ops) <wait>: Add `options' argument.
8468 <supports_non_stop, async, start_non_stop>: New fields.
8469 (target_supports_non_stop, target_async): New.
8470 (start_non_stop): Declare.
8471 (mywait): Add `options' argument.
8472 * target.c (mywait): Add `options' argument. Print child exit
8473 notifications here.
8474 (start_non_stop): New.
8475 * server.c (non_stop, own_buf, mem_buf): New globals.
8476 (struct vstop_notif): New.
8477 (notif_queue): New global.
8478 (queue_stop_reply, push_event, discard_queued_stop_replies)
8479 (send_next_stop_reply): New.
8480 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8481 interface changes.
8482 (attach_inferior): In non-stop mode, don't wait for the target
8483 here.
8484 (handle_general_set): Handle QNonStop.
8485 (handle_query): When handling qC, return the current general
8486 thread, instead of the first thread of the list.
8487 (handle_query): If the backend supports non-stop mode, include
8488 QNonStop+ in the qSupported query response.
8489 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8490 and non-stop mode.
8491 (handle_v_attach, handle_v_run): Handle non-stop mode.
8492 (handle_v_stopped): New.
8493 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8494 (myresume): Adjust to use resume_kind. Handle non-stop.
8495 (queue_stop_reply_callback): New.
8496 (handle_status): Handle non-stop mode.
8497 (main): Clear non_stop flag on reconnection. Use the event-loop.
8498 Refactor serial protocol handling from here ...
8499 (process_serial_event): ... to this new function. When GDB
8500 selects any thread, select one here. In non-stop mode, wait until
8501 GDB acks all pending events before exiting.
8502 (handle_serial_event, handle_target_event): New.
8503 * remote-utils.c (remote_open): Install remote_desc in the event
8504 loop.
8505 (remote_close): Remove remote_desc from the event loop.
8506 (putpkt_binary): Rename to...
8507 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8508 (putpkt_binary): New as wrapper around putpkt_binary_1.
8509 (putpkt_notif): New.
8510 (prepare_resume_reply): In non-stop mode, don't change the
8511 general_thread.
8512 * event-loop.c: New.
8513 * Makefile.in (OBJ): Add event-loop.o.
8514 (event-loop.o): New rule.
8515
8516 * linux-low.h (pid_of): Moved here.
8517 (lwpid_of): New.
8518 (get_lwp_thread): Use lwpid_of.
8519 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8520 * linux-low.c (pid_of): Delete.
8521 (inferior_pid): Use lwpid_of.
8522 (linux_event_pipe): New.
8523 (target_is_async_p): New.
8524 (delete_lwp): New.
8525 (handle_extended_wait): Use lwpid_of.
8526 (add_lwp): Don't set lwpid field.
8527 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8528 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8529 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8530 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8531 first. Adjust to linux_wait_for_event interface changes. Use
8532 lwpid_of.
8533 (linux_detach): Don't delete the main lwp here.
8534 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8535 (status_pending_p): Don't consider explicitly suspended lwps.
8536 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8537 pointer. Add OPTIONS argument. Change return type to int. Use
8538 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8539 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8540 pointer. Add status pointer argument. Return a pid instead of a
8541 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8542 changes. In non-stop mode, don't switch to a random thread.
8543 (linux_wait): Rename to...
8544 (linux_wait_1): ... this. Add target_options argument, and handle
8545 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8546 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8547 clean exit and signal exit code. Don't stop all threads in
8548 non-stop mode. In all-stop mode, only stop all threads when
8549 reporting a stop to GDB. Handle explicit thread stop requests.
8550 (async_file_flush, async_file_mark): New.
8551 (linux_wait): New.
8552 (send_sigstop): Use lwpid_of.
8553 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8554 interface changes. In non-stop mode, don't switch to a random
8555 thread.
8556 (linux_resume_one_lwp): Use lwpid_of.
8557 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8558 (linux_resume_one_thread): ... this. Handle resume_stop. In
8559 non-stop mode, don't look for pending flag in all threads.
8560 (resume_status_pending_p): Don't consider explicitly suspended
8561 threads.
8562 (my_waitpid): Reimplement. Emulate __WALL.
8563 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8564 Use lwpid_of.
8565 (sigchld_handler, linux_supports_non_stop, linux_async)
8566 (linux_start_non_stop): New.
8567 (linux_target_ops): Register linux_supports_non_stop, linux_async
8568 and linux_start_non_stop.
8569 (initialize_low): Install SIGCHLD handler.
8570 * thread-db.c (thread_db_create_event, find_one_thread)
8571 (thread_db_get_tls_address): Use lwpid_of.
8572 * win32-low.c (win32_detach): Adjust to use resume_kind.
8573 (win32_wait): Add `options' argument.
8574 * spu-low.c (spu_resume): Adjust to use resume_kind.
8575 (spu_wait): Add `options' argument.
8576
5b1c542e
PA
85772009-04-01 Pedro Alves <pedro@codesourcery.com>
8578
8579 Decouple target code from remote protocol.
8580
8581 * target.h (enum target_waitkind): New.
8582 (struct target_waitstatus): New.
8583 (struct target_ops) <wait>: Return an unsigned long. Take a
8584 target_waitstatus pointer instead of a char pointer.
8585 (mywait): Likewise.
8586 * target.c (mywait): Change prototype to return an unsigned long.
8587 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8588 * server.h (thread_from_wait, old_thread_from_wait): Delete
8589 declarations.
8590 (prepare_resume_reply): Change prototype to take a
8591 target_waitstatus.
8592 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8593 (last_status, last_ptid): New.
8594 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8595 pid instead of a signal.
8596 (attach_inferior): Remove "status" and "signal" parameters.
8597 Adjust.
8598 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8599 not as an address.
8600 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8601 (handle_v_requests, myresume): Remove "status" and "signal"
8602 parameters. Adjust.
8603 (handle_status): New.
8604 (main): Delete local `status'. Adjust.
8605 * remote-utils.c: Include target.h.
8606 (prepare_resume_reply): Change prototype to take a
8607 target_waitstatus. Adjust.
8608
8609 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8610 interface.
8611 * spu-low.c (spu_wait): Adjust.
8612 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8613 Delete.
8614 (win32_wait): Adjust.
8615
2bd7c093
PA
86162009-04-01 Pedro Alves <pedro@codesourcery.com>
8617
8618 * target.h (struct thread_resume): Delete leave_stopped member.
8619 (struct target_ops): Add a `n' argument to the `resume' callback.
8620 * server.c (start_inferior): Adjust.
8621 (handle_v_cont, myresume): Adjust.
8622 * linux-low.c (check_removed_breakpoint): Adjust to resume
8623 interface change, and to removed leave_stopped field.
8624 (resume_ptr): Delete.
8625 (struct thread_resume_array): New.
8626 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8627 resume interface change.
8628 (linux_continue_one_thread, linux_queue_one_thread)
8629 (resume_status_pending_p): Check if the resume field is NULL
8630 instead of checking the leave_stopped member.
8631 (linux_resume): Adjust to the target resume interface change.
8632 * spu-low.c (spu_resume): Adjust to the target resume interface
8633 change.
8634 * win32-low.c (win32_detach, win32_resume): Ditto.
8635
c35fafde
PA
86362009-04-01 Pedro Alves <pedro@codesourcery.com>
8637
8638 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8639 flag.
8640 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8641 pending.
8642 (linux_continue_one_thread): Only preserve the stepping flag if
8643 there's a pending breakpoint.
8644
0a59d50b
PA
86452009-03-31 Pedro Alves <pedro@codesourcery.com>
8646
8647 * server.c (main): After the inferior having exited, call
8648 remote_close before exiting gdbserver.
8649
f04c6d38
TJB
86502009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8651
8652 Fix size of FPSCR in Power 7 processors.
8653 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8654 (PPC_FEATURE_HAS_DFP): New #define.
8655 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8656 size of the FPSCR.
8657
78e5cee6
PA
86582009-03-23 Pedro Alves <pedro@codesourcery.com>
8659
8660 * server.c (handle_query) Whitespace and formatting.
8661
1b3f6016
PA
86622009-03-22 Pedro Alves <pedro@codesourcery.com>
8663
8664 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8665 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8666 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8667 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8668 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8669 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8670 Makefile.in, configure.ac: Fix whitespace throughout.
8671 * configure: Regenerate.
8672
a07b2135
PA
86732009-03-22 Pedro Alves <pedro@codesourcery.com>
8674
8675 * inferiors.c (find_inferior): Make it safe for the callback
8676 function to delete the currently iterated inferior.
8677
67cc2626
PA
86782009-03-22 Pedro Alves <pedro@codesourcery.com>
8679
8680 * Makefile.in (linuw_low_h): Move higher.
8681 (thread-db.o): Depend on $(linux_low_h).
8682
54a0b537
PA
86832009-03-17 Pedro Alves <pedro@codesourcery.com>
8684
8685 Rename "process" to "lwp" throughout.
8686
8687 * linux-low.c (all_processes): Rename to...
8688 (all_lwps): ... this.
8689 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8690 (add_process): Rename to ...
8691 (add_lwp): ... this. Adjust.
8692 (linux_create_inferior): Adjust.
8693 (linux_attach_lwp): Adjust.
8694 (linux_attach): Adjust.
8695 (linux_kill_one_process): Rename to ...
8696 (linux_kill_one_lwp): ... this. Adjust.
8697 (linux_kill): Adjust.
8698 (linux_detach_one_process): Rename to ...
8699 (linux_detach_one_lwp): ... this. Adjust.
8700 (linux_detach): Adjust.
8701 (check_removed_breakpoint): Adjust.
8702 (status_pending_p): Adjust.
8703 (linux_wait_for_process): Rename to ...
8704 (linux_wait_for_lwp): ... this. Adjust.
8705 (linux_wait_for_event): Adjust.
8706 (send_sigstop): Adjust.
8707 (wait_for_sigstop): Adjust.
8708 (stop_all_processes): Rename to ...
8709 (stop_all_lwps): ... this.
8710 (linux_resume_one_process): Rename to ...
8711 (linux_resume_one_lwp): ... this. Adjust.
8712 (linux_set_resume_request, linux_continue_one_thread)
8713 (linux_queue_one_thread, resume_status_pending_p)
8714 (usr_store_inferior_registers, regsets_store_inferior_registers)
8715 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8716 Adjust.
8717 * linux-low.h (get_process): Rename to ...
8718 (get_lwp): ... this. Adjust.
8719 (get_thread_process): Rename to ...
8720 (get_thread_lwp): ... this. Adjust.
8721 (get_process_thread): Rename to ...
8722 (get_lwp_thread): ... this. Adjust.
8723 (struct process_info): Rename to ...
8724 (struct lwp_info): ... this.
8725 (all_processes): Rename to ...
8726 (all_lwps): ... this.
8727 * proc-service.c (ps_lgetregs): Adjust.
8728 * thread-db.c (thread_db_create_event, find_one_thread)
8729 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8730
0b16c5cf
PA
87312009-03-14 Pedro Alves <pedro@codesourcery.com>
8732
8733 * server.c (handle_query): Handle "qAttached".
8734
32de4b9d
NS
87352009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8736
8737 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8738 GPLv3, update license URL.
8739
2aecd87f
DE
87402009-03-01 Doug Evans <dje@google.com>
8741
93efd302 8742 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8743 (server_h): Add gdb_signals.h.
8744 (signals.o): Update.
8745 * server.h (target_signal_from_host,target_signal_to_host_p)
8746 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8747
86b1f9c5
PM
87482009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8749
8750 * remote-utils.c (getpkt): Also generate remote-debug
8751 information if noack_mode is set.
8752
4aa995e1
PA
87532009-02-06 Pedro Alves <pedro@codesourcery.com>
8754
8755 * server.c (handle_query): Report qXfer:siginfo:read and
8756 qXfer:siginfo:write as supported and handle them.
8757 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8758 * linux-low.c (linux_xfer_siginfo): New.
8759 (linux_target_ops): Set it.
8760
62709adf
PA
87612009-01-26 Pedro Alves <pedro@codesourcery.com>
8762
8763 * server.c (gdbserver_usage): Mention --remote-debug.
8764 (main): Accept '--remote-debug' switch.
8765
aef93bd7
DE
87662009-01-18 Doug Evans <dje@google.com>
8767
8768 * regcache.c (new_register_cache): No need to check result of xcalloc.
8769 * server.c (handle_search_memory): Back out calls to xmalloc,
8770 result is checked and error is returned to user upon failure.
8771 (handle_query): Ditto. Add more checks for result of malloc.
8772 (handle_v_cont): Check result of malloc, report error back to
8773 user upon failure.
8774 (handle_v_run): Ditto. Call freeargv.
8775 * server.h (freeargv): Declare.
8776 * utils.c (freeargv): New fn.
8777
54363045
DE
87782009-01-15 Doug Evans <dje@google.com>
8779
f626972c
DE
8780 * gdbreplay.c (perror_with_name): Make arg const char *.
8781 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8782 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8783 * utils.c (perror_with_name): Make arg const char *.
54363045 8784
18aae699
PA
87852009-01-14 Pedro Alves <pedro@codesourcery.com>
8786
8787 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8788 when handling a EXIT_PROCESS_DEBUG_EVENT.
8789
ff703abe
JB
87902009-01-06 Joel Brobecker <brobecker@adacore.com>
8791
8792 * gdbreplay.c (gdbreplay_version): Update copyright year.
8793 * server.c (gdbserver_version): Likewise.
8794
f21cc1a2 87952009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8796
8797 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8798 (handle_extended_wait): Improve comment.
0e21c1ec 8799
bca929d3
DE
88002008-12-13 Doug Evans <dje@google.com>
8801
8802 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8803 * server.h (ATTR_MALLOC): New macro.
8804 (xmalloc,xcalloc,xstrdup): Declare.
8805 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8806 * inferiors.c: Ditto.
8807 * linux-low.c: Ditto.
8808 * mem-break.c: Ditto.
8809 * regcache.c: Ditto.
8810 * remote-utils.c: Ditto.
8811 * server.c: Ditto.
8812 * target.c: Ditto.
8813 * win32-low.c: Ditto.
8814
97438e3f
DE
88152008-12-12 Doug Evans <dje@google.com>
8816
896c7fbb
DE
8817 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8818 in debugging printf.
8819
97438e3f
DE
8820 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8821
e3b886f8
DE
88222008-12-09 Doug Evans <dje@google.com>
8823
8824 * linux-low.h (struct process_info): Delete member tid, unused.
8825 * thread-db.c (find_one_thread): Update.
8826 (maybe_attach_thread): Update.
8827
07e059b5
VP
88282008-12-02 Pedro Alves <pedro@codesourcery.com>
8829
889bf7c5
PA
8830 * target.h (struct target_ops): Add qxfer_osdata member.
8831 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8832 and dirent.h.
8833 (linux_qxfer_osdata): New functions.
8834 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8835 callback.
8836 * server.c (handle_query): Handle "qXfer:osdata:read:".
8837 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8838 (buffer_xml_printf): New functions.
8839 * server.h (struct buffer): New.
8840 (buffer_grow_str, buffer_grow_str0): New macros.
8841 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8842 (buffer_xml_printf): Declare.
07e059b5 8843
4cab47ab
DE
88442008-11-24 Doug Evans <dje@google.com>
8845
8846 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8847
f142445f
DJ
88482008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8849
8850 * server.c (handle_v_run): Always use the supplied argument list.
8851
d0107bb6 88522008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8853
d0107bb6
BW
8854 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8855 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8856
2c4ad781
TJB
88572008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8858
8859 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8860 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8861 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8862 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8863 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8864 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8865 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8866 XML target descriptions.
8867 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8868 when inferior is running on an ISA 2.05 or later processor. Add
8869 special case to return offset for full 64-bit slot of FPSCR when
8870 in 32-bits.
8871
dfb64f85
DJ
88722008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8873
8874 * Makefile.in (SFILES, clean): Added sparc64 files.
8875 (reg-sparc64.o, reg-sparc64.c): New.
8876 * configure.srv (sparc*-*-linux*): New configuration.
8877 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8878 syscall arguments for SPARC.
8879 (regsets_store_inferior_registers): Likewise.
8880 * linux-sparc-low.c: New file.
8881
66b6e1dd
DE
88822008-10-21 Doug Evans <dje@google.com>
8883
8884 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8885 (READLINE_DIR,READLINE_DEP): Delete.
8886 (INTERNAL_CFLAGS): Update.
8887 (LINTFLAGS): Update.
8888
9b710a42
PA
88892008-10-10 Pedro Alves <pedro@codesourcery.com>
8890
8891 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8892 whole argv from the last run, not just argv[0].
8893
5822d809
PA
88942008-09-08 Pedro Alves <pedro@codesourcery.com>
8895
8896 * regcache.c (new_register_cache): Return NULL if the register
8897 cache size isn't known yet.
8898 (free_register_cache): Avoid dereferencing a NULL regcache.
8899
74aac56f
DJ
89002008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8901
8902 * configure.srv: Merge MIPS and MIPS64.
8903
400b20f5
MR
89042008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8905
8906 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8907
677c5bb1
LM
89082008-08-18 Luis Machado <luisgpm@br.ibm.com>
8909
8910 * Makefile.in: Add required vsx dependencies.
8911
8912 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8913 Declare init_registers_powerpc_vsx32l.
8914 Declare init_registers_powerpc_vsx64l.
8915 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8916 (ppc_arch_setup): Check for VSX in hwcap.
8917 (ppc_fill_vsxregset): New function.
8918 (ppc_store_vsxregset): New function.
8919 Add new VSX entry in regset_info target_regsets.
8920
8921 * configure.srv: Add new VSX dependencies.
8922
a6f3e723
SL
89232008-08-12 Pedro Alves <pedro@codesourcery.com>
8924
8925 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8926 (remote_open): Set or clear transport_is_reliable.
8927 (putpkt_binary): Don't expect acks in noack mode.
8928 (getpkt): Don't send ack/nac in noack mode.
8929 * server.c (handle_general_set): Handle QStartNoAckMode.
8930 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8931 qSupported.
8932 (main): Reset noack_mode on every connection.
8933 * server.h (noack_mode): Declare.
8934
a417dc56
RW
89352008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8936
8937 * Makefile.in (GDBREPLAY_OBS): New variable.
8938 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8939
3221518c
UW
89402008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8941 Daniel Jacobowitz <dan@codesourcery.com>
8942
8943 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8944 (usr_store_inferior_registers): Likewise.
8945 (regsets_store_inferior_registers): Likewise.
8946
ec56be1b
PA
89472008-07-31 Rolf Jansen <rj@surtec.com>
8948 Pedro Alves <pedro@codesourcery.com>
8949
8950 * configure.ac: Check for memmem declaration.
8951 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8952 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8953 (disable_packet_qfThreadInfo): Unconditionally compile.
8954 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8955 * configure, config.in: Regenerate.
8956
2fe5e3ff
DE
89572008-07-28 Doug Kwan <dougkwan@google.com>
8958
8959 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8960 (linux_write_memory): Remove declaration of errno.
8961
836acd6d
UW
89622008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8963
8964 * linux-low.c (handle_extended_wait): Do not use "status"
8965 variable uninitialized.
8966
aeba519e
PA
89672008-07-07 Pedro Alves <pedro@codesourcery.com>
8968
8969 * server.c (handle_v_attach): Inhibit reporting dll changes.
8970
db42f210
PA
89712008-06-27 Pedro Alves <pedro@codesourcery.com>
8972
8973 * remote-utils.c (prepare_resume_reply): If requested, don't
8974 output "thread:TID" in the T stop reply.
8975
8976 * server.c (disable_packet_vCont, disable_packet_Tthread)
8977 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8978 (handle_query): If requested, disable support for qC, qfThreadInfo
8979 and qsThreadInfo.
8980 (handle_v_requests): If requested, disable support for vCont.
8981 (gdbserver_show_disableable): New.
8982 (main): Handle --disable-packet and --disable-packet=LIST.
8983
8984 * server.h (disable_packet_vCont, disable_packet_Tthread)
8985 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8986
8e4c5421
CD
89872008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8988
8989 * server.c (gdbserver_usage): Mention --version.
8990
6e23a804
DJ
89912008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8992
8993 * Makefile.in (gdbreplay.o): New rule.
8994
90aa6a40
JM
89952008-06-06 Joseph Myers <joseph@codesourcery.com>
8996
8997 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8998 message, not gdbserver.
8999
c16158bc 90002008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9001 Nathan Sidwell <nathan@codesourcery.com>
9002 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9003
9004 * acinclude.m4: Include ../../config/acx.m4.
9005 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9006 * configure, config.in: Regenerate.
9007 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9008 * server.c (gdbserver_version): Print PKGVERSION.
9009 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9010 (main): Adjust gdbserver_usage calls.
9011 * gdbreplay.c (version, host_name): Add declarations.
9012 (gdbreplay_version, gdbreplay_usage): New.
9013 (main): Accept --version and --help options.
9014
aeb75bf5
DJ
90152008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9016
9017 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9018 (arm_breakpoint_at): Handle Thumb.
9019 (the_low_target): Add comment.
9020
76b233dd
UW
90212008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9022
9023 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9024
08388c79
DE
90252008-05-09 Doug Evans <dje@google.com>
9026
a3c83fae
DE
9027 * server.h (decode_search_memory_packet): Declare.
9028 * remote-utils.c (decode_search_memory_packet): New fn.
9029 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9030 (handle_search_memory): New fn.
9031 (handle_query): Process qSearch:memory packets.
9032
bb9c3d36
UW
90332008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9034
9035 * regcache.c (registers_length): Remove.
9036 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9037 full register packet.
9038 * regcache.h (registers_length): Remove prototype.
9039 * server.h (PBUFSIZ): Define to 16384.
9040
7284e1be
UW
90412008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9042
9043 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9044 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9045 powerpc-64l.o, and powerpc-altivec64l.o.
9046 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9047 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9048 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9049 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9050 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9051 to srv_xmlfiles.
9052
9053 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9054 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9055 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9056 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9057 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9058 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9059 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9060 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9061 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9062 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9063 (clean): Update.
9064
9065 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9066 (init_registers_powerpc_32l): ... this new prototype.
9067 (init_registers_powerpc_32): Remove, replace by ...
9068 (init_registers_powerpc_altivec32l): ... this new prototype.
9069 (init_registers_powerpc_e500): Remove, replace by ...
9070 (init_registers_powerpc_e500l): ... this new prototype.
9071 (init_registers_ppc64): Remove, replace by ...
9072 (init_registers_powerpc_64l): ... this new prototype.
9073 (init_registers_powerpc_64): Remove, replace by ...
9074 (init_registers_powerpc_altivec64l): ... this new prototype.
9075 (ppc_num_regs): Set to 73.
9076 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9077 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9078 (ppc_cannot_store_register): Handle orig_r3 and trap.
9079 (ppc_arch_setup): Update init_registers_... calls.
9080 (ppc_fill_gregset): Handle orig_r3 and trap.
9081
9082 * inferiors.c (clear_inferiors): Reset current_inferior.
9083
fdc59709
PB
90842008-04-23 Paolo Bonzini <bonzini@gnu.org>
9085
889bf7c5
PA
9086 * acinclude.m4: Add override.m4.
9087 * configure: Regenerate.
fdc59709 9088
c9b2f845
UW
90892008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9090
9091 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9092 initial call to init_register_ppc64.
9093
550512b8
UW
90942008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9095
43aaf8b6
PA
9096 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9097 single powerpc*-*-linux* case.
550512b8
UW
9098 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9099
b6430ec3
UW
91002008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9101
9102 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9103 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9104 from reg_xmlfiles.
9105 * linux-ppc-low.c: Include <elf.h>.
9106 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9107 (ppc_hwcap): New global variable.
9108 (ppc_regmap): Remove __SPE__ #ifdef sections.
9109 (ppc_regmap_e500): New global variable.
9110 (ppc_cannot_store_register): Update __SPE__ special case.
9111 (ppc_get_hwcap): New function.
9112 (ppc_arch_setup): Use it to determine whether inferior supports
9113 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9114 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9115 Do not access registers if target does not support AltiVec.
9116 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9117 Do not access registers if target does not support SPE.
9118 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9119
52fa2412
UW
91202008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9121
9122 * linux-low.c (disabled_regsets, num_regsets): New.
9123 (use_regsets_p): Delete.
9124 (linux_wait_for_process): Clear disabled_regsets.
9125 (regsets_fetch_inferior_registers): Check and set it.
9126 (regsets_store_inferior_registers): Likewise.
9127 (linux_fetch_registers, linux_store_registers): Do not use
9128 use_regsets_p.
9129 (initialize_low): Allocate disabled_regsets.
9130
e28b3332
DJ
91312008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9132
9133 * Makefile.in (LIBOBJS): New.
9134 (OBS): Use LIBOBJS.
9135 (memmem.o): New rule.
9136 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9137 * configure: Regenerated.
9138
4536995d
UW
91392008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9140
9141 * server.c (handle_query): Never return "unsupported" for
9142 qXfer:features:read queries.
9143
221c031f
UW
91442008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9145
9146 * server.c (get_features_xml): Fix inverted condition.
9147 (handle_query): Always support qXfer:feature:read.
9148
ccd213ac
DJ
91492008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9150
9151 * server.c (wrapper_argv): New.
9152 (start_inferior): Handle wrapper_argv. If set, expect an extra
9153 trap.
9154 (gdbserver_usage): Document --wrapper.
9155 (main): Parse --wrapper.
9156
6fe305f7
UW
91572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9158
9159 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9160 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9161 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9162 (ppc_set_pc): Likewise.
9163 (ppc_arch_setup): New function.
9164 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9165 of collect_register.
889bf7c5 9166 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9167
5b0a002e
UW
91682008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9169
9170 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9171 instead of linux-ppc64-low.o.
9172 * linux-ppc64-low.c: Remove file.
9173 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9174 (linux-ppc64-low.o): Remove rule.
9175
9176 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9177 (init_registers_powerpc_64): Likewise.
9178 (ppc_regmap): Conditionally define depending on __powerpc64__.
9179 (ppc_cannot_store_register): Do not special-case "fpscr" when
9180 compiled on __powerpc64__.
9181 (ppc_collect_ptrace_register): New function.
9182 (ppc_supply_ptrace_register): New function.
9183 (ppc_breakpoint): Change type to "unsigned int".
9184 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9185 (the_low_target): Conditionally provide initializers for the
889bf7c5 9186 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9187 collect_ptrace_register and supply_ptrace_register members.
9188
9b4b61c8
UW
91892008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9190
9191 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9192 * server.c (gdbserver_xmltarget): Define.
9193 (get_features_xml): Use it to replace "target.xml" and arch_string.
9194
9195 * configure.srv: Remove srv_xmltarget. Add XML files that were
9196 mentioned there to srv_xmlfiles instead. Remove conditional tests
9197 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9198 srv_xmlfiles and srv_regobj to include all possible choices.
9199 * configure.ac (srv_xmltarget): Remove.
9200 (srv_xmlfiles): Do not add "target.xml".
9201 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9202 checks for supplementary target information.
9203 * configure: Regenerate.
9204 * Makefile.in (XML_TARGET): Remove.
9205 (target.xml): Remove rule.
9206 (clean): Do not clean up target.xml.
9207 (.PRECIOUS): Do not mention target.xml.
9208
9209 * target.h (struct target_ops): Remove arch_string member.
9210 * linux-low.c (linux_arch_string): Remove.
9211 (linux_target_ops): Remove arch_string initializer.
9212 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9213 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9214 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9215 * spu-low.c (spu_arch_string): Remove.
9216 (spu_target_ops): Remove arch_string initializer.
9217 * win32-low.c (win32_arch_string): Remove.
9218 (win32_target_ops): Remove arch_string initializer.
9219 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9220 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9221 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9222
ee1a7ae4
UW
92232008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9224
9225 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9226 by collect_ptrace_register and supply_ptrace_register hooks.
9227 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9228 instead of checking for the_low_target.left_pad_xfer.
9229 (usr_store_inferior_registers): Use collect_ptrace_register callback
9230 instead of checking for the_low_target.left_pad_xfer.
9231
9232 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9233 (s390_supply_ptrace_register): Likewise.
9234 (s390_fill_gregset): Call s390_collect_ptrace_register.
9235 (the_low_target): Update.
9236
9237 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9238 (ppc_supply_ptrace_register): Likewise.
9239 (the_low_target): Update.
9240
9241 * linux-i386-low.c (the_low_target): Update.
9242 * linux-x86-64-low.c (the_low_target): Update.
9243
d61ddec4
UW
92442008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9245
9246 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9247 reg-s390.o and reg-s390x.o.
9248
9249 * linux-low.c (new_inferior): New global variable.
9250 (linux_create_inferior, linux_attach): Set it.
9251 (linux_wait_for_process): Call the_low_target.arch_setup after the
9252 target has stopped for the first time.
9253 (initialize_low): Do not call the_low_target.arch_setup.
9254
9255 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9256 (s390_set_pc): Likewise.
9257 (s390_arch_setup): New function.
9258 (the_low_target): Use s390_arch_setup as arch_setup routine.
9259
9260 * regcache.c (realloc_register_cache): New function.
9261 (set_register_cache): Call it for each existing regcache.
9262
d05b4ac3
UW
92632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9264
9265 * server.h (init_registers): Remove prototype.
9266
9267 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9268 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9269 instead of init_registers ().
9270 * linux-arm-low.c (init_registers_arm): Add prototype.
9271 (init_registers_arm_with_iwmmxt): Likewise.
9272 (the_low_target): Add initializer for arch_setup field.
9273 * linux-cris-low.c (init_registers_cris): Add prototype.
9274 (the_low_target): Add initializer for arch_setup field.
9275 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9276 (the_low_target): Add initializer for arch_setup field.
9277 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9278 (the_low_target): Add initializer for arch_setup field.
9279 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9280 (the_low_target): Add initializer for arch_setup field.
9281 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9282 (the_low_target): Add initializer for arch_setup field.
9283 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9284 (the_low_target): Add initializer for arch_setup field.
9285 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9286 (init_registers_mips64_linux): Likewise.
9287 (the_low_target): Add initializer for arch_setup field.
9288 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9289 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9290 (the_low_target): Add initializer for arch_setup field.
9291 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9292 (init_registers_powerpc_64): Likewise.
9293 (the_low_target): Add initializer for arch_setup field.
9294 * linux-s390-low.c (init_registers_s390): Add prototype.
9295 (init_registers_s390x): Likewise.
9296 (the_low_target): Add initializer for arch_setup field.
9297 * linux-sh-low.c (init_registers_sh): Add prototype.
9298 (the_low_target): Add initializer for arch_setup field.
9299 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9300 (the_low_target): Add initializer for arch_setup field.
9301 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9302 (the_low_target): Add initializer for arch_setup field.
9303
9304 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9305 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9306 instead of init_registers ().
9307 * win32-arm-low.c (init_registers_arm): Add prototype.
9308 (the_low_target): Add initializer for arch_setup field.
9309 * win32-i386-low.c (init_registers_i386): Add prototype.
9310 (the_low_target): Add initializer for arch_setup field.
9311
9312 * spu-low.c (init_registers_spu): Add prototype.
9313 (initialize_low): Call initialie_registers_spu () instead of
9314 initialize_registers ().
9315
fd96d250
PA
93162008-02-19 Pedro Alves <pedro@codesourcery.com>
9317
9318 * server.c (handle_v_requests): When handling the vRun and vAttach
9319 packets, if already debugging a process, don't kill it. Return an
9320 error instead.
9321
d41b6bb4
DJ
93222008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9323
9324 * server.c (handle_query): Correct length check.
9325
5ac588cf
PA
93262008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9327
9328 * win32-low.c (do_initial_child_stuff): Add process handle
9329 parameter. Set current_process_handle and current_process_id from the
9330 parameters. Clear globals.
9331 (win32_create_inferior): Don't set current_process_handle and
9332 current_process_id here. Instead pass them on the call to
9333 do_initial_child_stuff.
9334 (win32_attach): Likewise.
9335 (win32_clear_inferiors): New.
9336 (win32_kill): Don't close the current process handle or the
9337 current thread handle here. Instead call win32_clear_inferiors.
9338 (win32_detach): Don't open a new handle to the process. Call
9339 win32_clear_inferiors.
9340 (win32_join): Don't rely on current_process_handle; open a new
9341 handle using the process id.
9342 (win32_wait): Call win32_clear_inferiors when the inferior process
9343 has exited.
9344
ecd7ecbc
DJ
93452008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9346
9347 * server.c (monitor_show_help): Add "exit".
9348
1525d545
MG
93492008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9350
ecd7ecbc 9351 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9352 (clean): Add reg-xtensa.c.
9353 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9354 * configure.srv (xtensa*-*-linux*) New target.
9355 * linux-xtensa-low.c: New.
9356 * xtensa-xtregs.c: New.
1525d545 9357
59a016f0
PA
93582008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9359
9360 * hostio.c: Don't include errno.h.
9361 (errno_to_fileio_errno): Move to hostio-errno.
9362 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9363 error number outputting to the target->hostio_last_error callback.
9364 (hostio_packet_error): Use FILEIO_EINVAL directly.
9365 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9366 calls to hostio_error.
9367 * hostio-errno.c: New.
9368 * server.h (hostio_last_error_from_errno): Declare.
9369 * target.h (target_ops): Add hostio_last_error member.
9370 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9371 as hostio_last_error handler.
889bf7c5 9372 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9373 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9374 (wince_hostio_last_error): New functions.
9375 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9376 as hostio_last_error handler.
9377 (win32_target_ops) [!_WIN32_WCE]: Register
9378 hostio_last_error_from_errno as hostio_last_error handler.
9379 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9380 (hostio-errno.o): New rule.
9381 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9382 * configure.srv (srv_hostio_err_objs): New variable. Default to
9383 hostio-errno.o.
9384 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9385 * configure: Regenerate.
9386
2d717e4f
DJ
93872008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9388
9389 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9390 (linux_kill, linux_detach): Clean up the process list.
9391 * remote-utils.c (remote_open): Improve port number parsing.
9392 (putpkt_binary, input_interrupt): Only send interrupts if the target
9393 is running.
9394 * server.c (extended_protocol): Make static.
9395 (attached): Define earlier.
9396 (exit_requested, response_needed, program_argv): New variables.
9397 (target_running): New.
9398 (start_inferior): Clear attached here.
9399 (attach_inferior): Set attached here.
9400 (require_running): Define.
9401 (handle_query): Use require_running and target_running. Implement
9402 "monitor exit".
9403 (handle_v_attach, handle_v_run): New.
9404 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9405 (gdbserver_usage): Update.
9406 (main): Redo argument parsing. Handle --debug and --multi. Handle
9407 --attach along with other options or after the port. Save
9408 program_argv. Support no initial program. Resynchronize
9409 communication with GDB after an error. Handle "monitor exit".
9410 Use require_running and target_running. Always allow the extended
9411 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9412 restart in extended mode.
9413 * README: Refer to the GDB manual. Update --attach usage.
9414
7407e2de
AS
94152007-12-20 Andreas Schwab <schwab@suse.de>
9416
9417 * linux-low.c (STACK_SIZE): Define.
9418 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9419 (linux_test_for_tracefork): Likewise.
9420
b65d95c5
DJ
94212007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9422
9423 * linux-low.c (linux_wait_for_event): Update messages. Do not
9424 reinsert auto-delete breakpoints.
9425 * mem-break.c (struct breakpoint): Change return type of handler to
9426 int.
9427 (set_breakpoint_at): Update handler type.
9428 (reinsert_breakpoint_handler): Return 1 instead of calling
9429 delete_breakpoint.
9430 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9431 setting a new one.
9432 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9433 * mem-break.h (set_breakpoint_at): Update handler type.
9434 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9435 * win32-low.c (auto_delete_breakpoint): New.
9436 (get_child_debug_event): Use it.
9437
4e799345
DJ
94382007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9439
9440 * configure.ac: Check for pread and pwrite.
9441 * hostio.c (handle_pread): Fall back to lseek and read.
9442 (handle_pwrite): Fall back to lseek and write.
9443 * config.in, configure: Regenerated.
9444
27524b67
DJ
94452007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9446
9447 * server.c (myresume): Add own_buf argument.
9448 (main): Update calls.
9449
a20d5e98
DJ
94502007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9451
9452 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9453 * remote-utils.c (remote_open): Do not call disable_async_io.
9454 (block_async_io): Delete.
9455 (unblock_async_io): Make static.
9456 (initialize_async_io): New.
9457 * server.c (handle_v_cont): Handle async I/O here.
9458 (myresume): Likewise. Move other common resume tasks here...
9459 (main): ... from here. Call initialize_async_io. Disable async
9460 I/O before the main loop.
9461 * server.h (initialize_async_io): Declare.
9462 (block_async_io, unblock_async_io): Delete prototypes.
9463 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9464
b79d787e
DJ
94652007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9466
9467 * remote-utils.c (readchar): Allow binary data in received messages.
9468
d97903b2
PA
94692007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9470
9471 * win32-low.c (attaching): New global.
9472 (win32_create_inferior): Clear the `attaching' global.
9473 (win32_attach): Set the `attaching' global.
9474 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9475 attaching. Only set a breakpoint at the entry point if not
9476 attaching.
9477
311de423
PA
94782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9479
9480 * server.c (main): Don't report dll events on the initial
9481 connection on attaches.
9482
6c2d16d2
PA
94832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9484
9485 * server.c (main): Relax numerical bases supported for the pid of
9486 the --attach command line argument.
9487
5ca906e6
PA
94882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9489
9490 * win32-low.c (win32_attach): Call OpenProcess before
9491 DebugActiveProcess, not after. Add last error output to error
9492 call.
9493
9c6c8194
PA
94942007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9495
9496 * win32-low.c (win32_get_thread_context)
9497 (win32_set_thread_context): New functions.
9498 (thread_rec): Use win32_get_thread_context.
9499 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9500 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9501 field.
9502
4d5d1aaa
PA
95032007-12-03 Leo Zayas
9504 Pedro Alves <pedro_alves@portugalmail.pt>
9505
9506 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9507 global variables.
9508 (child_add_thread): Minor cleanup.
9509 (child_continue): Resume artificially suspended threads before
9510 calling ContinueDebugEvent.
9511 (suspend_one_thread): New.
9512 (fake_breakpoint_event): New.
9513 (get_child_debug_event): Change return type to int. Check here if
9514 gdb sent an interrupt request. If a soft interrupt was requested,
9515 fake a breakpoint event. Return 0 if there is no event to handle,
9516 and 1 otherwise.
9517 (win32_wait): Don't check here if gdb sent an interrupt request.
9518 Ensure there is a valid event to handle.
9519 (win32_request_interrupt): Add soft interruption method as last
9520 resort.
9521
c436e841
PA
95222007-12-03 Leo Zayas
9523 Pedro Alves <pedro_alves@portugalmail.pt>
9524
9525 * win32-low.h (win32_thread_info): Add descriptions to the
9526 structure members. Replace `suspend_count' counter by a
9527 `suspended' flag.
9528 * win32-low.c (thread_rec): Update condition of when to get the
9529 context from the inferior. Rely on ContextFlags being set if it
9530 has already been retrieved. Only suspend the inferior thread if
9531 we haven't already. Warn if that fails.
9532 (continue_one_thread): s/suspend_count/suspended/. Only call
9533 ResumeThread once. Warn if that fails.
9534
e7b5fa67
PA
95352007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9536
9537 * win32-low.c (win32_wait): Don't read from the inferior when it
9538 has already exited.
9539
a385171d
PA
95402007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9541
9542 * Makefile.in (win32_low_h): New variable.
9543 (win32-low.o): Add dependency on $(win32_low_h).
9544 (win32-arm-low.o, win32-i386-low.o): New rules.
9545
f80c84b3
DJ
95462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9547
9548 * hostio.c: Correct copyright year.
9549
a6b151f1
DJ
95502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9551
9552 * Makefile.in (OBS): Add hostio.o.
9553 (hostio.o): New rule.
9554 * server.h (handle_vFile): Declare.
9555 * hostio.c: New file.
9556 * server.c (handle_v_requests): Take packet_len and new_packet_len
9557 for binary packets. Call handle_vFile.
9558 (main): Update call to handle_v_requests.
9559
f9387fc3
DJ
95602007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9561
9562 * linux-low.c: Include <sched.h>.
9563
51c2684e
DJ
95642007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9565
9566 * linux-low.c (linux_tracefork_grandchild): New.
9567 (linux_tracefork_child): Use clone.
9568 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9569
75f83163
JB
95702007-10-31 Joel Brobecker <brobecker@adacore.com>
9571
9572 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9573
da5898ce
DJ
95742007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9575
9576 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9577
24a09b5f
DJ
95782007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9579
9580 * inferiors.c (change_inferior_id): Delete.
9581 (add_pid_to_list, pull_pid_from_list): New.
9582 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9583 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9584 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9585 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9586 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9587 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9588 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9589 (using_threads): Always set to 1.
9590 (handle_extended_wait): New.
9591 (add_process): Do not set TID.
9592 (linux_create_inferior): Set must_set_ptrace_flags.
9593 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9594 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9595 (linux_thread_alive): Rename TID argument to LWPID.
9596 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9597 (linux_wait_for_event): Do not use TID or check using_threads. Update
9598 call to dead_thread_notify. Call handle_extended_wait.
9599 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9600 (send_sigstop): Delete sigstop_sent.
9601 (wait_for_sigstop): Avoid TID.
9602 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9603 (linux_test_for_tracefork): New.
9604 (linux_lookup_signals): Use thread_db_active and
9605 linux_supports_tracefork_flag.
9606 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9607 * linux-low.h (get_process_thread): Avoid TID.
9608 (struct process_ifo): Move thread_known and tid to the end. Remove
9609 sigstop_sent.
9610 (linux_attach_lwp, thread_db_init): Update prototypes.
9611 * server.h (change_inferior_id): Delete prototype.
9612 (add_pid_to_list, pull_pid_from_list): New prototypes.
9613 * thread-db.c (thread_db_use_events): New.
9614 (find_first_thread): Rename to...
9615 (find_one_thread): ...this. Update callers and messages. Do not
9616 call fatal. Check thread_db_use_events. Do not call
9617 change_inferior_id or new_thread_notify.
9618 (maybe_attach_thread): Update. Do not call new_thread_notify.
9619 (thread_db_init): Set thread_db_use_events. Check use_events.
9620 * utils.c (fatal, warning): Correct message prefix.
9621
30ed0a8f
DJ
96222007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9623
9624 * Makefile.in (clean): Remove new files.
9625 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9626 (powerpc-64.o, powerpc-64.c): New rules.
9627 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9628 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9629 with SPE.
9630 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9631 SPE targets.
9632 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9633 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9634 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9635 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9636 (target_regsets): Add AltiVec and SPE register sets.
9637 * configure.ac: Check for AltiVec and SPE.
9638 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9639 (ppc_fill_vrregset, ppc_store_vrregset): New.
9640 (target_regsets): Add AltiVec register set.
9641 * configure: Regenerated.
9642
fd462a61
DJ
96432007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9644
9645 * linux-low.c (O_LARGEFILE): Define.
9646 (linux_read_memory): Use /proc/PID/mem.
9647 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9648 * configure, config.in: Regenerated.
9649
69f223ed
DJ
96502007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9651
9652 * linux-low.c (linux_wait_for_event): Do not pass signals while
9653 single-stepping.
9654
aec18585
PA
96552007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9656
9657 * win32-low.c (create_process): New.
9658 (win32_create_inferior): Use create_process instead of
9659 CreateProcess. If create_process failed retry appending an ".exe"
9660 suffix. Store the GetLastError result immediatelly after
9661 create_process calls and use it on the call to error.
9662
34d86ddd
PA
96632007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9664
9665 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9666
5a0e3bd0
JB
96672007-08-23 Joel Brobecker <brobecker@adacore.com>
9668
9669 * configure.ac: Switch license to GPLv3.
9670
f88c79e6
MS
96712007-08-01 Michael Snyder <msnyder@access-company.com>
9672
9673 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9674
6b3d9b83
PA
96752007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9676
9677 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9678 typedef.
9679 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9680 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9681 CloseToolhelp32Snapshot.
9682 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9683 CloseToolhelp32Snapshot.
9684
c588c53c
MS
96852007-07-27 Michael Snyder <michael.snyder@access-company.com>
9686
9687 * server.c (main): Check for inferior exit before main loop.
9688
aa0403d9
PA
96892007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9690
9691 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9692 instead of on tmp_desc.
9693
255e7678
DJ
96942007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9695 Daniel Jacobowitz <dan@codesourcery.com>
9696
9697 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9698 (add_thread): Minor cleanups.
9699 (clear_inferiors): Move lower in the file. Clear the DLL
9700 list.
9701 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9702 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9703 (xml_escape_text): New.
9704 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9705 for qSupported.
9706 (handle_v_cont): Report errors.
9707 (gdbserver_version): Update.
9708 (main): Correct size of own_buf. Do not report initial DLL events.
9709 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9710 (unloaded_dll, xml_escape_text): New.
9711 * win32-low.c (enum target_waitkind): Update comments.
9712 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9713 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9714 (win32_EnumProcessModules, win32_GetModuleInformation)
9715 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9716 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9717 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9718 (win32_Module32First, win32_Module32Next, load_toolhelp)
9719 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9720 (get_child_debug_event): Handle DLL events.
9721 (win32_wait): Likewise.
9722
0d37add9
DJ
97232007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9724
9725 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9726 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9727
45e2715e
PA
97282007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9729
9730 * win32-low.c (handle_output_debug_string): Ignore event if not
9731 waiting.
9732
c5674cf1
PA
97332007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9734
9735 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9736
2bbe3cc1
DJ
97372007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9738
9739 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9740
ae13219e
DJ
97412007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9742
9743 * inferiors.c (change_inferior_id): Add comment.
9744 * linux-low.c (check_removed_breakpoint): Add an early
9745 prototype. Improve debug output.
9746 (linux_attach): Doc update.
9747 (linux_detach_one_process, linux_detach): Clean up before releasing
9748 each process.
9749 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9750 * linux-low.h (struct process_info): Doc improvement.
9751 * mem-break.c (delete_all_breakpoints): New.
9752 * mem-break.h (delete_all_breakpoints): New prototype.
9753 * thread-db.c (find_first_thread): New.
9754 (thread_db_create_event): Call it instead of
9755 thread_db_find_new_threads. Clean up unused variables.
9756 (maybe_attach_thread): Remove first thread handling.
9757 (thread_db_find_new_threads): Use find_first_thread.
9758 (thread_db_get_tls_address): Likewise.
9759
4105de34
DJ
97602007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9761
9762 * thread-db.c (thread_db_find_new_threads): Add prototype.
9763 (thread_db_create_event): Check for the main thread before adding
9764 a new thread.
9765 (maybe_attach_thread): Only enable event reporting if TID == 0.
9766 (thread_db_get_tls_address): Check for new threads.
9767
2b876972
DJ
97682007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9769
9770 * linux-low.c (linux_create_inferior): Try execv before execvp.
9771 * spu-low.c (spu_create_inferior): Likewise.
9772
7a245884
DJ
97732007-06-13 Mike Frysinger <vapier@gentoo.org>
9774
9775 * linux-low.c (linux_create_inferior): Change execv to execvp.
9776 * spu-low.c (spu_create_inferior): Likewies.
9777
117ce543
DJ
97782007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * Makefile.in (clean): Clean new files instead of deleted ones.
9781 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9782 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9783 rules.
9784 * configure.srv: Specify XML files and new regformats for MIPS and
9785 MIPS64 GNU/Linux.
9786 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9787 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9788 an entry for the restart register.
9789 (mips_cannot_fetch_register, mips_cannot_store_register)
9790 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9791 register names to match the XML descriptions.
9792 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9793 restart register instead of $0.
9794
0e7f50da
UW
97952007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9796 Markus Deuling <deuling@de.ibm.com>
9797
9798 * remote-utils.c (decode_xfer_write): New function.
9799 * server.h (decode_xfer_write): Add prototype.
9800 * server.c (handle_query): Add PACKET_LEN argument. Support
9801 qXfer:spu:read and qXfer:spu:write packets.
9802 (main): Pass packet_len to handle_query.
9803 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9804 * target.h (target_ops): Add qxfer_spu.
9805
374c1d38
UW
98062007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9807
9808 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9809 accessing non-seekable spufs files.
9810
bb63802a
UW
98112007-05-16 Markus Deuling <deuling@de.ibm.com>
9812
889bf7c5 9813 * server.c (handle_query): Add reply for qC packet.
bb63802a 9814
7390519e
PA
98152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9816 Leo Zayas <lerele@champenstudios@com>
9817
9818 * server.h (check_remote_input_interrupt_request): New function.
9819 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9820 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9821 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9822 (check_remote_input_interrupt_request): New function.
9823 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9824 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9825 winapi_GenerateConsoleCtrlEvent): New typedefs.
9826 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9827 to 250 ms.
9828 (win32_wait): Check for remote interrupt request
9829 with check_remote_input_interrupt_request.
9830 (win32_request_interrupt): New function.
9831 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9832
34b34921
PA
98332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9834
9835 * win32-low.c (debug_registers_changed,
9836 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9837 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9838 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9839 (thread_rec): Get context using the low target.
9840 (child_add_thread): Call thread_added on the low target,
9841 which does the same thing.
9842 (regptr): Delete.
9843 (do_initial_child_stuff): Remove debug registers references.
9844 Set context using the low target. Resume threads after
9845 setting the contexts.
9846 (child_continue): Remove dead variable. Remove debug
9847 registers references.
9848 (child_fetch_inferior_registers): Go through the low target.
9849 (do_child_store_inferior_registers): Remove.
9850 (child_store_inferior_registers): Go through the low target.
9851 (win32_resume): Remove debug registers references.
9852 Set context using the low target.
9853 (handle_exception): Change return type to void. Don't record
9854 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9855 first chance exception.
889bf7c5 9856 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9857 goto loop. Always return after waiting for debug event.
9858 (win32_wait): Convert to switch statement. Handle spurious
9859 events.
9860
9861 * win32-i386-low.c (debug_registers_changed,
9862 debug_registers_used): New.
9863 (initial_stuff): Rename to ...
9864 (i386_initial_stuff): ... this. Clear debug registers
9865 state variables.
9866 (store_debug_registers): Delete.
9867 (i386_get_thread_context): New.
9868 (load_debug_registers): Delete.
9869 (i386_set_thread_context): New.
9870 (i386_thread_added): New.
9871 (single_step): Rename to ...
9872 (i386_single_step): ... this.
9873 (do_fetch_inferior_registers): Rename to ...
9874 (i386_fetch_inferior_register): ... this.
9875 (i386_store_inferior_register): New.
9876 (the_low_target): Adapt to new interface.
9877
9878 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9879 (arm_get_thread_context): New.
9880 (arm_set_thread_context): New.
9881 (regptr): New.
9882 (do_fetch_inferior_registers): Rename to ...
9883 (arm_fetch_inferior_register): ... this.
9884 (arm_store_inferior_register): New.
9885 (arm_wince_breakpoint): Reimplement as unsigned long.
9886 (arm_wince_breakpoint_len): Define.
9887 (the_low_target): Adapt to new interface.
9888
9889 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9890 load_debug_registers. Add get_thread_context, set_thread_context,
9891 thread_added and store_inferior_register. Rename
9892 fetch_inferior_registers to fetch_inferior_register.
9893 (regptr): Remove declaration.
9894
dd6953e1
PA
98952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9896
9897 * linux-low.c (linux_detach): Change return type to int. Return 0.
9898 * spu-low.c (spu_detach): Likewise.
9899
444d6139
PA
99002007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9901
9902 * target.h (target_ops): Change return type of detach to int.
9903 Add join.
9904 (join_inferior): New.
9905 * server.c (main): Don't skip detach support on mingw32.
9906 If the inferior doesn't support detaching return error.
9907 Call join_inferior instead of using waitpid.
9908 * linux-low.c (linux_join): New.
9909 (linux_target_op): Add linux_join.
9910 * spu-low.c (spu_join): New.
9911 (spu_target_ops): Add spu_join.
9912 * win32-low.c (win32_detach): Adapt to new interface.
9913 Reopen current_process_handle before detaching. Issue a child
9914 resume before detaching.
9915 (win32_join): New.
9916 (win32_target_op): Add win32_join.
9917
1d5315fe
PA
99182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9919
9920 * win32-low.c (win32-attach): Fix return value.
9921 * target.h (target_ops): Describe ATTACH return values.
9922
bf914831
PA
99232007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9924
9925 * win32-low.c (GETPROCADDRESS): Define.
9926 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9927 (winapi_DebugSetProcessKillOnExit): Likewise.
9928 (win32_create_inferior): Force usage of ansi CreateProcessA.
9929 (win32_attach): Use GETPROCADDRESS.
9930 (win32_detach): Likewise.
9931
f72f3e60
PA
99322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9933
9934 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9935
ed50f18f
PA
99362007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9937
9938 * win32-low.c: Commit leftover changes from 2007-03-29.
9939
0c2ead7e
DJ
99402007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9941
9942 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9943 fields short instead of int. Add explicit padding.
9944 (i387_cache_to_fsave): Remove unnecessary casts.
9945 (i387_fsave_to_cache): Doc fix.
9946 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9947
73725ff3
DJ
99482007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9949
9950 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9951 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9952
d99f33d8
PA
99532007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9954
9955 * configure.srv (arm*-*-mingw32ce*): Move near the other
9956 arm targets.
9957
68070c10
PA
99582007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9959
2482afc6 9960 * configure.ac: Add errno checking.
68070c10
PA
9961 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9962 sys/file.h and malloc.h.
9963 (AC_CHECK_DECLS): Add perror.
9964 (srv_mingwce): Handle.
2482afc6 9965 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9966 win32-i386-low.o to srv_tgtobj.
9967 (i[34567]86-*-mingw*): Likewise.
9968 (arm*-*-mingw32ce*): Add case.
9969 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9970 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9971 [__MINGW32CE__] (strerror): New function.
9972 [__MINGW32CE__] (errno): Define to GetLastError.
9973 [__MINGW32CE__] (COUNTOF): New macro.
9974 (remote_open): Remove extra close call.
9975 * mem-break.c (delete_breakpoint_at): New function.
9976 * mem-break.h (delete_breakpoint_at): Declare.
9977 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9978 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9979 [USE_WIN32API] (read, write): Add char* casts.
9980 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9981 * server.h: Include wincecompat.h on Windows CE.
9982 [HAVE_ERRNO_H]: Check.
9983 (perror): Declare if not declared.
9984 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9985 (perror_with_name): Remove errno declaration.
9986 * wincecompat.h: New.
9987 * wincecompat.c: New.
9988 * win32-low.h: New.
9989 * win32-arm-low.c: New.
9990 * win32-i386-low.c: New.
9991 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9992 (OUTMSG2): Make it safe.
9993 (_T): New macro.
9994 (COUNTOF): New macro.
9995 (NUM_REGS): Get it from the low target.
9996 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9997 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9998 (thread_rec): Let low target handle debug registers.
9999 (child_add_thread): Likewise.
10000 (child_init_thread_list): Likewise.
10001 (continue_one_thread): Likewise.
10002 (regptr): New.
10003 (do_child_fetch_inferior_registers): Move to ...
10004 * win32-i386-low.c: ... here, and rename to ...
10005 (do_fetch_inferior_registers): ... this.
889bf7c5 10006 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10007 Go through the low target.
10008 (do_child_store_inferior_registers): Use regptr.
10009 (strwinerror): New function.
10010 (win32_create_inferior): Handle Windows CE.
10011 Use strwinerror instead of strerror on Windows error
10012 codes. Add program to the error output.
10013 Don't close the main thread handle on Windows CE.
10014 (win32_attach): Use coredll.dll on Windows CE.
10015 (win32_kill): Close current process and current
10016 thread handles.
10017 (win32_detach): Use coredll.dll on Windows CE.
10018 (win32_resume): Let low target handle debug registers, and
10019 step request.
10020 (handle_exception): Add/Remove initial breakpoint. Avoid
10021 non-existant WSTOPSIG on Windows CE.
10022 (win32_read_inferior_memory): Cast to remove warning.
10023 (win32_arch_string): Go through the low target.
10024 (initialize_low): Call set_breakpoint_data with the low
10025 target's breakpoint.
10026 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10027 FOP_REGNUM, mappings): Move to ...
10028 * win32-i386-low.c: ... here.
10029 * win32-low.c (win32_thread_info): Move to ...
10030 * win32-low.h: ... here.
10031 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10032 win32-arm-low.c and wincecompat.c.
10033 (all:): Add $EXEEXT.
10034 (install-only:): Likewise.
10035 (gdbserver:): Likewise.
10036 (gdbreplay:): Likewise.
10037 * config.in: Regenerate.
10038 * configure: Regenerate.
10039
41093d81
PA
100402007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10041
10042 * win32-low.c: Rename typedef thread_info to
10043 win32_thread_info throughout.
10044
544afa54
PA
100452007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10046
10047 * win32-i386-low.c: Rename to ...
10048 * win32-low.c: ... this.
10049 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10050 * Makefile.in: Likewise.
10051
bce7165d
PA
100522007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10053
10054 * remote-utils.c (monitor_output): Constify msg parameter.
10055 * server.h (monitor_output): Likewise.
10056 * win32-i386-low.c (handle_output_debug_string): New.
10057 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10058 handle_output_debug_string.
10059 (get_child_debug_event): Likewise.
10060
506c7aa0
DJ
100612007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10062
10063 * server.c (main): Correct strtoul check.
10064
42c81e2a
DJ
100652007-03-27 Jon Ringle <jon@ringle.org>
10066
10067 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10068
9453113a
DJ
100692007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10070
10071 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10072
64a69107
DJ
100732007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10074
10075 * terminal.h: Check HAVE_SGTTY_H.
10076
100772007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10078
10079 * remote-utils.c (remote_open): Print out the assigned port number.
10080
c74d0ad8
DJ
100812007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10082
10083 * remote-utils.c (monitor_output): New function.
10084 * server.c (debug_threads): Define here.
10085 (monitor_show_help): New function.
10086 (handle_query): Handle qRcmd.
10087 (main): Do not handle 'd' packet.
10088 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10089 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10090 of debug_threads.
10091
de7c3b4a
PA
100922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10093
10094 * Makefile.in (EXEEXT): New.
10095 (clean): Use $(EXEEXT).
10096
ef57601b
PA
100972007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10098
10099 * target.h (target_ops): Rename send_signal to request_interrupt,
10100 and remove enum target_signal parameter.
10101 * linux-low.c (linux_request_interrupt): Rename from
10102 linux_send_signal, and always send SIGINT.
10103 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10104 and always send SIGINT.
10105 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10106 of send_signal.
10107 (input_interrupt): Likewise.
10108
820f2bda
PA
101092007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10110
10111 * server.c (get_features_xml): Check if target implemented
10112 arch_string.
10113 * win32-i386-low.c (win32_arch_string): New.
10114 (win32_target_ops): Add win32_arch_string as arch_string member.
10115
ab39bf24
UW
101162007-02-22 Markus Deuling <deuling@de.ibm.com>
10117
10118 * spu-low.c (spu_arch_string): New.
10119 (spu_target_ops): Add spu_arch_string.
10120
61ff6e04
DJ
101212007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10122
10123 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10124 * configure.ac: Do not check for terminal.h.
10125 * configure, config.in: Regenerated.
10126
fb1e4ffc
DJ
101272007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10128
10129 * Makefile.in (OBS): Add $(XML_BUILTIN).
10130 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10131 (clean): Update.
10132 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10133 (arm-with-iwmmxt.c): New.
10134 * config.in, configure: Regenerate.
10135 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10136 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10137 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10138 (arm*-*-linux*): Add iWMMXt and regset support.
10139 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10140 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10141 (arm_store_wmmxregset, target_regsets): New.
10142 * server.c (get_features_xml): Take annex argument. Check builtin
10143 XML documents.
10144 (handle_query): Handle multiple annexes.
10145
0f48aa01
DJ
101462007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10147
10148 * remote-utils.c [USE_WIN32API] (read, write): Define.
10149 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10150 write.
10151
23181151
DJ
101522007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10153
10154 * linux-i386-low.c (the_low_target): Set arch_string.
10155 * linux-x86-64-low.c (the_low_target): Likewise.
10156 * linux-low.c (linux_arch_string): New.
10157 (linux_target_ops): Add it.
10158 * linux-low.h (struct linux_target_ops): Add arch_string.
10159 * server.c (write_qxfer_response): Use const void * for DATA.
10160 (get_features_xml): New.
10161 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10162 * target.h (struct target_ops): Add arch_string method.
10163
9d606399
DJ
101642007-01-03 Denis Pilat <denis.pilat@st.com>
10165 Daniel Jacobowitz <dan@codesourcery.com>
10166
10167 * linux-low.c (linux_kill): Handle being called with no threads.
10168 * win32-i386-low.c (win32_kill): Likewise.
10169 (get_child_debug_event): Clear current_process_handle.
10170
101712006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10172 Daniel Jacobowitz <dan@codesourcery.com>
10173
10174 * remote-utils.c (remote_open): Check the type of specified
10175 serial port devices before opening them.
10176 * server.c (main): Kill the inferior if an error occurs during
10177 the first remote_open.
10178
a5e13d24
DJ
101792006-12-05 Markus Deuling <deuling@de.ibm.com>
10180
10181 * README: Update supported targets.
10182
186947f7
DJ
101832006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10184
10185 * Makefile.in (clean): Remove reg-mips64.c.
10186 (reg-mips64.c, reg-mips64.o): New rules.
10187 * configure.srv: Handle mips64. Include regset support for mips.
10188 * linux-mips-low.c (union mips_register): New.
10189 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10190 (mips_breakpoint, mips_breakpoint_at): Use int.
10191 (mips_collect_register, mips_supply_register)
10192 (mips_collect_register_32bit, mips_supply_register_32bit)
10193 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10194 (mips_store_fpregset, target_regsets): New.
10195 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10196
a13e2c95
UW
101972006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10198
10199 * configure.srv: Add target "spu*-*-*".
10200 * Makefile.in (clean): Remove reg-spu.c.
10201 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10202 * spu-low.c: New file.
10203
cb7283db
DJ
102042006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10205
10206 * configure.ac: Correct td_thr_tls_get_addr test.
10207 * configure: Regenerated.
10208
89be2091
DJ
102092006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10210
10211 * linux-low.c (linux_wait_for_event): Reformat. Use the
10212 pass_signals array.
10213 * remote-utils.c (decode_address_to_semicolon): New.
10214 * server.c (pass_signals, handle_general_set): New.
10215 (handle_query): Mention QPassSignals for qSupported.
10216 (main): Call handle_general_set.
10217 * server.h (pass_signals, decode_address_to_semicolon): New.
10218
000ef4f0
DJ
102192006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10220
10221 * server.c (handle_query): Correct error handling for read_auxv.
10222
b7149293
UW
102232005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10224
10225 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10226 and srv_linux_thread_db to yes.
10227 * linux-s390-low.c (s390_fill_gregset): New function.
10228 (target_regsets): Define data structure.
10229
dae5f5cf
DJ
102302006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10231
10232 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10233 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10234 * config.in, configure: Regenerated.
10235 * inferiors.c (gdb_id_to_thread): New function.
10236 (gdb_id_to_thread_id): Use it.
10237 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10238 * linux-low.h (struct process_info): Add th member.
10239 (thread_db_get_tls_address): New prototype.
10240 * remote-utils.c (decode_address): Make non-static.
10241 * server.c (handle_query): Handle qGetTLSAddr.
10242 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10243 * target.h (struct target_ops): Add get_tls_address.
10244 * thread-db.c (maybe_attach_thread): Save the thread handle.
10245 (thread_db_get_tls_address): New.
10246
32ca6d61
DJ
102472006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10250 (linux_resume_one_process): Take a siginfo_t *. Update all
10251 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10252 (struct pending_signals): Add a siginfo_t.
10253 (linux_wait_for_process): Always set last_status.
10254 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10255 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10256 * linux-low.h (struct process_info): Add last_status.
10257
5ffff7c1
DJ
102582006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * remote-utils.c (try_rle): New function.
10261 (putpkt_binary): Use it.
10262
8695c747
DJ
102632006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10264
10265 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10266 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10267 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10268 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10269 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10270 point registers.
10271
290fadea
RS
102722006-08-08 Richard Sandiford <richard@codesourcery.com>
10273
10274 * server.c (terminal_fd): New variable.
10275 (old_foreground_pgrp): Likewise.
10276 (restore_old_foreground_pgrp): New function.
10277 (start_inferior): Record the terminal file descriptor in terminal_fd
10278 and its original foreground group in old_foreground_pgrp. Register
10279 restore_old_foreground_pgrp with atexit().
10280
9f2e1e63
DJ
102812006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10282
10283 * server.c (handle_query): Correct qPart to qXfer.
10284
b80864fb
DJ
102852006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10286
10287 * configure.ac: Check for more headers which are missing on
10288 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10289 * configure.srv: Add Cygwin and mingw32.
10290 * remote-utils.c: Don't include headers unconditionally which
10291 are missing on mingw32. Include <winsock.h> for mingw32.
10292 (remote_open): Adjust for mingw32 support. Flush
10293 standard error after writing to it.
10294 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10295 (unblock_async_io, enable_async_io, disable_async_io)
10296 (readchar, getpkt): Update for Winsock support.
10297 (prepare_resume_reply): Expect a protocol signal number.
10298 * server.c: Disable <sys/wait.h> on mingw32.
10299 (start_inferior): Adjust for mingw32 support. Flush
10300 standard error after writing to it.
10301 (attach_inferior): Likewise. Use protocol signal
10302 numbers.
10303 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10304 and names.
10305 * win32-i386-low.c: New file.
10306 * Makefile.in (XM_CLIBS): Set.
10307 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10308 (win32-i386-low.o): New dependency rule.
10309 * linux-low.c (linux_wait): Use target signal numbers.
10310 * target.h (struct target_ops): Doc fix.
10311 * server.h (target_signal_to_name): New prototype.
10312 * gdbreplay.c: Don't include headers unconditionally which
10313 are missing on mingw32. Include <winsock.h> for mingw32.
10314 (remote_close, remote_open): Adjust for Winsock support.
10315 * configure, config.in: Regenerated.
10316
0876f84a
DJ
103172006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10318
10319 * server.c (decode_xfer_read, write_qxfer_response): New.
10320 (handle_query): Take a packet length argument. Handle
10321 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10322 the qSupported response.
10323 (main): Update call to handle_query.
10324
01f9e8fa
DJ
103252006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10328 (putpkt_binary): Renamed from putpkt and adjusted for binary
10329 data.
10330 (putpkt): New wrapper for putpkt_binary.
10331 (readchar): Don't mask off the high bit.
10332 (decode_X_packet): New function.
10333 * server.c (main): Call putpkt_binary if a handler sets the packet
10334 length. Save the length of the incoming packet. Handle 'X'.
10335 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10336
be2a5f71
DJ
103372006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10338
10339 * server.c (handle_query): Handle qSupported.
10340
ea025f5f
DJ
103412006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10342
10343 * remote-utils.c (all_symbols_looked_up): New variable.
10344 (look_up_one_symbol): Check it.
10345 * server.h (look_up_one_symbol): New declaration.
10346 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10347
9308fc88
DJ
103482006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10349
10350 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10351 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10352 (PTRACE_GET_THREAD_AREA): Define.
10353 (ps_get_thread_area): New function.
10354
52fb6437
NS
103552006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10356
10357 * configure.srv (m68k*-*-uclinux*): New target.
10358 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10359 (linux_resume_one_process): Remove extraneous cast.
10360 (linux_read_offsets): New.
10361 (linux_target_op): Add linux_read_offsets on mmuless systems.
10362 * server.c (handle_query): Add qOffsets logic.
10363 * target.h (struct target_ops): Add read_offsets.
10364
21b0f40c
DJ
103652006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10366
10367 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10368 (PTRACE_GET_THREAD_AREA): Define.
10369 (ps_get_thread_area): New function.
10370 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10371 (linux-x86-64-low.o): Update.
10372
0050a760
DJ
103732006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10374
10375 * configure.ac: Remove checks for prfpregset_t.
10376 * gdb_proc_service.h: New file.
10377 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10378 new "gdb_proc_service.h".
10379 * proc-service.c: Likewise.
10380 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10381 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10382 * Makefile.in (gdb_proc_service_h): Updated.
10383 * configure, config.in: Regenerated.
10384
b92a518e
DJ
103852006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10386
10387 * remote-utils.c (prepare_resume_reply): Move declaration
10388 of gdb_id_from_wait to the top of the block.
10389
545587ee
DJ
103902006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10391
10392 * linux-low.c (regsets_store_inferior_registers): Read the regset
10393 from the target before filling it.
10394
9db87ebd
DJ
103952006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10396
10397 * server.c (attach_inferior): Return SIGTRAP for a successful
10398 attach.
10399
dd24457d
DJ
104002006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10401
10402 * Makefile.in (OBS): Add version.o.
10403 (STAGESTUFF): Delete.
10404 (version.o): Add dependencies.
10405 (version.c): Replace rule.
10406 (clean): Remove version.c.
10407 * server.c (gdbserver_version): New.
10408 (gdbserver_usage): Use printf.
10409 (main): Handle --version and --help.
10410 * server.h (version, host_name): Add declarations.
10411
6f0f660e
EZ
104122005-12-23 Eli Zaretskii <eliz@gnu.org>
10413
889bf7c5
PA
10414 * linux-arm-low.c:
10415 * linux-arm-low.c:
10416 * inferiors.c:
10417 * i387-fp.h:
10418 * i387-fp.c:
10419 * gdbreplay.c:
10420 * regcache.c:
10421 * proc-service.c:
10422 * mem-break.h:
10423 * mem-break.c:
10424 * linux-x86-64-low.c:
10425 * linux-sh-low.c:
10426 * linux-s390-low.c:
10427 * linux-ppc64-low.c:
10428 * linux-ppc-low.c:
10429 * linux-mips-low.c:
10430 * linux-m68k-low.c:
10431 * linux-m32r-low.c:
10432 * linux-low.h:
10433 * linux-low.c:
10434 * linux-ia64-low.c:
10435 * linux-i386-low.c:
10436 * linux-crisv32-low.c:
10437 * thread-db.c:
10438 * terminal.h:
10439 * target.h:
10440 * target.c:
10441 * server.h:
10442 * server.c:
10443 * remote-utils.c:
10444 * regcache.h:
10445 * utils.c:
10446 * Makefile.in:
10447 * configure.ac:
6f0f660e
EZ
10448 * gdbserver.1: Add (C) after Copyright. Update the FSF
10449 address.
10450
9d1fb177
DJ
104512005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10452
10453 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10454 (arm_breakpoint_at): Recognize both breakpoints.
10455 (the_low_target): Use the correct breakpoint instruction.
10456
011a70c2
DJ
104572005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10458
10459 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10460 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10461 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10462 (the_low_target): Update.
10463
7fb85e41
AS
104642005-10-25 Andreas Schwab <schwab@suse.de>
10465
10466 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10467
10468 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10469 (ia64_num_regs): Reduce to 462.
10470
3db0444b
DJ
104712005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10472
10473 * acinclude.m4: Correct quoting.
10474 * aclocal.m4: Regenerated.
10475
10476 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10477 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10478 (thread_db_init): Call thread_db_err_str.
10479 * configure.ac: Check for TD_VERSION.
10480 * config.in, configure: Regenerated.
10481
bee0189a
DJ
104822005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10483
10484 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10485
e9d25b98
DJ
104862005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10487
10488 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10489 is not available. Define HAVE_PTRACE_GETREGS if it is.
10490 * config.in, configure: Regenerated.
10491 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10492 * linux-i386-low.c, linux-m68k-low.c: Update to use
10493 HAVE_PTRACE_GETREGS.
10494 * linux-low.c (regsets_fetch_inferior_registers)
10495 (regsets_store_inferior_registers): Only return 0 if we processed
10496 GENERAL_REGS.
10497 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10498 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10499
a06660f7
DJ
105002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10501
10502 * inferiors.c (struct thread_info): Add gdb_id.
10503 (add_thread): Add gdb_id argument.
10504 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10505 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10506 calls to add_thread.
10507 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10508 * server.c (handle_query): Use thread_to_gdb_id.
10509 (handle_v_cont, main): Use gdb_id_to_thread_id.
10510 * server.h (add_thread): Update prototype.
10511 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10512 prototypes.
10513
5a1f5858
DJ
105142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10517 left-padded registers.
10518 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10519 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10520
e122f1f5
SE
105212005-07-01 Steve Ellcey <sje@cup.hp.com>
10522
10523 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10524 * configure: Regenerate.
10525 * config.in: Regenerate.
10526 * server.h (NEED_DECLARATION_STRERROR):
10527 Replace with !HAVE_DECL_STRERROR.
10528
d592fa2f
DJ
105292005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10530
10531 * linux-low.c (linux_wait, linux_send_signal): Don't test
10532 an unsigned long variable for > 0 if it could be MAX_ULONG.
10533 * server.c (myresume): Likewise.
10534 * target.c (set_desired_inferior): Likewise.
10535
ccbd4912
MK
105362005-06-13 Mark Kettenis <kettenis@gnu.org>
10537
10538 * configure.ac: Simplify and improve check for socklen_t.
10539 * configure, config.in: Regenerate.
10540
f450004a
DJ
105412005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10542
10543 * acconfig.h: Remove.
10544 * configure.ac: Add a test for socklen_t. Use three-argument
10545 AC_DEFINE throughout.
10546 * config.in: Regenerated using autoheader 2.59.
10547 * configure: Regenerated.
10548
10549 * gdbreplay.c (socklen_t): Provide a default.
10550 (remote_open): Use socklen_t.
10551 * remote-utils.c (socklen_t): Provide a default.
10552 (remote_open): Use socklen_t.
10553 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10554 unsigned char.
10555
10556 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10557 char for buffers.
10558 * linux-low.c (linux_read_memory, linux_write_memory)
10559 (linux_read_auxv): Likewise.
10560 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10561 (check_mem_write): Likewise.
10562 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10563 Likewise.
10564 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10565 (registers_from_string, register_data): Likewise.
10566 * server.c (handle_query, main): Likewise.
10567 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10568 (decode_M_packet): Likewise.
10569 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10570 * target.h (struct target_ops): Update read_memory, write_memory,
10571 and read_auxv.
10572 (read_inferior_memory, write_inferior_memory): Update.
10573 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10574 to unsigned char *.
10575 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10576 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10577 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10578 linux-s390-low.c, linux-sh-low.c: Update for changes in
10579 read_inferior_memory and the_low_target->breakpoint.
10580
eee84df1
DJ
105812005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10582
10583 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10584 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10585 * configure.srv: Add powerpc64-*-linux*.
10586 * linux-ppc64-low.c: New file.
10587
45b134e5
OF
105882005-05-23 Orjan Friberg <orjanf@axis.com>
10589
10590 * linux-cris-low.c: New file with support for CRIS.
10591 * linux-crisv32-low.c: Ditto for CRISv32.
10592 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10593 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10594 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10595 reg-crisv32.o, and reg-crisv32.c to make rules.
10596 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10597 recognized targets.
10598
48d93c75
UW
105992005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10600
10601 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10602 of sizeof (PTRACE_XFER_TYPE).
10603 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10604
e013ee27
OF
106052005-05-12 Orjan Friberg <orjanf@axis.com>
10606
889bf7c5 10607 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10608 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10609 pointers for hardware watchpoint support.
10610 * linux-low.h (struct linux_target_ops): Ditto.
10611 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10612 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10613 to linux_target_ops.
10614 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10615 reply packet.
10616 * server.c (main): Recognize 'Z' and 'z' packets.
10617
b0ded00b
UW
106182005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10619
10620 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10621 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10622 (the_low_target): Add new members.
10623
8643e2ad
DJ
106242005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10625
10626 * proc-service.c (ps_lgetregs): Search all_processes instead of
10627 all_threads.
10628
fc620387
DJ
106292005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * server.c (start_inferior): Change return type to int.
10632 (attach_inferior): Change sigptr to int *.
10633 (handle_v_cont, handle_v_requests): Change signal to int *.
10634 (main): Change signal to int.
10635
106362005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10637
10638 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10639 * configure.srv: Add m32r*-*-linux*.
10640 * linux-m32r-low.c: New file.
10641
e0e76420
DJ
106422005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10643
10644 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10645
a1928bad
DJ
106462005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10647
10648 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10649 Take unsigned long arguments for PIDs.
10650 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10651 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10652 (wait_for_sigstop, linux_resume_one_process)
10653 (regsets_fetch_inferior_registers, linux_send_signal)
10654 (linux_read_auxv): Likewise. Update the types of variables holding
10655 PIDs. Update format string specifiers.
10656 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10657 * remote-utils.c (prepare_resume_reply): Likewise.
10658 * server.c (cont_thread, general_thread, step_thread)
10659 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10660 unsigned long.
10661 (handle_query): Update format specifiers.
10662 (handle_v_cont, main): Use strtoul for thread IDs.
10663 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10664 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10665 (general_thread, step_thread, thread_from_wait)
10666 (old_thread_from_wait): Update.
10667 * target.h (struct thread_resume): Use unsigned long for THREAD.
10668 (struct target_ops): Use unsigned long for arguments to attach and
10669 thread_alive.
10670
dcdb98d2
DJ
106712005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10672
10673 * acinclude.m4: Include bfd/bfd.m4 directly.
10674 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10675 <agriffis@toolchain.org>.
10676 * aclocal.m4, configure: Regenerated.
10677
bec39cab
AC
106782005-01-07 Andrew Cagney <cagney@gnu.org>
10679
10680 * configure.ac: Rename configure.in, require autoconf 2.59.
10681 * configure: Re-generate.
10682
434c4c77
DJ
106832004-12-08 Daniel Jacobowitz <dan@debian.org>
10684
10685 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10686 LIBS when finished.
10687 * aclocal.m4: Regenerated.
10688 * configure: Regenerated.
10689
db1d3e1b
AS
106902004-11-21 Andreas Schwab <schwab@suse.de>
10691
10692 * linux-m68k-low.c (m68k_num_gregs): Define.
10693 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10694 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10695 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10696 (m68k_breakpoint_at): New. Add to the_low_target.
10697
10698 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10699 srv_linux_thread_db to yes.
10700
43360365
JB
107012004-10-20 Joel Brobecker <brobecker@gnat.com>
10702
10703 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10704 (ARCH_SET_FS): Likewise.
10705 (ARCH_GET_FS): Likewise.
10706 (ARCH_GET_GS): Likewise.
10707
fd500816
DJ
107082004-10-16 Daniel Jacobowitz <dan@debian.org>
10709
10710 * linux-i386-low.c (ps_get_thread_area): New.
10711 * linux-x86-64-low.c (ps_get_thread_area): New.
10712 * linux-low.c: Include <sys/syscall.h>.
10713 (linux_kill_one_process): Don't kill the first thread here.
10714 (linux_kill): Kill the first thread here.
10715 (kill_lwp): New function.
10716 (send_sigstop, linux_send_signal): Use it.
10717 * proc-service.c: Clean up #ifdefs.
10718 (fpregset_info): Delete.
10719 (ps_lgetregs): Update and enable implementation.
10720 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10721 implementations.
10722 * remote-utils.c (struct sym_cache, symbol_cache): New.
10723 (input_interrupt): Print a clearer message.
10724 (async_io_enabled): New variable.
10725 (enable_async_io, disable_async_io): Use it. Update comments.
10726 (look_up_one_symbol): Use the symbol cache.
10727 * thread-db.c (thread_db_look_up_symbols): New function.
10728 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10729
f6de3c42
DJ
107302004-10-16 Daniel Jacobowitz <dan@debian.org>
10731
10732 * configure.in: Test for -rdynamic.
10733 * configure: Regenerated.
10734 * Makefile (INTERNAL_LDFLAGS): New.
10735 (gdbserver, gdbreplay): Use it.
10736
2c0fc042
AC
107372004-09-02 Andrew Cagney <cagney@gnu.org>
10738
10739 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10740
075b3282
DJ
107412004-03-23 Daniel Jacobowitz <drow@mvista.com>
10742
10743 * linux-low.c (linux_wait): Clear all_processes list also.
10744
fa6a77dc
DJ
107452004-03-12 Daniel Jacobowitz <drow@mvista.com>
10746
10747 * linux-low.c: Include <errno.h>. Remove extern declaration of
10748 errno.
10749
6d782a97
DJ
107502004-03-12 Daniel Jacobowitz <drow@mvista.com>
10751
10752 * gdbreplay.c, server.h, utils.c: Update copyright years.
10753
3a7fb99b
DJ
107542004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10755
10756 * server.c (main): Print child status or termination signal from
10757 variable 'signal', not 'sig'.
10758
c3e735a6
DJ
107592004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10760
10761 * linux-low.c (linux_read_memory): Change return type to
10762 int. Check for and return error from ptrace().
10763 * target.c (read_inferior_memory): Change return type to int. Pass
10764 back return status from the_target->read_memory().
10765 * target.h (struct target_ops): Adapt *read_memory() prototype.
10766 Update comment.
10767 (read_inferior_memory): Adapt prototype.
10768 * server.c (main): Return an error packet if
10769 read_inferior_memory() returns an error.
10770
a59d1c82
DJ
107712004-03-04 Daniel Jacobowitz <drow@mvista.com>
10772
10773 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10774 Unify with other clean targets.
10775
dc3f8883
DJ
107762004-02-29 Daniel Jacobowitz <drow@mvista.com>
10777
10778 * server.c (handle_v_cont): Call set_desired_inferior.
10779
89a208da
DJ
107802004-02-29 Daniel Jacobowitz <drow@mvista.com>
10781
10782 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10783
62ea82f5
DJ
107842004-02-29 Daniel Jacobowitz <drow@mvista.com>
10785
10786 * linux-low.c (linux_wait): Unblock async I/O.
10787 (linux_resume): Block and enable async I/O.
10788 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10789 * server.h (block_async_io, unblock_async_io): Add prototypes.
10790
6910d122
DJ
107912004-02-29 Daniel Jacobowitz <drow@mvista.com>
10792
10793 * remote-utils.c (remote_open): Print a status notice after
10794 opening a TCP port.
10795 * server.c (attach_inferior): Print a status notice after
10796 attaching.
10797
107982004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10799
10800 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10801
c89dc5d4
DJ
108022004-02-26 Daniel Jacobowitz <drow@mvista.com>
10803
10804 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10805 error packet.
10806 * server.c, target.h: Update copyright years.
10807
4b8dad4a
RM
108082004-02-25 Roland McGrath <roland@redhat.com>
10809
10810 * target.h (struct target_ops): New member `read_auxv'.
10811 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10812 * linux-low.c (linux_read_auxv): New function.
10813 (linux_target_ops): Initialize `read_auxv' member to that.
10814
d7446758
JB
108152004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10816
10817 Committed by Jim Blandy <jimb@redhat.com>.
10818
10819 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10820 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10821 instead of GPR_SIZE to distiguish s390 and s390x targets.
10822
5544ad89
DJ
108232004-01-31 Daniel Jacobowitz <drow@mvista.com>
10824
10825 * linux-low.c: Update copyright year.
10826 (check_removed_breakpoint): Clear pending_is_breakpoint.
10827 (linux_set_resume_request, linux_queue_one_thread)
10828 (resume_status_pending_p): New functions.
10829 (linux_continue_one_thread): Use process->resume.
10830 (linux_resume): Only resume threads if there are no pending events.
10831 * linux-low.h (struct process_info): Add resume request
10832 pointer.
10833
2a68b70e
DJ
108342004-01-30 Daniel Jacobowitz <drow@mvista.com>
10835
10836 * regcache.c (new_register_cache): Clear the allocated register
10837 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10838
64386c31
DJ
108392003-10-13 Daniel Jacobowitz <drow@mvista.com>
10840
10841 * linux-low.c (linux_resume): Take a struct thread_resume *
10842 argument.
10843 (linux_wait): Update call.
10844 (resume_ptr): New static variable.
10845 (linux_continue_one_thread): Renamed from
10846 linux_continue_one_process. Use resume_ptr.
10847 (linux_resume): Use linux_continue_one_thread.
10848 * server.c (handle_v_cont, handle_v_requests): New functions.
10849 (myresume): New function.
10850 (main): Handle 'v' case.
10851 * target.h (struct thread_resume): New type.
10852 (struct target_ops): Change argument of "resume" to struct
10853 thread_resume *.
10854 (myresume): Delete macro.
10855
c938e9b0
L
108562003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10857
10858 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10859 (uninstall): Support DESTDIR.
10860
7f313d07
BC
10861Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10862
10863 * configure.srv: Add xscale*linux copy of arm*linux entry.
10864
3b2fc2ea
DJ
108652003-07-24 Daniel Jacobowitz <drow@mvista.com>
10866
10867 * linux-arm-low.c (arm_reinsert_addr): New function.
10868 (the_low_target): Add arm_reinsert_addr.
10869
1c0a559e
MK
108702003-07-08 Mark Kettenis <kettenis@gnu.org>
10871
10872 * mem-break.c: Remove whitespace at end of file.
10873
43d5792c
DJ
108742003-06-28 Daniel Jacobowitz <drow@mvista.com>
10875
10876 * configure.in: Check whether we need to prototype strerror.
10877 * server.h: Optionally prototype strerror.
10878 * gdbreplay.c (perror_with_name): Use strerror.
10879 * linux-low.c (linux_attach_lwp): Use strerror.
10880 * utils.c (perror_with_name): Use strerror.
10881 * config.in, configure: Regenerated.
10882
c8a86edf
DJ
108832003-06-28 Daniel Jacobowitz <drow@mvista.com>
10884
10885 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10886 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10887
73d37363
DJ
108882003-06-20 Daniel Jacobowitz <drow@mvista.com>
10889
10890 * Makefile.in (SFILES): Update.
10891 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10892 low-sun3.c: Remove files.
10893
6ad8ae5c
DJ
108942003-06-17 Daniel Jacobowitz <drow@mvista.com>
10895
10896 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10897 (linux_detach_one_process, linux_detach): New functions.
10898 (linux_target_ops): Add linux_detach.
10899 * server.c (main): Handle 'D' packet.
10900 * target.h (struct target_ops): Add "detach" member.
10901 (detach_inferior): Define.
10902
1581182a
MK
109032003-06-13 Mark Kettenis <kettenis@gnu.org>
10904
10905 From Kelley Cook <kelleycook@wideopenwest.com>:
10906 * configure.srv: Accept i[34567]86 variants.
10907
e5379b03
DJ
109082003-06-05 Daniel Jacobowitz <drow@mvista.com>
10909
10910 * linux-low.c (linux_wait_for_event): Correct comment typos.
10911 (linux_resume_one_process): Call check_removed_breakpoint.
10912 (linux_send_signal): New function.
10913 (linux_target_ops): Add linux_send_signal.
10914 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10915 of kill.
10916 * target.h (struct target_ops): Add send_signal.
10917
2ff29de4
JB
109182003-05-29 Jim Blandy <jimb@redhat.com>
10919
10920 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10921 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10922 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10923 away part of the register's value.
10924
254787d4
DJ
109252003-03-26 Daniel Jacobowitz <drow@mvista.com>
10926
10927 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10928 (linux_wait_for_event, linux_init_signals): Likewise.
10929
94e10508
DJ
109302003-03-17 Daniel Jacobowitz <drow@mvista.com>
10931
10932 * configure.in: Check for stdlib.h.
10933 * configure: Regenerated.
10934 * config.in: Regenerated.
10935
4c0711e0
DJ
109362003-01-04 Andreas Schwab <schwab@suse.de>
10937
10938 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10939
ef66e766
AC
109402003-01-02 Andrew Cagney <ac131313@redhat.com>
10941
10942 * Makefile.in: Remove obsolete code.
10943
a1358604
DJ
109442002-11-20 Daniel Jacobowitz <drow@mvista.com>
10945
10946 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10947 defined(PT_FPR0_HI).
10948
23ce3b1c
DJ
109492002-11-17 Stuart Hughes <seh@zee2.com>
10950
10951 * linux-arm-low.c (arm_num_regs): Increase.
10952 (arm_regmap): Include status register.
10953
109542002-11-17 Daniel Jacobowitz <drow@mvista.com>
10955
10956 * linux-low.c (register_addr): Remove incorrect -1 check.
10957
a9fa9f7d
DJ
109582002-08-29 Daniel Jacobowitz <drow@mvista.com>
10959
10960 * linux-low.c (linux_create_inferior): Call setpgid. Return
10961 the new PID.
10962 (unstopped_p, linux_signal_pid): Remove.
10963 (linux_target_ops): Remove linux_signal_pid.
10964 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10965 global instead of target method.
10966 * target.h (struct target_ops): Remove signal_pid. Update comment
10967 for create_inferior.
10968 * server.c (signal_pid): New variable.
10969 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10970 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10971 (attach_inferior): Set signal_pid.
10972
17574093
DJ
109732002-08-23 Daniel Jacobowitz <drow@mvista.com>
10974
10975 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10976
109772002-08-20 Jim Blandy <jimb@redhat.com>
10978
10979 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10980 default for this.
10981
109822002-08-01 Andrew Cagney <cagney@redhat.com>
10983
10984 * Makefile.in: Make chill references obsolete.
10985
109862002-07-24 Kevin Buettner <kevinb@redhat.com>
10987
10988 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10989 * configure: Regenerate.
10990 * config.in: Regenerate.
10991
109922002-07-09 David O'Brien <obrien@FreeBSD.org>
10993
10994 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10995 (perror_with_name, remote_close, remote_open, expect, play): Static.
10996
109972002-07-04 Michal Ludvig <mludvig@suse.cz>
10998
4b8dad4a 10999 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11000 byte offsets instead of an array of indexes.
11001 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11002
110032002-06-13 Daniel Jacobowitz <drow@mvista.com>
11004
11005 * regcache.c: Add comment.
11006
110072002-06-11 Daniel Jacobowitz <drow@mvista.com>
11008
11009 * thread-db.c: New file.
11010 * proc-service.c: New file.
11011 * acinclude.m4: New file.
11012 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11013 proc-service.o, and thread-db.o.
11014 (linux-low.o): Add USE_THREAD_DB.
11015 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11016 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11017 * aclocal.m4: Regenerated.
11018 * config.in: Regenerated.
11019 * configure: Regenerated.
11020 * configure.in: Check for proc_service.h, sys/procfs.h,
11021 thread_db.h, and linux/elf.h headrs.
11022 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11023 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11024 Check for -lthread_db and thread support.
11025 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11026 PowerPC, and SuperH.
11027 * i387-fp.c: Constify arguments.
11028 * i387-fp.h: Likewise.
11029 * inferiors.c: (struct thread_info): Renamed from
11030 `struct inferior_info'. Remove PID member. Use generic inferior
11031 list header. All uses updated.
11032 (inferiors, signal_pid): Removed.
11033 (all_threads): New variable.
11034 (get_thread): Define.
11035 (add_inferior_to_list): New function.
11036 (for_each_inferior): New function.
11037 (change_inferior_id): New function.
11038 (add_inferior): Removed.
11039 (remove_inferior): New function.
11040 (add_thread): New function.
11041 (free_one_thread): New function.
11042 (remove_thread): New function.
11043 (clear_inferiors): Use for_each_inferior and free_one_thread.
11044 (find_inferior): New function.
11045 (find_inferior_id): New function.
11046 (inferior_target_data): Update argument type.
11047 (set_inferior_target_data): Likewise.
11048 (inferior_regcache_data): Likewise.
11049 (set_inferior_regcache_data): Likewise.
11050 * linux-low.c (linux_bp_reinsert): Remove.
11051 (all_processes, stopping_threads, using_thrads)
11052 (struct pending_signals, debug_threads, pid_of): New.
11053 (inferior_pid): Replace with macro.
11054 (struct inferior_linux_data): Remove.
11055 (get_stop_pc, add_process): New functions.
11056 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11057 Use add_process and add_thread.
11058 (linux_attach_lwp): New function, based on old linux_attach. Use
11059 add_process and add_thread. Set stop_expected for new threads.
11060 (linux_attach): New function.
11061 (linux_kill_one_process): New function.
11062 (linux_kill): Kill all LWPs.
11063 (linux_thread_alive): Use find_inferior_id.
11064 (check_removed_breakpoints, status_pending_p): New functions.
11065 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11066 Update. Use WNOHANG. Wait for cloned processes also. Update process
11067 struct for the found process.
11068 (linux_wait_for_event): New function.
11069 (linux_wait): Use it. Support LWPs.
11070 (send_sigstop, wait_for_sigstop, stop_all_processes)
11071 (linux_resume_one_process, linux_continue_one_process): New functions.
11072 (linux_resume): Support LWPs.
11073 (REGISTER_RAW_SIZE): Remove.
11074 (fetch_register): Use register_size instead. Call supply_register.
11075 (usr_store_inferior_registers): Likewise. Call collect_register.
11076 Fix recursive case.
11077 (regsets_fetch_inferior_registers): Improve error message.
11078 (regsets_store_inferior_registers): Add debugging.
11079 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11080 (unstopped_p, linux_signal_pid): New functions.
11081 (linux_target_ops): Add linux_signal_pid.
11082 (linux_init_signals): New function.
11083 (initialize_low): Call it. Initialize using_threads.
11084 * regcache.c (inferior_regcache_data): Add valid
11085 flag.
11086 (get_regcache): Fetch registers lazily. Add fetch argument
11087 and update all callers.
11088 (regcache_invalidate_one, regcache_invalidate): New
11089 functions.
11090 (new_register_cache): Renamed from create_register_cache.
11091 Return the new regcache.
11092 (free_register_cache): Change argument to a void *.
11093 (registers_to_string, registers_from_string): Call get_regcache
11094 with fetch flag set.
11095 (register_data): Make static. Pass fetch flag to get_regcache.
11096 (supply_register): Call get_regcache with fetch flag clear.
11097 (collect_register): Call get_regcache with fetch flag set.
11098 (collect_register_as_string): New function.
11099 * regcache.h: Update.
11100 * remote-utils.c (putpkt): Flush after debug output and use
11101 stderr.
11102 Handle input interrupts while waiting for an ACK.
11103 (input_interrupt): Use signal_pid method.
11104 (getpkt): Flush after debug output and use stderr.
11105 (outreg): Use collect_register_as_string.
11106 (new_thread_notify, dead_thread_notify): New functions.
11107 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11108 and general_thread.
11109 (look_up_one_symbol): Flush after debug output.
11110 * server.c (step_thread, server_waiting): New variables.
11111 (start_inferior): Don't use signal_pid. Update call to mywait.
11112 (attach_inferior): Update call to mywait.
11113 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11114 (main): Don't fetch/store registers explicitly. Use
11115 set_desired_inferior. Support proposed ``Hs'' packet. Update
11116 calls to mywait.
11117 * server.h: Update.
11118 (struct inferior_list, struct_inferior_list_entry): New.
11119 * target.c (set_desired_inferior): New.
11120 (write_inferior_memory): Constify.
11121 (mywait): New function.
11122 * target.h: Update.
11123 (struct target_ops): New signal_pid method.
11124 (mywait): Removed macro, added prototype.
11125
11126 * linux-low.h (regset_func): Removed.
11127 (regset_fill_func, regset_store_func): New.
11128 (enum regset_type): New.
11129 (struct regset_info): Add type field. Use new operation types.
11130 (struct linux_target_ops): stop_pc renamed to get_pc.
11131 Add decr_pc_after_break and breakpoint_at.
11132 (get_process, get_thread_proess, get_process_thread)
11133 (strut process_info, all_processes, linux_attach_lwp)
11134 (thread_db_init): New.
11135
11136 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11137 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11138 (the_low_target): Add new members.
11139 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11140 (i386_store_fpxregset): Constify.
11141 (target_regsets): Add new kind identifier.
11142 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11143 (i386_set_pc): Add debugging.
11144 (i386_breakpoint_at): New function.
11145 (the_low_target): Add new members.
11146 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11147 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11148 (mips_breakpoint_at): New.
11149 (the_low_target): Add new members.
11150 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11151 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11152 (the_low_target): Add new members.
11153 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11154 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11155 (the_low_target): Add new members.
11156 * linux-x86-64-low.c (target_regsets): Add new kind
11157 identifier.
11158
111592002-05-15 Daniel Jacobowitz <drow@mvista.com>
11160
11161 From Martin Pool <mbp@samba.org>:
11162 * server.c (gdbserver_usage): New function.
11163 (main): Call it.
11164
111652002-05-14 Daniel Jacobowitz <drow@mvista.com>
11166
11167 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11168 stop_at -> stop_pc.
11169
111702002-05-04 Andrew Cagney <ac131313@redhat.com>
11171
11172 * Makefile.in: Remove obsolete code.
11173
111742002-04-24 Michal Ludvig <mludvig@suse.cz>
11175
11176 * linux-low.c (regsets_fetch_inferior_registers),
11177 (regsets_store_inferior_registers): Removed cast to int from
11178 ptrace() calls.
11179 * regcache.h: Added declaration of struct inferior_info.
11180
111812002-04-20 Daniel Jacobowitz <drow@mvista.com>
11182
11183 * inferiors.c (struct inferior_info): Add regcache_data.
11184 (add_inferior): Call create_register_cache.
11185 (clear_inferiors): Call free_register_cache.
11186 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11187 * regcache.c (struct inferior_regcache_data): New.
11188 (registers): Remove.
11189 (get_regcache): New function.
11190 (create_register_cache, free_register_cache): New functions.
11191 (set_register_cache): Don't initialize the register cache here.
11192 (registers_to_string, registers_from_string, register_data): Call
11193 get_regcache.
11194 * regcache.h: Add prototypes.
11195 * server.h: Likewise.
11196
111972002-04-20 Daniel Jacobowitz <drow@mvista.com>
11198
11199 * mem-break.c: New file.
11200 * mem-break.h: New file.
11201 * Makefile.in: Add mem-break.o rule; update server.h
11202 dependencies.
11203 * inferiors.c (struct inferior_info): Add target_data
11204 member.
11205 (clear_inferiors): Free target_data member if set.
11206 (inferior_target_data, set_inferior_target_data): New functions.
11207 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11208 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11209 * linux-low.c (linux_bp_reinsert): New variable.
11210 (struct inferior_linux_data): New.
11211 (linux_create_inferior): Use set_inferior_target_data.
11212 (linux_attach): Likewise. Call add_inferior.
11213 (linux_wait_for_one_inferior): New function.
11214 (linux_wait): Call it.
11215 (linux_write_memory): Add const.
11216 (initialize_low): Call set_breakpoint_data.
11217 * linux-low.h (struct linux_target_ops): Add breakpoint
11218 handling members.
11219 * server.c (attach_inferior): Remove extra add_inferior
11220 call.
11221 * server.h: Include mem-break.h. Update inferior.c
11222 prototypes.
11223 * target.c (read_inferior_memory)
11224 (write_inferior_memory): New functions.
11225 * target.h (read_inferior_memory)
11226 (write_inferior_memory): Change macros to prototypes.
11227 (struct target_ops): Update comments. Add const to write_memory
11228 definition.
11229
112302002-04-11 Daniel Jacobowitz <drow@mvista.com>
11231
11232 * linux-low.c (usr_store_inferior_registers): Support
11233 registers which are allowed to fail to store.
11234 * linux-low.h (linux_target_ops): Likewise.
11235 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11236 (ppc_cannot_store_register): FPSCR may not be storable.
11237
112382002-04-09 Daniel Jacobowitz <drow@mvista.com>
11239
11240 * server.h: Include <string.h> if HAVE_STRING_H.
11241 * ChangeLog: Correct paths in last ChangeLog entry.
11242
112432002-04-09 Daniel Jacobowitz <drow@mvista.com>
11244
11245 * linux-low.h: Remove obsolete prototypes.
11246 (struct linux_target_ops): New.
11247 (extern the_low_target): New.
11248 * linux-low.c (num_regs, regmap): Remove declarations.
11249 (register_addr): Use the_low_target explicitly.
11250 (fetch_register): Likewise.
11251 (usr_fetch_inferior_registers): Likewise.
11252 (usr_store_inferior_registers): Likewise.
11253 * linux-arm-low.c (num_regs): Remove.
11254 (arm_num_regs): Define.
11255 (arm_regmap): Renamed from regmap, made static.
11256 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11257 made static.
11258 (arm_cannot_store_register): Renamed from cannot_store_register,
11259 made static.
11260 (the_low_target): New.
11261 * linux-i386-low.c (num_regs): Remove.
11262 (i386_num_regs): Define.
11263 (i386_regmap): Renamed from regmap, made static.
11264 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11265 made static.
11266 (i386_cannot_store_register): Renamed from cannot_store_register,
11267 made static.
11268 (the_low_target): New.
11269 * linux-ia64-low.c (num_regs): Remove.
11270 (ia64_num_regs): Define.
11271 (ia64_regmap): Renamed from regmap, made static.
11272 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11273 made static.
11274 (ia64_cannot_store_register): Renamed from cannot_store_register,
11275 made static.
11276 (the_low_target): New.
11277 * linux-m68k-low.c (num_regs): Remove.
11278 (m68k_num_regs): Define.
11279 (m68k_regmap): Renamed from regmap, made static.
11280 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11281 made static.
11282 (m68k_cannot_store_register): Renamed from cannot_store_register,
11283 made static.
11284 (the_low_target): New.
11285 * linux-mips-low.c (num_regs): Remove.
11286 (mips_num_regs): Define.
11287 (mips_regmap): Renamed from regmap, made static.
11288 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11289 made static.
11290 (mips_cannot_store_register): Renamed from cannot_store_register,
11291 made static.
11292 (the_low_target): New.
11293 * linux-ppc-low.c (num_regs): Remove.
11294 (ppc_num_regs): Define.
11295 (ppc_regmap): Renamed from regmap, made static.
11296 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11297 made static.
11298 (ppc_cannot_store_register): Renamed from cannot_store_register,
11299 made static.
11300 (the_low_target): New.
11301 * linux-s390-low.c (num_regs): Remove.
11302 (s390_num_regs): Define.
11303 (s390_regmap): Renamed from regmap, made static.
11304 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11305 made static.
11306 (s390_cannot_store_register): Renamed from cannot_store_register,
11307 made static.
11308 (the_low_target): New.
11309 * linux-sh-low.c (num_regs): Remove.
11310 (sh_num_regs): Define.
11311 (sh_regmap): Renamed from regmap, made static.
11312 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11313 made static.
11314 (sh_cannot_store_register): Renamed from cannot_store_register,
11315 made static.
11316 (the_low_target): New.
11317 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11318 (the_low_target): New.
11319
113202002-04-09 Daniel Jacobowitz <drow@mvista.com>
11321
11322 * Makefile.in: Add stamp-h target.
11323 * configure.in: Create stamp-h.
11324 * configure: Regenerated.
11325
113262002-04-09 Daniel Jacobowitz <drow@mvista.com>
11327
11328 * inferiors.c: New file.
11329 * target.c: New file.
11330 * target.h: New file.
11331 * Makefile.in: Add target.o and inferiors.o. Update
11332 dependencies.
11333 * linux-low.c (inferior_pid): New static variable,
11334 moved from server.c.
11335 (linux_create_inferior): Renamed from create_inferior.
11336 Call add_inferior. Return 0 on success instead of a PID.
11337 (linux_attach): Renamed from myattach.
11338 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11339 (linux_thread_alive): Renamed from mythread_alive.
11340 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11341 child dies.
11342 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11343 (regsets_store_inferior_registers): Correct error message.
11344 Add missing ``return 0''.
11345 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11346 (linux_store_registers): Renamed from store_inferior_registers.
11347 (linux_read_memory): Renamed from read_inferior_memory.
11348 (linux_write_memory): Renamed from write_inferior_memory.
11349 (linux_target_ops): New structure.
11350 (initialize_low): Call set_target_ops ().
11351 * remote-utils.c (unhexify): New function.
11352 (hexify): New function.
11353 (input_interrupt): Send signals to ``signal_pid''.
11354 * server.c (inferior_pid): Remove.
11355 (start_inferior): Update create_inferior call.
11356 (attach_inferior): Call add_inferior.
11357 (handle_query): New function.
11358 (main): Call handle_query for `q' packets.
11359 * server.h: Include "target.h". Remove obsolete prototypes.
11360 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11361
113622002-04-09 Daniel Jacobowitz <drow@mvista.com>
11363
11364 * Makefile.in: Add WARN_CFLAGS. Update configury
11365 dependencies.
11366 * configure.in: Check for <string.h>
11367 * configure: Regenerate.
11368 * config.in: Regenerate.
11369 * gdbreplay.c: Include needed system headers.
11370 (remote_open): Remove strchr prototype.
11371 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11372 * regcache.c (supply_register): Change buf argument to const void *.
11373 (supply_register_by_name): Likewise.
11374 (collect_register): Change buf argument to void *.
11375 (collect_register_by_name): Likewise.
11376 * regcache.h: Add missing prototypes.
11377 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11378 * server.c (handle_query): New function.
11379 (attached): New static variable, moved out of main.
11380 (main): Quiet longjmp clobber warnings.
11381 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11382 * utils.c (error): Remove NORETURN.
11383 (fatal): Likewise.
This page took 1.606908 seconds and 4 git commands to generate.