configure: check for libipt
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
96c97461
PL
12015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2
3 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4 Z_PACKET_SW_BP.
5
37d66942
PL
62015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7
8 * linux-aarch64-low.c: Remove comment about endianness.
9 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11 memcmp.
12
dc06243f
GB
132015-06-24 Gary Benson <gbenson@redhat.com>
14
15 * linux-i386-ipa.c (stdint.h): Do not include.
16 * lynx-i386-low.c (stdint.h): Likewise.
17 * lynx-ppc-low.c (stdint.h): Likewise.
18 * mem-break.c (stdint.h): Likewise.
19 * thread-db.c (stdint.h): Likewise.
20 * tracepoint.c (stdint.h): Likewise.
21 * win32-low.c (stdint.h): Likewise.
22
124e13d9
SM
232015-06-18 Simon Marchi <simon.marchi@ericsson.com>
24
25 * server.c (write_qxfer_response): Update call to
26 remote_escape_output.
27
909c2cda
JK
282015-06-15 Aleksandar Ristovski <aristovski@qnx.com
29 Jan Kratochvil <jan.kratochvil@redhat.com>
30
31 Merge multiple hex conversions.
32 * gdbreplay.c (tohex): Rename to 'fromhex'.
33 (logchar): Use fromhex.
34
24c05f46
JK
352015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
36
37 * server.c (handle_qxfer_libraries): Set `version' attribute for
38 <library-list>.
39
14d2069a
GB
402015-06-10 Gary Benson <gbenson@redhat.com>
41
42 * target.h (struct target_ops) <multifs_open>: New field.
43 <multifs_unlink>: Likewise.
44 <multifs_readlink>: Likewise.
45 * linux-low.c (nat/linux-namespaces.h): New include.
46 (linux_target_ops): Initialize the_target->multifs_open,
47 the_target->multifs_unlink and the_target->multifs_readlink.
48 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
49 * hostio.c (hostio_fs_pid): New static variable.
50 (hostio_handle_new_gdb_connection): New function.
51 (handle_setfs): Likewise.
52 (handle_open): Use the_target->multifs_open as appropriate.
53 (handle_unlink): Use the_target->multifs_unlink as appropriate.
54 (handle_readlink): Use the_target->multifs_readlink as
55 appropriate.
56 (handle_vFile): Handle vFile:setfs packets.
57 * server.c (handle_query): Call hostio_handle_new_gdb_connection
58 after target_handle_new_gdb_connection.
59
4b8b5e72
GB
602015-06-10 Gary Benson <gbenson@redhat.com>
61
62 * configure.ac (AC_CHECK_FUNCS): Add setns.
63 * config.in: Regenerate.
64 * configure: Likewise.
65 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
66 (linux-namespaces.o): New rule.
67 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
68
3ac2e371
GB
692015-06-09 Gary Benson <gbenson@redhat.com>
70
71 * hostio.c (handle_open): Process mode argument with
72 fileio_to_host_mode.
73
ca9b78ce
YQ
742015-06-01 Yao Qi <yao.qi@linaro.org>
75
76 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
77 * linux-x86-low.c: Likewise.
78
bfacd19d
DB
792015-05-28 Don Breazeal <donb@codesourcery.com>
80
81 * linux-low.c (handle_extended_wait): Initialize
82 thread_info.last_resume_kind for new fork children.
83
452003ef
PA
842015-05-15 Pedro Alves <palves@redhat.com>
85
86 * target.h (target_handle_new_gdb_connection): Rewrite using if
87 wrapped in do/while.
88
1041a03c
JB
892015-05-14 Joel Brobecker <brobecker@adacore.com>
90
91 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
92 * configure, config.in: Regenerate.
93 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
94 Declare typedef.
95
c269dbdb
DB
962015-05-12 Don Breazeal <donb@codesourcery.com>
97
98 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
99 PTRACE_EVENT_VFORK_DONE.
100 (linux_low_ptrace_options, extended_event_reported): Add vfork
101 events.
102 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
103 and "vforkdone" for RSP 'T' Stop Reply Packet.
104 * server.h (report_vfork_events): Declare
105 global variable.
106
3a8a0396
DB
1072015-05-12 Don Breazeal <donb@codesourcery.com>
108
109 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
110 (the_low_target) <new_fork>: Initialize new member.
111 * linux-arm-low.c (arm_new_fork): New function.
112 (the_low_target) <new_fork>: Initialize new member.
113 * linux-low.c (handle_extended_wait): Call new target function
114 new_fork.
115 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
116 * linux-mips-low.c (mips_add_watchpoint): New function
117 extracted from mips_insert_point.
118 (the_low_target) <new_fork>: Initialize new member.
119 (mips_linux_new_fork): New function.
120 (mips_insert_point): Call mips_add_watchpoint.
121 * linux-x86-low.c (x86_linux_new_fork): New function.
122 (the_low_target) <new_fork>: Initialize new member.
123
de0d863e
DB
1242015-05-12 Don Breazeal <donb@codesourcery.com>
125
126 * linux-low.c (handle_extended_wait): Implement return value,
127 rename argument 'event_child' to 'event_lwp', handle
128 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
129 (linux_low_ptrace_options): New function.
130 (linux_low_filter_event): Call linux_low_ptrace_options,
131 use different argument fo linux_enable_event_reporting,
132 use return value from handle_extended_wait.
133 (extended_event_reported): New function.
134 (linux_wait_1): Call extended_event_reported and set
135 status to report fork events.
136 (linux_write_memory): Add pid to debug message.
137 (reset_lwp_ptrace_options_callback): New function.
138 (linux_handle_new_gdb_connection): New function.
139 (linux_target_ops): Initialize new structure member.
140 * linux-low.h (struct lwp_info) <waitstatus>: New member.
141 * lynx-low.c: Initialize new structure member.
142 * remote-utils.c (prepare_resume_reply): Implement stop reason
143 "fork" for "T" stop message.
144 * server.c (handle_query): Call handle_new_gdb_connection.
145 * server.h (report_fork_events): Declare global flag.
146 * target.h (struct target_ops) <handle_new_gdb_connection>:
147 New member.
148 (target_handle_new_gdb_connection): New macro.
149 * win32-low.c: Initialize new structure member.
150
ddcbc397
DB
1512015-05-12 Don Breazeal <donb@codesourcery.com>
152
153 * mem-break.c (APPEND_TO_LIST): Define macro.
154 (clone_agent_expr): New function.
155 (clone_one_breakpoint): New function.
156 (clone_all_breakpoints): New function.
157 * mem-break.h: Declare new functions.
158
89245bc0
DB
1592015-05-12 Don Breazeal <donb@codesourcery.com>
160
161 * linux-low.c (linux_supports_fork_events): New function.
162 (linux_supports_vfork_events): New function.
163 (linux_target_ops): Initialize new structure members.
164 (initialize_low): Call linux_check_ptrace_features.
165 * lynx-low.c (lynx_target_ops): Initialize new structure
166 members.
167 * server.c (report_fork_events, report_vfork_events):
168 New global flags.
169 (handle_query): Add new features to qSupported packet and
170 response.
171 (captured_main): Initialize new global variables.
172 * target.h (struct target_ops) <supports_fork_events>:
173 New member.
174 <supports_vfork_events>: New member.
175 (target_supports_fork_events): New macro.
176 (target_supports_vfork_events): New macro.
177 * win32-low.c (win32_target_ops): Initialize new structure
178 members.
179
835205d0
GB
1802015-05-12 Gary Benson <gbenson@redhat.com>
181
182 * server.c (handle_qxfer_exec_file): Use current process
183 if annex is empty.
184
21e94bd9
SL
1852015-05-08 Sandra Loosemore <sandra@codesourcery.com>
186
187 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
188 Remove HAVE_PTRACE_GETREGS conditionals.
189 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
190 instead of PTRACE_GETREGS and PTRACE_SETREGS.
191
45614f15
YQ
1922015-05-08 Yao Qi <yao.qi@linaro.org>
193
194 * linux-low.c (linux_supports_conditional_breakpoints): New
195 function.
196 (linux_target_ops): Install new target method.
197 * lynx-low.c (lynx_target_ops): Install NULL hook for
198 supports_conditional_breakpoints.
199 * nto-low.c (nto_target_ops): Likewise.
200 * spu-low.c (spu_target_ops): Likewise.
201 * win32-low.c (win32_target_ops): Likewise.
202 * server.c (handle_query): Check
203 target_supports_conditional_breakpoints.
204 * target.h (struct target_ops) <supports_conditional_breakpoints>:
205 New field.
206 (target_supports_conditional_breakpoints): New macro.
207
80ad801e
PA
2082015-05-06 Pedro Alves <palves@redhat.com>
209
210 PR server/18081
211 * server.c (start_inferior): If the process exits, mourn it.
212
819843c7
GB
2132015-04-21 Gary Benson <gbenson@redhat.com>
214
215 * hostio.c (fileio_open_flags_to_host): Factored out to
216 fileio_to_host_openflags in common/fileio.c. Single use
217 updated.
218
a2d5a9d7
MF
2192015-04-17 Max Filippov <jcmvbkbc@gmail.com>
220
221 * linux-xtensa-low.c (xtensa_fill_gregset)
222 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
223 XCHAL_HAVE_LOOP.
224
deb44829
MF
2252015-04-17 Max Filippov <jcmvbkbc@gmail.com>
226
227 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
228 (regs_info): Replace usrregs pointer with NULL.
229
e57f1de3
GB
2302015-04-17 Gary Benson <gbenson@redhat.com>
231
232 * target.h (struct target_ops) <pid_to_exec_file>: New field.
233 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
234 * server.c (handle_qxfer_exec_file): New function.
235 (qxfer_packets): Add exec-file entry.
236 (handle_query): Report qXfer:exec-file:read as supported packet.
237
62828379
RN
2382015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
239
240 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
241
b88bb450
GB
2422015-04-09 Gary Benson <gbenson@redhat.com>
243
244 * hostio-errno.c (errno_to_fileio_error): Remove function.
245 Update caller to use remote_fileio_to_fio_error.
246
c8f4bfdd
YQ
2472015-04-09 Yao Qi <yao.qi@linaro.org>
248
249 * linux-low.c (linux_insert_point): Call
250 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
251 (linux_remove_point): Call remove_memory_breakpoint if type is
252 raw_bkpt_type_sw.
253 * linux-x86-low.c (x86_insert_point): Don't call
254 insert_memory_breakpoint.
255 (x86_remove_point): Don't call remove_memory_breakpoint.
256
41f98f02
PA
2572015-04-01 Pedro Alves <palves@redhat.com>
258 Cleber Rosa <crosa@redhat.com>
259
260 * server.c (gdbserver_usage): Reorganize and extend the usage
261 message.
262
2bf6fb9d
PA
2632015-03-24 Pedro Alves <palves@redhat.com>
264
265 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
266 output. Also dump TRAP_TRACE.
267 (linux_low_filter_event): In debug output, distinguish a
268 resume_stop SIGSTOP from a delayed SIGSTOP.
269
369f6daa
GB
2702015-03-24 Gary Benson <gbenson@redhat.com>
271
272 * linux-x86-low.c (x86_linux_new_thread): Moved to
273 nat/x86-linux.c.
274 (x86_linux_prepare_to_resume): Likewise.
275
8e5d4070
GB
2762015-03-24 Gary Benson <gbenson@redhat.com>
277
278 * Makefile.in (x86-linux-dregs.o): New rule.
279 * configure.srv: Add x86-linux-dregs.o to relevant targets.
280 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
281 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
282 (x86_linux_dr_get): Likewise.
283 (x86_linux_dr_set): Likewise.
284 (update_debug_registers_callback): Likewise.
285 (x86_linux_dr_set_addr): Likewise.
286 (x86_linux_dr_get_addr): Likewise.
287 (x86_linux_dr_set_control): Likewise.
288 (x86_linux_dr_get_control): Likewise.
289 (x86_linux_dr_get_status): Likewise.
290 (x86_linux_update_debug_registers): Likewise.
291
2b95d440
GB
2922015-03-24 Gary Benson <gbenson@redhat.com>
293
294 * linux-x86-low.c (x86_linux_update_debug_registers):
295 New function, factored out from...
296 (x86_linux_prepare_to_resume): ...this.
297
14b0bc68
GB
2982015-03-24 Gary Benson <gbenson@redhat.com>
299
300 * linux-x86-low.c (x86_linux_dr_get): Update comments.
301 (x86_linux_dr_set): Likewise.
302 (update_debug_registers_callback): Likewise.
303 (x86_linux_dr_set_addr): Likewise.
304 (x86_linux_dr_get_addr): Likewise.
305 (x86_linux_dr_set_control): Likewise.
306 (x86_linux_dr_get_control): Likewise.
307 (x86_linux_dr_get_status): Likewise.
308 (x86_linux_prepare_to_resume): Likewise.
309
5dfe6ca8
GB
3102015-03-24 Gary Benson <gbenson@redhat.com>
311
312 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
313 Use perror_with_name. Pass string through gettext.
314 (x86_linux_dr_set): Likewise.
315
d33472ad
GB
3162015-03-24 Gary Benson <gbenson@redhat.com>
317
318 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
319 (x86_linux_dr_set_addr): ...this.
320 (x86_dr_low_get_addr): Rename to...
321 (x86_linux_dr_get_addr): ...this.
322 (x86_dr_low_set_control): Rename to...
323 (x86_linux_dr_set_control): ...this.
324 (x86_dr_low_get_control): Rename to...
325 (x86_linux_dr_get_control): ...this.
326 (x86_dr_low_get_status): Rename to...
327 (x86_linux_dr_get_status): ...this.
328 (x86_dr_low): Update with new function names.
329
4b134ca1
GB
3302015-03-24 Gary Benson <gbenson@redhat.com>
331
332 * Makefile.in (x86-linux.o): New rule.
333 * configure.srv: Add x86-linux.o to relevant targets.
334 * linux-low.c (lwp_set_arch_private_info): New function.
335 (lwp_arch_private_info): Likewise.
336 * linux-x86-low.c: Include nat/x86-linux.h.
337 (arch_lwp_info): Removed structure.
338 (update_debug_registers_callback):
339 Use lwp_set_debug_registers_changed.
340 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
341 and lwp_set_debug_registers_changed.
342 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
343
34c703da
GB
3442015-03-24 Gary Benson <gbenson@redhat.com>
345
346 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
347 * linux-arm-low.c (arm_new_thread): Likewise.
348 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
349 * linux-mips-low.c (mips_linux_new_thread): Likewise.
350 * linux-x86-low.c (x86_linux_new_thread): Likewise.
351 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
352
cff068da
GB
3532015-03-24 Gary Benson <gbenson@redhat.com>
354
355 * linux-low.c (ptid_of_lwp): New function.
356 (lwp_is_stopped): Likewise.
357 (lwp_stop_reason): Likewise.
358 * linux-x86-low.c (update_debug_registers_callback):
359 Use lwp_is_stopped.
360 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
361 lwp_stop_reason.
362
b2f7c7e8
GB
3632015-03-24 Gary Benson <gbenson@redhat.com>
364
365 * linux-low.h (linux_stop_lwp): Remove declaration.
366
6d4ee8c6
GB
3672015-03-24 Gary Benson <gbenson@redhat.com>
368
369 * linux-low.h: Include nat/linux-nat.h.
370 * linux-low.c (iterate_over_lwps_args): New structure.
371 (iterate_over_lwps_filter): New function.
372 (iterate_over_lwps): Likewise.
373 * linux-x86-low.c (update_debug_registers_callback):
374 Update signature to what iterate_over_lwps expects.
375 Remove PID check that iterate_over_lwps now performs.
376 (x86_dr_low_set_addr): Use iterate_over_lwps.
377 (x86_dr_low_set_control): Likewise.
378
70a0bb6b
GB
3792015-03-24 Gary Benson <gbenson@redhat.com>
380
381 * linux-x86-low.c (x86_debug_reg_state): New function.
382 (x86_linux_prepare_to_resume): Use the above.
383
7b669087
GB
3842015-03-24 Gary Benson <gbenson@redhat.com>
385
386 * linux-low.c (current_lwp_ptid): New function.
387 * linux-x86-low.c: Include nat/linux-nat.h.
388 (x86_dr_low_get_addr): Use current_lwp_ptid.
389 (x86_dr_low_get_control): Likewise.
390 (x86_dr_low_get_status): Likewise.
391
eef49a3d
PA
3922015-03-20 Pedro Alves <palves@redhat.com>
393
394 * tracepoint.c (cmd_qtstatus): Make "str" const.
395
b2333d22
PA
3962015-03-20 Pedro Alves <palves@redhat.com>
397
398 * server.c (handle_general_set): Make "req_str" const.
399
23f238d3
PA
4002015-03-19 Pedro Alves <palves@redhat.com>
401
402 * linux-low.c (linux_resume_one_lwp): Rename to ...
403 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
404 instead call perror_with_name.
405 (check_ptrace_stopped_lwp_gone): New function.
406 (linux_resume_one_lwp): Reimplement as wrapper around
407 linux_resume_one_lwp_throw that swallows errors if the LWP is
408 gone.
409
91baf43f
PA
4102015-03-19 Pedro Alves <palves@redhat.com>
411
412 * linux-low.c (count_events_callback, select_event_lwp_callback):
413 No longer check whether the thread has resume_stop as last resume
414 kind.
415
8bf3b159
PA
4162015-03-19 Pedro Alves <palves@redhat.com>
417
418 * linux-low.c (count_events_callback, select_event_lwp_callback):
419 Use the lwp's status_pending_p field, not the thread's.
420
b90fc188
PA
4212015-03-19 Pedro Alves <palves@redhat.com>
422
423 * linux-low.c (select_event_lwp_callback): Update comments to
424 no longer mention SIGTRAP.
425
464b0089
GB
4262015-03-18 Gary Benson <gbenson@redhat.com>
427
428 * server.c (handle_query): Do not report vFile:fstat as supported.
429
aa9e327f
GB
4302015-03-11 Gary Benson <gbenson@redhat.com>
431
432 * hostio.c (sys/types.h): New include.
433 (sys/stat.h): Likewise.
434 (common-remote-fileio.h): Likewise.
435 (handle_fstat): New function.
436 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 437
791c0056
GB
4382015-03-11 Gary Benson <gbenson@redhat.com>
439
440 * configure.ac (AC_CHECK_MEMBERS): Add checks for
441 struct stat.st_blocks and struct stat.st_blksize.
442 * configure: Regenerate.
443 * config.in: Likewise.
444 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
445 (OBS): Add common-remote-fileio.o.
446 (common-remote-fileio.o): New rule.
447
9a9df970
PA
4482015-03-09 Pedro Alves <palves@redhat.com>
449
450 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
451 'struct sockaddr' pointer in 'accept' call.
452
9eb1356e
PA
4532015-03-09 Pedro Alves <palves@redhat.com>
454
455 Revert:
456 2015-03-07 Pedro Alves <palves@redhat.com>
457 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
458 or <winsock2.h> here. Instead include "gdb_socket.h".
459 (remote_open): Use union gdb_sockaddr_u.
460 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
461 or <winsock2.h> here. Instead include "gdb_socket.h".
462 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
463 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
464 or <sys/un.h>.
465 (init_named_socket, gdb_agent_helper_thread): Use union
466 gdb_sockaddr_u.
467
aac331e4
PA
4682015-03-07 Pedro Alves <palves@redhat.com>
469
470 * configure.ac (build_warnings): Move
471 -Wdeclaration-after-statement to the C-specific set.
472 * configure: Regenerate.
473
366c75fc
PA
4742015-03-07 Pedro Alves <palves@redhat.com>
475
476 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
477 or <winsock2.h> here. Instead include "gdb_socket.h".
478 (remote_open): Use union gdb_sockaddr_u.
479 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
480 or <winsock2.h> here. Instead include "gdb_socket.h".
481 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
482 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
483 or <sys/un.h>.
484 (init_named_socket, gdb_agent_helper_thread): Use union
485 gdb_sockaddr_u.
486
492d29ea
PA
4872015-03-07 Pedro Alves <palves@redhat.com>
488
489 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
490 instead.
491
60a191ed
YQ
4922015-03-06 Yao Qi <yao.qi@linaro.org>
493
494 * linux-aarch64-low.c (aarch64_insert_point): Use
495 show_debug_regs as a boolean.
496 (aarch64_remove_point): Likewise.
497
f5771b1d
PA
4982015-03-05 Pedro Alves <palves@redhat.com>
499
500 * lynx-low.c (lynx_target_ops): Install NULL hooks for
501 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
502 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
503 * nto-low.c (nto_target_ops): Likewise.
504 * spu-low.c (spu_target_ops): Likewise.
505 * win32-low.c (win32_target_ops): Likewise.
506
3e572f71
PA
5072015-03-04 Pedro Alves <palves@redhat.com>
508
509 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
510 Decide whether a breakpoint triggered based on the SIGTRAP's
511 siginfo.si_code.
512 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
513 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
514 (linux_low_filter_event): Check for breakpoints before checking
515 watchpoints.
516 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
517 siginfo.si_code.
518 (linux_stopped_by_sw_breakpoint)
519 (linux_supports_stopped_by_sw_breakpoint)
520 (linux_stopped_by_hw_breakpoint)
521 (linux_supports_stopped_by_hw_breakpoint): New functions.
522 (linux_target_ops): Install new target methods.
523
1ec68e26
PA
5242015-03-04 Pedro Alves <palves@redhat.com>
525
526 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
527 * server.c (swbreak_feature, hwbreak_feature): New globals.
528 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
529 (captured_main): Clear swbreak_feature and hwbreak_feature.
530 * server.h (swbreak_feature, hwbreak_feature): Declare.
531 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
532 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
533 supports_stopped_by_hw_breakpoint>: New fields.
534 (target_supports_stopped_by_sw_breakpoint)
535 (target_stopped_by_sw_breakpoint)
536 (target_supports_stopped_by_hw_breakpoint)
537 (target_stopped_by_hw_breakpoint): Declare.
538
15c66dd6
PA
5392015-03-04 Pedro Alves <palves@redhat.com>
540
541 enum lwp_stop_reason -> enum target_stop_reason
542 * linux-low.c (check_stopped_by_breakpoint): Adjust.
543 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
544 (linux_wait_1, stuck_in_jump_pad_callback)
545 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
546 (linux_stopped_by_watchpoint):
547 * linux-low.h (enum lwp_stop_reason): Delete.
548 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
549 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
550
98fc70d6
YQ
5512015-03-04 Yao Qi <yao.qi@linaro.org>
552
553 * Makefile.in (SFILES): Add linux-aarch64-low.c.
554
dd2ac174
GB
5552015-03-03 Gary Benson <gbenson@redhat.com>
556
557 * hostio.c (handle_vFile): Fix prefix lengths.
558
d68e53f4
MM
5592015-03-03 Markus Metzger <markus.t.metzger@intel.com>
560
561 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
562 ptr_bits.
563
bf2d68ab
AA
5642015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
565
566 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
567 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
568 (clean): Add "rm -f" for above C files.
569 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
570 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
571 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
572 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
573 * linux-s390-low.c (HWCAP_S390_VX): New macro.
574 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
575 (init_registers_s390x_vx_linux64)
576 (init_registers_s390x_tevx_linux64)
577 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
578 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
579 declarations.
580 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
581 (s390_store_vxrs_high): New functions.
582 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
583 NT_S390_VXRS_HIGH.
584 (s390_arch_setup): Add logic for selecting one of the new target
585 descriptions. Activate the new vector regsets if applicable.
586 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
587 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
588 and init_registers_s390x_tevx_linux64.
589
c966a859
PA
5902015-03-01 Pedro Alves <palves@redhat.com>
591
592 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
593 parameter.
594
4180215b
PA
5952015-02-27 Pedro Alves <palves@redhat.com>
596
597 * linux-x86-low.c (u_debugreg_offset): New function.
598 (x86_linux_dr_get, x86_linux_dr_set): Use it.
599
749bab01
PA
6002015-02-27 Pedro Alves <palves@redhat.com>
601
602 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
603 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
604 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
605 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
606 (ps_lsetfpregs, ps_getpid)
607 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
608 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
609 (ps_lsetxregs, ps_plog): Declare.
610
3c14e5a3
PA
6112015-02-27 Pedro Alves <palves@redhat.com>
612
613 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
614 IP_AGENT_EXPORT_FUNC.
615 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
616 IP_AGENT_EXPORT_FUNC.
617 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
618 (IP_AGENT_EXPORT): Delete.
619 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
620 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
621 (gdb_trampoline_buffer_error, collecting, gdb_collect)
622 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
623 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
624 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
625 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
626 (traceframe_read_count, traceframe_write_count)
627 (traceframes_created, trace_state_variables, get_raw_reg)
628 (get_trace_state_variable_value, set_trace_state_variable_value)
629 (ust_loaded, helper_thread_id, cmd_buf): Use
630 IPA_SYM_EXPORTED_NAME.
631 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
632 (tracepoints) Use IP_AGENT_EXPORT_VAR.
633 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
634 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
635 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
636 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
637 EXTERN_C_PUSH/EXTERN_C_POP.
638 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
639 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
640 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
641 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
642 (traceframe_write_count, traceframe_read_count)
643 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
644 (about_to_request_buffer_space, get_trace_state_variable_value)
645 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
646 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
647 EXTERN_C_PUSH/EXTERN_C_POP.
648 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
649 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
650 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
651 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
652 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
653 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
654 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
655 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
656 Define.
657 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
658 (IP_AGENT_EXPORT_VAR_DECL): Define.
659 (tracing): Declare.
660 (gdb_agent_get_raw_reg): Declare.
661
fe978cb0
PA
6622015-02-27 Tom Tromey <tromey@redhat.com>
663 Pedro Alves <palves@redhat.com>
664
665 Rename symbols whose names are reserved C++ keywords throughout.
666
3bc3d82a
PA
6672015-02-27 Pedro Alves <palves@redhat.com>
668
669 * Makefile.in (COMPILER): New, get it from autoconf.
670 (CXX): Get from autoconf instead.
671 (COMPILE.pre): Use COMPILER.
672 (CC-LD): Rename to ...
673 (CC_LD): ... this. Use COMPILER.
674 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
675 (CXX_FOR_TARGET): Default to g++ instead of gcc.
676 * acinclude.m4: Include build-with-cxx.m4.
677 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
678 Disable -Werror by default if building in C++ mode.
679 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
680 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
681 the C++ compiler. Save/restore CXXFLAGS too.
682 * configure: Regenerate.
683
07697489
PA
6842015-02-27 Pedro Alves <palves@redhat.com>
685
686 * acinclude.m4: Include libiberty.m4.
687 * configure.ac: Call libiberty_INIT.
688 * config.in, configure: Regenerate.
689
9beb7c4e
PA
6902015-02-26 Pedro Alves <palves@redhat.com>
691
692 * linux-low.c (linux_wait_1): When incrementing the PC past a
693 program breakpoint always use the_low_target.breakpoint_len as
694 increment, rather than the maximum between that and
695 the_low_target.decr_pc_after_break.
696
8090aef2
PA
6972015-02-23 Pedro Alves <palves@redhat.com>
698
699 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
700 thread was doing a step-over; always adjust the PC if
701 we stepped over a permanent breakpoint.
702 (linux_wait_1): If we stepped over breakpoint that was on top of a
703 permanent breakpoint, manually advance the PC past it.
704
bc9540e8
PA
7052015-02-23 Pedro Alves <palves@redhat.com>
706
707 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
708 modes.
709 (x86_fill_gregset, x86_store_gregset): Use it when handling
710 $orig_eax.
711
2db9a427
PA
7122015-02-20 Pedro Alves <palves@redhat.com>
713
714 * thread-db.c: Include "nat/linux-procfs.h".
715 (thread_db_init): Skip listing new threads if the kernel supports
716 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
717
afa8d396
PA
7182015-02-20 Pedro Alves <palves@redhat.com>
719
720 * linux-low.c (status_pending_p_callback): Use ptid_match.
721
c9587f88
AT
7222015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
723
724 PR breakpoints/16812
725 * linux-low.c (wstatus_maybe_breakpoint): Remove.
726 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
727 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
728
b05ec7a5
AT
7292015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
730
731 PR breakpoints/15956
732 * tracepoint.c (cmd_qtinit): Add check for current_thread.
733
d33501a5
MM
7342015-02-09 Markus Metzger <markus.t.metzger@intel.com>
735
736 * linux-low.c (linux_low_btrace_conf): Print size.
737 * server.c (handle_btrace_conf_general_set): New.
738 (hanle_general_set): Call handle_btrace_conf_general_set.
739 (handle_query): Report Qbtrace-conf:bts:size as supported.
740
f4abbc16
MM
7412015-02-09 Markus Metzger <markus.t.metzger@intel.com>
742
743 * linux-low.c (linux_low_enable_btrace): Update parameters.
744 (linux_low_btrace_conf): New.
745 (linux_target_ops)<to_btrace_conf>: Initialize.
746 * server.c (current_btrace_conf): New.
747 (handle_btrace_enable): Rename to ...
748 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
749 to target_enable_btrace. Update comment. Update users.
750 (handle_qxfer_btrace_conf): New.
751 (qxfer_packets): Add btrace-conf entry.
752 (handle_query): Report qXfer:btrace-conf:read as supported packet.
753 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
754 (target_ops)<read_btrace_conf>: New.
755 (target_enable_btrace): Update parameters.
756 (target_read_btrace_conf): New.
757
043c3577
MM
7582015-02-09 Markus Metzger <markus.t.metzger@intel.com>
759
760 * server.c (handle_btrace_general_set): Remove call to
761 target_supports_btrace.
762 (supported_btrace_packets): New.
763 (handle_query): Call supported_btrace_packets.
764 * target.h: include btrace-common.h.
765 (btrace_target_info): Removed.
766 (supports_btrace, target_supports_btrace): Update parameters.
767
734b0e4b
MM
7682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
769
770 * Makefile.in (SFILES): Add common/btrace-common.c.
771 (OBS): Add common/btrace-common.o.
772 (btrace-common.o): Add build rules.
773 * linux-low: Include btrace-common.h.
774 (linux_low_read_btrace): Use struct btrace_data. Call
775 btrace_data_init and btrace_data_fini.
776
d6c146e9
PA
7772015-02-06 Pedro Alves <palves@redhat.com>
778
779 * thread-db.c (find_new_threads_callback): Add debug output.
780
20ba1ce6
PA
7812015-02-04 Pedro Alves <palves@redhat.com>
782
783 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
784 (resume_stopped_resumed_lwps): New function.
785 (linux_wait_for_event_filtered): Use it.
786
8cc73a39
SDJ
7872015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
788
789 * Makefile.in (SFILES): Add linux-personality.c.
790 (linux-personality.o): New rule.
791 * configure.srv (srv_linux_obj): Add linux-personality.o to the
792 list of objects to be built.
793 * linux-low.c: Include nat/linux-personality.h.
794 (linux_create_inferior): Remove code to disable address space
795 randomization (moved to ../nat/linux-personality.c). Create
796 cleanup to disable address space randomization.
797
fb23d554
SDJ
7982015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
799
800 * Makefile.in (posix-strerror.o): New rule.
801 (mingw-strerror.o): Likewise.
802 * configure: Regenerated.
803 * configure.ac: Source file ../common/common.host. Initialize new
804 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
805
cdf43629
YQ
8062015-01-14 Yao Qi <yao@codesourcery.com>
807
808 * Makefile.in (SFILES): Add nat/ppc-linux.c.
809 (ppc-linux.o): New rule.
810 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
811 * configure.ac: AC_CHECK_FUNCS(getauxval).
812 * config.in: Re-generated.
813 * configure: Re-generated.
814 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
815 ppc64_64bit_inferior_p
816
514c5338
YQ
8172015-01-14 Yao Qi <yao@codesourcery.com>
818
819 * linux-ppc-low.c: Include "nat/ppc-linux.h".
820 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
821 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
822 (PT_ORIG_R3, PT_TRAP): Likewise.
823 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
824 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
825 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
826
3368c1e5
JB
8272015-01-10 Joel Brobecker <brobecker@adacore.com>
828
829 * i387-fp.c (i387_cache_to_xsave): In look over
830 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
831 zmmh_low_space field by use of zmmh_high_space.
832
582511be
PA
8332015-01-09 Pedro Alves <palves@redhat.com>
834
835 * linux-low.c (step_over_bkpt): Move higher up in the file.
836 (handle_extended_wait): Don't store the stop_pc here.
837 (get_stop_pc): Adjust comments and rename to ...
838 (check_stopped_by_breakpoint): ... this. Record whether the LWP
839 stopped for a software breakpoint or hardware breakpoint.
840 (thread_still_has_status_pending_p): New function.
841 (status_pending_p_callback): Use
842 thread_still_has_status_pending_p. If the event is no longer
843 interesting, resume the LWP.
844 (handle_tracepoints): Add assert.
845 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
846 (wstatus_maybe_breakpoint): New function.
847 (cancel_breakpoint): Delete function.
848 (check_stopped_by_watchpoint): New function, factored out from
849 linux_low_filter_event.
850 (lp_status_maybe_breakpoint): Delete function.
851 (linux_low_filter_event): Remove filter_ptid argument.
852 Leave thread group exits pending here. Store the LWP's stop PC.
853 Always leave events pending.
854 (linux_wait_for_event_filtered): Pull all events out of the
855 kernel, and leave them all pending.
856 (count_events_callback, select_event_lwp_callback): Consider all
857 events.
858 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
859 (select_event_lwp): Only give preference to the stepping LWP in
860 all-stop mode. Adjust comments.
861 (ignore_event): New function.
862 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
863 references to cancel_breakpoints. Adjust to renames. Also give
864 equal priority to all LWPs that have had events in non-stop mode.
865 If reporting a software breakpoint event, unadjust the LWP's PC.
866 (linux_wait): If linux_wait_1 returned an ignored event, retry.
867 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
868 Adjust.
869 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
870 (resume_status_pending_p): Use thread_still_has_status_pending_p.
871 (linux_stopped_by_watchpoint): Adjust.
872 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
873 * linux-low.h (enum lwp_stop_reason): New.
874 (struct lwp_info) <stop_pc>: Adjust comment.
875 <stopped_by_watchpoint>: Delete field.
876 <stop_reason>: New field.
877 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
878 * mem-break.c (software_breakpoint_inserted_here)
879 (hardware_breakpoint_inserted_here): New function.
880 * mem-break.h (software_breakpoint_inserted_here)
881 (hardware_breakpoint_inserted_here): Declare.
882 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
883 (cancel_breakpoints): Delete.
884 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
885 (upload_fast_traceframes): Remove references to
886 cancel_breakpoints.
887
a33e3959
PA
8882015-01-09 Pedro Alves <palves@redhat.com>
889
890 * thread-db.c (find_new_threads_callback): Ignore thread if the
891 kernel thread ID is -1.
892
8784d563
PA
8932015-01-09 Pedro Alves <palves@redhat.com>
894
895 * linux-low.c (linux_attach_fail_reason_string): Move to
896 nat/linux-ptrace.c, and rename.
897 (linux_attach_lwp): Update comment.
898 (attach_proc_task_lwp_callback): New function.
899 (linux_attach): Adjust to rename and use
900 linux_proc_attach_tgid_threads.
901 (linux_attach_fail_reason_string): Delete declaration.
902
76f2b779
JB
9032015-01-01 Joel Brobecker <brobecker@adacore.com>
904
905 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
906 * server.c (gdbserver_version): Likewise.
907
fafcc06a
SDJ
9082014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
909
910 * remote-utils.c: Include ctype.h.
911 (input_interrupt): Explicitly handle the case when the char
912 received is the NUL byte. Improve the printing of non-ASCII
913 characters.
914
beed38b8
JB
9152014-12-16 Joel Brobecker <brobecker@adacore.com>
916
917 * linux-low.c (linux_low_filter_event): Update call to
918 linux_enable_event_reporting following the addition of
919 a new parameter to that function.
920
bf330350
CU
9212014-12-16 Catalin Udma <catalin.udma@freescale.com>
922
923 PR server/17457
924 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
925 (AARCH64_FPCR_REGNO): Likewise.
926 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
927 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
928 (aarch64_store_fpregset): Likewise.
929
5227d625
JB
9302014-12-15 Joel Brobecker <brobecker@adacore.com>
931
932 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
933 Remove FIXME comment about assumption about N.
934
f93b65a0
JB
9352014-12-13 Joel Brobecker <brobecker@adacore.com>
936
937 * configure.ac: If large-file support is disabled in GDBserver,
938 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
939 * configure: Regenerate.
940
e5a9158d
AA
9412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
942
943 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
944 warning upon ENODATA from ptrace.
945 * linux-s390-low.c (s390_store_tdb): New.
946 (s390_regsets): Add regset for NT_S390_TDB.
947
feea5f36
AA
9482014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
949
950 * linux-low.c (regsets_store_inferior_registers): Skip regsets
951 without a fill_function.
952 * linux-s390-low.c (s390_fill_last_break): Remove.
953 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
954 (s390_arch_setup): Use regset's size instead of fill_function for
955 loop end condition.
956
098dbe61
AA
9572014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
958
959 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
960 the regset's store function when ptrace returned an error.
961 * regcache.c (get_thread_regcache): Invalidate register cache
962 before fetching inferior's registers.
963
28eef672
AA
9642014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
965
966 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
967 while-loop as for-loop.
968 (regsets_store_inferior_registers): Likewise.
969
bdca27a2
YQ
9702014-11-28 Yao Qi <yao@codesourcery.com>
971
972 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
973 * config.in, configure: Re-generate.
974 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
975 is defined.
976
9c232dda
YQ
9772014-11-21 Yao Qi <yao@codesourcery.com>
978
979 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
980 (AC_CHECK_HEADERS): Remove malloc.h.
981 * configure: Re-generated.
982 * config.in: Re-generated.
983 * server.h: Don't include alloca.h and malloc.h.
984 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
985 Don't include malloc.h.
986
43968415
JB
9872014-11-17 Joel Brobecker <brobecker@adacore.com>
988
989 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
990 corresponding ERRNO check in same block.
991
40e91bc7
PA
9922014-11-12 Pedro Alves <palves@redhat.com>
993
994 * server.c (cont_thread): Update comment.
995 (start_inferior, attach_inferior): No longer clear cont_thread.
996 (handle_v_cont): No longer set cont_thread.
997 (captured_main): Clear cont_thread each time a GDB connects.
998
c2c118cf
PA
9992014-11-12 Pedro Alves <palves@redhat.com>
1000
1001 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1002 thread, and don't resume all threads if the Hc thread has exited.
1003
78708b7c
PA
10042014-11-12 Pedro Alves <palves@redhat.com>
1005
1006 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1007 the process group instead of to a specific LWP.
1008
a2abc7de
PA
10092014-10-15 Pedro Alves <palves@redhat.com>
1010
1011 PR server/17487
1012 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1013 parameter.
1014 (arm_set_thread_context): Delete.
1015 (the_low_target): Adjust.
1016 * win32-i386-low.c (debug_registers_changed)
1017 (debug_registers_used): Delete.
1018 (update_debug_registers_callback): New function.
1019 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1020 needing to update their debug registers.
1021 (win32_get_current_dr): New function.
1022 (x86_dr_low_get_addr, x86_dr_low_get_control)
1023 (x86_dr_low_get_status): Fetch the debug register from the thread
1024 record's context.
1025 (i386_initial_stuff): Adjust.
1026 (i386_get_thread_context): Remove current_event parameter. Don't
1027 clear debug_registers_changed nor copy DR values to
1028 debug_reg_state.
1029 (i386_set_thread_context): Delete.
1030 (i386_prepare_to_resume): New function.
1031 (i386_thread_added): Mark the thread as needing to update irs
1032 debug registers.
1033 (the_low_target): Remove i386_set_thread_context and install
1034 i386_prepare_to_resume.
1035 * win32-low.c (win32_get_thread_context): Adjust.
1036 (win32_set_thread_context): Use SetThreadContext
1037 directly.
1038 (win32_prepare_to_resume): New function.
1039 (win32_require_context): New function, factored out from ...
1040 (thread_rec): ... this.
1041 (continue_one_thread): Call win32_prepare_to_resume on each thread
1042 we're about to continue.
1043 (win32_resume): Call win32_prepare_to_resume on the event thread.
1044 * win32-low.h (struct win32_thread_info)
1045 <debug_registers_changed>: New field.
1046 (struct win32_target_ops): Change prototype of set_thread_context,
1047 delete set_thread_context and add prepare_to_resume.
1048 (win32_require_context): New declaration.
1049
a442d071
GB
10502014-10-08 Gary Benson <gbenson@redhat.com>
1051
1052 * server.h: Do not include common-exceptions.h.
1053
6f1947e8
GB
10542014-10-08 Gary Benson <gbenson@redhat.com>
1055
1056 * server.h: Do not include cleanups.h.
1057
63b434a4
JH
10582014-09-30 James Hogan <james.hogan@imgtec.com>
1059
1060 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1061 mips64-dsp-linux.c.
1062
c4d9ceb6
YQ
10632014-09-23 Yao Qi <yao@codesourcery.com>
1064
1065 * linux-low.c (lp_status_maybe_breakpoint): New function.
1066 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1067 (count_events_callback): Likewise.
1068 (select_event_lwp_callback): Likewise.
1069 (cancel_breakpoints_callback): Likewise.
1070
89a5711c
DB
10712014-09-19 Don Breazeal <donb@codesourcery.com>
1072
1073 * linux-low.c (handle_extended_wait): Call
1074 linux_ptrace_get_extended_event.
1075 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1076 linux_is_extended_waitstatus.
1077
bffc0964
JB
10782014-09-16 Joel Brobecker <brobecker@adacore.com>
1079
1080 * Makefile.in (CPPFLAGS): Define.
1081 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1082 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1083
0bfdf32f
GB
10842014-09-16 Gary Benson <gbenson@redhat.com>
1085
1086 * inferiors.h (current_inferior): Renamed as...
1087 (current_thread): New variable. All uses updated.
1088 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1089 (maybe_move_out_of_jump_pad): Likewise.
1090 (cancel_breakpoint): Likewise.
1091 (linux_low_filter_event): Likewise.
1092 (wait_for_sigstop): Likewise.
1093 (linux_resume_one_lwp): Likewise.
1094 (need_step_over_p): Likewise.
1095 (start_step_over): Likewise.
1096 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1097 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1098 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1099 and save_inferior as saved_thread.
1100 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1101 saved_thread.
1102 (regcache_invalidate_thread): Likewise.
1103 * remote-utils.c (prepare_resume_reply): Likewise.
1104 * thread-db.c (thread_db_get_tls_address): Likewise.
1105 (disable_thread_event_reporting): Likewise.
1106 (remove_thread_event_breakpoints): Likewise.
1107 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1108 as saved_thread.
1109 * target.h (set_desired_inferior): Renamed as...
1110 (set_desired_thread): New declaration. All uses updated.
1111 * server.c (myresume): Updated comment to reference thread instead
1112 of inferior.
1113 (handle_serial_event): Likewise.
1114 (handle_target_event): Likewise.
1115
361c8ade
GB
11162014-09-12 Tom Tromey <tromey@redhat.com>
1117 Gary Benson <gbenson@redhat.com>
1118
1119 * regcache.h: Include common-regcache.h.
1120 (regcache_read_pc): Don't declare.
1121 * regcache.c (get_thread_regcache_for_ptid): New function.
1122
bd9269f7
GB
11232014-09-11 Tom Tromey <tromey@redhat.com>
1124 Gary Benson <gbenson@redhat.com>
1125
1126 * symbol.c: New file.
1127 * Makefile.in (SFILES): Add symbol.c.
1128 (OBS): Add symbol.o.
1129
f8c1d06b
GB
11302014-09-11 Gary Benson <gbenson@redhat.com>
1131
1132 * target.c (target_stop_ptid, target_continue_ptid): New
1133 functions.
1134
721ec300
GB
11352014-09-11 Tom Tromey <tromey@redhat.com>
1136 Gary Benson <gbenson@redhat.com>
1137
1138 * target.h: Include target/target.h.
1139 * target.c (target_read_memory, target_read_uint32)
1140 (target_write_memory): New functions.
1141
c5e92cca
GB
11422014-09-11 Gary Benson <gbenson@redhat.com>
1143
1144 * server.h (debug_hw_points): Don't declare.
1145 * server.c (debug_hw_points): Don't define. Replace all uses
1146 with show_debug_regs.
1147 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
1148 all uses with show_debug_regs.
1149
2e4bb98a
EBM
11502014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1151
1152 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1153 endianness into account.
1154 (ppc_supply_ptrace_register): Likewise.
1155
ac740bc7
JH
11562014-09-03 James Hogan <james.hogan@imgtec.com>
1157
1158 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1159 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1160
97ea6506
GB
11612014-09-03 Gary Benson <gbenson@redhat.com>
1162
1163 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1164 ALL_DEBUG_ADDRESS_REGISTERS.
1165
df7e5265
GB
11662014-09-02 Gary Benson <gbenson@redhat.com>
1167
1168 * i386-low.h: Renamed as...
1169 * x86-low.h: New file. All type, function and variable name
1170 prefixes changed from "i386_" to "x86_". All references updated.
1171 * i386-low.c: Renamed as...
1172 * x86-low.c: New file. All type, function and variable name
1173 prefixes changed from "i386_" to "x86_". All references updated.
1174
ed859da7
GB
11752014-09-02 Gary Benson <gbenson@redhat.com>
1176
1177 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1178 (x86_linux_new_thread): Likewise.
1179
860789c7
GB
11802014-08-29 Gary Benson <gbenson@redhat.com>
1181
1182 * server.h (setjmp.h): Do not include.
1183 (toplevel): Do not declare.
1184 (common-exceptions.h): Include.
1185 (cleanups.h): Likewise.
1186 * server.c (toplevel): Do not define.
1187 (exit_code): New static global.
1188 (detach_or_kill_for_exit_cleanup): New function.
1189 (main): New function. Original main renamed to...
1190 (captured_main): New function.
1191 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1192
ff55e1b5
GB
11932014-08-29 Gary Benson <gbenson@redhat.com>
1194
1195 * Makefile.in (SFILES): Add common/common-exceptions.c.
1196 (OBS): Add common-exceptions.o.
1197 (common-exceptions.o): New rule.
1198 * utils.c (prepare_to_throw_exception): New function.
1199
e9bcb658
GB
12002014-08-29 Gary Benson <gbenson@redhat.com>
1201
1202 * config.in: Regenerate.
1203 * configure: Likewise.
1204
e3180625
GB
12052014-08-29 Gary Benson <gbenson@redhat.com>
1206
1207 * Makefile.in (SFILES): Add common/cleanups.c.
1208 (OBS): cleanups.o.
1209 (cleanups.o): New rule.
1210
e3d6ba5d
GB
12112014-08-29 Gary Benson <gbenson@redhat.com>
1212
1213 * utils.c (internal_vwarning): New function.
1214
7096e886
GB
12152014-08-28 Gary Benson <gbenson@redhat.com>
1216
1217 * utils.h (fatal): Remove declaration.
1218 * utils.c (fatal): Remove function.
1219
14ce3192
GB
12202014-08-28 Gary Benson <gbenson@redhat.com>
1221
1222 * tracepoint.c (gdb_agent_init): Replace fatal with
1223 perror_with_name.
1224 (initialize_tracepoint): Likewise.
1225
50278d59
GB
12262014-08-28 Gary Benson <gbenson@redhat.com>
1227
1228 * remote-utils.c (remote_prepare): Replace fatal with error.
1229
aa96c426
GB
12302014-08-28 Gary Benson <gbenson@redhat.com>
1231
1232 * linux-low.c (linux_async): Replace fatal with warning.
1233 Tidy up and return.
1234 (linux_start_non_stop): Return -1 if linux_async failed.
1235
f7160e97
GB
12362014-08-28 Gary Benson <gbenson@redhat.com>
1237
1238 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1239 gdb_assert.
1240 (i386_dr_low_get_addr): Remove vague comment.
1241 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1242 gdb_assert.
1243
38e08fca
GB
12442014-08-28 Gary Benson <gbenson@redhat.com>
1245
1246 * inferiors.c (get_thread_process): Replace check with gdb_assert.
1247 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1248 internal_error.
1249 (linux_resume_one_lwp): Likewise.
1250 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1251 gdb_assert.
1252 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1253 with internal_error.
1254 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1255 (init_register_cache): Replace fatal with gdb_assert_not_reached.
1256 (find_register_by_name): Replace fatal with internal_error.
1257 (find_regno): Likewise.
1258 * tdesc.c (init_target_desc): Replace check with gdb_assert.
1259 * thread-db.c (thread_db_create_event): Likewise.
1260 (thread_db_load_search): Likewise.
1261 (try_thread_db_load_1): Likewise.
1262 * tracepoint.c (get_jump_space_head): Replace fatal with
1263 internal_error.
1264 (claim_trampoline_space): Likewise.
1265 (have_fast_tracepoint_trampoline_buffer): Likewise.
1266 (cmd_qtstart): Likewise.
1267 (stop_tracing): Likewise.
1268 (fast_tracepoint_collecting): Likewise.
1269 (target_malloc): Likewise.
1270 (download_tracepoint): Likewise.
1271 (download_trace_state_variables): Replace check with gdb_assert.
1272 (upload_fast_traceframes): Replace fatal with internal_error.
1273
34abf635
GB
12742014-08-19 Tom Tromey <tromey@redhat.com>
1275 Gary Benson <gbenson@redhat.com>
1276
1277 * Makefile.in (SFILES): Add common/common-debug.c.
1278 (OBS): Add common-debug.o.
1279 (common-debug.o): New rule.
1280 * debug.h (debug_printf): Don't declare.
1281 * debug.c (debug_printf): Renamed and rewritten as...
1282 (debug_vprintf): New function.
1283
f6e94d78
GB
12842014-08-19 Gary Benson <gbenson@redhat.com>
1285
1286 * utils.h: Do not include print-utils.h.
1287
9239eeab
GB
12882014-08-19 Tom Tromey <tromey@redhat.com>
1289 Gary Benson <gbenson@redhat.com>
1290
1291 * server.h: Add static assertion.
1292 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1293
ef87c8bb
GB
12942014-08-19 Tom Tromey <tromey@redhat.com>
1295 Gary Benson <gbenson@redhat.com>
1296
1297 * Makefile.in (SFILES): Add common/errors.c.
1298 (OBS): Add errors.o.
1299 (IPA_OBS): Add errors-ipa.o.
1300 (errors.o): New rule.
1301 (errors-ipa.o): Likewise.
1302 * utils.h (perror_with_name, error, warning): Don't declare.
1303 * utils.c (warning): Renamed and rewritten as...
1304 (vwarning): New function.
1305 (error): Renamed and rewritten as...
1306 (verror): New function.
1307 (internal_error): Renamed and rewritten as...
1308 (internal_verror): New function.
1309
bb974a24
GB
13102014-08-07 Gary Benson <gbenson@redhat.com>
1311
1312 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1313 * configure: Regenerate.
1314 * config.in: Likewise.
1315 * server.h: Do not include errno.h.
1316 * event-loop.c: Likewise.
1317 * hostio-errno.c: Likewise.
1318 * linux-low.c: Likewise.
1319 * remote-utils.c: Likewise.
1320 * spu-low.c: Likewise.
1321 * utils.c: Likewise.
1322 * gdbreplay.c: Unconditionally include errno.h.
1323
6d3d12eb
GB
13242014-08-07 Gary Benson <gbenson@redhat.com>
1325
1326 * server.h: Do not include string.h.
1327 * event-loop.c: Likewise.
1328 * linux-low.c: Likewise.
1329 * regcache.c: Likewise.
1330 * remote-utils.c: Likewise.
1331 * spu-low.c: Likewise.
1332 * utils.c: Likewise.
1333
dccbb609
GB
13342014-08-07 Gary Benson <gbenson@redhat.com>
1335
1336 * server.h: Do not include gdb_assert.h.
1337
e76df0d0
GB
13382014-08-07 Gary Benson <gbenson@redhat.com>
1339
1340 * server.h: Do not include common-utils.h.
1341
4cb9c816
GB
13422014-08-07 Gary Benson <gbenson@redhat.com>
1343
1344 * server.h: Do not include ptid.h.
1345 * notif.h: Likewise.
1346
3995eeee
GB
13472014-08-07 Gary Benson <gbenson@redhat.com>
1348
1349 * server.h: Do not include gdb_locale.h.
1350
cb9f1a9b
GB
13512014-08-07 Gary Benson <gbenson@redhat.com>
1352
1353 * server.h: Do not include gdb/signals.h.
1354 * win32-low.c: Likewise.
1355
a5fceff8
GB
13562014-08-07 Gary Benson <gbenson@redhat.com>
1357
1358 * server.h: Do not include pathmax.h.
1359
b9391142
GB
13602014-08-07 Gary Benson <gbenson@redhat.com>
1361
1362 * server.h: Do not include libiberty.h.
1363 * linux-bfin-low.c: Likewise.
1364
0e443c87
GB
13652014-08-07 Gary Benson <gbenson@redhat.com>
1366
1367 * server.h: Do not include ansidecl.h.
1368
8ebb3f56
GB
13692014-08-07 Gary Benson <gbenson@redhat.com>
1370
1371 * linux-x86-low.c: Do not include stddef.h.
1372 * lynx-ppc-low.c: Likewise.
1373 * tracepoint.c: Likewise.
1374
8980bdf6
GB
13752014-08-07 Gary Benson <gbenson@redhat.com>
1376
1377 * server.h: Do not include stdarg.h.
1378 * nto-low.c: Likewise.
1379
d7096f71
GB
13802014-08-07 Gary Benson <gbenson@redhat.com>
1381
1382 * server.h: Do not include stdlib.h.
1383 * inferiors.c: Likewise.
1384 * linux-low.c: Likewise.
1385 * regcache.c: Likewise.
1386 * spu-low.c: Likewise.
1387 * tracepoint.c: Likewise.
1388 * utils.c: Likewise.
1389
d02f550d
GB
13902014-08-07 Gary Benson <gbenson@redhat.com>
1391
1392 * server.h: Do not include stdio.h.
1393 * linux-low.c: Likewise.
1394 * remote-utils.c: Likewise.
1395 * spu-low.c: Likewise.
1396 * utils.c: Likewise.
1397 * wincecompat.c: Likewise.
1398
87f6c4e3
GB
13992014-08-06 Gary Benson <gbenson@redhat.com>
1400
1401 * regcache.c (init_register_cache): Move conditionals inside if.
1402
7089dca4
GB
14032014-08-06 Gary Benson <gbenson@redhat.com>
1404
1405 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1406
462f517e
GB
14072014-07-31 Gary Benson <gbenson@redhat.com>
1408
1409 * ax.h: Do not include server.h.
1410 * gdbthread.h: Likewise.
1411 * lynx-low.h: Likewise.
1412 * notif.h: Likewise.
1413
976411d6
GB
14142014-07-30 Gary Benson <gbenson@redhat.com>
1415
1416 * server.h: Include common-defs.h.
1417 Do not include config.h or build-gnulib-gdbserver/config.h.
1418
d41f6d8e
GB
14192014-07-30 Gary Benson <gbenson@redhat.com>
1420
1421 * hostio-errno.c: Move server.h to top of includes list.
1422 * inferiors.c: Likewise.
1423 * linux-x86-low.c: Likewise.
1424 * notif.c: Include server.h.
1425
314c6a35
TT
14262014-07-24 Tom Tromey <tromey@redhat.com>
1427 Gary Benson <gbenson@redhat.com>
1428
1429 * server.h (CORE_ADDR): Now unsigned.
1430
69ff6be5
PA
14312014-07-16 Pedro Alves <palves@redhat.com>
1432
1433 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1434
ce9e3fe7
PA
14352014-07-15 Pedro Alves <palves@redhat.com>
1436
1437 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1438 copy.
1439
e76126e8
PA
14402014-07-11 Pedro Alves <palves@redhat.com>
1441
1442 * linux-low.c (kill_wait_lwp): New function, based on
1443 kill_one_lwp_callback, but use my_waitpid directly.
1444 (kill_one_lwp_callback, linux_kill): Use it.
1445
8e9db26e
PA
14462014-06-23 Pedro Alves <palves@redhat.com>
1447
1448 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1449 before setting DR0..DR3.
1450
698b3e08
GB
14512014-06-20 Gary Benson <gbenson@redhat.com>
1452
1453 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1454 * configure: Regenerated.
1455 * config.in: Likewise.
1456
125f8a3d
GB
14572014-06-20 Gary Benson <gbenson@redhat.com>
1458
1459 * Makefile.in (SFILES): Update locations for files moved
1460 from common to nat.
1461 (object file files): Reordered.
1462
42995dbd
GB
14632014-06-20 Gary Benson <gbenson@redhat.com>
1464
1465 * i386-low.h (i386_dr_low_can_set_addr): Removed.
1466 (i386_dr_low_set_addr): Likewise.
1467 (i386_dr_low_get_addr): Likewise.
1468 (i386_dr_low_can_set_control): Likewise.
1469 (i386_dr_low_set_control): Likewise.
1470 (i386_dr_low_get_control): Likewise.
1471 (i386_dr_low_get_status): Likewise.
1472 (i386_get_debug_register_length): Likewise.
1473 * linux-x86-low.c (i386_dr_low_set_addr):
1474 Changed signature. Made static.
1475 (i386_dr_low_get_addr): Likewise.
1476 (i386_dr_low_set_control): Likewise.
1477 (i386_dr_low_get_control): Likewise.
1478 (i386_dr_low_get_status): Likewise.
1479 (i386_dr_low): New global variable.
1480 * win32-i386-low.c (i386_dr_low_set_addr):
1481 Changed signature. Made static.
1482 (i386_dr_low_get_addr): Likewise.
1483 (i386_dr_low_set_control): Likewise.
1484 (i386_dr_low_get_control): Likewise.
1485 (i386_dr_low_get_status): Likewise.
1486 (i386_dr_low): New global variable.
1487
e1d2394b
MS
14882014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
1489
1490 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1491 * Makefile.in (AR, AR_FLAGS): Define.
1492 * configure: Regenerate.
1493
3a8ee006
GB
14942014-06-19 Gary Benson <gbenson@redhat.com>
1495
1496 * Makefile.in (i386-dregs.o): New rule.
1497 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1498 * i386-low.c (target.h): Remove include.
1499 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1500 (DR_CONTROL_SHIFT): Likewise.
1501 (DR_CONTROL_SIZE): Likewise.
1502 (DR_RW_EXECUTE): Likewise.
1503 (DR_RW_WRITE): Likewise.
1504 (DR_RW_READ): Likewise.
1505 (DR_RW_IORW): Likewise.
1506 (DR_LEN_1): Likewise.
1507 (DR_LEN_2): Likewise.
1508 (DR_LEN_4): Likewise.
1509 (DR_LEN_8): Likewise.
1510 (DR_LOCAL_ENABLE_SHIFT): Likewise.
1511 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1512 (DR_ENABLE_SIZE): Likewise.
1513 (DR_LOCAL_SLOWDOWN): Likewise.
1514 (DR_GLOBAL_SLOWDOWN): Likewise.
1515 (DR_CONTROL_RESERVED): Likewise.
1516 (I386_DR_CONTROL_MASK): Likewise.
1517 (I386_DR_VACANT): Likewise.
1518 (I386_DR_LOCAL_ENABLE): Likewise.
1519 (I386_DR_GLOBAL_ENABLE): Likewise.
1520 (I386_DR_DISABLE): Likewise.
1521 (I386_DR_SET_RW_LEN): Likewise.
1522 (I386_DR_GET_RW_LEN): Likewise.
1523 (I386_DR_WATCH_HIT): Likewise.
1524 (i386_wp_op_t): Likewise.
1525 (i386_show_dr): Likewise.
1526 (i386_length_and_rw_bits): Likewise.
1527 (i386_insert_aligned_watchpoint): Likewise.
1528 (i386_remove_aligned_watchpoint): Likewise.
1529 (i386_handle_nonaligned_watchpoint): Likewise.
1530 i386_update_inferior_debug_regs(): Likewise.
1531 (i386_dr_insert_watchpoint): Likewise.
1532 (i386_dr_remove_watchpoint): Likewise.
1533 (i386_dr_region_ok_for_watchpoint): Likewise.
1534 (i386_dr_stopped_data_address): Likewise.
1535 (i386_dr_stopped_by_watchpoint): Likewise.
1536
8f26655c
GB
15372014-06-19 Gary Benson <gbenson@redhat.com>
1538
1539 * i386-low.c (i386_dr_show): Renamed to
1540 i386_show_dr and made static. All uses updated.
1541 (i386_dr_length_and_rw_bits): Renamed to
1542 i386_length_and_rw_bits and made static.
1543 All uses updated.
1544 (i386_dr_insert_aligned_watchpoint): Renamed to
1545 i386_insert_aligned_watchpoint and made static.
1546 All uses updated.
1547 (i386_dr_remove_aligned_watchpoint): Renamed to
1548 i386_remove_aligned_watchpoint and made static.
1549 All uses updated.
1550 (i386_dr_update_inferior_debug_regs): Renamed to
1551 i386_update_inferior_debug_regs and made static.
1552 All uses updated.
1553
b9228891
GB
15542014-06-18 Gary Benson <gbenson@redhat.com>
1555
5171def3
GB
1556 * i386-low.h (i386_dr_low_can_set_addr): New macro.
1557 (i386_dr_low_can_set_control): Likewise.
1558 (i386_get_debug_register_length): Likewise.
1559 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1560 (i386_dr_low_can_set_control): Likewise.
1561 (i386_get_debug_register_length): Likewise.
1562
15632014-06-17 Gary Benson <gbenson@redhat.com>
1564
b9228891
GB
1565 * i386-low.h (i386-dregs.h): New include.
1566 (DR_FIRSTADDR): Now in i386-dregs.h.
1567 (DR_LASTADDR): Likewise.
1568 (DR_NADDR): Likewise.
1569 (DR_STATUS): Likewise.
1570 (DR_CONTROL): Likewise.
1571 (i386_debug_reg_state): Likewise.
1572 (i386_dr_insert_watchpoint): Likewise.
1573 (i386_dr_remove_watchpoint): Likewise.
1574 (i386_dr_region_ok_for_watchpoint): Likewise.
1575 (i386_dr_stopped_data_address): Likewise.
1576 (i386_dr_stopped_by_watchpoint): Likewise.
1577 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1578
4be83cc2
GB
15792014-06-18 Gary Benson <gbenson@redhat.com>
1580
1581 * i386-low.h (i386_low_insert_watchpoint): Renamed to
1582 i386_dr_insert_watchpoint.
1583 (i386_low_remove_watchpoint): Renamed to
1584 i386_dr_remove_watchpoint.
1585 (i386_low_region_ok_for_watchpoint): Renamed to
1586 i386_dr_region_ok_for_watchpoint.
1587 (i386_low_stopped_data_address): Renamed to
1588 i386_dr_stopped_data_address.
1589 (i386_low_stopped_by_watchpoint): Renamed to
1590 i386_dr_stopped_by_watchpoint.
1591 * i386-low.c (i386_show_dr): Renamed to
1592 i386_dr_show and made nonstatic. All uses updated.
1593 (i386_length_and_rw_bits): Renamed to
1594 i386_dr_length_and_rw_bits and made nonstatic.
1595 All uses updated.
1596 (i386_insert_aligned_watchpoint): Renamed to
1597 i386_dr_insert_aligned_watchpoint and made nonstatic.
1598 All uses updated.
1599 (i386_remove_aligned_watchpoint): Renamed to
1600 i386_dr_remove_aligned_watchpoint and made nonstatic.
1601 All uses updated.
1602 (i386_update_inferior_debug_regs): Renamed to
1603 i386_dr_update_inferior_debug_regs and made nonstatic.
1604 All uses updated.
1605 (i386_low_insert_watchpoint): Renamed to
1606 i386_dr_insert_watchpoint. All uses updated.
1607 (i386_low_remove_watchpoint): Renamed to
1608 i386_dr_remove_watchpoint. All uses updated.
1609 (i386_low_region_ok_for_watchpoint): Renamed to
1610 i386_dr_region_ok_for_watchpoint. All uses updated.
1611 (i386_low_stopped_data_address): Renamed to
1612 i386_dr_stopped_data_address. All uses updated.
1613 (i386_low_stopped_by_watchpoint): Renamed to
1614 i386_dr_stopped_by_watchpoint. All uses updated.
1615
131aa0d4
GB
16162014-06-18 Gary Benson <gbenson@redhat.com>
1617
1618 * i386-low.c (i386_dr_low_can_set_addr): New macro.
1619 (i386_dr_low_can_set_control): Likewise.
1620 (i386_insert_aligned_watchpoint): New check.
1621
d9305f7f
GB
16222014-06-18 Gary Benson <gbenson@redhat.com>
1623
1624 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1625 Renamed to state.
1626
e927c9fc
GB
16272014-06-18 Gary Benson <gbenson@redhat.com>
1628
1629 * i386-low.c (i386_length_and_rw_bits): Use internal_error
1630 instead of fatal and error.
1631 (i386_handle_nonaligned_watchpoint): Likewise.
1632
1b6d4134
GB
16332014-06-18 Gary Benson <gbenson@redhat.com>
1634
1635 * i386-low.c (i386_get_debug_register_length): New macro.
1636 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
1637 (i386_show_dr): Use debug_printf instead of fprintf. Use
1638 phex to format values.
1639
6e62758f
GB
16402014-06-18 Gary Benson <gbenson@redhat.com>
1641
1642 * i386-low.h: Comment changes.
1643 * i386-low.c: Likewise.
1644
fc6e2f03
GB
16452014-06-18 Gary Benson <gbenson@redhat.com>
1646
1647 * i386-low.c: Whitespace changes.
1648
f9d1eeed
TT
16492014-06-12 Tom Tromey <tromey@redhat.com>
1650
1651 * utils.c (freeargv): Remove.
1652
0b04e523
TT
16532014-06-12 Tom Tromey <tromey@redhat.com>
1654
1655 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1656 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1657 (parse_debug_format_options): Likewise.
1658 (gdbserver_usage): Likewise.
1659 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1660 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1661 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1662 against libiberty.
1663 ($(LIBGNU)): Depend on libiberty.
1664 (all-lib): Recurse into all subdirs.
1665 (install-only): Invoke "install" target in subdirs.
1666 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1667 targets.
1668 * configure: Rebuild.
1669 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
1670 for vasprintf, vsnprintf, or gettimeofday.
1671 * configure.srv: Don't add safe-ctype.o or lbasename.o to
1672 srv_tgtobj.
1673
270c9937
JB
16742014-06-05 Joel Brobecker <brobecker@adacore.com>
1675
1676 * development.sh: Delete.
1677 * Makefile.in (config.status): Adjust dependency on development.sh.
1678 * configure.ac: Adjust development.sh source call.
1679 * configure: Regenerate.
1680
0a261ed8
PA
16812014-06-02 Pedro Alves <palves@redhat.com>
1682
1683 * ax.c (gdb_free_agent_expr): New function.
1684 * ax.h (gdb_free_agent_expr): New declaration.
1685 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1686 list.
1687 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1688 static.
1689 (clear_breakpoint_conditions_and_commands): New function.
1690 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1691 (clear_breakpoint_conditions_and_commands): New declaration.
1692
e9dae05e
RR
16932014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1694
1695 * linux-aarch64-low.c (asm/ptrace.h): Include.
1696
5876f503
JK
16972014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1698
1699 Fix TLS access for -static -pthread.
1700 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1701 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1702 (thread_db_load_search, try_thread_db_load_1): Initialize it.
1703
802e8e6d
PA
17042014-05-20 Pedro Alves <palves@redhat.com>
1705
1706 * linux-aarch64-low.c (aarch64_insert_point)
1707 (aarch64_remove_point): No longer check whether the type is
1708 supported here. Adjust to new interface.
1709 (the_low_target): Install aarch64_supports_z_point_type as
1710 supports_z_point_type method.
1711 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1712 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1713 instead of a Z packet char. Adjust.
1714 (arm_supports_z_point_type): New function.
1715 (arm_insert_point, arm_remove_point): Adjust to new interface.
1716 (the_low_target): Install arm_supports_z_point_type.
1717 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1718 (cris_insert_point, cris_remove_point): Adjust to new interface.
1719 Don't check whether the type is supported here.
1720 (the_low_target): Install cris_supports_z_point_type.
1721 * linux-low.c (linux_supports_z_point_type): New function.
1722 (linux_insert_point, linux_remove_point): Adjust to new interface.
1723 * linux-low.h (struct linux_target_ops) <insert_point,
1724 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
1725 raw_breakpoint pointer parameter.
1726 <supports_z_point_type>: New method.
1727 * linux-mips-low.c (mips_supports_z_point_type): New function.
1728 (mips_insert_point, mips_remove_point): Adjust to new interface.
1729 Use mips_supports_z_point_type.
1730 (the_low_target): Install mips_supports_z_point_type.
1731 * linux-ppc-low.c (the_low_target): Install NULL as
1732 supports_z_point_type method.
1733 * linux-s390-low.c (the_low_target): Install NULL as
1734 supports_z_point_type method.
1735 * linux-sparc-low.c (the_low_target): Install NULL as
1736 supports_z_point_type method.
1737 * linux-x86-low.c (x86_supports_z_point_type): New function.
1738 (x86_insert_point): Adjust to new insert_point interface. Use
1739 insert_memory_breakpoint. Adjust to new
1740 i386_low_insert_watchpoint interface.
1741 (x86_remove_point): Adjust to remove_point interface. Use
1742 remove_memory_breakpoint. Adjust to new
1743 i386_low_remove_watchpoint interface.
1744 (the_low_target): Install x86_supports_z_point_type.
1745 * lynx-low.c (lynx_target_ops): Install NULL as
1746 supports_z_point_type callback.
1747 * nto-low.c (nto_supports_z_point_type): New.
1748 (nto_insert_point, nto_remove_point): Adjust to new interface.
1749 (nto_target_ops): Install nto_supports_z_point_type.
1750 * mem-break.c: Adjust intro comment.
1751 (struct raw_breakpoint) <raw_type, size>: New fields.
1752 <inserted>: Update comment.
1753 <shlib_disabled>: Delete field.
1754 (enum bkpt_type) <gdb_breakpoint>: Delete value.
1755 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1756 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1757 (raw_bkpt_type_to_target_hw_bp_type): New function.
1758 (find_enabled_raw_code_breakpoint_at): New function.
1759 (find_raw_breakpoint_at): New type and size parameters. Use them.
1760 (insert_memory_breakpoint): New function, based off
1761 set_raw_breakpoint_at.
1762 (remove_memory_breakpoint): New function.
1763 (set_raw_breakpoint_at): Reimplement.
1764 (set_breakpoint): New, based on set_breakpoint_at.
1765 (set_breakpoint_at): Reimplement.
1766 (delete_raw_breakpoint): Go through the_target->remove_point
1767 instead of assuming memory breakpoints.
1768 (find_gdb_breakpoint_at): Delete.
1769 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1770 (find_gdb_breakpoint): New function.
1771 (set_gdb_breakpoint_at): Delete.
1772 (z_type_supported): New function.
1773 (set_gdb_breakpoint_1): New function, loosely based off
1774 set_gdb_breakpoint_at.
1775 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1776 (delete_gdb_breakpoint_at): Delete.
1777 (delete_gdb_breakpoint_1): New function, loosely based off
1778 delete_gdb_breakpoint_at.
1779 (delete_gdb_breakpoint): New function.
1780 (clear_gdb_breakpoint_conditions): Rename to ...
1781 (clear_breakpoint_conditions): ... this. Don't handle a NULL
1782 breakpoint.
1783 (add_condition_to_breakpoint): Make static.
1784 (add_breakpoint_condition): Take a struct breakpoint pointer
1785 instead of an address. Adjust.
1786 (gdb_condition_true_at_breakpoint): Rename to ...
1787 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1788 z_type parameter.
1789 (gdb_condition_true_at_breakpoint): Reimplement.
1790 (add_breakpoint_commands): Take a struct breakpoint pointer
1791 instead of an address. Adjust.
1792 (gdb_no_commands_at_breakpoint): Rename to ...
1793 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
1794 parameter. Return true if no breakpoint was found. Change debug
1795 output.
1796 (gdb_no_commands_at_breakpoint): Reimplement.
1797 (run_breakpoint_commands): Rename to ...
1798 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
1799 and change return type to boolean.
1800 (run_breakpoint_commands): New function.
1801 (gdb_breakpoint_here): Also check for Z1 breakpoints.
1802 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1803 breakpoint. Go through the_target->remove_point instead of
1804 assuming memory breakpoint.
1805 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1806 software and hardware breakpoints.
1807 (reinsert_raw_breakpoint): Go through the_target->insert_point
1808 instead of assuming memory breakpoint.
1809 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1810 software and hardware breakpoints.
1811 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1812 Check both software and hardware breakpoints.
1813 (validate_inserted_breakpoint): Assert the breakpoint is a
1814 software breakpoint. Set the inserted flag to -1 instead of
1815 setting shlib_disabled.
1816 (delete_disabled_breakpoints): Adjust.
1817 (validate_breakpoints): Only validate software breakpoints.
1818 Adjust to inserted flag change.
1819 (check_mem_read, check_mem_write): Skip breakpoint types other
1820 than software breakpoints. Adjust to inserted flag change.
1821 * mem-break.h (enum raw_bkpt_type): New enum.
1822 (raw_breakpoint, struct process_info): Forward declare.
1823 (Z_packet_to_target_hw_bp_type): Delete declaration.
1824 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1825 (set_gdb_breakpoint, delete_gdb_breakpoint)
1826 (clear_breakpoint_conditions): New declarations.
1827 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1828 (breakpoint_inserted_here): Update comment.
1829 (add_breakpoint_condition, add_breakpoint_commands): Replace
1830 address parameter with a breakpoint pointer parameter.
1831 (gdb_breakpoint_here): Update comment.
1832 (delete_gdb_breakpoint_at): Delete.
1833 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1834 * server.c (process_point_options): Take a struct breakpoint
1835 pointer instead of an address. Adjust.
1836 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1837 delete_gdb_breakpoint.
1838 * spu-low.c (spu_target_ops): Install NULL as
1839 supports_z_point_type method.
1840 * target.h: Include mem-break.h.
1841 (struct target_ops) <prepare_to_access_memory>: Update comment.
1842 <supports_z_point_type>: New field.
1843 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1844 instead of a char. Also take a raw breakpoint pointer.
1845 * win32-arm-low.c (the_low_target): Install NULL as
1846 supports_z_point_type.
1847 * win32-i386-low.c (i386_supports_z_point_type): New function.
1848 (i386_insert_point, i386_remove_point): Adjust to new interface.
1849 (the_low_target): Install i386_supports_z_point_type.
1850 * win32-low.c (win32_supports_z_point_type): New function.
1851 (win32_insert_point, win32_remove_point): Adjust to new interface.
1852 (win32_target_ops): Install win32_supports_z_point_type.
1853 * win32-low.h (struct win32_target_ops):
1854 <supports_z_point_type>: New method.
1855 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1856 instead of a char. Also take a raw breakpoint pointer.
1857
932539e3
PA
18582014-05-20 Pedro Alves <palves@redhat.com>
1859
1860 * mem-break.h: Include break-common.h.
1861 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1862 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1863 (Z_packet_to_target_hw_bp_type): New declaration.
1864 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1865 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1866 (Z_PACKET_ACCESS_WP): Delete macros.
1867 (Z_packet_to_hw_type): Delete function.
1868 * i386-low.h: Don't include break-common.h here.
1869 (Z_packet_to_hw_type): Delete declaration.
1870 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1871 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1872 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1873 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1874 * linux-aarch64-low.c: Don't include break-common.h here.
1875 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1876 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1877 (Z_packet_to_target_hw_bp_type): Delete function.
1878 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1879 function.
1880 (mips_insert_point, mips_remove_point): Use
1881 Z_packet_to_target_hw_bp_type.
1882
4ff0d3d8
PA
18832014-05-20 Pedro Alves <palves@redhat.com>
1884
1885 * linux-aarch64-low.c: Include break-common.h.
1886 (enum target_point_type): Delete.
1887 (Z_packet_to_point_type): Rename to ...
1888 (Z_packet_to_target_hw_bp_type): ... this, and return a
1889 target_hw_bp_type instead.
1890 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1891 instead of an enum target_point_type.
1892 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
1893 breakpoint type.
1894 (aarch64_dr_state_insert_one_point)
1895 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1896 (aarch64_handle_aligned_watchpoint)
1897 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1898 Take an enum target_hw_bp_type instead of an enum
1899 target_point_type.
1900 (aarch64_supports_z_point_type): New function.
1901 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
1902 use Z_packet_to_target_hw_bp_type.
1903
786dc519
JB
19042014-05-20 Joel Brobecker <brobecker@adacore.com>
1905
1906 * configure.ac: Only use -Werror by default when DEVELOPMENT
1907 is true.
1908 * configure: Regenerate.
1909
9e0aa64f
JK
19102014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
1911
1912 Fix gdbserver qGetTLSAddr for x86_64 -m32.
1913 * linux-x86-low.c (X86_64_USER_REGS): New.
1914 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1915
2b577b92
YQ
19162014-04-28 Yao Qi <yao@codesourcery.com>
1917
1918 * Makefile.in (i386-avx512.c): Fix the typo of generated file
1919 name.
1920
94611da2
PA
19212014-04-25 Pedro Alves <palves@redhat.com>
1922
1923 PR server/16255
1924 * linux-low.c (linux_attach_fail_reason_string): New function.
1925 (linux_attach_lwp): Delete.
1926 (linux_attach_lwp_1): Rename to ...
1927 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
1928 argument. Remove "initial" parameter. Return int instead of
1929 void. Don't error or warn here.
1930 (linux_attach): Adjust to call linux_attach_lwp. Call error on
1931 failure to attach to the tgid. Call warning when failing to
1932 attach to an lwp.
1933 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1934 argument. Remove "initial" parameter. Return int instead of
1935 void. Don't error or warn here.
1936 (linux_attach_fail_reason_string): New declaration.
1937 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1938 interface change. Use linux_attach_fail_reason_string.
1939
01f9f808
MS
19402014-04-24 Michael Sturm <michael.sturm@mintel.com>
1941 Walfred Tedeschi <walfred.tedeschi@intel.com>
1942
1943 * Makefile.in: Added rules to handle new files
1944 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1945 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1946 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1947 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1948 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1949 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1950 x32-avx512-linux.o.
1951 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1952 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1953 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1954 i386/x32-avx512.xml.
1955 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1956 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1957 i386/x32-avx512-linux.xml.
1958 * i387-fp.c (num_avx512_k_registers): New constant for number
1959 of K registers.
1960 (num_avx512_zmmh_low_registers): New constant for number of
1961 lower ZMM registers (0-15).
1962 (num_avx512_zmmh_high_registers): New constant for number of
1963 higher ZMM registers (16-31).
1964 (num_avx512_ymmh_registers): New contant for number of higher
1965 YMM registers (ymm16-31 added by avx521 on x86_64).
1966 (num_avx512_xmm_registers): New constant for number of higher
1967 XMM registers (xmm16-31 added by AVX512 on x86_64).
1968 (struct i387_xsave): Add space for AVX512 registers.
1969 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1970 Add code to handle AVX512 registers.
1971 (i387_xsave_to_cache): Add code to handle AVX512 registers.
1972 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1973 prototypei from generated file.
1974 (tdesc_amd64_avx512_linux): Likewise.
1975 (init_registers_x32_avx512_linux): Likewise.
1976 (tdesc_x32_avx512_linux): Likewise.
1977 (init_registers_i386_avx512_linux): Likewise.
1978 (tdesc_i386_avx512_linux): Likewise.
1979 (x86_64_regmap): Add AVX512 registers.
1980 (x86_linux_read_description): Add code to handle AVX512 XSTATE
1981 mask.
1982 (initialize_low_arch): Add code to initialize AVX512 registers.
1983
51aa91f9
PA
19842014-04-23 Pedro Alves <palves@redhat.com>
1985
1986 * mem-break.c (find_gdb_breakpoint_at): Make static.
1987 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1988
a4165e94
PA
19892014-04-23 Pedro Alves <palves@redhat.com>
1990
1991 * i386-low.c: Don't include break-common.h here.
1992 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1993 prototype to take target_hw_bp_type as argument instead of a Z
1994 packet char.
1995 * i386-low.h: Include break-common.h here.
1996 (Z_packet_to_hw_type): Declare.
1997 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1998 prototypes.
1999 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2000 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2001 (x86_remove_point): Convert the packet number to a
2002 target_hw_bp_type before calling i386_low_remove_watchpoint.
2003 * win32-i386-low.c (i386_insert_point): Convert the packet number
2004 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2005 (i386_remove_point): Convert the packet number to a
2006 target_hw_bp_type before calling i386_low_remove_watchpoint.
2007
b8acf843
PA
20082014-04-23 Pedro Alves <palves@redhat.com>
2009
2010 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2011
d708bcd1
PA
20122014-04-10 Pedro Alves <palves@redhat.com>
2013
2014 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2015 Check if the condition or command is NULL before checking if the
2016 breakpoint is known. On success, return true.
2017 * mem-break.h (add_breakpoint_condition): Document return.
2018 (add_breakpoint_commands): Add describing comment.
2019 * server.c (skip_to_semicolon): New function.
2020 (process_point_options): Use it.
2021
2eec7d5b
PA
20222014-04-09 Pedro Alves <palves@redhat.com>
2023
2024 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2025 to lwpid_of.
2026
fa96cb38
PA
20272014-02-27 Pedro Alves <palves@redhat.com>
2028
2029 PR 12702
2030 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2031 macros.
2032 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2033 output.
2034 (last_thread_of_process_p): Take a PID argument instead of a
2035 thread pointer.
2036 (linux_wait_for_lwp): Delete.
2037 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2038 functions.
2039 (linux_low_filter_event): New function, party factored out from
2040 linux_wait_for_event.
2041 (linux_wait_for_event): Rename to ...
2042 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2043 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2044 sigsuspend. Check for zombie leaders.
2045 (linux_wait_for_event): Reimplement as wrapper around
2046 linux_wait_for_event_filtered.
2047 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2048 a normal or signal exit is seen, it's the whole process exiting.
2049 (wait_for_sigstop): No longer a for_each_inferior callback.
2050 Rewrite on top of linux_wait_for_event_filtered.
2051 (stop_all_lwps): Call wait_for_sigstop directly.
2052 * server.c (resume, handle_target_event): Handle
2053 TARGET_WAITKIND_NO_RESUMED.
2054
d763de10
JB
20552014-02-26 Joel Brobecker <brobecker@adacore.com>
2056
2057 * win32-low.c (psapi_get_dll_name,
2058 * win32_CreateToolhelp32Snapshot): Delete.
2059 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2060 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2061 Delete.
2062 (handle_load_dll): Add function description.
2063 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2064
850a0f76
JB
20652014-02-26 Joel Brobecker <brobecker@adacore.com>
2066
2067 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2068 Add comment.
2069 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2070 base address when calling win32_add_one_solib.
2071 (handle_load_dll): Delete local variable load_addr.
2072 Remove 0x1000 offset applied to DLL base address when calling
2073 win32_add_one_solib.
2074 (handle_unload_dll): Add comment.
2075
f25b3fc3
JB
20762014-02-26 Joel Brobecker <brobecker@adacore.com>
2077
2078 * win32-low.c (win32_add_all_dlls): Renames
2079 win32_ensure_ntdll_loaded. Rewrite function documentation.
2080 Adjust implementation to always load all DLLs.
2081 Add 0x1000 offset to DLL base address when calling
2082 win32_add_one_solib.
2083 (child_initialization_done): New static global.
2084 (do_initial_child_stuff): Set child_initialization_done to
2085 zero during child initialization, and 1 after. Replace call
2086 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2087 Add comment.
2088 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2089 (handle_unload_dll): Add function documentation.
2090 (get_child_debug_event): Ignore load and unload DLL events
2091 during child initialization.
2092
d86d4aaf
DE
20932014-02-20 Doug Evans <dje@google.com>
2094
3bc32da3 2095 Remove global all_lwps.
d86d4aaf
DE
2096 * inferiors.h (ptid_of): Move here from linux-low.h.
2097 (pid_of, lwpid_of): Ditto.
2098 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2099 parameter is a struct thread_info * now.
2100 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2101 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2102 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2103 directly.
2104 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2105 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2106 * linux-arm-low.c (update_registers_callback): Update, "entry"
2107 parameter is a struct thread_info * now.
2108 Fetch lwpid from current_inferior directly.
2109 (arm_insert_point): Pass &all_threads to find_inferior instead of
2110 &all_lwps.
2111 (arm_remove_point): Ditto.
2112 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
2113 (arm_prepare_to_resume): Fetch pid from thread.
2114 (arm_read_description): Fetch lwpid from current_inferior directly.
2115 * linux-low.c (all_lwps): Delete.
2116 (delete_lwp): Delete call to remove_inferior.
2117 (handle_extended_wait): Fetch lwpid from thread.
2118 (add_lwp): Don't set lwp->entry.id. Remove call to
2119 add_inferior_to_list.
2120 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
2121 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
2122 (kill_one_lwp_callback): Ditto.
2123 (linux_kill): Don't dereference NULL pointer.
2124 Fetch ptid,lwpid from thread.
2125 (get_detach_signal): Fetch ptid from thread.
2126 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2127 Simplify call to regcache_invalidate_thread.
2128 (delete_lwp_callback): Update, "entry" parameter is a
2129 struct thread_info * now. Fetch pid from thread.
2130 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2131 (status_pending_p_callback): Update, "entry" parameter is a
2132 struct thread_info * now. Fetch ptid from thread.
2133 (find_lwp_pid): Update, "entry" parameter is a
2134 struct thread_info * now.
2135 (linux_wait_for_lwp): Fetch pid from thread.
2136 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2137 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2138 (enqueue_one_deferred_signal): Fetch lwpid from thread.
2139 (dequeue_one_deferred_signal): Ditto.
2140 (cancel_breakpoint): Fetch ptid from current_inferior.
2141 (linux_wait_for_event): Pass &all_threads to find_inferior,
2142 not &all_lwps. Fetch ptid, lwpid from thread.
2143 (count_events_callback): Update, "entry" parameter is a
2144 struct thread_info * now.
2145 (select_singlestep_lwp_callback): Ditto.
2146 (select_event_lwp_callback): Ditto.
2147 (cancel_breakpoints_callback): Ditto.
2148 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2149 not &all_lwps.
2150 (select_event_lwp): Ditto. Fetch ptid from event_thread.
2151 (unsuspend_one_lwp): Update, "entry" parameter is a
2152 struct thread_info * now.
2153 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2154 not &all_lwps.
2155 (linux_stabilize_threads): Ditto. And for for_each_inferior.
2156 Fetch lwpid from thread, not lwp.
2157 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2158 Pass &all_threads to find_inferior, not &all_lwps.
2159 (send_sigstop): Fetch lwpid from thread, not lwp.
2160 (send_sigstop_callback): Update, "entry" parameter is a
2161 struct thread_info * now.
2162 (suspend_and_send_sigstop_callback): Ditto.
2163 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
2164 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2165 struct thread_info * now.
2166 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
2167 from thread, lwp.
2168 (lwp_running): Update, "entry" parameter is a
2169 struct thread_info * now.
2170 (stop_all_lwps): Fetch ptid from thread.
2171 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2172 (linux_resume_one_lwp): Fetch lwpid from thread.
2173 (linux_set_resume_request): Update, "entry" parameter is a
2174 struct thread_info * now. Fetch pid, lwpid from thread.
2175 (resume_status_pending_p): Update, "entry" parameter is a
2176 struct thread_info * now.
2177 (need_step_over_p): Ditto. Fetch lwpid from thread.
2178 (start_step_over): Fetch lwpid from thread.
2179 (linux_resume_one_thread): Update, "entry" parameter is a
2180 struct thread_info * now. Fetch lwpid from thread.
2181 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2182 (proceed_one_lwp): Update, "entry" parameter is a
2183 struct thread_info * now. Fetch lwpid from thread.
2184 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2185 struct thread_info * now.
2186 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2187 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
2188 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2189 directly.
2190 (regsets_store_inferior_registers): Ditto.
2191 (fetch_register, store_register): Ditto.
2192 (linux_read_memory, linux_write_memory): Ditto.
2193 (linux_request_interrupt): Ditto.
2194 (linux_read_auxv): Ditto.
2195 (linux_xfer_siginfo): Ditto.
2196 (linux_qxfer_spu): Ditto.
2197 (linux_qxfer_libraries_svr4): Ditto.
2198 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2199 moved to inferiors.h.
2200 (get_lwp): Delete.
2201 (get_thread_lwp): Update.
2202 (struct lwp_info): Delete member "entry". Simplify comment for
2203 member "thread".
2204 (all_lwps): Delete.
2205 * linux-mips-low.c (mips_read_description): Fetch lwpid from
2206 current_inferior directly.
2207 (update_watch_registers_callback): Update, "entry" parameter is a
2208 struct thread_info * now. Fetch pid from thread.
2209 (mips_linux_prepare_to_resume): Fetch ptid from thread.
2210 (mips_insert_point): Fetch lwpid from current_inferior.
2211 Pass &all_threads to find_inferior, not &all_lwps.
2212 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2213 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2214 directly.
2215 (mips_stopped_data_address): Ditto.
2216 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2217 directly.
2218 * linux-tile-low.c (tile_arch_setup): Ditto.
2219 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2220 (update_debug_registers_callback): Update, "entry" parameter is a
2221 struct thread_info * now. Fetch pid from thread.
2222 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2223 Pass &all_threads to find_inferior, not &all_lwps.
2224 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2225 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2226 Pass &all_threads to find_inferior, not &all_lwps.
2227 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2228 (i386_dr_low_get_status): Ditto.
2229 (x86_linux_prepare_to_resume): Fetch ptid from thread.
2230 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2231 (x86_linux_read_description): Ditto.
2232 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2233
3b8361aa
DE
22342014-02-20 Doug Evans <dje@google.com>
2235
2236 * inferiors.c (get_first_inferior): Fix buglet.
2237
f7667f0d
DE
22382014-02-19 Doug Evans <dje@google.com>
2239
2240 * gdbthread.h (add_thread): Change result type to struct thread_info *.
2241 * inferiors.c (add_thread): Change result type to struct thread_info *.
2242 All callers updated.
2243 (add_lwp): Call add_thread here instead of in callers.
2244 All callers updated.
2245 * linux-low.h (get_lwp_thread): Rewrite.
2246 (struct lwp_info): New member "thread".
2247
b3312d80
DE
22482014-02-19 Doug Evans <dje@google.com>
2249
2250 * linux-low.c (add_lwp): Change result to struct lwp_info *.
2251 All callers updated.
2252
ecc6f45c
DE
22532014-02-19 Doug Evans <dje@google.com>
2254
2255 * inferiors.c (add_thread): Fix whitespace.
2256
649ebbca
DE
22572014-02-19 Doug Evans <dje@google.com>
2258
2259 * dll.c (clear_dlls): Replace accessing list implemention details
2260 with API function.
2261 * gdbthread.h (get_first_thread): Declare.
2262 * inferiors.c (for_each_inferior_with_data): New function.
2263 (get_first_thread): New function.
2264 (find_thread_ptid): Simplify.
2265 (get_first_inferior): New function.
2266 (clear_list): Delete.
2267 (one_inferior_p): New function.
2268 (clear_inferior_list): New function.
2269 (clear_inferiors): Update.
2270 * inferiors.h (for_each_inferior_with_data): Declare.
2271 (clear_inferior_list): Declare.
2272 (one_inferior_p): Declare.
2273 (get_first_inferior): Declare.
2274 * linux-low.c (linux_wait_for_event): Replace accessing list
2275 implemention details with API function.
2276 * server.c (target_running): Ditto.
2277 (accumulate_file_name_length): New function.
2278 (emit_dll_description): New function.
2279 (handle_qxfer_libraries): Replace accessing list implemention
2280 details with API function.
2281 (handle_qxfer_threads_worker): New function.
2282 (handle_qxfer_threads_proper): Replace accessing list implemention
2283 details with API function.
2284 (handle_query): Ditto.
2285 (visit_actioned_threads_callback_ftype): New typedef.
2286 (visit_actioned_threads_data): New struct.
2287 (visit_actioned_threads): Rewrite to be find_inferior callback.
2288 (resume): Call find_inferior.
2289 (handle_status): Replace accessing list implemention
2290 details with API function.
2291 (process_serial_event): Replace accessing list implemention details
2292 with API function.
2293 * target.c (set_desired_inferior): Replace accessing list implemention
2294 details with API function.
2295 * tracepoint.c (same_process_p): New function.
2296 (gdb_agent_about_to_close): Replace accessing list implemention
2297 details with API function.
2298 * win32-low.c (child_delete_thread): Replace accessing list
2299 implemention details with API function.
2300 (match_dll_by_basename): New function.
2301 (dll_is_loaded_by_basename): New function.
2302 (win32_ensure_ntdll_loaded): Replace accessing list implemention
2303 details call to dll_is_loaded_by_basename.
2304
80894984
DE
23052014-02-19 Doug Evans <dje@google.com>
2306
2307 * dll.h (struct dll_info): Add comment.
2308 * gdbthread.h (struct thread_info): Add comment.
2309 (current_ptid): Simplify.
2310 * inferiors.c (add_process): Update.
2311 (remove_process): Update.
2312 * inferiors.h (struct process_info): Rename member "head" to "entry".
2313 * linux-low.c (delete_lwp): Update.
2314 (add_lwp): Update.
2315 (last_thread_of_process_p): Update.
2316 (kill_one_lwp_callback, linux_kill): Update.
2317 (status_pending_p_callback): Update.
2318 (wait_for_sigstop): Update. Simplify read of ptid.
2319 (start_step_over): Update.
2320 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2321 (get_lwp_thread): Update.
2322 (struct lwp_info): Rename member "head" to "entry".
2323 * regcache.h (inferior_list_entry): Delete.
2324 * server.c (kill_inferior_callback): Update.
2325 (detach_or_kill_inferior_callback): Update.
2326 (print_started_pid): Update.
2327 (print_attached_pid): Update.
2328 (process_serial_event): Simplify read of ptid.
2329 * thread-db.c (thread_db_create_event): Update.
2330 (thread_db_get_tls_address): Update.
2331 * win32-low.c (current_inferior_ptid): Simplify.
2332
46917d26
TT
23332014-02-19 Tom Tromey <tromey@redhat.com>
2334
2335 * target.h (struct target_ops) <supports_btrace>: Add target_ops
2336 argument.
2337 (target_supports_btrace): Update.
2338
0759a81e
YQ
23392014-02-14 Yao Qi <yao@codesourcery.com>
2340
2341 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2342 (rsp-low-ipa.o): New target.
2343
a7191e8b
TT
23442014-02-12 Tom Tromey <tromey@redhat.com>
2345
2346 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2347 convert_ascii_to_int.
2348 * regcache.c (registers_to_string): Likewise.
2349 * remote-utils.c (decode_M_packet): Likewise.
2350 * server.c (process_serial_event): Likewise.
2351
ff0e980e
TT
23522014-02-12 Tom Tromey <tromey@redhat.com>
2353
2354 * server.c (handle_query, handle_v_run): Use hex2bin, not
2355 unhexify.
2356 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2357
e9371aff
TT
23582014-02-12 Tom Tromey <tromey@redhat.com>
2359
2360 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2361 convert_int_to_ascii.
2362 * regcache.c (registers_to_string, collect_register_as_string):
2363 Likewise.
2364 * remote-utils.c (look_up_one_symbol, relocate_instruction):
2365 Likewise.
2366 * server.c (process_serial_event): Likewise.
2367 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2368 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2369
971dc0b8
TT
23702014-02-12 Tom Tromey <tromey@redhat.com>
2371
2372 * remote-utils.c (look_up_one_symbol, monitor_output): Use
2373 bin2hex, not hexify.
2374 * tracepoint.c (cmd_qtstatus): Likewise.
2375
0a822afb
TT
23762014-02-12 Tom Tromey <tromey@redhat.com>
2377
2378 * remote-utils.c (monitor_output): Pass explicit length to
2379 hexify.
2380
9c3d6531
TT
23812014-02-12 Tom Tromey <tromey@redhat.com>
2382
2383 * tracepoint.c: Include rsp-low.h.
2384 * server.c: Include rsp-low.h.
2385 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2386 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2387 declare.
2388 * remote-utils.c: Include rsp-low.h.
2389 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2390 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2391 (convert_int_to_ascii, convert_ascii_to_int): Move to
2392 common/rsp-low.c.
2393 * regcache.c: Include rsp-low.h.
2394 * ax.c: Include rsp-low.h.
2395 * Makefile.in (SFILES): Add common/rsp-low.c.
2396 (OBS): Add rsp-low.o.
2397 (rsp-low.o): New target.
2398
01fd3ea5
TT
23992014-02-12 Tom Tromey <tromey@redhat.com>
2400
2401 * utils.h (pulongest, plongest, phex_nz): Don't declare.
2402 Include print-utils.h.
2403 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2404 (plongest, thirty_two, phex_nz): Remove.
2405 * Makefile.in (SFILES): Add common/print-utils.c.
2406 (OBS): Add print-utils.o.
2407 (print-utils-ipa.o): New target.
2408 (print-utils.o): New target.
2409 (IPA_OBJS): Add print-utils-ipa.o.
2410
e99dc820
TT
24112014-02-06 Tom Tromey <tromey@redhat.com>
2412
2413 * Makefile.in (SFILES): Fix indentation.
2414
ee1e2d4f
DE
24152014-02-05 Doug Evans <dje@google.com>
2416
2417 * linux-low.c (linux_wait_for_event): Improve comment.
2418 (linux_wait_1): Keep current_inferior in sync with event_child.
2419
f5a02773
DE
24202014-01-22 Doug Evans <dje@google.com>
2421
2422 * gdbthread.h (gdb_id_to_thread): Delete, unused.
2423
87ce2a04
DE
24242014-01-22 Doug Evans <dje@google.com>
2425
2426 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2427 * configure: Regenerate.
2428 * config.in: Regenerate.
2429 * Makefile.in (SFILES): Add debug.c.
2430 (OBS): Add debug.o.
2431 * debug.c: New file.
2432 * debug.h: New file.
2433 * linux-aarch64-low.c (*): Update all debugging printfs to use
2434 debug_printf instead of fprintf.
2435 * linux-arm-low.c (*): Ditto.
2436 * linux-cris-low.c (*): Ditto.
2437 * linux-crisv32-low.c (*): Ditto.
2438 * linux-m32r-low.c (*): Ditto.
2439 * linux-sparc-low.c (*): Ditto.
2440 * linux-x86.c (*): Ditto.
2441 * linux-low.c (*): Ditto.
2442 (linux_wait_1): Add calls to debug_enter, debug_exit.
2443 (linux_wait): Remove redundant debugging printf.
2444 (stop_all_lwps): Add calls to debug_enter, debug_exit.
2445 (linux_resume, unstop_all_lwps): Ditto.
2446 * mem-break.c (*): Update all debugging printfs to use
2447 debug_printf instead of fprintf.
2448 * remote-utils.c (*): Ditto.
2449 * thread-db.c (*): Ditto.
2450 * server.c #include <ctype.h>, "gdb_vecs.h".
2451 (debug_threads): Moved to debug.c.
2452 (*): Update all debugging printfs to use debug_printf instead of
2453 fprintf.
2454 (start_inferior): Replace call to fflush with call to debug_flush.
2455 (monitor_show_help): Mention set debug-format.
2456 (parse_debug_format_options): New function.
2457 (handle_monitor_command): Handle "monitor set debug-format".
2458 (gdbserver_usage): Mention --debug-format.
2459 (main): Parse --debug-format.
2460 * server.h (debug_threads): Declaration moved to debug.h.
2461 #include "debug.h".
2462 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2463 trace_debug_1 that uses debug_printf.
2464 (tracepoint_look_up_symbols): Update all debugging printfs to use
2465 debug_printf instead of fprintf.
2466
e671835b
BS
24672014-01-20 Baruch Siach <baruch@tkos.co.il>
2468
2469 * linux-xtensa-low.c: Include asm/ptrace.h instead of
2470 sys/ptrace.h.
2471
b5737fa9
PA
24722014-01-17 Pedro Alves <palves@redhat.com>
2473
ea38d2a9 2474 PR build/16445
c7faa97a
PA
2475 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2476 defined after including gdb_proc_service.h.
b5737fa9 2477
40ed484e
DE
24782014-01-16 Doug Evans <dje@google.com>
2479
2480 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2481 (match_dll): Use it.
2482
969c39fb
MM
24832014-01-16 Markus Metzger <markus.t.metzger@intel.com>
2484
2485 * target.h (target_ops) <read_btrace>: Change parameters and
2486 return type to allow error reporting.
2487 * server.c (handle_qxfer_btrace): Support delta reads. Pass
2488 trace reading errors on.
2489 * linux-low.c (linux_low_read_btrace): Pass trace reading
2490 errors on.
2491 (linux_low_disable_btrace): New.
2492
ab7f45ba
DE
24932014-01-15 Doug Evans <dje@google.com>
2494
2495 * inferiors.c (thread_id_to_gdb_id): Delete.
2496 * inferiors.h (thread_id_to_gdb_id): Delete.
2497
66af0f44
EZ
24982014-01-13 Eli Zaretskii <eliz@gnu.org>
2499
2500 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2501 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
2502 versions.
2503
9939e131
PA
25042014-01-08 Pedro Alves <palves@redhat.com>
2505
2506 * server.c (handle_status): Don't discard previous queued stop
2507 replies or thread's pending status here.
2508 (main) <disconnection>: Do it here instead.
2509
b7ea362b
PA
25102014-01-08 Pedro Alves <palves@redhat.com>
2511
2512 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2513 * server.c (visit_actioned_threads, handle_pending_status): New
2514 function.
2515 (handle_v_cont): Factor out parts to ...
2516 (resume): ... this new function. If in all-stop, and a thread
2517 being resumed has a pending status, report it without actually
2518 resuming.
2519 (myresume): Adjust to use the new 'resume' function.
2520 (clear_pending_status_callback, set_pending_status_callback)
2521 (find_status_pending_thread_callback): New functions.
2522 (handle_status): Handle the case of multiple threads having
2523 interesting statuses to report. Report threads' real last signal
2524 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
2525 with an interesting thread to report the status for, instead of
2526 always reporting the status of the first thread.
2527
28498c42
JB
25282014-01-01 Joel Brobecker <brobecker@adacore.com>
2529
2530 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2531 * gdbreplay.c (gdbreplay_version): Likewise.
2532
f45c82da
YZ
25332013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
2534
2535 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2536 iov.iov_len with the real length in use.
2537
379a5e2d
JB
25382013-12-13 Joel Brobecker <brobecker@adacore.com>
2539
2540 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2541 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2542 for all targets that use win32-low.c.
2543 * win32-low.c (win32_ensure_ntdll_loaded): New function.
2544 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2545
4210d83e
PA
25462013-12-13 Pedro Alves <palves@redhat.com>
2547
2548 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2549 if equal to TARGET_WAITKIND_LOADED.
2550 * win32-low.c (cached_status): New static global.
2551 (win32_wait): Add declaration.
2552 (do_initial_child_stuff): Flush all initial pending debug events
2553 up to the initial breakpoint.
2554 (win32_wait): If CACHED_STATUS was set, return that instead
2555 of doing a real wait. Remove the code resuming the execution
2556 of the inferior after receiving a TARGET_WAITKIND_LOADED event
2557 during the initial phase. Also remove the code changing
2558 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2559 TARGET_WAITKIND_STOPPED.
2560
e7f0d979
YQ
25612013-12-11 Yao Qi <yao@codesourcery.com>
2562
2563 * notif.c (handle_notif_ack): Return 0 if no notification
2564 matches.
2565
ebcf782c
DE
25662013-11-20 Doug Evans <dje@google.com>
2567
2568 * linux-low.c (linux_set_resume_request): Fix comment.
2569
20ad9378
DE
25702013-11-20 Doug Evans <dje@google.com>
2571
2572 * linux-low.c (resume_status_pending_p): Tweak comment.
2573
a196ebeb
WT
25742013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
2575
2576 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2577 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2578 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2579 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2580 (srv_amd64_regobj): Add amd64-mpx.o.
2581 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2582 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2583 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2584 * i387-fp.c (num_pl_bnd_register) Added constant.
2585 (num_pl_bnd_cfg_registers) Added constant.
2586 (struct i387_xsave) Added reserved area and MPX fields.
2587 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2588 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2589 function.
2590 (tdesc_i386_mpx_linux): Add MPX amd64 target.
2591 (init_registers_amd64_mpx_linux): Declare new function.
2592 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2593 (x86_64_regmap): Add MPX registers.
2594 (x86_linux_read_description): Add MPX case.
2595 (initialize_low_arch): Initialize MPX targets.
2596
0080a2f6
TT
25972013-11-18 Tom Tromey <tromey@redhat.com>
2598
2599 * configure: Rebuild.
2600 * configure.ac: Don't check for stdlib.h.
2601 * gdbreplay.c: Unconditionally include stdlib.h.
2602
2978b111
TT
26032013-11-18 Tom Tromey <tromey@redhat.com>
2604
2605 * config.in: Rebuild.
2606 * configure: Rebuild.
2607 * configure.ac: Don't use AC_HEADER_DIRENT.
2608
a3d08894
TT
26092013-11-18 Tom Tromey <tromey@redhat.com>
2610
2611 * server.h: Don't check HAVE_STRING_H.
2612 * gdbreplay.c: Don't check HAVE_STRING_H.
2613 * configure: Rebuild.
2614
0a5dd17d
TT
26152013-11-18 Tom Tromey <tromey@redhat.com>
2616
2617 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2618 LIBGNU.
2619
1bd2f0ba
TT
26202013-11-08 Tom Tromey <tromey@redhat.com>
2621
2622 * configure, config.in: Rebuild.
2623 * configure.ac: Remove unused configury.
2624
3266f10b
TT
26252013-11-08 Tom Tromey <tromey@redhat.com>
2626
2627 * acinclude.m4: Include common.m4, codeset.m4.
2628 * configure, config.in: Rebuild.
2629 * configure.ac: Use GDB_AC_COMMON.
2630
6682d959
AA
26312013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
2632
2633 * linux-s390-low.c (HWCAP_S390_TE): New define.
2634 (s390_arch_setup): Consider the TE field in the HWCAP for
2635 determining 'have_regset_tdb'.
2636
fd0a4d76
SDJ
26372013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
2638
2639 PR gdb/16014
2640 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2641 call to sizeof.
2642
1a3d890b
PA
26432013-10-02 Pedro Alves <palves@redhat.com>
2644
2645 * server.c (process_serial_event): Don't output "GDBserver
2646 exiting" if GDB is connected through stdio.
2647 * target.c (mywait): Likewise, be silent if GDB is connected
2648 through stdio.
2649
97ad4581
JB
26502013-10-01 Joel Brobecker <brobecker@adacore.com>
2651
2652 * lynx-low.c (lynx_add_threads_after_attach): New function.
2653 (lynx_attach): Remove call to add_thread. Add call to
2654 lynx_add_threads_after_attach instead.
2655
5b4e221c
MF
26562013-09-28 Mike Frysinger <vapier@gentoo.org>
2657
2658 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2659 * config.in, configure: Regenerated.
2660
ee47b2f8
YQ
26612013-09-18 Yao Qi <yao@codesourcery.com>
2662
2663 PR server/15959
2664 * server.c (start_inferior): Clear 'resume_info'.
2665
d6707650 26662013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2667
d6707650
JW
2668 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2669 for each register.
2670
9243dd0e 26712013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 2672
9243dd0e
JW
2673 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2674 linux-tile-low.o to srv_tgtobj.
2675
c623a6ef
WN
26762013-09-16 Will Newton <will.newton@linaro.org>
2677
2678 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2679 out regs.
2680
fb71d39e
PA
26812013-09-06 Pedro Alves <palves@redhat.com>
2682
2683 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2684 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2685 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2686 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2687 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2688 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2689
8e7e9910
PA
26902013-09-06 Pedro Alves <palves@redhat.com>
2691
2692 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2693 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2694
7c3a12ca
PA
26952013-09-06 Pedro Alves <palves@redhat.com>
2696
2697 * linux-amd64-ipa.c: Include tracepoint.h.
2698 * linux-i386-ipa.c: Include tracepoint.h.
2699
8eb3d7b6
RW
27002013-09-06 Ricard Wanderlof <ricardw@axis.com>
2701
2702 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2703 (ps_get_thread_area): New function.
2704
eddddb9d
RW
27052013-09-06 Ricard Wanderlof <ricardw@axis.com>
2706
2707 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2708 (initialize_low_arch): Call init_registers_crisv32 rather than
2709 init_register_crisv32.
2710
533b0600
PA
27112013-09-05 Pedro Alves <palves@redhat.com>
2712
2713 * server.h (handle_vFile, hostio_last_error_from_errno): Move
2714 to ...
2715 * hostio.h: ... this new file.
2716 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2717 win32-low.c: Include hostio.h.
2718
0ce3d3b5
PA
27192013-09-05 Pedro Alves <palves@redhat.com>
2720
2721 * server.h (gdb_client_data, handler_func, callback_handler_func)
2722 (delete_file_handler, add_file_handler, append_callback_event)
2723 (delete_callback_event, start_event_loop, initialize_event_loop):
2724 Move to event-loop.h and include it.
2725 * event-loop.h: New file.
2726
799cdc37
PA
27272013-09-05 Pedro Alves <palves@redhat.com>
2728
2729 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2730 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2731 (loaded_dll, unloaded_dll): Move to ...
2732 * dll.h: ... this new file.
2733 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2734
6a6bbd9d
PA
27352013-09-05 Pedro Alves <palves@redhat.com>
2736
2737 * server.h (current_process, get_thread_process, all_processes)
2738 (add_inferior_to_list, for_each_inferior, current_inferior)
2739 (remove_inferior, add_process, remove_process, find_process_pid)
2740 (have_started_inferiors_p, have_attached_inferiors_p)
2741 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2742 (clear_inferiors, find_inferior, find_inferior_id)
2743 (inferior_target_data, set_inferior_target_data)
2744 (inferior_regcache_data, set_inferior_regcache_data): Move to
2745 inferiors.h, and include it.
2746 * inferiors.h: New file.
2747
f699aaba
PA
27482013-09-05 Pedro Alves <palves@redhat.com>
2749
2750 * server.h (struct emit_ops, current_insn_ptr, emit_error):
2751 Move ...
2752 * ax.h: ... here.
2753
c144c7a0
PA
27542013-09-05 Pedro Alves <palves@redhat.com>
2755
2756 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2757 tracepoint.h.
2758 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2759 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2760 (handle_tracepoint_general_set, handle_tracepoint_query)
2761 (tracepoint_finished_step, tracepoint_was_hit)
2762 (release_while_stepping_state_list, current_traceframe)
2763 (in_readonly_region, traceframe_read_mem)
2764 (fetch_traceframe_registers, traceframe_read_sdata)
2765 (traceframe_read_info, struct fast_tpoint_collect_status)
2766 (fast_tracepoint_collecting, force_unlock_trace_buffer)
2767 (handle_tracepoit_bkpts, initialize_low_tracepoint)
2768 (supply_fast_tracepoint_registers)
2769 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2770 (ipa_tdesc, claim_trampoline_space)
2771 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2772 (agent_mem_read, agent_get_trace_state_variable_value)
2773 (agent_set_trace_state_variable_value, agent_tsv_read)
2774 (agent_mem_read_string, get_raw_reg_func_addr)
2775 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2776 * tracepoint.h: ... this new file.
2777
ff42e6ab
PA
27782013-09-05 Pedro Alves <palves@redhat.com>
2779
2780 * server.h (perror_with_name, error, fatal, warning, paddress)
2781 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2782 include it.
2783 * utils.h: New file.
2784
541af0f4
PA
27852013-09-05 Pedro Alves <palves@redhat.com>
2786
2787 * server.h (remote_debug, noack_mode, transport_is_reliable)
2788 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2789 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2790 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2791 (write_enn, initialize_async_io, enable_async_io)
2792 (disable_async_io, check_remote_input_interrupt_request)
2793 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2794 (dead_thread_notify, prepare_resume_reply)
2795 (decode_address_to_semicolon, decode_address, decode_m_packet)
2796 (decode_M_packet, decode_X_packet, decode_xfer_write)
2797 (decode_search_memory_packet, unhexify, hexify)
2798 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2799 (look_up_one_symbol, relocate_instruction)
2800 (monitor_output): Move to remote-utils.h, and include it.
2801 * remote-utils.h: New file.
2802
eebdf26b
PA
28032013-09-05 Pedro Alves <palves@redhat.com>
2804
2805 * server.h (_): Delete.
2806
3aafd2ff
PA
28072013-09-02 Pedro Alves <palves@redhat.com>
2808
2809 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2810 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2811 allocated.
2812 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2813
cee83bcb
PM
28142013-09-02 Pierre Muller <muller@sourceware.org>
2815
2816 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2817 or WriteProcessMemory complete successfully and handle
2818 ERROR_PARTIAL_COPY error.
2819
9a13b2fa
PA
28202013-09-02 Pedro Alves <palves@redhat.com>
2821
2822 * server.c (gdb_read_memory): Return -1 on traceframe memory read
2823 error instead of EIO.
2824
602e3198
JK
28252013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2826
2827 PR server/15604
2828 * linux-low.c: Include filestuff.h.
2829 (linux_create_inferior) <pid == 0>: Call close_most_fds.
2830 * lynx-low.c: Include filestuff.h.
2831 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2832 * server.c: Include filestuff.h.
2833 (main): Call notice_open_fds.
2834 * spu-low.c: Include filestuff.h.
2835 (spu_create_inferior) <pid == 0>: Call close_most_fds.
2836
96d7229d
LM
28372013-08-22 Luis Machado <lgustavo@codesourcery.com>
2838
2839 * Makefile.in: Explain why ../target and ../nat are not
2840 listed as include file search paths.
2841 (linux-waitpid.o): New object file rule.
2842 * configure.srv (srv_native_linux_obj): New variable.
2843 Replace all occurrences of linux native object files with
2844 $srv_native_linux_obj.
2845 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2846 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2847 (linux_enable_event_reporting): Remove declaration.
2848 (my_waitpid): Moved to common/linux-waitpid.c.
2849 (linux_wait_for_event): Pass ptid when calling
2850 linux_enable_event_reporting.
2851 (linux_supports_tracefork_flag): Remove.
2852 (linux_enable_event_reporting): Likewise.
2853 (linux_tracefork_grandchild): Remove.
2854 (STACK_SIZE): Moved to common/linux-ptrace.c.
2855 (linux_tracefork_child): Remove.
2856 (linux_test_for_tracefork): Remove.
2857 (linux_look_up_symbols): Call linux_supports_traceclone.
2858 (initialize_low): Remove call to linux_test_for_tracefork.
2859 * linux-low.h (PTRACE_TYPE_ARG3): Move to
2860 common/linux-ptrace.h.
2861 (PTRACE_TYPE_ARG4): Likewise.
2862 Include linux-ptrace.h.
2863
32940073
PA
28642013-08-21 Pedro Alves <palves@redhat.com>
2865
2866 * config.in: Renegerate.
2867
33b60d58 28682013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 2869
33b60d58
LM
2870 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2871 (SFILES): Remove $(srcdir)/common/target-common.c and
2872 add $(srcdir)/target/waitstatus.c.
2873 (OBS): Remove target-common.o and add waitstatus.o.
2874 (server_h): Remove $(srcdir)/../common/target-common.h and
2875 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2876 and $(srcdir)/../target/waitstatus.h.
2877 (target-common.o): Remove.
2878 (waitstatus.o): New target object file.
2879 * target.h: Do not include target-common.h and
2880 include target/resume.h, target/wait.h and
2881 target/waitstatus.h.
2882
b8e1b30e
LM
28832013-08-13 Luis Machado <lgustavo@codesourcery.com>
2884
2885 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2886 to PTRACE_TYPE_ARG3.
2887 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2888 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2889 PTRACE_TYPE_ARG4.
2890 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2891 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2892
7a60ad40
YQ
28932013-07-27 Jie Zhang <jie@codesourcery.com>
2894 Daniel Jacobowitz <dan@codesourcery.com>
2895 Yao Qi <yao@codesourcery.com>
2896
2897 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2898 (mips-linux-watch.o): New rule.
2899 (mips_linux_watch_h): New variable.
2900 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2901 srv_tgtobj.
2902 * linux-mips-low.c: Include mips-linux-watch.h.
2903 (struct arch_process_info, struct arch_lwp_info): New.
2904 (update_watch_registers_callback): New function.
2905 (mips_linux_new_process, mips_linux_new_thread) New functions.
2906 (mips_linux_prepare_to_resume, mips_insert_point): New
2907 functions.
2908 (mips_remove_point, mips_stopped_by_watchpoint): New
2909 functions.
2910 (rsp_bp_type_to_target_hw_bp_type): New function.
2911 (mips_stopped_data_address): New function.
2912 (the_low_target): Add watchpoint support functions.
2913
de6f69ad
YQ
29142013-07-27 Yao Qi <yao@codesourcery.com>
2915
2916 * i386-low.c: Include break-common.h.
2917 (enum target_hw_bp_type): Remove.
2918
3360c0bf
LM
29192013-07-24 Luis Machado <lgustavo@codesourcery.com>
2920
2921 * Makefile.in (SFILES): /common/target-common.c.
2922 (OBS): Add target-common.o.
2923 (server_h): Add $(srcdir)/../common/target-common.h.
2924 (target-common.o): New target.
2925 * server.c (queue_stop_reply_callback): Free
2926 status string after use.
2927 * target.c (target_waitstatus_to_string): Remove.
2928 * target.h: Include target-common.h.
2929 (resume_kind): Likewise.
2930 (target_waitkind): Likewise.
2931 (target_waitstatus): Likewise.
2932 (TARGET_WNOHANG): Likewise.
2933
bd885420
YQ
29342013-07-04 Yao Qi <yao@codesourcery.com>
2935
2936 * Makefile.in (host_alias): Use @host_noncanonical@.
2937 (target_alias): Use @target_noncanonical@.
2938 * configure.ac: Use ACX_NONCANONICAL_TARGET and
2939 ACX_NONCANONICAL_HOST.
2940 * configure: Regenerated.
2941
2942 Revert:
2943 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
2944
2945 * configure.ac (version_host, version_target): Set and AC_SUBST them.
2946 * configure: Rebuild.
2947 * Makefile.in (version_host, version_target): Get from configure.
2948 (version.c): Use $(version_host) and $(version_target).
2949
17ef446e
PA
29502013-07-03 Pedro Alves <palves@redhat.com>
2951
2952 * Makefile.in (config.status): Depend on development.sh.
2953 * acinclude.m4: Include libmcheck.m4.
2954 * configure: Regenerate.
2955
7a9a7487
MG
29562013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2957
2958 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2959 attribute inside the parentheses.
2960 (winapi_DebugSetProcessKillOnExit): Ditto.
2961 (winapi_DebugBreakProcess): Ditto.
2962 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 2963
49b64de6
MG
29642013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
2965
2966 * notif.h (notif_event): Add a dummy member to avoid compiler
2967 errors.
2968
d5749ee7
PA
29692013-07-01 Pedro Alves <palves@redhat.com>
2970
2971 * hostio.c (HOSTIO_PATH_MAX): Define.
2972 (require_filename, handle_open, handle_unlink, handle_readlink):
2973 Use it.
2974
d8d2a3ee
PA
29752013-07-01 Pedro Alves <palves@redhat.com>
2976
2977 * server.h: Include "pathmax.h".
2978 * linux-low.c: Don't include sys/param.h.
2979 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2980 MAXPATHLEN.
2981 * win32-low.c: Don't include sys/param.h.
2982 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2983
bc7dea8d
PA
29842013-07-01 Pedro Alves <palves@redhat.com>
2985
2986 * event-loop.c: Don't check HAVE_UNISTD_H before including
2987 <unistd.h>.
2988 * gdbreplay.c: Likewise.
2989 * remote-utils.c: Likewise.
2990 * server.c: Likewise.
2991 * configure.ac: Don't check for unistd.h.
2992 * configure: Regenerate.
2993
d6c2da54
TT
29942013-06-28 Tom Tromey <tromey@redhat.com>
2995
2996 * Makefile.in (version.c): Use version.in, not
2997 common/version.in.
2998
257b6bec
MG
29992013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3000
3001 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3002 * configure: Rebuild.
3003 * Makefile.in (version_host, version_target): Get from configure.
3004 (version.c): Use $(version_host) and $(version_target).
3005
86ebe149
DK
30062013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3007
3008 Fix trace-status to output user name without trailing colon.
3009 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3010
f30aa5af
DK
30112013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3012
3013 Fix trace-status to output proper start-time and stop-time.
3014 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3015 output start time and stop time in hex as gdb expects.
3016
28a93511
YQ
30172013-06-26 Pedro Alves <pedro@codesourcery.com>
3018
3019 * tracepoint.c (build_traceframe_info_xml): Output trace state
3020 variables present in the trace buffer.
3021
01208463
TT
30222013-06-24 Tom Tromey <tromey@redhat.com>
3023
3024 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3025 create-version.sh.
3026 (version.o): Remove.
3027 * gdbreplay.c: Include version.h.
3028 (version, host_name): Don't declare.
3029 * server.h: Include version.h.
3030 (version, host_name): Don't declare.
3031
760256f9
PA
30322013-06-12 Pedro Alves <palves@redhat.com>
3033
3034 * linux-x86-low.c (linux_is_elf64): Delete global.
3035 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3036 with local linux_pid_exe_is_elf_64_file use.
3037
030031ee
PA
30382013-06-11 Pedro Alves <palves@redhat.com>
3039
3040 * linux-low.c (regset_disabled, disable_regset): New functions.
3041 (regsets_fetch_inferior_registers)
3042 (regsets_store_inferior_registers): Use them.
3043 (initialize_regsets_info); Don't allocate the disabled_regsets
3044 array here.
3045 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3046 comment.
3047
5da6eb0a
PA
30482013-06-11 Pedro Alves <palves@redhat.com>
3049
3050 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3051 xmalloc.
3052
7e5aaa09
PA
30532013-06-11 Pedro Alves <palves@redhat.com>
3054
3055 * linux-x86-low.c (initialize_low_arch): Call
3056 init_registers_x32_avx_linux.
3057
d878444c
JK
30582013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3059
3060 Fix compatibility with Android Bionic.
3061 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3062 it is not empty.
3063
3aee8918
PA
30642013-06-07 Pedro Alves <palves@redhat.com>
3065
5f2b57b5 3066 PR server/14823
3aee8918
PA
3067 * Makefile.in (OBS): Add tdesc.o.
3068 (IPA_OBJS): Add tdesc-ipa.o.
3069 (tdesc-ipa.o): New rule.
3070 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3071 interface.
3072 * linux-low.c (new_inferior): Delete.
3073 (disabled_regsets, num_regsets): Delete.
3074 (linux_add_process): Adjust to set the new per-process
3075 new_inferior flag.
3076 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3077 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3078 was a stop. When calling arch_setup, switch the current inferior
3079 to the thread that got an event.
3080 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3081 (regsets_fetch_inferior_registers)
3082 (regsets_store_inferior_registers): New regsets_info parameter.
3083 Adjust to use it.
3084 (linux_register_in_regsets): New regs_info parameter. Adjust to
3085 use it.
3086 (register_addr, fetch_register, store_register): New usrregs_info
3087 parameter. Adjust to use it.
3088 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3089 parameter regs_info. Adjust to use it.
3090 (linux_fetch_registers): Get the current inferior's regs_info, and
3091 adjust to use it.
3092 (linux_store_registers): Ditto.
3093 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3094 (initialize_low): Don't initialize the target_regsets here. Call
3095 initialize_low_arch.
3096 * linux-low.h (target_regsets): Delete declaration.
3097 (struct regsets_info): New.
3098 (struct usrregs_info): New.
3099 (struct regs_info): New.
3100 (struct process_info_private) <new_inferior>: New field.
3101 (struct linux_target_ops): Delete the num_regs, regmap, and
3102 regset_bitmap fields. New field regs_info.
3103 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3104 * i387-fp.c (num_xmm_registers): Delete.
3105 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3106 calls to new interface.
3107 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3108 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3109 Infer the number of xmm registers from the regcache's target
3110 description.
3111 * i387-fp.h (num_xmm_registers): Delete.
3112 * inferiors.c (add_thread): Don't install the thread's regcache
3113 here.
3114 * proc-service.c (gregset_info): Fetch the current inferior's
3115 regs_info. Adjust to use it.
3116 * regcache.c: Include tdesc.h.
3117 (register_bytes, reg_defs, num_registers)
3118 (gdbserver_expedite_regs): Delete.
3119 (get_thread_regcache): If the thread doesn't have a regcache yet,
3120 create one, instead of aborting gdbserver.
3121 (regcache_invalidate_one): Rename to ...
3122 (regcache_invalidate_thread): ... this.
3123 (regcache_invalidate_one): New.
3124 (regcache_invalidate): Only invalidate registers of the current
3125 process.
3126 (init_register_cache): Add target_desc parameter, and use it.
3127 (new_register_cache): Ditto. Assert the target description has a
3128 non zero registers_size.
3129 (regcache_cpy): Add assertions. Adjust.
3130 (realloc_register_cache, set_register_cache): Delete.
3131 (registers_to_string, registers_from_string): Adjust.
3132 (find_register_by_name, find_regno, find_register_by_number)
3133 (register_cache_size): Add target_desc parameter, and use it.
3134 (free_register_cache_thread, free_register_cache_thread_one)
3135 (regcache_release, register_cache_size): New.
3136 (register_size): Add target_desc parameter, and use it.
3137 (register_data, supply_register, supply_register_zeroed)
3138 (supply_regblock, supply_register_by_name, collect_register)
3139 (collect_register_as_string, collect_register_by_name): Adjust.
3140 * regcache.h (struct target_desc): Forward declare.
3141 (struct regcache) <tdesc>: New field.
3142 (init_register_cache, new_register_cache): Add target_desc
3143 parameter.
3144 (regcache_invalidate_thread): Declare.
3145 (regcache_invalidate_one): Delete declaration.
3146 (regcache_release): Declare.
3147 (find_register_by_number, register_cache_size, register_size)
3148 (find_regno): Add target_desc parameter.
3149 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3150 declarations.
3151 * remote-utils.c: Include tdesc.h.
3152 (outreg, prepare_resume_reply): Adjust.
3153 * server.c: Include tdesc.h.
3154 (gdbserver_xmltarget): Delete declaration.
3155 (get_features_xml, process_serial_event): Adjust.
3156 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3157 declare.
3158 (struct process_info) <tdesc>: New field.
3159 (ipa_tdesc): Declare.
3160 * tdesc.c: New file.
3161 * tdesc.h: New file.
3162 * tracepoint.c: Include tdesc.h.
3163 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3164 (get_context_regcache): Adjust to pass ipa_tdesc down.
3165 (do_action_at_tracepoint): Adjust to get the register cache size
3166 from the context regcache's description.
3167 (traceframe_walk_blocks): Adjust to get the register cache size
3168 from the current trace frame's description.
3169 (traceframe_get_pc): Adjust to get current trace frame's
3170 description and pass it down.
3171 (gdb_collect): Adjust to get the register cache size from the
3172 IPA's description.
3173 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3174 (gdbserver_xmltarget): Delete.
3175 (initialize_low_tracepoint): Set the ipa's target description.
3176 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3177 (initialize_low_tracepoint): Set the ipa's target description.
3178 * linux-x86-low.c: Include tdesc.h.
3179 [__x86_64__] (is_64bit_tdesc): New.
3180 (ps_get_thread_area, x86_get_thread_area): Use it.
3181 (i386_cannot_store_register): Rename to ...
3182 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
3183 (i386_cannot_fetch_register): Rename to ...
3184 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
3185 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3186 to new interface.
3187 (target_regsets): Rename to ...
3188 (x86_regsets): ... this.
3189 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3190 interface.
3191 (x86_siginfo_fixup): Use is_64bit_tdesc.
3192 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3193 (tdesc_x32_avx_linux, tdesc_x32_linux)
3194 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3195 Declare.
3196 (x86_linux_update_xmltarget): Delete.
3197 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3198 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3199 (AMD64_LINUX_USER64_CS): New.
3200 (x86_linux_read_description): New, based on
3201 x86_linux_update_xmltarget.
3202 (same_process_callback): New.
3203 (x86_arch_setup_process_callback): New.
3204 (x86_linux_update_xmltarget): New.
3205 (x86_regsets_info): New.
3206 (amd64_linux_regs_info): New.
3207 (i386_linux_usrregs_info): New.
3208 (i386_linux_regs_info): New.
3209 (x86_linux_regs_info): New.
3210 (x86_arch_setup): Reimplement.
3211 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3212 (x86_emit_ops): Ditto.
3213 (the_low_target): Adjust. Install x86_linux_regs_info,
3214 x86_cannot_fetch_register, and x86_cannot_store_register.
3215 (initialize_low_arch): New.
3216 * linux-ia64-low.c (tdesc_ia64): Declare.
3217 (ia64_fetch_register): Adjust.
3218 (ia64_usrregs_info, regs_info): New globals.
3219 (ia64_regs_info): New function.
3220 (the_low_target): Adjust.
3221 (initialize_low_arch): New function.
3222 * linux-sparc-low.c (tdesc_sparc64): Declare.
3223 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3224 Adjust.
3225 (sparc_arch_setup): New function.
3226 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3227 (the_low_target): Adjust.
3228 (initialize_low_arch): New function.
3229 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3230 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3231 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3232 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3233 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3234 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3235 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3236 (tdesc_powerpc_isa205_vsx64l): Declare.
3237 (ppc_cannot_store_register, ppc_collect_ptrace_register)
3238 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3239 (ppc_set_pc, ppc_get_hwcap): Adjust.
3240 (ppc_usrregs_info): Forward declare.
3241 (!__powerpc64__) ppc_regmap_adjusted: New global.
3242 (ppc_arch_setup): Adjust to the current process'es target
3243 description.
3244 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3245 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3246 (ppc_store_evrregset): Adjust.
3247 (target_regsets): Rename to ...
3248 (ppc_regsets): ... this, and make static.
3249 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3250 (ppc_regs_info): New function.
3251 (the_low_target): Adjust.
3252 (initialize_low_arch): New function.
3253 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3254 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3255 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3256 (tdesc_s390x_linux64v2): Declare.
3257 (s390_collect_ptrace_register, s390_supply_ptrace_register)
3258 (s390_fill_gregset, s390_store_last_break): Adjust.
3259 (target_regsets): Rename to ...
3260 (s390_regsets): ... this, and make static.
3261 (s390_get_pc, s390_set_pc): Adjust.
3262 (s390_get_hwcap): New target_desc parameter, and use it.
3263 [__s390x__] (have_hwcap_s390_high_gprs): New global.
3264 (s390_arch_setup): Adjust to set the current process'es target
3265 description. Don't adjust the regmap.
3266 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3267 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3268 (regs_info_3264): New globals.
3269 (s390_regs_info): New function.
3270 (the_low_target): Adjust.
3271 (initialize_low_arch): New function.
3272 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3273 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3274 [__mips64] (init_registers_mips_linux)
3275 (init_registers_mips_dsp_linux): Delete defines.
3276 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3277 (have_dsp): New global.
3278 (mips_read_description): New, based on mips_arch_setup.
3279 (mips_arch_setup): Reimplement.
3280 (get_usrregs_info): New function.
3281 (mips_cannot_fetch_register, mips_cannot_store_register)
3282 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3283 (mips_fill_fpregset, mips_store_fpregset): Adjust.
3284 (target_regsets): Rename to ...
3285 (mips_regsets): ... this, and make static.
3286 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3287 (dsp_regs_info, regs_info): New globals.
3288 (mips_regs_info): New function.
3289 (the_low_target): Adjust.
3290 (initialize_low_arch): New function.
3291 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3292 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3293 Declare.
3294 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3295 (arm_read_description): New, with bits factored from
3296 arm_arch_setup.
3297 (arm_arch_setup): Reimplement.
3298 (target_regsets): Rename to ...
3299 (arm_regsets): ... this, and make static.
3300 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3301 (arm_regs_info): New function.
3302 (the_low_target): Adjust.
3303 (initialize_low_arch): New function.
3304 * linux-m68k-low.c (tdesc_m68k): Declare.
3305 (target_regsets): Rename to ...
3306 (m68k_regsets): ... this, and make static.
3307 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3308 (m68k_regs_info): New function.
3309 (m68k_arch_setup): New function.
3310 (the_low_target): Adjust.
3311 (initialize_low_arch): New function.
3312 * linux-sh-low.c (tdesc_sharch): Declare.
3313 (target_regsets): Rename to ...
3314 (sh_regsets): ... this, and make static.
3315 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3316 (sh_regs_info, sh_arch_setup): New functions.
3317 (the_low_target): Adjust.
3318 (initialize_low_arch): New function.
3319 * linux-bfin-low.c (tdesc_bfin): Declare.
3320 (bfin_arch_setup): New function.
3321 (bfin_usrregs_info, regs_info): New globals.
3322 (bfin_regs_info): New function.
3323 (the_low_target): Adjust.
3324 (initialize_low_arch): New function.
3325 * linux-cris-low.c (tdesc_cris): Declare.
3326 (cris_arch_setup): New function.
3327 (cris_usrregs_info, regs_info): New globals.
3328 (cris_regs_info): New function.
3329 (the_low_target): Adjust.
3330 (initialize_low_arch): New function.
3331 * linux-cris-low.c (tdesc_crisv32): Declare.
3332 (cris_arch_setup): New function.
3333 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3334 (cris_regs_info): New function.
3335 (the_low_target): Adjust.
3336 (initialize_low_arch): New function.
3337 * linux-m32r-low.c (tdesc_m32r): Declare.
3338 (m32r_arch_setup): New function.
3339 (m32r_usrregs_info, regs_info): New globals.
3340 (m32r_regs_info): Adjust.
3341 (initialize_low_arch): New function.
3342 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3343 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3344 (tic6x_usrregs_info): Forward declare.
3345 (tic6x_read_description): New function, based on ...
3346 (tic6x_arch_setup): ... this. Reimplement.
3347 (target_regsets): Rename to ...
3348 (tic6x_regsets): ... this, and make static.
3349 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3350 (tic6x_regs_info): New function.
3351 (the_low_target): Adjust.
3352 (initialize_low_arch): New function.
3353 * linux-xtensa-low.c (tdesc_xtensa): Declare.
3354 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3355 (target_regsets): Rename to ...
3356 (xtensa_regsets): ... this, and make static.
3357 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3358 globals.
3359 (xtensa_arch_setup, xtensa_regs_info): New functions.
3360 (the_low_target): Adjust.
3361 (initialize_low_arch): New function.
3362 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3363 (nios2_arch_setup): Set the current process'es tdesc.
3364 (target_regsets): Rename to ...
3365 (nios2_regsets): ... this.
3366 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3367 (nios2_regs_info): New function.
3368 (the_low_target): Adjust.
3369 (initialize_low_arch): New function.
a261b8f5
PA
3370 * linux-aarch64-low.c (tdesc_aarch64): Declare.
3371 (aarch64_arch_setup): Set the current process'es tdesc.
3372 (target_regsets): Rename to ...
3373 (aarch64_regsets): ... this.
3374 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3375 (aarch64_regs_info): New function.
3376 (the_low_target): Adjust.
3377 (initialize_low_arch): New function.
3aee8918
PA
3378 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3379 globals.
3380 (target_regsets): Rename to ...
3381 (tile_regsets): ... this.
3382 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3383 (tile_regs_info): New function.
3384 (tile_arch_setup): Set the current process'es tdesc.
3385 (the_low_target): Adjust.
3386 (initialize_low_arch): New function.
3387 * spu-low.c (tdesc_spu): Declare.
3388 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3389 * win32-arm-low.c (tdesc_arm): Declare.
3390 (arm_arch_setup): New function.
3391 (the_low_target): Install arm_arch_setup instead of
3392 init_registers_arm.
3393 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3394 (init_windows_x86): Rename to ...
3395 (i386_arch_setup): ... this. Set `win32_tdesc'.
3396 (the_low_target): Adjust.
3397 * win32-low.c (win32_tdesc): New global.
3398 (child_add_thread): Don't create the thread cache here.
3399 (do_initial_child_stuff): Set the new process'es tdesc.
3400 * win32-low.h (struct target_desc): Forward declare.
3401 (win32_tdesc): Declare.
3402 * lynx-i386-low.c (tdesc_i386): Declare global.
3403 (lynx_i386_arch_setup): Set `lynx_tdesc'.
3404 * lynx-low.c (lynx_tdesc): New global.
3405 (lynx_add_process): Set the new process'es tdesc.
3406 * lynx-low.h (struct target_desc): Forward declare.
3407 (lynx_tdesc): Declare global.
3408 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3409 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3410 * nto-low.c (nto_tdesc): New global.
3411 (do_attach): Set the new process'es tdesc.
3412 * nto-low.h (struct target_desc): Forward declare.
3413 (nto_tdesc): Declare.
3414 * nto-x86-low.c (tdesc_i386): Declare.
3415 (nto_x86_arch_setup): Set `nto_tdesc'.
3416
b1fbec62
GB
34172013-06-04 Gary Benson <gbenson@redhat.com>
3418
3419 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3420 to qSupported response when appropriate.
3421 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3422 with nonzero-length annex.
3423 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3424 arguments supplied in annex.
3425
d1ec4ce7
DE
34262013-05-31 Doug Evans <dje@google.com>
3427
ac44adcb 3428 PR server/15594
d1ec4ce7
DE
3429 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3430 64 bits in 64-cross-32 environment.
3431
9b25f2d3
PA
34322013-05-28 Pedro Alves <palves@redhat.com>
3433
3434 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3435 (aarch64-without-fpu.c): Delete rule.
3436 * configure.srv (aarch64*-*-linux*): Remove references to
3437 aarch64-without-fpu.o and aarch64-without-fpu.xml.
3438 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3439 declaration.
3440
6740dc9c
PA
34412013-05-24 Pedro Alves <palves@redhat.com>
3442
3443 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3444 instead of strchr/decode_address. Error if the range isn't split
3445 with a ','. Don't assume there's be a ':' in the action.
3446
c2d6af84
PA
34472013-05-23 Yao Qi <yao@codesourcery.com>
3448 Pedro Alves <palves@redhat.com>
3449
3450 * linux-low.c (lwp_in_step_range): New function.
3451 (linux_wait_1): If the thread was range stepping and stopped
3452 outside the stepping range, report the stop to GDB. Otherwise,
3453 continue stepping. Add range stepping debug output.
3454 (linux_set_resume_request): Copy the step range from the resume
3455 request to the lwp.
3456 (linux_supports_range_stepping): New.
3457 (linux_target_ops) <supports_range_stepping>: Set to
3458 linux_supports_range_stepping.
3459 * linux-low.h (struct linux_target_ops)
3460 <supports_range_stepping>: New field.
3461 (struct lwp_info) <step_range_start, step_range_end>: New fields.
3462 * linux-x86-low.c (x86_supports_range_stepping): New.
3463 (the_low_target) <supports_range_stepping>: Set to
3464 x86_supports_range_stepping.
3465 * server.c (handle_v_cont): Handle 'r' action.
3466 (handle_v_requests): Append ";r" if the target supports range
3467 stepping.
3468 * target.h (struct thread_resume) <step_range_start,
3469 step_range_end>: New fields.
3470 (struct target_ops) <supports_range_stepping>:
3471 New field.
3472 (target_supports_range_stepping): New macro.
3473
58794e1a
JB
34742013-05-17 Joel Brobecker <brobecker@adacore.com>
3475
3476 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3477 confusion in comment.
3478
d631c5a7
JB
34792013-05-17 Joel Brobecker <brobecker@adacore.com>
3480
3481 * lynx-low.c (struct process_info_private): New type.
3482 (lynx_add_process): New function.
3483 (lynx_create_inferior, lynx_attach): Replace calls to
3484 add_process by calls to lynx_add_process.
3485 (lynx_resume): If PTID is null, then try using
3486 current_process()->private->last_wait_event_ptid.
3487 Add comments.
3488 (lynx_clear_inferiors): Delete. The contents of that function
3489 has been inlined in lynx_mourn;
3490 (lynx_wait_1): Save the ptid in the process's private data.
3491 (lynx_mourn): Free the process' private data. Replace call
3492 to lynx_clear_inferiors by call to clear_inferiors.
3493
96f7a20f
YQ
34942013-05-17 Yao Qi <yao@codesourcery.com>
3495
3496 * i386-low.c (i386_length_and_rw_bits): Move the comment to
3497 the right place.
3498
db0dfaa0
LM
34992013-05-16 Luis Machado <lgustavo@codesourcery.com>
3500
3501 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3502 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
3503 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3504 PT_TEXT_END_ADDR guards. Update comments.
3505 (linux_target_op) <read_offsets>: Conditionally define to
3506 linux_read_offsets if the target is UCLIBC and if it defines
3507 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3508
68f5f838
SL
35092013-05-06 Sandra Loosemore <sandra@codesourcery.com>
3510 Andrew Jenner <andrew@codesourcery.com>
3511
3512 * Makefile.in (SFILES): Add linux-nios2-low.c.
3513 (clean): Add action to delete nios2-linux.c.
3514 (nios2-linux.c): New rule.
3515 * configure.srv: Add nios2*-*-linux*.
3516 * linux-nios2-low.c: New.
3517
1ebff1fd
HAQ
35182013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
3519
3520 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3521
f6150862
HZ
35222013-04-25 Hui Zhu <hui@codesourcery.com>
3523
3524 PR gdb/15186
f6150862
HZ
3525 * ax.c (ax_printf): Add fflush.
3526
614c279d
TT
35272013-04-22 Tom Tromey <tromey@redhat.com>
3528
3529 * Makefile.in (SFILES): Add filestuff.c.
3530 (OBS): Add filestuff.o.
3531 (filestuff.o): New target.
3532 * config.in, configure: Rebuild.
3533 * configure.ac: Check for fdwalk, pipe2.
3534
7d4e5717
PA
35352013-04-17 Pedro Alves <palves@redhat.com>
3536
3537 * configure.ac (USE_THREAD_DB): Delete variable.
3538 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3539 Don't AC_SUBST USE_THREAD_DB.
3540 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3541 * config.in, configure: Regenerate.
3542
d5c93e41
PA
35432013-04-16 Pedro Alves <palves@redhat.com>
3544
3545 * linux-low.h (struct lwp_info) <thread_known>: Move under
3546 the USE_THREAD_DB #ifdef.
3547
04f5fe89
PA
35482013-04-16 Pedro Alves <palves@redhat.com>
3549
3550 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3551 (linux-low.o): Delete rule.
3552 * linux-low.h: Always include "gdb_thread_db.h" instead of
3553 conditionally including thread_db.h.
3554 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3555 HAVE_THREAD_DB_H.
3556
480b27bf
JK
35572013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3558
3559 * Makefile.in (install-only): Fix make install regression.
3560
43662968
JK
35612013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3562
3563 Convert man pages to texinfo, new gdbinit.5 texinfo page.
3564 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3565 installation.
3566 * gdbserver.1: Remove.
3567
3e74e146
PA
35682013-03-22 Pedro Alves <palves@redhat.com>
3569
3570 * linux-low.c (handle_extended_wait): Don't call
3571 linux_enable_event_reporting.
3572
a8347a2a
TT
35732013-03-15 Tony Theodore <tonyt@logyst.com>
3574
3575 PR build/9098:
3576 * Makefile.in (SHELL): Use @SHELL@.
3577
eeb56fa7
SDJ
35782013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
3579
3580 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3581 compiler warning.
3582
4fa7e2ff
JB
35832013-03-13 Joel Brobecker <brobecker@adacore.com>
3584
3585 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3586 Remove extraneous NULL element.
3587
8ddb1965
YQ
35882013-03-13 Yao Qi <yao@codesourcery.com>
3589
3590 * tracepoint.c (traceframe_read_tsv): Look for the last matched
3591 'V' block in trace frame.
3592
9accd112
MM
35932013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3594
3595 * target.h (struct target_ops): Add btrace ops.
3596 (target_supports_btrace): New macro.
3597 (target_enable_btrace): New macro.
3598 (target_disable_btrace): New macro.
3599 (target_read_btrace): New macro.
3600 * gdbthread.h (struct thread_info): Add btrace field.
3601 * server.c: Include btrace-common.h.
3602 (handle_btrace_general_set): New function.
3603 (handle_btrace_enable): New function.
3604 (handle_btrace_disable): New function.
3605 (handle_general_set): Call handle_btrace_general_set.
3606 (handle_qxfer_btrace): New function.
3607 (struct qxfer qxfer_packets[]): Add btrace entry.
3608 * inferiors.c (remove_thread): Disable btrace.
3609 * linux-low: Include linux-btrace.h.
3610 (linux_low_enable_btrace): New function.
3611 (linux_low_read_btrace): New function.
3612 (linux_target_ops): Add btrace ops.
3613 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3614 Add srv_linux_btrace=yes.
3615 (x86_64-*-linux*): Add linux-btrace.o.
3616 Add srv_linux_btrace=yes.
3617 * configure.ac: Define HAVE_LINUX_BTRACE.
3618 * config.in: Regenerated.
3619 * configure: Regenerated.
3620
5cc22e4c
MM
36212013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3622
3623 * server.c (handle_qxfer): Preserve error message if -3 is
3624 returned.
3625 (qxfer): Document the -3 return value.
3626
7c97f91e
MM
36272013-03-11 Markus Metzger <markus.t.metzger@intel.com>
3628
3629 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3630 (linux_btrace_h): New variable.
3631 (linux-btrace.o): New rule.
3632
be9a119c 36332013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
3634 Hafiz Abid Qadeer <abidh@codesourcery.com>
3635
3636 * tracepoint.c (trace_buffer_size): New global.
3637 (DEFAULT_TRACE_BUFFER_SIZE): New define.
3638 (init_trace_buffer): Change to one-argument function. Allocate
3639 trace buffer memory.
3640 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3641 handle QTBuffer:size packet.
3642 (cmd_bigqtbuffer_size): New function.
3643 (initialize_tracepoint): Call init_trace_buffer with
3644 DEFAULT_TRACE_BUFFER_SIZE.
3645 * server.c (handle_query): Add QTBuffer:size in the
3646 supported packets.
3647
e64f7499
YQ
36482013-03-07 Yao Qi <yao@codesourcery.com>
3649
3650 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3651 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3652 of -1.
3653 (cmd_qtsp): Adjust condition. Do post increment.
3654 Set cur_action and cur_step_action back to 0.
3655
f0ae6fc3
PA
36562013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
3657
3658 PR server/15236
3659 * linux-low.c (linux_write_memory): Return early success if LEN is
3660 zero.
3661
b5b0b0af
CV
36622013-03-05 Corinna Vinschen <vinschen@redhat.de>
3663
334ad4a8 3664 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 3665
589bc927
TT
36662013-02-28 Tom Tromey <tromey@redhat.com>
3667
3668 * configure.ac: Invoke AC_SYS_LARGEFILE.
3669 * configure, config.in: Rebuild.
3670
dfe07582
CV
36712013-02-28 Corinna Vinschen <vinschen@redhat.com>
3672
3673 * win32-low.c: Throughout, fix format strings and casts of
3674 printf-like functions to avoid type related warnings on all
3675 platforms.
3676 (get_child_debug_event): Print dwDebugEventCode as hex since
3677 that's how it's usually documented.
3678
736cd585
YQ
36792013-02-28 Yao Qi <yao@codesourcery.com>
3680
3681 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3682 pulongest.
3683
e1f58301
JW
36842013-02-27 Jiong Wang <jiwang@tilera.com>
3685
3686 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3687 (reg-tilegx32.c): New rule.
3688 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3689 * linux-tile-low.c (tile_arch_setup): New function. Invoke
3690 different register info initializer according to elf class.
3691 (init_registers_tilgx32): New function. The tilegx32 register info
3692 initializer.
3693 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3694 (tile_store_gregset): Likewise.
3695
d171ca78
YQ
36962013-02-27 Yao Qi <yao@codesourcery.com>
3697
3698 * server.c (process_point_options): Print debug message when
3699 debug_threads is true.
3700
282bbdf3
YQ
37012013-02-26 Yao Qi <yao@codesourcery.com>
3702
3703 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3704
aca22551
PA
37052013-02-19 Pedro Alves <palves@redhat.com>
3706 Kai Tietz <ktietz@redhat.com>
3707
3708 PR gdb/15161
3709
3710 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3711 instead of strtoul to extract address from packet.
3712 (process_serial_event) <'z'>: Likewise.
3713
4f3cee1c
YQ
37142013-02-18 Yao Qi <yao@codesourcery.com>
3715
3716 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3717
8e1d55a3
PA
37182013-02-14 Pedro Alves <palves@redhat.com>
3719
3720 Plug memory leak.
3721
3722 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3723 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3724
458820da
PA
37252013-02-14 Pedro Alves <palves@redhat.com>
3726
3727 * tracepoint.c (cmd_qtdpsrc): Use savestring.
3728
baea0dae
PA
37292013-02-14 Pedro Alves <palves@redhat.com>
3730
3731 * tracepoint.c (save_string): Delete.
3732 (add_tracepoint_action): Use savestring instead of save_string.
3733
0b1afbb3
PA
37342013-02-12 Pedro Alves <palves@redhat.com>
3735
3736 * linux-xtensa-low.c: Ditto.
3737 * xtensa-xtregs.c: Ditto.
3738
8a4ac37e
PA
37392013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
3740
3741 * thread-db.c (thread_db_get_tls_address): NULL pointer check
3742 thread_db.
3743
148de6bb
MS
37442013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3745
3746 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3747 aarch64_num_wp_regs and aarch64_num_bp_regs to
3748 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3749
55fac6e0
MS
37502013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
3751
3752 * linux-aarch64-low.c (ps_get_thread_area): Replace
3753 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3754
176eb98c
MS
37552013-02-04 Jim MacArthur <jim.macarthur@arm.com>
3756 Marcus Shawcroft <marcus.shawcroft@arm.com>
3757 Nigel Stephens <nigel.stephens@arm.com>
3758 Yufeng Zhang <yufeng.zhang@arm.com>
3759
3760 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3761 (aarch64.c, aarch64-without-fpu.c): New targets.
3762 * configure.srv (aarch64*-*-linux*): New.
3763 * linux-aarch64-low.c: New file.
3764
56f7af9c
MS
37652013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3766
43aaf8b6 3767 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
3768 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3769 (dequeue_one_deferred_signal, linux_resume_one_thread)
3770 (fetch_register, linux_write_memory, linux_enable_event_reporting)
3771 (linux_tracefork_grandchild, linux_test_for_tracefork)
3772 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3773 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3774 where the argument is 0.
3775
60f662b0
YQ
37762013-01-25 Yao Qi <yao@codesourcery.com>
3777
3778 * event-loop.c: Include "queue.h".
3779 (gdb_event_p): New typedef.
3780 (struct gdb_event) <next_event>: Remove.
3781 (event_queue): Change to QUEUE(gdb_event_p).
3782 (async_queue_event): Remove.
3783 (gdb_event_xfree): New.
3784 (initialize_event_loop): New.
3785 (process_event): Use API from QUEUE.
3786 (wait_for_event): Likewise.
3787 * server.c (main): Call initialize_event_loop.
3788 * server.h (initialize_event_loop): Declare.
3789
5ae4861a
YQ
37902013-01-18 Yao Qi <yao@codesourcery.com>
3791
3792 * ax.h (struct eval_agent_expr_context): New.
3793 (gdb_eval_agent_expr): Update declaration.
3794 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3795 TFRAME. Add new argument CTX.
3796 * server.h (struct eval_agent_expr_context): Declare.
3797 (agent_mem_read, agent_tsv_read): Update declaration.
3798 (agent_mem_read_string): Likewise.
3799 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3800 (add_traceframe_block): Add new argument TPOINT.
3801 Increase TPOINT->traceframe_usage.
3802 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3803 eval_tracepoint_agent_expr.
3804 (condition_true_at_tracepoint): Likewise.
3805 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
3806 (agent_mem_read_string, agent_tsv_read): Likewise.
3807
85e00e85
YQ
38082013-01-16 Yao Qi <yao@codesourcery.com>
3809
3810 * linux-low.c (linux_resume_one_lwp): Don't check
3811 'lwp->bp_reinsert != 0'.
3812
4039cf45
JB
38132013-01-07 Joel Brobecker <brobecker@adacore.com>
3814 Pedro Alves <palves@redhat.com>
3815
3816 * lynx-low.c (ptrace_request_to_str): Define a temporary
3817 macro and use it to simplify this function's implementation.
3818
9044dee2
JB
38192013-01-07 Joel Brobecker <brobecker@adacore.com>
3820
3821 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3822 sets errno.
3823
e6352c8f
JB
38242013-01-07 Joel Brobecker <brobecker@adacore.com>
3825
3826 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3827
50681a27
JB
38282013-01-07 Joel Brobecker <brobecker@adacore.com>
3829
3830 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3831
3f6e77ef
JB
38322013-01-07 Joel Brobecker <brobecker@adacore.com>
3833
3834 * lynx-low.c (lynx_resume): Use the resume_info parameter
3835 to determine the ptid for the lynx_ptrace call, unless
3836 it is equal to minus_one_ptid, in which case we use the
3837 ptid of the current_inferior.
3838 (lynx_wait_1): After having received a thread create/exit
3839 event, resume the inferior's execution using the signaling
3840 thread's ptid, rather than the old ptid.
3841
7fda33ae
JB
38422013-01-07 Joel Brobecker <brobecker@adacore.com>
3843
3844 * lynx-low.c (lynx_resume): Delete variable ret.
3845
b9786c74
JB
38462013-01-01 Joel Brobecker <brobecker@adacore.com>
3847
3848 * gdbreplay.c (gdbreplay_version): Update copyright year.
3849 * server.c (gdbserver_version): Likewise.
3850
8b93d60f
JB
38512012-12-17 Joel Brobecker <brobecker@adacore.com>
3852
3853 * lynx-low.c (lynx_wait_1): Add debug trace before adding
3854 new thread.
3855
037335a7
JB
38562012-12-17 Joel Brobecker <brobecker@adacore.com>
3857
3858 * lynx-low.c (ptrace_request_to_str): Add handling for
3859 PTRACE_GETTRACESIG.
3860
52d4cbd8
JB
38612012-12-17 Joel Brobecker <brobecker@adacore.com>
3862
3863 * lynx-low.c (lynx_attach): Delete variable new_process.
3864
ab8f6ca9
JB
38652012-12-17 Joel Brobecker <brobecker@adacore.com>
3866
3867 * lynx-low.c (lynx_create_inferior): Delete variable
3868 new_process.
3869
78cbc024
JB
38702012-12-17 Joel Brobecker <brobecker@adacore.com>
3871
3872 * lynx-low.c (ptrace_request_to_str): Do not handle
3873 PTRACE_GETTHREADLIST if this macro does not exist.
3874
14a00470
YQ
38752012-12-15 Yao Qi <yao@codesourcery.com>
3876
3877 * Makefile.in (OBS): Add notif.o.
3878 * notif.c, notif.h: New.
3879 * server.c: Include "notif.h".
3880 (struct vstop_notif) <next>: Remove.
3881 <base>: New field.
3882 (queue_stop_reply): Update.
3883 (push_event, send_next_stop_reply): Remove.
3884 (discard_queued_stop_replies): Update.
3885 (notif_stop): New variable.
3886 (handle_v_stopped): Remove.
3887 (handle_v_requests): Don't call handle_v_stopped. Call
3888 handle_ack_notif instead.
3889 (queue_stop_reply_callback): Call notif_event_enque instead
3890 of queue_stop_reply.
3891 (handle_status): Don't call send_next_stop_reply, call
3892 notif_write_event instead.
3893 (kill_inferior_callback): Likewise.
3894 (detach_or_kill_inferior_callback): Likewise.
3895 (main): Call initialize_notif.
3896 (process_serial_event): Call QUEUE_is_empty.
3897 (handle_target_event): Call notif_push instead of push event.
3898 * server.h (push_event): Remove declaration.
3899
61c125b9
TT
39002012-12-10 Tom Tromey <tromey@redhat.com>
3901
3902 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3903 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3904 macros.
3905 (.c.o): Rewrite.
3906 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3907 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3908 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3909 (amd64-linux-ipa.o, ax.o): Rewrite.
3910 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3911 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3912 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3913 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3914 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3915 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3916 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3917 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3918 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3919 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3920 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3921 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3922 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3923 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3924 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3925 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3926 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3927 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3928 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3929 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3930 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3931 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3932 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3933 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3934 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3935 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3936 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3937 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3938 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3939 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3940 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3941 (reg-tilegx.o): Remove.
3942 (all_object_files): New macro.
3943 Include .deps files.
3944 * aclocal.m4, configure: Rebuild.
3945 * acinclude.m4: Include depstand.m4, lead-dot.m4.
3946 * configure.ac: Invoke ZW_CREATE_DEPDIR,
3947 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
3948
e90e9ad9
TT
39492012-12-05 Tom Tromey <tromey@redhat.com>
3950
3951 PR gdb/14917:
3952 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3953
02d403bf 39542012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
3955
3956 * configure.ac: Check for linux/perf_event.h.
3957 * config.in: Regenerated.
3958 * configure: Regenerated.
3959
0270a750
PA
39602012-11-26 Maxime Villard <rustyBSD@gmx.fr>
3961
3962 * hostio.c (handle_readlink): Decrease buffer size
3963 parameter passed to readlink by one byte.
3964
8c29b58e
YQ
39652012-11-26 Yao Qi <yao@codesourcery.com>
3966
3967 * configure.ac (build_warnings): Append '-Wempty-body'.
3968 * configure: Regenerated.
3969 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3970 body.
3971
8bdce1ff
PM
39722012-11-15 Pierre Muller <muller@sourceware.org>
3973
3974 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3975 * config.in: Regenerate.
3976 * configure: Regenerate.
3977 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3978 Use "gdb_wait.h" header instead of <sys/wait.h> header.
3979 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3980 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3981 header.
3982 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
3983 instead of <sys/wait.h> header.
3984 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3985
02d403bf 39862012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
3987
3988 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3989 (various make rules): Remove -DGDBSERVER
3990
fbd5db48
YQ
39912012-11-09 Yao Qi <yao@codesourcery.com>
3992
3993 * spu-low.c (current_ptid): Move it to ..
3994 * gdbthread.h: ... here. New.
3995 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3996 * server.c (myresume, process_serial_event): Likewise.
3997 * thread-db.c (thread_db_find_new_threads): Likewise.
3998 * tracepoint.c (run_inferior_command): Likewise.
3999
b3dc46ff
AB
40002012-10-01 Andrew Burgess <aburgess@broadcom.com>
4001
4002 * server.c (handle_search_memory_1): Include access length in
4003 warning message.
4004
07c04788
HPN
40052012-09-05 Michael Brandt <michael.brandt@axis.com>
4006
4007 * linux-crisv32-low.c: Fix compile errors.
4008
918d227b
YQ
40092012-09-04 Yao Qi <yao@codesourcery.com>
4010
4011 * tracepoint.c (cmd_qtsv): Adjust debug message.
4012 Don't check CUR_TPOINT.
4013
18c1b81a
YQ
40142012-08-28 Yao Qi <yao@codesourcery.com>
4015
4016 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4017 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4018 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4019 Remove declarations of xmalloc, xreallloc, xstrdup and
4020 freeargv.
4021 * Makefile.in (libiberty_h): New.
4022 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4023 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4024
dc82f37b
YQ
40252012-08-23 Yao Qi <yao@codesourcery.com>
4026
4027 * server.h: Remove declaration of 'xsnprintf'.
4028
406b1477
KS
40292012-08-22 Keith Seitz <keiths@redhat.com>
4030
4031 * server.h: Include build-gnulib-gbserver/config.h.
4032 * gdbreplay.c: Likewise.
4033
e6712ff1
DE
40342012-08-08 Doug Evans <dje@google.com>
4035
4036 * Makefile.in (SFILES): Add gdb_vecs.c.
4037 (OBS): Add gdb_vecs.o.
4038 (gdb_vecs_h, host_defs_h): New variables.
4039 (thread-db.o): Add $(gdb_vecs_h) dependency.
4040 (gdb_vecs.o): New rule.
4041 * thread-db.c: #include "gdb_vecs.h".
4042 (thread_db_load_search): Use a vector to iterate over path elements.
4043 Handle text appearing after "$pdir".
4044
4045 * configure.ac: Add check for strstr.
4046 * config.in: Regenerate.
4047 * configure: Regenerate.
4048
7c3270ae
UW
40492012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4050
4051 * hostio.c (handle_pread): If pread fails, fall back to attempting
4052 lseek/read.
4053 (handle_pwrite): Likewise for pwrite.
4054
b62e2b27
UW
40552012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4056
4057 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4058 between unsupported TYPE and unimplementable ADDR/LEN combination.
4059 (arm_insert_point): Act on new return value.
4060
78a99e91
PA
40612012-07-31 Pedro Alves <palves@redhat.com>
4062
4063 * server.c (process_point_options): Only skip tokens if we find
4064 one that is unrecognized. Don't treat 'X' specially while
4065 skipping unrecognized tokens.
4066
fcf303ab
UW
40672012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4068
4069 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4070 to 4-byte-align HW breakpoint addresses for Thumb.
4071
7255706c
YQ
40722012-07-27 Yao Qi <yao@codesourcery.com>
4073
4074 PR remote/14161.
4075
4076 * server.h: Declare gdb_agent_about_to_close.
4077 * target.c (kill_inferior): Include "agent.h".
4078 New. Send command 'kill'.
4079 * target.h (kill_inferior): Removed macro.
4080 * tracepoint.c (gdb_agent_about_to_close): New.
4081 (gdb_agent_helper_thread): Handle command 'close'.
4082 Wait endlessly until the inferior stops.
4083 Install gdb_agent_remove_socket to atexit hook.
4084 (agent_socket_name): New static variable.
4085 (gdb_agent_socket_init): Replace local variable 'name' with
4086 'agent_socket_name'.
4087 (gdb_agent_remove_socket): New.
4088
5a3f286f
YQ
40892012-07-27 Yao Qi <yao@codesourcery.com>
4090
4091 * server.c (process_point_options): Stop at 'X' when parsing.
4092
961bd387
ME
40932012-07-19 Michael Eager <eager@eagercon.com>
4094
a261b8f5 4095 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
4096 to hw_execute.
4097 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4098 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4099 hardware breakpoint.
4100
aa7c7447
JK
41012012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4102
4103 * gdbserver/linux-low.c (initialize_low): Call
4104 linux_ptrace_init_warnings.
4105
7f216e7c
DE
41062012-07-02 Doug Evans <dje@google.com>
4107
4108 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4109 pointer to int.
4110
d3ce09f5
SS
41112012-07-02 Stan Shebs <stan@codesourcery.com>
4112
4113 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
4114 (ax.o): Add it to build rule.
4115 (ax-ipa.o): Ditto.
4116 (OBS): Add format.o.
4117 (IPA_OBS): Add format.o.
4118 * server.c (handle_query): Claim support for breakpoint commands.
4119 (process_point_options): Add command case.
4120 (process_serial_event): Leave running if there are printfs in
4121 effect.
4122 * mem-break.h (any_persistent_commands): Declare.
4123 (add_breakpoint_commands): Declare.
4124 (gdb_no_commands_at_breakpoint): Declare.
4125 (run_breakpoint_commands): Declare.
4126 * mem-break.c (struct point_command_list): New struct.
4127 (struct breakpoint): New field command_list.
4128 (any_persistent_commands): New function.
4129 (add_commands_to_breakpoint): New function.
4130 (add_breakpoint_commands): New function.
4131 (gdb_no_commands_at_breakpoint): New function.
4132 (run_breakpoint_commands): New function.
4133 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4134 locally.
4135 * ax.c: Include format.h.
4136 (ax_printf): New function.
4137 (gdb_eval_agent_expr): Add printf opcode.
4138
2f8f6aed
YQ
41392012-06-13 Yao Qi <yao@codesourcery.com>
4140
4141 * server.c (start_inferior): Remove duplicated writes to fields
4142 'last_resume_kind' and 'last_status' of 'current_inferior'.
4143
0c9070b3
YQ
41442012-06-12 Yao Qi <yao@codesourcery.com>
4145 Pedro Alves <palves@redhat.com>
4146
4147 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
4148 comment.
4149 * server.c (handle_v_cont): Extend comment.
4150
c52daf70
YQ
41512012-06-11 Yao Qi <yao@codesourcery.com>
4152
4153 * linux-low.c (linux_attach): Add 'static'.
4154
d38bbb0a
YQ
41552012-06-06 Yao Qi <yao@codesourcery.com>
4156
4157 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4158
89dc0afd
JK
41592012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4160
4161 Fix gcc -flto compilation warning.
4162 * server.c (main): Make variable multi_mode and attach volatile.
4163
75f62ce7
TJB
41642012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4165
4166 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4167 if the platform doesn't know about it.
4168
65f479b6
PA
41692012-05-30 Jeff Kenton <jkenton@tilera.com>
4170
4171 * Makefile.in (SFILES): Add linux-tile-low.c.
4172 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4173 * configure.srv: Handle tilegx-*-linux*.
4174 * linux-tile-low.c: New file.
4175
0c5bf5a9
JK
41762012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4177
4178 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4179
a493e3e2
PA
41802012-05-24 Pedro Alves <palves@redhat.com>
4181
4182 PR gdb/7205
4183
43aaf8b6 4184 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 4185
2ea28649
PA
41862012-05-24 Pedro Alves <palves@redhat.com>
4187
4188 PR gdb/7205
4189
4190 Replace target_signal with gdb_signal throughout.
4191
8d409d16
MR
41922012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
4193
4194 * linux-low.c (linux_store_registers): Avoid the copying sequence
4195 when no data has been retrieved by ptrace.
4196
23512c01
MGD
41972012-05-22 Will Deacon <will.deacon@arm.com>
4198
4199 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4200 Include asm/ptrace.h.
4201 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4202 already defined.
4203
4934b29e
MR
42042012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
4205
4206 * linux-low.c (linux_store_registers): Don't re-retrieve data
4207 with ptrace that has already been obtained from /proc. Always
4208 copy any data retrieved with ptrace to the buffer supplied.
4209
bde24c0a
PA
42102012-05-11 Yao Qi <yao@codesourcery.com>
4211 Pedro Alves <palves@redhat.com>
4212
4213 * linux-low.c (enum stopping_threads_kind): New.
4214 (stopping_threads): Change type to `enum stopping_threads_kind'.
4215 (handle_extended_wait): If stopping and suspending threads, leave
4216 the new_lwp suspended too.
4217 (linux_wait_for_event): Adjust.
4218 (stop_all_lwps): Set `stopping_threads' to
4219 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4220 whether we're suspending threads or just stopping them. Assert no
4221 recursion happens.
4222
623b6bdf
YQ
42232012-04-29 Yao Qi <yao@codesourcery.com>
4224
4225 * server.h: Move some code to ...
4226 * gdbthread.h: ... here. New.
4227 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4228 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4229 (nto-low.o, win32-low.o): Likewise.
4230 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4231 * regcache.c, remote-utils.c, server.c: Likewise.
4232 * target.c, tracepoint.c, win32-low.c: Likewise.
4233
f15f9948
TJB
42342012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4235
4236 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4237 (PTRACE_ARG4_TYPE): Likewise.
4238 (PTRACE_XFER_TYPE): Likewise.
4239 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4240 ptrace to PTRACE_ARG3_TYPE.
4241 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4242 (PTRACE_ARG4_TYPE): Likewise.
4243 (PTRACE_XFER_TYPE): Likewise.
4244 (linux_detach_one_lwp): Cast fourth argument of
4245 ptrace to long then PTRACE_ARG4_TYPE.
4246 (regsets_fetch_inferior_registers): Cast third argument of
4247 ptrace to long then PTRACE_ARG3_TYPE.
4248 (regsets_store_inferior_registers): Likewise.
4249
38ea300a
PA
42502012-04-20 Pedro Alves <palves@redhat.com>
4251
4252 * configure: Regenerate.
4253
c971b7fa
PA
42542012-04-19 Pedro Alves <palves@redhat.com>
4255
43aaf8b6 4256 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 4257 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
4258 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4259 (all, install-only, uninstall, clean-info, all-lib, clean): No
4260 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
4261 (maintainer-clean realclean distclean): Use subdir_do.
4262 (subdir_do): New.
4263 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 4264 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
4265 * acinclude.m4: Include acx_configure_dir.m4.
4266 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4267 calls. Call AC_PROG_RANLIB. Configure gnulib using
4268 ACX_CONFIGURE_DIR.
4269 (GNULIB): New.
4270 (GNULIB_STDINT_H): Adjust.
4271 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4272 * gdbreplay.c: Include build-gnulib/config.h.
4273 * server.h: Likewise.
4274 * aclocal.m4: Regenerate.
4275 * config.in: Regenerate.
4276 * configure: Regenerate.
c971b7fa 4277
809277f8
PA
42782012-04-19 Pedro Alves <palves@redhat.com>
4279
4280 * Makefile.in (LIBGNU, INCGNU): Adjust.
4281 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4282 (all, install-only, uninstall, clean-info, all-lib, clean)
4283 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4284 * configure.ac: Adjust AC_OUTPUT output.
4285 * aclocal.m4: Regenerate.
4286 * configure: Regenerate.
4287
fd9bb8b8
PA
42882012-04-19 Pedro Alves <palves@redhat.com>
4289
4290 * Makefile.in (generated_files): New.
4291 (server_h): Remove the explicit dependency on config.h, and depend
4292 on $generated_files.
4293
1c298c66
PA
42942012-04-19 Pedro Alves <palves@redhat.com>
4295
4296 * Makefile.in (INCGNU): Add -Ignulib.
4297
57c4b50b
PA
42982012-04-19 Pedro Alves <palves@redhat.com>
4299
4300 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4301 (INCGNU): ... this, and spell out -I here.
4302 (GNULIB_LIB): Rename to ...
4303 (LIBGNU): ... this.
4304 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4305
1030e047
PA
43062012-04-19 Pedro Alves <palves@redhat.com>
4307
4308 * config.in: Regenerate.
4309
447d4319
PA
43102012-04-19 Pedro Alves <palves@redhat.com>
4311
4312 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4313 * server.h (memmem): Remove declaration.
4314 * config.in: Regenerate.
4315 * configure: Regenerate.
4316
aad9eab9
YQ
43172012-04-19 Yao Qi <yao@codesourcery.com>
4318
4319 * Makefile.in (SFILES): Add common/vec.c.
4320 (OBS): Add vec.o.
4321 (vec.o): New rule.
4322
3e10640f
YQ
43232012-04-19 Yao Qi <yao@codesourcery.com>
4324
4325 * remote-utils.c (prepare_resume_reply): Replace with macro
4326 target_core_of_thread.
4327 * server.c (handle_qxfer_threads_proper): Likewise.
4328 * target.h (traget_core_of_thread): New macro.
4329
71622373
PA
43302012-04-18 Pedro Alves <palves@redhat.com>
4331
4332 * aclocal.m4: Regenerate.
4333 * configure: Regenerate.
4334
80d26939
YQ
43352012-04-16 Yao Qi <yao@codesourcery.com>
4336
4337 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4338 duplicated on address.
4339
42476b70
YQ
43402012-04-16 Yao Qi <yao@codesourcery.com>
4341
4342 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4343 (struct tracepoint_action_ops) <send>: New field.
4344 (m_tracepoint_action_send, r_tracepoint_action_send): New.
4345 (agent_expr_send, x_tracepoint_action_send): New.
4346 (l_tracepoint_action_send): New.
4347 (cmd_qtdp): Download and install tracepoint
4348 according to `use_agent'.
4349 (run_inferior_command): Add one more parameter `len'.
4350 Update callers.
4351 (tracepoint_send_agent): New.
4352 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4353
7bc83639
YQ
43542012-04-16 Yao Qi <yao@codesourcery.com>
4355
4356 * tracepoint.c (download_tracepoints): Moved to ...
4357 (cmd_qtstart): ... here.
4358
5f18041e
YQ
43592012-04-14 Yao Qi <yao@codesourcery.com>
4360
4361 * tracepoint.c: Include inttypes.h.
4362 (struct collect_memory_action): Use sized types.
4363 (struct tracepoint): Likewise.
4364 (cmd_qtdp, stop_tracing): Update print specifiers.
4365 (cmd_qtp, response_tracepoint): Likewise.
4366 (collect_data_at_tracepoint): Likewise.
4367 (collect_data_at_step): Likewise.
4368
55a8c076
YQ
43692012-04-14 Yao Qi <yao@codesourcery.com>
4370
4371 Import gnulib module inttypes.
4372 * aclocal.m4, config.in, configure: Regenerated.
4373
dc750257
YQ
43742012-04-14 Yao Qi <yao@codesourcery.com>
4375
4376 * Makefile.in (maintainer-clean, realclean, distclean): Remove
4377 Makefile and config.status at last.
4378
0ab5faf9
YQ
43792012-04-13 Yao Qi <yao@codesourcery.com>
4380
4381 * tracepoint.c: Include stdint.h unconditionally.
4382
18f5fd81
TJB
43832012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4384
4385 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4386 on BFD_HAVE_SYS_PROCFS_TYPE.
4387 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4388 * configure: Regenerate.
4389 * config.in: Likewise.
4390
4d47af5c
L
43912012-04-13 H.J. Lu <hongjiu.lu@intel.com>
4392
4393 * Makefile.in (clean): Also remove x32.c x32-linux.c
4394 x32-avx.c x32-avx-linux.c.
4395 (x32.o): New target.
4396 (x32.c): Likewise.
4397 (x32-linux.o): Likewise.
4398 (x32-linux.c): Likewise.
4399 (x32-avx.o): Likewise.
4400 (x32-avx.c): Likewise.
4401 (x32-avx-linux.o): Likewise.
4402 (x32-avx-linux.c): Likewise.
4403
4404 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4405 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4406 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4407 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4408 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4409 i386/x32-avx-linux.xml.
4410
4411 * linux-x86-low.c (init_registers_x32_linux): New prototype.
4412 (init_registers_x32_avx_linux): Likwise.
4413 (x86_linux_update_xmltarget): Call init_registers_x32_linux
4414 or init_registers_x32_avx_linux if linux_is_elf64 is false.
4415
ecedbe58
PA
44162012-04-13 Pedro Alves <palves@redhat.com>
4417
4418 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4419 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4420 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4421 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4422 the sub-make.
4423
c92b5177
L
44242012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4425
4426 * linux-x86-low.c (compat_x32_clock_t): New.
4427 (compat_x32_siginfo_t): Likewise.
4428 (compat_x32_siginfo_from_siginfo): Likewise.
4429 (siginfo_from_compat_x32_siginfo): Likewise.
4430 (linux_is_elf64): Likewise.
4431 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4432 and siginfo_from_compat_x32_siginfo for x32.
4433 (x86_arch_setup): Set linux_is_elf64.
4434
214d508e
L
44352012-04-12 H.J. Lu <hongjiu.lu@intel.com>
4436
4437 PR gdb/13969
4438 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4439 e_machine field.
4440 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4441 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4442 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4443 compatible with process.
4444
c9a1864a
YQ
44452012-04-12 Yao Qi <yao@codesourcery.com>
4446
4447 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4448 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4449 (install-only, install-info, clean): Handle sub dir gnulib.
4450 (all-lib, am--refresh): New targets.
4451 (memmem.o): Remove target.
4452 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4453 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
4454 (AC_REPLACE_FUNCS): Remove memmem.
4455 Invoke gl_INIT and AM_INIT_AUTOMAKE.
4456 (AC_OUTPUT): Generate Makefile in gnulib/.
4457 * aclocal.m4, config.in, configure: Regenerated.
4458
367ba2c2
MR
44592012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
4460
4461 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4462
9d236627
PA
44632012-04-05 Pedro Alves <palves@redhat.com>
4464
4465 -Werror=strict-aliasing
4466
4467 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4468 pointer.
4469
111217b3
PA
44702012-04-04 Pedro Alves <palves@redhat.com>
4471
4472 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4473 (sparc_store_gregset_from_stack, sparc_store_gregset)
4474 (sparc_breakpoint_at): Fix formatting.
4475
8365dcf5
TJB
44762012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
4477
4478 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4479 are available.
4480 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4481 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4482 * config.in: Regenerate.
4483 * configure: Likewise.
4484
689cc2ae
PA
44852012-03-29 Pedro Alves <palves@redhat.com>
4486
4487 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4488 Correct ptrace arguments.
4489
c14dfd32
PA
44902012-03-28 Pedro Alves <palves@redhat.com>
4491
4492 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4493 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4494 (IA64_FR1_REGNUM): New defines.
4495 (ia64_fetch_register): New.
4496 (the_low_target): Install it.
4497 * linux-low.h (struct linux_target_ops) <fetch_register>: New
4498 field.
4499 * linux-low.c (linux_fetch_registers): Try the
4500 the_low_target.fetch_register hook first.
4501
4502 * linux-arm-low.c (the_low_target): Adjust.
4503 * linux-bfin-low.c (the_low_target): Adjust.
4504 * linux-cris-low.c (the_low_target): Adjust.
4505 * linux-crisv32-low.c (the_low_target): Adjust.
4506 * linux-m32r-low.c (the_low_target): Adjust.
4507 * linux-m68k-low.c (the_low_target): Adjust.
4508 * linux-mips-low.c (the_low_target): Adjust.
4509 * linux-ppc-low.c (the_low_target): Adjust.
4510 * linux-s390-low.c (the_low_target): Adjust.
4511 * linux-sh-low.c (the_low_target): Adjust.
4512 * linux-sparc-low.c (the_low_target): Adjust.
4513 * linux-tic6x-low.c (the_low_target): Adjust.
4514 * linux-x86-low.c (the_low_target): Adjust.
4515 * linux-xtensa-low.c (the_low_target): Adjust.
4516
63c88e13
PA
45172012-03-26 Pedro Alves <palves@redhat.com>
4518
4519 * server.c (handle_qxfer_libraries): Don't bail early if
4520 the_target->qxfer_libraries_svr4 is not NULL.
4521
fb723180
PA
45222012-03-26 Pedro Alves <palves@redhat.com>
4523
4524 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4525
0afae3cf
PA
45262012-03-23 Pedro Alves <palves@redhat.com>
4527
4528 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4529 "library-list-svr4" element's start tag when the the DSO list is
4530 empty.
4531
485f1ee4
PA
45322012-03-23 Pedro Alves <palves@redhat.com>
4533
4534 * linux-low.c (read_one_ptr): Read the inferior's pointer through
4535 a variable whose type size is the same as the inferior's pointer
4536 size.
4537
a5362b9a
TS
45382012-03-21 Thomas Schwinge <thomas@codesourcery.com>
4539
4540 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4541 struct siginfo.
4542 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4543 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4544 * linux-low.h: Include <signal.h>.
4545 (struct siginfo): Remove forward declaration.
4546 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4547 struct siginfo.
4548
d226c142
MF
45492012-03-21 Mike Frysinger <vapier@gentoo.org>
4550
4551 * .gitignore: Ignore more files.
4552
122f36ef
PA
45532012-03-19 Pedro Alves <palves@redhat.com>
4554 Jan Kratochvil <jan.kratochvil@redhat.com>
4555
4556 * server.c (cont_thread, general_thread): Add describing comments.
4557 (start_inferior): Clear `cont_thread'.
4558 (handle_v_cont): Don't set `cont_thread' if resuming all threads
4559 of a process.
4560
fc3e5175
YQ
45612012-03-15 Yao Qi <yao@codesourcery.com>
4562
4563 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4564 handling to ...
4565 (cmd_qtdp): ... here.
4566
8d0d92cd
YQ
45672012-03-15 Yao Qi <yao@codesourcery.com>
4568
4569 * tracepoint.c (struct tracepoint_action_ops): New.
4570 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4571 (m_tracepoint_action_download): New.
4572 (r_tracepoint_action_download): New.
4573 (x_tracepoint_action_download): New.
4574 (l_tracepoint_action_download): New.
4575 (add_tracepoint_action): Install `action->ops' according type.
4576 (download_tracepoint_1): Move code `download' function pointer
4577 of various tracepoint_action_ops.
4578
87b0bb13
JK
45792012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4580
4581 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
4582 linux_ptrace_attach_warnings.
4583
5f572dec
JK
45842012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4585
4586 * Makefile.in (linux-ptrace.o): New.
4587 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4588 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4589 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4590 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4591 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4592 of these targets.
4593 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4594
f4647387
YQ
45952012-03-08 Yao Qi <yao@codesourcery.com>
4596 Pedro Alves <palves@redhat.com>
4597
4598 Fix PR server/13392.
4599 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4600 offset of JMP insn.
4601 * tracepoint.c (remove_tracepoint): New.
4602 (cmd_qtdp): Call remove_tracepoint when failed to install.
4603
9b224c5e
PA
46042012-03-07 Pedro Alves <palves@redhat.com>
4605
4606 * linux-low.c (get_detach_signal): New.
4607 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4608 Pass on pending signals to PTRACE_DETACH. Check the result of the
4609 ptrace call.
4610 * server.c (program_signals, program_signals_p): New.
4611 (handle_general_set): Handle QProgramSignals.
4612 * server.h (program_signals, program_signals_p): Declare.
4613
e237a7e2
JK
46142012-03-05 Pedro Alves <palves@redhat.com>
4615 Jan Kratochvil <jan.kratochvil@redhat.com>
4616
4617 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4618 New comment why.
4619
5808517f
YQ
46202012-03-03 Yao Qi <yao@codesourcery.com>
4621
4622 * tracepoint.c (tracepoint_look_up_symbols): Update call to
4623 agent_look_up_symbols.
4624
58b4daa5
YQ
46252012-03-03 Yao Qi <yao@codesourcery.com>
4626
4627 * Makefile.in (linux-low.o): Keep dependence on agent.h.
4628 (linux-x86-low.o): Likewise.
4629 * server.h: Remove in_process_agent_loaded.
4630 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
4631 common/agent.c.
4632 Update callers.
4633
8ffcbaaf
YQ
46342012-03-03 Yao Qi <yao@codesourcery.com>
4635
4636 * tracepoint.c (gdb_agent_capability): New global.
4637 (in_process_agent_loaded_ust): Renamed to
4638 `in_process_agent_supports_ust'.
4639 Update callers.
4640 (in_process_agent_supports_ust): Call agent_capability_check.
4641 (clear_installed_tracepoints): Assert that agent supports
4642 agent.
4643
d1feda86
YQ
46442012-03-03 Yao Qi <yao@codesourcery.com>
4645
4646 * linux-low.c (linux_supports_agent): New.
4647 (linux_target_ops): Initialize field `supports_agent' with
4648 linux_supports_agent.
4649 * target.h (struct target_ops) <supports_agent>: New.
4650 (target_supports_agent): New macro.
4651 * server.c (handle_general_set): Handle packet 'QAgent'.
4652 (handle_query): Send `QAgent+'.
4653 * Makefile.in (server.o): Depends on agent.h.
4654
2fa291ac
YQ
46552012-03-03 Yao Qi <yao@codesourcery.com>
4656
4657 * Makefile.in (OBS): Add agent.o.
4658 Add new rule for agent.o.
4659 Track dependence of tracepoint.c on agent.h.
4660 * tracepoint.c (run_inferior_command_1):
4661 (run_inferior_command): Call agent_run_command.
4662 (gdb_ust_connect_sync_socket): Deleted. Move it to
4663 common/agent.c.
4664 (resume_thread, stop_thread): Likewise.
4665 (gdb_ust_socket_init): Renamed to ...
4666 (gdb_agent_socket_init): ... New.
4667 (gdb_ust_thread): Renamed to ...
4668 (gdb_agent_helper_thread): ... New.
4669 (gdb_ust_init): Move some code to ...
4670 (gdb_agent_init): ... here. New.
4671 [HAVE_UST]: Call gdb_ust_init.
4672 (initialize_tracepoint_ftlib): Call gdb_agent_init.
4673 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4674 * config.in, configure: Regenerated.
4675
05044653
PA
46762012-03-02 Pedro Alves <palves@redhat.com>
4677
4678 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4679 * linux-low.c (struct simple_pid_list): New.
4680 (stopped_pids): New a struct simple_pid_list pointer.
4681 (add_to_pid_list, pull_pid_from_list): New.
4682 (handle_extended_wait): Don't assume the first signal new children
4683 report is SIGSTOP. Adjust call to pull_pid_from_list.
4684 (linux_wait_for_lwp): Adjust.
4685
8d00225b
YQ
46862012-03-02 Yao Qi <yao@codesourcery.com>
4687
4688 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4689 debug log.
4690
19560ba5
YQ
46912012-03-02 Yao Qi <yao@codesourcery.com>
4692
4693 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4694 `stop_pc' and `tpoint'. Update caller.
4695
1faeff08
MR
46962012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
4697
4698 * linux-low.h (linux_target_ops): Add regset_bitmap member.
4699 * linux-low.c (use_linux_regsets): New macro.
4700 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4701 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4702 (linux_register_in_regsets): New function.
4703 (usr_fetch_inferior_registers): Skip registers covered by
4704 regsets.
4705 (usr_store_inferior_registers): Likewise.
4706 (usr_fetch_inferior_registers): New macro.
4707 (usr_store_inferior_registers): Likewise.
4708 (linux_fetch_registers): Handle mixed regset/non-regset targets.
4709 (linux_store_registers): Likewise.
4710 * linux-mips-low.c (init_registers_mips_dsp_linux): New
4711 prototype.
4712 (init_registers_mips64_dsp_linux): Likewise.
4713 (init_registers_mips_linux): New macro.
4714 (init_registers_mips_dsp_linux): Likewise.
4715 (mips_dsp_num_regs): Likewise.
4716 (DSP_BASE, DSP_CONTROL): New fallback macros.
4717 (mips_base_regs): New macro.
4718 (mips_regmap): Use it. Fix the size.
4719 (mips_dsp_regmap): New variable.
4720 (mips_dsp_regset_bitmap): Likewise.
4721 (mips_arch_setup): New function.
4722 (mips_cannot_fetch_register): Use the_low_target.regmap rather
4723 than mips_regmap.
4724 (mips_cannot_store_register): Likewise.
4725 (the_low_target): Update .arch_setup, .num_regs and .regmap
4726 initializers. Add .regset_bitmap initializer.
4727 * linux-arm-low.c (the_low_target): Add .regset_bitmap
4728 initializer.
4729 * linux-bfin-low.c (the_low_target): Likewise.
4730 * linux-cris-low.c (the_low_target): Likewise.
4731 * linux-crisv32-low.c (the_low_target): Likewise.
4732 * linux-ia64-low.c (the_low_target): Likewise.
4733 * linux-m32r-low.c (the_low_target): Likewise.
4734 * linux-m68k-low.c (the_low_target): Likewise.
4735 * linux-ppc-low.c (the_low_target): Likewise.
4736 * linux-s390-low.c (the_low_target): Likewise.
4737 * linux-sh-low.c (the_low_target): Likewise.
4738 * linux-sparc-low.c (the_low_target): Likewise.
4739 * linux-tic6x-low.c (the_low_target): Likewise.
4740 * linux-x86-low.c (the_low_target): Likewise.
4741 * linux-xtensa-low.c (the_low_target): Likewise.
4742 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4743 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
4744 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4745 srv_xmlfiles.
4746 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4747 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4748
c03e6ccc
YQ
47492012-02-29 Yao Qi <yao@codesourcery.com>
4750 Pedro Alves <palves@redhat.com>
4751
4752 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4753 `step_over_finished' is true.
4754
644cebc9
PA
47552012-02-27 Pedro Alves <palves@redhat.com>
4756
4757 * linux-low.c (pid_is_stopped): Delete, moved to common/.
4758 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4759
c14d7ab2
PA
47602012-02-27 Pedro Alves <palves@redhat.com>
4761
4762 PR server/9684
4763 * linux-low.c (pid_is_stopped): New.
4764 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4765
412c89dd
LM
47662012-02-25 Luis Machado <lgustavo@codesourcery.com>
4767
4768 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4769 of conditions.
4770
b745defe
MR
47712012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
4772
4773 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4774
9f3a5c85
LM
47752012-02-24 Luis Machado <lgustavo@codesourcery>
4776
4777 * server.c (handle_query): Advertise support for target-side
4778 breakpoint condition evaluation.
4779 (process_point_options): New function.
4780 (process_serial_event): When inserting a breakpoint, check for
4781 a target-side condition that should be evaluated.
4782
4783 * mem-break.c: Include regcache.h and ax.h.
4784 (point_cond_list_t): New data structure.
4785 (breakpoint) <cond_list>: New field.
4786 (find_gdb_breakpoint_at): Make non-static.
4787 (delete_gdb_breakpoint_at): Clear any target-side
4788 conditions.
4789 (clear_gdb_breakpoint_conditions): New function.
4790 (add_condition_to_breakpoint): Likewise.
4791 (add_breakpoint_condition): Likewise.
4792 (gdb_condition_true_at_breakpoint): Likewise.
4793 (gdb_breakpoint_here): Return result directly instead
4794 of going through a local variable.
4795
4796 * mem-break.h (find_gdb_breakpoint_at): New prototype.
4797 (clear_gdb_breakpoint_conditions): Likewise.
4798 (add_breakpoint_condition): Likewise.
4799 (gdb_condition_true_at_breakpoint): Likewise.
4800
4801 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4802 (need_step_over_p): Take target-side breakpoint condition into
4803 consideration.
4804
5e1dc496
LM
48052012-02-24 Luis Machado <lgustavo@codesourcery>
4806
4807 * server.h: Include tracepoint.h.
4808 (agent_mem_read, agent_get_trace_state_variable_value,
4809 agent_set_trace_state_variable_value,
4810 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4811 get_set_tsv_func_addr): New prototypes.
4812
4813 * ax.h: New include file.
4814 * ax.c: New source file.
4815
4816 * tracepoint.c: Include ax.h.
4817 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4818 agent_expr, eval_result_type): Move to ax.h.
4819 (parse_agent_expr): Rename to ...
4820 (gdb_parse_agent_expr): ... this, make it non-static and move
4821 to ax.h.
4822 (unparse_agent_expr) Rename to ...
4823 (gdb_unparse_agent_expr): ... this, make it non-static and move
4824 to ax.h.
4825 (eval_agent_expr): Rename to ...
4826 (eval_tracepoint_agent_expr): ... this.
4827 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4828 forward declarations.
4829 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4830 (agent_get_trace_state_variable_value): New function.
4831 (agent_set_trace_state_variable_value): New function.
4832 (cmd_qtdp): Call gdb_parse_agent_expr (...).
4833 (response_tracepoint): Call gdb_unparse_agent_expr (...).
4834 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4835 (condition_true_at_tracepoint): Likewise.
4836 (parse_agent_expr): Rename to ...
4837 (gdb_parse_agent_expr): ... this and move to ax.c.
4838 (unparse_agent_expr): Rename to ...
4839 (gdb_unparse_agent_expr): ... this and move to ax.c.
4840 (gdb_agent_op_name): Move to ax.c.
4841 (eval_agent_expr): Rename to ...
4842 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4843 and move to ax.c.
4844 (eval_tracepoint_agent_expr): New function.
4845 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 4846 non-static.
5e1dc496
LM
4847 (current_insn_ptr, emit_error, struct bytecode_address): Move to
4848 ax.c.
4849 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4850 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4851 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4852 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4853 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4854 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4855 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4856 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4857 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4858 (compile_bytecodes): Remove forward declaration.
4859 (is_goto_target): Move to ax.c.
4860 (compile_bytecodes): Move to ax.c and call
4861 agent_get_trace_state_variable_value (...) and
4862 agent_set_trace_state_variable_value (...).
4863
4864 * Makefile.in: Update ax.c and IPA dependencies.
4865
277e4e52
PA
48662012-02-24 Pedro Alves <palves@redhat.com>
4867
4868 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4869 (cmd_bigqtbuffer_circular): ... this. Only handle
4870 'QTBuffer:circular:'.
4871 (handle_tracepoint_general_set): Adjust.
4872
bf4c19f7
YQ
48732012-02-16 Yao Qi <yao@codesourcery.com>
4874
4875 * inferiors.c: Move code to ...
4876 * dll.c: .... here. New.
4877 * server.h: Declare clear_dlls.
4878 * Makefile.in (SFILES): Add dll.c.
4879 (OBS): Add dll.o
4880 (dll.o): New rule.
4881
d73f2619
YQ
48822012-02-11 Yao Qi <yao@codesourcery.com>
4883
4884 * server.c: (handle_monitor_command): Add a new parameter
4885 `own_buf'.
4886 (handle_query): Update caller.
4887
f8255c2a
JB
48882012-02-09 Joel Brobecker <brobecker@adacore.com>
4889
4890 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4891 * configure, config.in: Regenerate.
4892 * hostio.c: Provide an alternate implementation if HAVE_READLINK
4893 is not defined.
4894
da84f473
PA
48952012-02-02 Pedro Alves <palves@redhat.com>
4896
4897 Try SIGKILL first, then PTRACE_KILL.
4898 * linux-low.c (linux_kill_one_lwp): New.
4899 (linux_kill_one_lwp): Rename to ...
4900 (kill_one_lwp_callback): ... this. Use the new
4901 linux_kill_one_lwp.
4902
e886a173
PA
49032012-02-02 Pedro Alves <palves@redhat.com>
4904
4905 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4906 inferior.
4907
be07f1a2
PA
49082012-01-27 Pedro Alves <palves@redhat.com>
4909
4910 * linux-low.c (linux_child_pid_to_exec_file): Delete.
4911 (elf_64_file_p): Make static.
4912 (linux_pid_exe_is_elf_64_file): New.
4913 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4914 Delete declarations.
4915 (linux_pid_exe_is_elf_64_file): Declare.
4916 * linux-x86-low.c (x86_arch_setup): Use
4917 linux_pid_exe_is_elf_64_file.
4918
d8301ad1
JK
49192012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
4920
4921 * linux-low.c (linux_wait_for_event_1): Rename to ...
4922 (linux_wait_for_event): ... here and merge it with former
4923 linux_wait_for_event - new variable wait_ptid, use it.
4924 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4925
01b17894
PA
49262012-01-23 Pedro Alves <palves@redhat.com>
4927
4928 * server.c (main): Avoid yet another case of infinite loop while
4929 detaching/killing after a longjmp.
4930
e825046f
JK
49312012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4932
4933 Code cleanup.
4934 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4935
b9e7b9c3
UW
49362012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
4937
4938 * hostio.c (handle_readlink): New function.
4939 (handle_vFile): Call it to handle "vFile:readlink" packets.
4940
901f9912
UW
49412012-01-20 Pedro Alves <palves@redhat.com>
4942 Ulrich Weigand <ulrich.weigand@linaro.org>
4943
4944 * server.c (handle_v_requests): Only support vAttach and vRun to
4945 start multiple processes when in extended protocol mode.
4946
fc1ab1a0
PA
49472012-01-17 Pedro Alves <palves@redhat.com>
4948
4949 * tracepoint.c (initialize_tracepoint): Use mmap instead of
4950 memalign plus mprotect to allocate the scratch buffer.
4951
7d5d4e98
PA
49522012-01-13 Pedro Alves <palves@redhat.com>
4953
4954 * server.c (attach_inferior): Clear `cont_thread'.
4955
f128d5e9
PA
49562012-01-13 Pedro Alves <palves@redhat.com>
4957
4958 * server.c (main): Avoid infinite loop while detaching/killing
4959 after a longjmp.
4960
06db92f0
DE
49612012-01-09 Doug Evans <dje@google.com>
4962
4963 * server.c (start_inferior): Set last_ptid in --wrapper case.
4964
32d92999
YQ
49652012-01-06 Yao Qi <yao@codesourcery.com>
4966
4967 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4968 defined.
4969 [IN_PROCESS_AGENT] (debug_agent): New global variable.
4970
5e0a92a9
YQ
49712012-01-04 Yao Qi <yao@codesourcery.com>
4972
4973 * tracepoint.c (cmd_qtdp): Print debug message
4974 for static tracepoint.
4975
ae639e8c
YQ
49762012-01-04 Yao Qi <yao@codesourcery.com>
4977
4978 * tracepoint.c (trace_vdebug): Differentiate debug message
4979 between gdbserver and IPA.
4980
f72429c5
YQ
49812012-01-03 Yao Qi <yao@codesourcery.com>
4982
4983 * tracepoint.c (tracepoint_was_hit): Don't collect for
4984 static tracepoint.
4985
12c3e59c
JB
49862012-01-02 Joel Brobecker <brobecker@adacore.com>
4987
4988 * terminal.h: Reformat copyright header.
4989
67827812
JB
49902012-01-02 Joel Brobecker <brobecker@adacore.com>
4991
4992 * server.c (gdbserver_version): Update copyright year.
4993 * gdbreplay.c (gdbreplay_version): Likewise.
4994
3e52c33d
JK
49952011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
4996
4997 * linux-low.c (linux_create_inferior): Put empty if clause for write.
4998
4999 Revert:
5000 2011-12-18 Hui Zhu <teawater@gmail.com>
5001 * linux-low.c (linux_create_inferior): Save return value to ret.
5002
66f1260e
HZ
50032011-12-18 Hui Zhu <teawater@gmail.com>
5004
5005 * linux-low.c (linux_create_inferior): Save return value to ret.
5006
e77616d7
DE
50072011-12-16 Doug Evans <dje@google.com>
5008
e7b06c57
DE
5009 * linux-low.c (linux_create_inferior): If stdio connection,
5010 redirect stdin from /dev/null, stdout to stderr.
5011 * remote-utils.c (remote_is_stdio): New static global.
5012 (remote_connection_is_stdio): New function.
5013 (remote_prepare): Handle stdio connection.
5014 (remote_open): Ditto.
5015 (remote_close): Don't close stdin for stdio connections.
5016 (read_prim,write_prim): New functions. Replace all calls to
5017 read/write to these.
5018 * server.c (main): Watch for "-" argument. Move call to
5019 remote_prepare before start_inferior.
5020 * server.h (STDIO_CONNECTION_NAME): New macro.
5021 (remote_connection_is_stdio): Declare.
5022
e77616d7
DE
5023 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5024 in debugging output.
5025
82067193
YQ
50262011-12-15 Yao Qi <yao@codesourcery.com>
5027
5028 * tracepoint.c: Include sys/syscall.h.
5029 (gdb_ust_thread): Remove preprocessor conditional.
5030
82bfbe7e
PA
50312011-12-14 Pedro Alves <pedro@codesourcery.com>
5032
5033 * linux-low.c (linux_detach_one_lwp): Call
5034 the_low_target.prepare_to_resume before detaching.
5035
712c6575
YQ
50362011-12-14 Yao Qi <yao@codesourcery.com>
5037
5038 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5039 of write.
5040
d54d1edf
YQ
50412011-12-14 Yao Qi <yao@codesourcery.com>
5042
5043 * i386-low.c (i386_low_stopped_data_address): Initialize local
5044 variable `control'.
5045
6210a125
PA
50462011-12-13 Pedro Alves <pedro@codesourcery.com>
5047
5048 PR remote/13492
5049
5050 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5051 DR_CONTROL unless necessary. Extend comments.
5052 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5053 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5054
2ece8244
YQ
50552011-12-13 Yao Qi <yao@codesourcery.com>
5056
5057 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5058 macros.
5059 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5060
784867a5
JK
50612011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5062
5063 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5064 Print new debug message for such case.
5065
6bf36717
JK
50662011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5067
5068 Fix overlapping memcpy.
5069 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5070 the read_inferior_memory transfer.
5071 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5072 write_inferior_memory transfer.
5073 (set_fast_tracepoint_jump): New variable buf. Use it for the
5074 read_inferior_memory and write_inferior_memory transfers.
5075 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5076 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5077 Use it for the write_inferior_memory transfer.
5078 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5079 buffers.
5080
50275556
MR
50812011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5082
5083 * linux-low.c (fetch_register, store_register): Make code
5084 consistent, fix formatting.
5085
7325beb4
MR
50862011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5087
5088 * linux-low.c (usr_store_inferior_registers): Factor out code
5089 to handle individual registers into...
5090 (store_register): ... this new function.
5091
c642a434
UW
50922011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5093
5094 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5095 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5096 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5097 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5098 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5099 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5100 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5101 (srv_xmlfiles): Add new XML files.
5102
5103 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5104 and <sys/uio.h>.
5105 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5106 (init_registers_s390_linux32v1): Add prototype.
5107 (init_registers_s390_linux32v2): Likewise.
5108 (init_registers_s390_linux64v1): Likewise.
5109 (init_registers_s390_linux64v2): Likewise.
5110 (init_registers_s390x_linux64v1): Likewise.
5111 (init_registers_s390x_linux64v2): Likewise.
5112 (s390_num_regs): Increment to 52.
5113 (s390_regmap): Add orig_r2 register.
5114 (s390_num_regs_3264): Increment to 68.
5115 (s390_regmap_3264): Add orig_r2 register.
5116 (s390_collect_ptrace_register): Handle orig_r2 register.
5117 (s390_supply_ptrace_register): Likewise.
5118 (s390_fill_last_break): New function.
5119 (s390_store_last_break): Likewise.
5120 (s390_fill_system_call): New function.
5121 (s390_store_system_call): Likewise.
5122 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5123 register sets.
5124 (s390_check_regset): New function.
5125 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5126 NT_S390_SYSTEM_CALL regsets and use appropriate description.
5127 Update target_regsets for available register sets.
5128
2268b414
JK
51292011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
5130 Jan Kratochvil <jan.kratochvil@redhat.com>
5131
5132 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5133 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5134 New.
5135 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5136 * linux-low.h (struct process_info_private): New member r_debug.
5137 * server.c (handle_qxfer_libraries): Call
5138 the_target->qxfer_libraries_svr4.
5139 (handle_qxfer_libraries_svr4): New function.
5140 (qxfer_packets): New entry "libraries-svr4".
5141 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5142 * target.h (struct target_ops): New member qxfer_libraries_svr4.
5143 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5144 PACKET_qXfer_libraries_svr4.
5145
d6db1fab
UW
51462011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
5147
5148 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5149 PSW address/mask between 8-byte and 16-byte formats.
5150 (s390_supply_ptrace_register): Likewise.
5151 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5152 basic addressing mode bit.
5153
242f5f1c
SS
51542011-11-24 Stan Shebs <stan@codesourcery.com>
5155
5156 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5157
f196051f
SS
51582011-11-17 Stan Shebs <stan@codesourcery.com>
5159
5160 * tracepoint.c (struct tracepoint): New field traceframe_usage.
5161 (tracing_start_time): New global.
5162 (tracing_stop_time): New global.
5163 (tracing_user_name): New global.
5164 (tracing_notes): New global.
5165 (tracing_stop_note): New global.
5166 (cmd_qtstart): Set traceframe_usage, start_time.
5167 (stop_tracing): Set stop_time.
5168 (cmd_qtstatus): Report additional status.
5169 (cmd_qtp): New function.
5170 (handle_tracepoint_query): Call it.
5171 (cmd_qtnotes): New function.
5172 (handle_tracepoint_general_set): Call it.
5173 (get_timestamp): Rename from tsv_get_timestamp.
5174
405f8e94
SS
51752011-11-14 Stan Shebs <stan@codesourcery.com>
5176 Kwok Cheung Yeung <kcy@codesourcery.com>
5177
5178 * linux-x86-low.c (small_jump_insn): New.
5179 (i386_install_fast_tracepoint_jump_pad): Add arguments for
5180 trampoline and error message, build a trampoline and issue a small
5181 jump instruction to it.
5182 (x86_install_fast_tracepoint_jump_pad): Add arguments for
5183 trampoline and error message.
5184 (x86_get_min_fast_tracepoint_insn_len): New.
5185 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5186 * linux-low.h (struct linux_target_ops): Add arguments to
5187 install_fast_tracepoint_jump_pad operation, add new operation.
5188 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5189 arguments.
5190 (linux_get_min_fast_tracepoint_insn_len): New function.
5191 (linux_target_op): Add new operation.
5192 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5193 (gdb_trampoline_buffer_end): Ditto.
5194 (gdb_trampoline_buffer_error): Ditto.
5195 (struct ipa_sym_addresses): Add fields for new IPA variables.
5196 (symbol_list): Add entries for new IPA variables.
5197 (struct tracepoint): Add fields to hold the address range of the
5198 trampoline used by the tracepoint.
5199 (trampoline_buffer_head): New static variable.
5200 (trampoline_buffer_tail): Ditto.
5201 (claim_trampoline_space): New function.
5202 (have_fast_tracepoint_trampoline_buffer): New function.
5203 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5204 structure.
5205 (install_fast_tracepoint): Ditto, also add error buffer argument.
5206 (cmd_qtminftpilen): New function.
5207 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5208 (fast_tracepoint_from_trampoline_address): New function.
5209 (fast_tracepoint_collecting): Handle trampoline as part of jump
5210 pad space.
5211 (set_trampoline_buffer_space): New function.
5212 (initialize_tracepoint): Initialize new IPA variables.
5213 * target.h (struct target_ops): Add arguments to
5214 install_fast_tracepoint_jump_pad operation, add new
5215 get_min_fast_tracepoint_insn_len operation.
5216 (target_get_min_fast_tracepoint_insn_len): New.
5217 (install_fast_tracepoint_jump_pad): Add arguments.
5218 * server.h (IPA_BUFSIZ): Define.
5219 * linux-i386-ipa.c: Include extra header files.
5220 (initialize_fast_tracepoint_trampoline_buffer): New function.
5221 (initialize_low_tracepoint): Call it.
5222 * server.h (set_trampoline_buffer_space): Declare.
5223 (claim_trampoline_space): Ditto.
5224 (have_fast_tracepoint_trampoline_buffer): Ditto.
5225
1e4d1764
YQ
52262011-11-14 Yao Qi <yao@codesourcery.com>
5227
5228 * server.c (handle_query): Handle InstallInTrace for qSupported.
5229 * tracepoint.c (add_tracepoint): Sort list.
5230 (install_tracepoint, download_tracepoint): New.
5231 (cmd_qtdp): Call them to install and download tracepoints.
5232 (sort_tracepoints): Removed.
5233 (cmd_qtstart): Update.
5234
5c73ff4e
YQ
52352011-11-14 Yao Qi <yao@codesourcery.com>
5236
5237 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5238 * mem-break.h: Declare.
5239 * tracepoint.c (cmd_qtstart): Move some code to ...
5240 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5241 New.
5242 (download_tracepoints): Move some code to ...
5243 (download_tracepoint_1): ... here. New.
5244
86a30030
YQ
52452011-11-08 Yao Qi <yao@codesourcery.com>
5246
5247 * remote-utils.c (relocate_instruction): A comment fix.
5248
8d26e50c
JB
52492011-11-07 Joel Brobecker <brobecker@adacore.com>
5250
5251 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5252 (i386_dr_low_get_control, i386_dr_low_get_status): Use
5253 dr_status_mirror and dr_control_mirror from debug_reg_state.
5254 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5255 (i386_initial_stuff): Remove use of deleted globals.
5256 (i386_get_thread_context, i386_set_thread_context,
5257 i386_thread_added): Use dr_status_mirror and dr_control_mirror
5258 from debug_reg_state.
5259
a59306a3
YQ
52602011-11-05 Yao Qi <yao@codesourcery.com>
5261
5262 * tracepoint.c (gdb_collect): Loop over tracepoints of same
5263 address as TPOINT's.
5264
3065dfb6
SS
52652011-11-02 Stan Shebs <stan@codesourcery.com>
5266
5267 * tracepoint.c (agent_mem_read_string): New function.
5268 (eval_agent_expr): Call it for tracenz.
5269 * server.c (handle_query): Report support for tracenz.
5270
fd0d8c7c
YQ
52712011-11-02 Yao Qi <yao@codesourcery.com>
5272
5273 * tracepoint.c (cmd_qtstart): Remove unused local variables.
5274
609086b1
YQ
52752011-11-02 Yao Qi <yao@codesourcery.com>
5276
5277 * target.h: Fix a typo in comment.
5278
b9fd1791
PA
52792011-10-31 Pedro Alves <pedro@codesourcery.com>
5280
5281 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
5282 clobber the breakpoints' shadows with fast tracepoint jumps.
5283 * mem-break.h (check_mem_write): Add `myaddr' parameter.
5284 * target.c (write_inferior_memory): Also pass MYADDR down to
5285 check_mem_write.
5286
03583c20
UW
52872011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
5288
5289 * configure.ac: Check support for personality routine.
5290 * configure: Regenerate.
5291 * config.in: Likewise.
5292 * linux-low.c: Include <sys/personality.h>.
5293 Define ADDR_NO_RANDOMIZE if necessary.
5294 (linux_create_inferior): Disable address space randomization when
5295 forking inferior, if requested.
5296 (linux_supports_disable_randomization): New function.
5297 (linux_target_ops): Install it.
5298 * server.h (disable_randomization): Declare.
5299 * server.c (disable_randomization): New global variable.
5300 (handle_general_set): Handle QDisableRandomization.
5301 (handle_query): Likewise for qSupported.
5302 (main): Support --disable-randomization and --no-disable-randomization
5303 command line arguments.
5304 * target.h (struct target_ops): Add supports_disable_randomization.
5305 (target_supports_disable_randomization): New macro.
5306
723b724b
MF
53072011-09-29 Mike Frysinger <vapier@gentoo.org>
5308
5309 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5310 ifdef check.
5311 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5312 [!PT_GETDSBT] (target_loadmap): New definition.
5313 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5314 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5315 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5316 and PT_GETDSBT to LINUX_LOADMAP.
5317 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5318 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5319
55329a5c 53202011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
5321
5322 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5323 (arm_linux_hwbp_cap): New static variable.
5324 (arm_linux_get_hwbp_cap): Replace by ...
5325 (arm_linux_init_hwbp_cap): ... this new function.
5326 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5327 (arm_linux_get_hw_watchpoint_count): Likewise.
5328 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5329 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5330 (arm_prepare_to_resume): Use perror_with_name instead of error.
5331
55329a5c 53322011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
5333
5334 * linux-arm-low.c: Include <signal.h>.
5335 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5336 (struct arm_linux_hwbp_cap): New data type.
5337 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5338 (struct arm_linux_hw_breakpoint): New data type.
5339 (MAX_BPTS, MAX_WPTS): Define.
5340 (struct arch_process_info, struct arch_lwp_info): New data types.
5341 (arm_linux_get_hwbp_cap): New function.
5342 (arm_linux_get_hw_breakpoint_count): Likewise.
5343 (arm_linux_get_hw_watchpoint_count): Likewise.
5344 (arm_linux_get_hw_watchpoint_max_length): Likewise.
5345 (arm_hwbp_control_initialize): Likewise.
5346 (arm_hwbp_control_is_enabled): Likewise.
5347 (arm_hwbp_control_is_initialized): Likewise.
5348 (arm_hwbp_control_disable): Likewise.
5349 (arm_linux_hw_breakpoint_equal): Likewise.
5350 (arm_linux_hw_point_initialize): Likewise.
5351 (struct update_registers_data): New data structure.
5352 (update_registers_callback: New function.
5353 (arm_insert_point): Likewise.
5354 (arm_remove_point): Likewise.
5355 (arm_stopped_by_watchpoint): Likewise.
5356 (arm_stopped_data_address): Likewise.
5357 (arm_new_process): Likewise.
5358 (arm_new_thread): Likewise.
5359 (arm_prepare_to_resume): Likewise.
5360 (the_low_target): Register arm_insert_point, arm_remove_point,
5361 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5362 arm_new_thread, and arm_prepare_to_resume.
5363
6b9801d4
SS
53642011-09-15 Stan Shebs <stan@codesourcery.com>
5365
5366 * server.h (struct emit_ops): Add compare-goto fields.
5367 * tracepoint.c (gdb_agent_op_sizes): New table.
5368 (emit_eq_goto): New function.
5369 (emit_ne_goto): New function.
5370 (emit_lt_goto): New function.
5371 (emit_le_goto): New function.
5372 (emit_gt_goto): New function.
5373 (emit_ge_goto): New function.
5374 (is_goto_target): New function.
5375 (compile_bytecodes): Recognize special cases of compare-goto
5376 combinations and call specialized emitters for them.
5377 * linux-x86-low.c (amd64_emit_eq_goto): New function.
5378 (amd64_emit_ne_goto): New function.
5379 (amd64_emit_lt_goto): New function.
5380 (amd64_emit_le_goto): New function.
5381 (amd64_emit_gt_goto): New function.
5382 (amd64_emit_ge_goto): New function.
5383 (amd64_emit_ops): Add the new functions.
5384 (i386_emit_eq_goto): New function.
5385 (i386_emit_ne_goto): New function.
5386 (i386_emit_lt_goto): New function.
5387 (i386_emit_le_goto): New function.
5388 (i386_emit_gt_goto): New function.
5389 (i386_emit_ge_goto): New function.
5390 (i386_emit_ops): Add the new functions.
5391
bf15cbda
SS
53922011-09-08 Stan Shebs <stan@codesourcery.com>
5393
5394 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5395 (i386_emit_epilogue): Restore %ebx.
5396
943ca1dd
JZ
53972011-08-31 Jie Zhang <jzhang918@gmail.com>
5398
5399 * server.c (step_thread): Remove definition.
5400 (process_serial_event): Don't handle Hs.
5401 * server.h (step_thread): Remove declaration.
5402 * target.c (set_desired_inferior): Remove use of step_thread.
5403
e3deef73
LM
54042011-08-24 Luis Machado <lgustavo@codesourcery.com>
5405
5406 * linux-low.c: Include linux-procfs.h.
5407 (linux_attach_lwp_1): Update comments.
5408 (linux_attach): Scan for existing threads when attaching to a
5409 process that is the tgid.
5410 * Makefile.in: Update dependencies.
5411
13da1c97
LM
54122011-08-24 Luis Machado <lgustavo@codesourcery.com>
5413
5414 * configure.srv: Add linux-procfs.o dependencies.
5415
881127c9
YQ
54162011-08-14 Yao Qi <yao@codesourcery.com>
5417
5418 * target.h (struct target_ops): Fix indent.
5419 * win32-low.c (win32_target_ops): Fix comment.
5420
58dbd541
YQ
54212011-08-14 Andrew Jenner <andrew@codesourcery.com>
5422 Yao Qi <yao@codesourcery.com>
5423
5424 * Makefile.in (clean): Remove tic6x-*.c files.
5425 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5426 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5427 (tic6x-c64xp-linux.c): Likewise.
5428 * configure.srv: Add support for tic6x-*-uclinux.
5429 * linux-tic6x-low.c: New.
5430 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5431
78d85199
YQ
54322011-08-14 Andrew Stubbs <ams@codesourcery.com>
5433 Yao Qi <yao@codesourcery.com>
5434
5435 * target.h (struct target_ops): Add read_loadmap.
5436 * linux-low.c (struct target_loadseg): New type.
5437 (struct target_loadmap): New type.
5438 (linux_read_loadmap): New function.
5439 (linux_target_ops): Add linux_read_loadmap.
5440 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
5441 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5442 to NULL.
78d85199 5443
a959a88d
EZ
54442011-08-05 Eli Zaretskii <eliz@gnu.org>
5445
5446 * win32-low.c: Include <stdint.h>.
5447
1ced966e
PA
54482011-07-22 Pedro Alves <pedro@codesourcery.com>
5449
5450 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5451 to the inferior here.
5452 (i386_remove_aligned_watchpoint): Ditto.
5453 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5454 fit part of the watchpoint in the debug registers.
5455 (i386_update_inferior_debug_regs): New.
5456 (i386_low_insert_watchpoint): Work on a local mirror of the debug
5457 registers, and only update the inferior on success.
5458 (i386_low_remove_watchpoint): Ditto.
5459
d26e3629
KY
54602011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
5461
5462 * linux-low.c (compare_ints, unique, list_threads, show_process,
5463 linux_core_of_thread): Delete.
5464 (linux_target_ops): Change linux_core_of_thread to
5465 linux_common_core_of_thread.
5466 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5467 * utils.c (malloc_failure): Change type of argument.
5468 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5469 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5470 common/linux-osdata.c, common/ptid.c and common/buffer.c.
5471 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5472 (IPA_OBJS): Add common-utils-ipa.o.
5473 (ptid_h, linux_osdata_h): New macros.
5474 (server_h): Add common/common-utils.h, common/xml-utils.h,
5475 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5476 common/ptid.h.
5477 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5478 ptid.o, buffer.o): New rules.
5479 (linux-low.o): Add common/linux-osdata.h as a dependency.
5480 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5481 * configure.ac: Add AC_HEADER_DIRENT check.
5482 * config.in: Regenerate.
5483 * configure: Regenerate.
5484 * remote-utils.c (xml_escape_text): Delete.
5485 (buffer_grow, buffer_free, buffer_init, buffer_finish,
5486 buffer_xml_printf): Move to common/buffer.c.
5487 * server.c (main): Remove call to initialize_inferiors.
5488 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5489 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5490 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5491 internal_error, gdb_assert, gdb_assert_fail): Delete.
5492 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5493 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5494 common/buffer.h.
5495 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5496 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5497 initialize_inferiors): Delete.
5498
2275a1a7
PA
54992011-07-20 Pedro Alves <pedro@codesourcery.com>
5500
5501 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5502 symbol error.
5503
0a5b1e09
PA
55042011-05-31 Pedro Alves <pedro@codesourcery.com>
5505
5506 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5507 assertion.
5508 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5509
6938fd34
YQ
55102011-05-26 Yao Qi <yao@codesourcery.com>
5511
5512 * Makefile.in (thread-db.o): Track dependence to
5513 common/gdb_thread_db.h.
5514 * thread-db.c: include gdb_thread_db.h from right place.
5515
b481f9e0
TT
55162011-05-16 Adrian Cornish <gnu@bluedreamer.com>
5517
5518 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5519 __FILE__ and __LINE__ to internal_error.
5520
98a5dd13
DE
55212011-05-13 Doug Evans <dje@google.com>
5522
5523 * thread-db.c (try_thread_db_load_from_sdir): New function.
5524 (try_thread_db_load_from_dir): New function.
5525 (thread_db_load_search): Handle $sdir, ignore $pdir.
5526 Remove trying of system directories if search of
5527 libthread-db-search-path fails, that is now done via $sdir.
5528
d248b706
KY
55292011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
5530
5531 * server.c (handle_query): Add EnableDisableTracepoints to the list
5532 of supported features.
43aaf8b6 5533 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 5534 tracepoints.
43aaf8b6
PA
5535 (cmd_qtenable_disable): New.
5536 (cmd_qtstart): Install tracepoints even if disabled.
5537 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5538 receiving a QTEnable or QTDisable packet.
5539 (gdb_collect): Skip data collection if fast tracepoint is disabled.
5540 (ust_marker_to_static_tracepoint): Do not ignore disabled static
5541 tracepoints.
5542 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 5543
84e578fb
DE
55442011-05-10 Doug Evans <dje@google.com>
5545
5546 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5547
71f55dd8
DE
55482011-05-04 Doug Evans <dje@google.com>
5549
5550 * linux-low.c (linux_join): Skip process lookup.
5551 * spu-low.c (spu_join): Ditto.
5552 * server.c (join_inferiors_callback): Delete.
5553 (process_serial_event): For 'D' packet (detach) call join_inferior
5554 directly.
5555
4d393d60
JM
55562011-05-04 Joseph Myers <joseph@codesourcery.com>
5557
5558 * README: Don't mention xscale*-*-linux*.
5559 * configure.srv (xscale*-*-linux*): Don't handle target.
5560
b00ad6ff
NF
55612011-04-27 Nathan Froyd <froydnj@codesourcery.com>
5562
5563 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5564 casting pointers.
5565 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5566 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5567 (i386_emit_void_call_2): Likewise.
5568
af96c192
YQ
55692011-04-26 Yao Qi <yao@codesourcery.com>
5570
43aaf8b6
PA
5571 * linux-low.c: Move common macros to linux-ptrace.h.
5572 Include linux-ptrace.h.
af96c192
YQ
5573 * Makefile.in (linux_ptrace_h): New.
5574 (linux-low.o): Depends on linux-ptrace.h.
5575
03f2bd59
JK
55762011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5577
5578 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5579 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
5580 (remote_prepare): New function with most of the TCP code from ...
5581 (remote_open): ... here. Detect PORT here unconditionally. Move also
5582 setting transport_is_reliable.
5583 * server.c (run_once): New variable.
5584 (gdbserver_usage): Document it.
5585 (main): Set run_once for `--once'. Call remote_prepare. Exit after
5586 the first run if RUN_ONCE.
5587 * server.h (run_once, remote_prepare): New declarations.
5588
7a9dd1b2
TT
55892011-04-19 Tom Tromey <tromey@redhat.com>
5590
5591 * win32-low.c (handle_load_dll): Remove duplicate "the".
5592
81239425
PM
55932011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
5594
5595 Remove support for old Cygwin 1.5 versions.
5596 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5597 function to avoid warning.
5598 (win32_add_one_solib): Use cygwin_conv_path function to avoid
5599 warning.
5600
9e0627f1
PM
56012011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
5602
5603 * gdbserver/server.h (Macro _): Define it if not available.
5604
588eebee
MS
56052011-03-14 Michael Snyder <msnyder@vmware.com>
5606
348af9f7 5607 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 5608
43f70d4c
JB
56092011-03-10 Joel Brobecker <brobecker@adacore.com>
5610
5611 * Makefile.in (maintainer-clean realclean distclean): Remove
5612 "make ... subdir_do" command.
5613
348af9f7
MS
56142011-03-10 Michael Snyder <msnyder@vmware.com>
5615
5616 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5617
5618 * server.c (handle_v_run): Free alloced buffer on early return.
5619
e637a4f5
YQ
56202011-03-09 Yao Qi <yao@codesourcery.com>
5621
5622 Revert:
5623 2011-03-04 Yao Qi <yao@codesourcery.com>
5624
5625 * Makefile.in: Remove GNU make feature --directory.
5626
5627 2011-03-05 Yao Qi <yao@codesourcery.com>
5628
5629 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5630 (subdir_do): New make target. Copied from gdb/Makefile.
5631 (maintainer-clean, realclean, distclean, clean): Call corresponding
5632 make targets in common/Makefile.
5633
5634 2011-02-11 Yao Qi <yao@codesourcery.com>
5635
5636 * configure.ac: Call AC_PROG_RANLIB.
5637 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5638 * configure: Regenerate.
5639
e6edda56
JK
56402011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5641
5642 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5643
e5141119
JB
56442011-03-06 Yao Qi <yao@codesourcery.com>
5645
5646 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5647
64794aa4
JB
56482011-03-05 Yao Qi <yao@codesourcery.com>
5649
5650 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5651 (subdir_do): New make target. Copied from gdb/Makefile.
5652 (maintainer-clean, realclean, distclean, clean): Call corresponding
5653 make targets in common/Makefile.
5654
7a762829
YQ
56552011-03-04 Yao Qi <yao@codesourcery.com>
5656
5657 * Makefile.in: Remove GNU make feature --directory.
5658
348af9f7
MS
56592011-03-04 Michael Snyder <msnyder@vmware.com>
5660
5661 * server.c (queue_stop_reply): Call xmalloc not malloc.
5662
56632011-03-02 Michael Snyder <msnyder@vmware.com>
5664
5665 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5666
9f72fee2
MS
56672011-02-28 Michael Snyder <msnyder@vmware.com>
5668
588eebee
MS
5669 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5670 (cmd_qtframe): Ditto.
5671 (cmd_qtbuffer): Ditto.
5672 (cmd_bigqtbuffer): Ditto.
5673
9f72fee2
MS
5674 * utils.c (decimal2str): Initialize 'width' to nine, then
5675 don't mess with it.
5676
8040bd49
UW
56772011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
5678
5679 * hostio.c (require_data): Free *data, not data.
5680
7e52cbd0
JK
56812011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5682
5683 * hostio.c (require_data): Use free, not xfree.
5684
9130f83e
MS
56852011-02-27 Michael Snyder <msnyder@vmware.com>
5686
4b812f4e
MS
5687 * server.c (handle_query): Discard unused value.
5688
9130f83e
MS
5689 * hostio.c (require_data): Free malloc memory before returning
5690 error.
5691
69d37113
MS
56922011-02-26 Michael Snyder <msnyder@vmware.com>
5693
5694 * linux-low.c (list_threads): Call closedir for dirent.
5695
35f5825a
MS
56962011-02-27 Michael Snyder <msnyder@vmware.com>
5697
2a589cef
MS
5698 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5699 a case statement falls through.
5700
0adea5f7
MS
5701 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5702
35f5825a
MS
5703 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5704 in comparison.
5705
238f1c74
MS
57062011-02-26 Michael Snyder <msnyder@vmware.com>
5707
5708 * utils.c (decimal2str): Eliminate dead code and dead param.
5709 (pulongest): Drop dead param from call to decimal2str.
5710 (plongest): Ditto.
5711
633ff500
JB
57122011-02-24 Joel Brobecker <brobecker@adacore.com>
5713
5714 Revert the following patch (not approved yet):
5715 2011-02-21 Hui Zhu <teawater@gmail.com>
5716 * tracepoint.c (tp_printf): New function.
5717 (eval_agent_expr): Handle gdb_agent_op_printf.
5718
f9c6ff72
HZ
57192011-02-21 Hui Zhu <teawater@gmail.com>
5720
5721 * tracepoint.c (tp_printf): New function.
5722 (eval_agent_expr): Handle gdb_agent_op_printf.
5723
94d5e490
TT
57242011-02-18 Tom Tromey <tromey@redhat.com>
5725
5726 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5727 (tracepoint.o): Likewise.
5728 * tracepoint.c (enum gdb_agent_op): Use ax.def.
5729 (gdb_agent_op_names): Likewise.
5730
c7f96d2b
TT
57312011-02-18 Tom Tromey <tromey@redhat.com>
5732
5733 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5734 gdb_agent_op_rot>: New constants.
5735 (gdb_agent_op_names): Add pick and roll.
5736 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5737 cases.
5738
0feedb2c
JK
57392011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5740
5741 * aclocal.m4: Regenerated with aclocal-1.11.1.
5742
b3b9301e
PA
57432011-02-14 Pedro Alves <pedro@codesourcery.com>
5744
5745 * server.c (handle_qxfer_traceframe_info): New.
5746 (qxfer_packets): Register "traceframe-info".
5747 (handle_query): Report support for qXfer:traceframe-info:read+.
5748 * tracepoint.c (match_blocktype): New.
5749 (traceframe_find_block_type): Rename to ...
5750 (traceframe_walk_blocks): ... this. Add callback filter argument,
5751 and use it.
5752 (traceframe_find_block_type): New, reimplemented on top of
5753 traceframe_walk_blocks.
5754 (build_traceframe_info_xml): New.
5755 (traceframe_read_info): New.
5756 * server.h (traceframe_read_info): Declare.
5757
4f3e6fb7
YQ
57582011-02-11 Yao Qi <yao@codesourcery.com>
5759
5760 * configure.ac: Call AC_PROG_RANLIB.
5761 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
5762 * configure: Regenerate.
5763
764880b7
PA
57642011-02-07 Pedro Alves <pedro@codesourcery.com>
5765
5766 * server.c (gdb_read_memory): Change return semantics to allow
5767 partial transfers.
5768 (handle_search_memory_1): Adjust.
5769 (process_serial_event) <'m' packet>: Handle partial transfers.
5770 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5771
1c79eb8a
PA
57722011-01-28 Pedro Alves <pedro@codesourcery.com>
5773
5774 * regcache.c (init_register_cache): Initialize
5775 regcache->register_status.
5776 (free_register_cache): Release regcache->register_status.
5777 (regcache_cpy): Copy register_status.
5778 (registers_to_string): Print 'x's for unavailable registers.
5779 (supply_register): Mark the register's status valid or
5780 unavailable, depending on whether a buffer was passed in or not.
5781 (supply_register_zeroed): New.
5782 (supply_regblock): Mark the registers' status valid or
5783 unavailable, depending on whether a buffer was passed in or not.
5784 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5785 (struct regcache): New `register_status' field.
5786 (supply_register_zeroed): Declare.
5787 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5788 supply_register_zeroed, rather than passing a NULL buffer to
5789 supply_register.
5790 * tracepoint.c (fetch_traceframe_registers): Update comment.
5791
85724a0e
PA
57922011-01-28 Pedro Alves <pedro@codesourcery.com>
5793
5794 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5795 buffer explicit.
5796
d08aafef
PA
57972011-01-25 Pedro Alves <pedro@codesourcery.com>
5798
5799 * server.h (decode_xfer_write): Change prototype.
5800 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5801 and don't extract the annex here.
5802 * server.c (decode_xfer_read): Remove `annex' parameter,
5803 and don't extract the annex here.
5804 (decode_xfer): New.
5805 (struct qxfer): New.
5806 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5807 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5808 (handle_qxfer_statictrace): New functions, abstracted out from
5809 handle_query, and made to use the struct qxfer interface.
5810 (handle_threads_qxfer_proper): Rename to ...
5811 (handle_qxfer_threads_proper): ... this.
5812 (handle_threads_qxfer): Rename to ...
5813 (handle_qxfer_threads): ... this. Adjust.
5814 (qxfer_packets): New array.
5815 (handle_qxfer): New function.
5816 (handle_query): Use handle_qxfer.
5817
493e2a69
MS
58182011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
5819
5820 * gdbreplay.c: Shorten lines of >= 80 columns.
5821 * linux-low.c: Ditto.
5822 * linux-ppc-low.c: Ditto.
5823 * linux-s390-low.c: Ditto.
5824 * linux-sparc-low.c: Ditto.
5825 * linux-x86-low.c: Ditto.
5826 * linux-xtensa-low.c: Ditto.
5827 * mem-break.c: Ditto.
5828 * nto-low.c: Ditto.
5829 * regcache.h: Ditto.
5830 * remote-utils.c: Ditto.
5831 * server.c: Ditto.
5832 * server.h: Ditto.
5833 * thread-db.c: Ditto.
5834 * tracepoint.c: Ditto.
5835 * utils.c: Ditto.
5836 * win32-low.h: Ditto.
5837
44944448
JB
58382011-01-05 Joel Brobecker <brobecker@adacore.com>
5839
5840 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5841 update.
5842
71ce852c
JB
58432011-01-01 Joel Brobecker <brobecker@adacore.com>
5844
5845 * server.c (gdbserver_version): Update copyright year in version
5846 output.
5847 * gdbreplay.c (gdbreplay_version): Ditto.
5848
eb826dc6
MF
58492010-12-29 Jie Zhang <jie.zhang@analog.com>
5850
5851 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5852 * linux-bfin-low.c: New file.
5853 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5854 PT_DATA_ADDR for BFIN targets.
5855 * Makefile.in (SFILES): Add linux-bfin-low.c.
5856 (clean): Remove reg-bfin.c.
5857 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5858 * README: Mention supported Blackfin targets.
5859
39ab222a
MF
58602010-12-23 Mike Frysinger <vapier@gentoo.org>
5861
5862 * .gitignore: New file.
5863
a1f2ce7d
MF
58642010-11-16 Mike Frysinger <vapier@gentoo.org>
5865
5866 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5867
f474844c
JZ
58682010-10-22 Jie Zhang <jie@codesourcery.com>
5869
5870 * Makefile.in: Add FLAGS_TO_PASS variable.
5871 (install): Remove dependency of install-only and recursively
5872 invoke make for install-only.
5873
f1048712
DE
58742010-10-04 Doug Evans <dje@google.com>
5875
5876 * Makefile.in (uninstall): Use $(DESTDIR).
5877
b53a1623
PA
58782010-09-24 Pedro Alves <pedro@codesourcery.com>
5879
e6ee044d
PA
5880 PR gdb/11842
5881
b53a1623
PA
5882 * linux-x86-low.c (compat_siginfo_from_siginfo)
5883 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5884 si_code is < 0. Check for si_code == SI_TIMER before checking for
5885 si_code < 0.
5886
fa1bd1e4
JB
58872010-09-13 Joel Brobecker <brobecker@adacore.com>
5888
5889 * lynx-i386-low.c: New file.
5890 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5891
47fac8f8
JB
58922010-09-13 Joel Brobecker <brobecker@adacore.com>
5893
5894 * lynx-low.c (ptrace_request_to_str): Remove handling for
5895 request values that have been removed in LynxOS 5.x.
5896
1adfc54d
JB
58972010-09-13 Joel Brobecker <brobecker@adacore.com>
5898
5899 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5900 <ptrace.h>
5901
c2a66c29
NS
59022010-09-09 Nathan Sidwell <nathan@codesourcery.com>
5903
5904 * configure.ac: Add --enable-inprocess-agent option.
5905 * configure: Rebuilt.
5906
32fcada3
YQ
59072010-09-06 Yao Qi <yao@codesourcery.com>
5908
5909 * linux-low.c (linux_kill): Remove unused variable.
5910 (linux_stabilize_threads): Likewise.
5911 * server.c (start_inferior): Likewise.
5912 (queue_stop_reply_callback): Likewise.
5913 * tracepoint.c (do_action_at_tracepoint): Likewise.
5914
0cccb683
YQ
59152010-09-06 Yao Qi <yao@codesourcery.com>
5916
5917 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5918 on return.
5919
423ec54c
JK
59202010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5921
5922 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5923
12ac6819
PA
59242010-09-06 Pedro Alves <pedro@codesourcery.com>
5925
5926 * Makefile.in (install-only): Replace $IPA_DEPFILES with
5927 "$(IPA_DEPFILES)".
5928
8ed54b31
JB
59292010-09-01 Joel Brobecker <brobecker@adacore.com>
5930
5931 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5932 gdbserver/lynx-ppc-low.c: New files.
5933 * Makefile.in (lynx_low_h): New variable.
5934 (lynx-low.o, lynx-ppc-low.o): New rules.
5935 * configure.ac: On LynxOS, link with -lnetinet.
5936 * configure.srv: Add handling of powerpc-*-lynxos* targets.
5937 * configure: regenerate.
5938
bb0116a4
JB
59392010-09-01 Joel Brobecker <brobecker@adacore.com>
5940
5941 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5942 * configure.ac: Add check for vasprintf and vsnprintf.
5943 * configure, config.in: Regenerate.
5944 * server.h (vasprintf, vsnprintf): Add conditional declarations.
5945
a778ab81 59462010-09-01 Joel Brobecker <brobecker@adacore.com>
5947
5948 * gdbreplay.c: Move include of alloca.h up, next to include of
5949 malloc.h.
5950 * server.h: Add include of malloc.h.
5951 * mem-break.c: Remove include of malloc.h.
5952 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5953
8b034a19 59542010-09-01 Joel Brobecker <brobecker@adacore.com>
5955
5956 * Makefile.in (memmem.o): Build with -Wno-error.
5957
59582010-09-01 Joel Brobecker <brobecker@adacore.com>
5959
5960 * utils.c (xsnprintf): Make non-static.
5961 * server.h: Add xsnprintf declaration.
5962 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5963 replace calls to snprintf by calls to xsnprintf throughout.
5964
59652010-09-01 Joel Brobecker <brobecker@adacore.com>
5966
5967 * configure.ac: Add configure check for alloca.
5968 * configure, config.in: Regenerate.
5969 * server.h: Include alloca.h if it exists.
5970 * gdbreplay.c: Include alloca.h if it exists.
5971
1a981360
PA
59722010-08-28 Pedro Alves <pedro@codesourcery.com>
5973
5974 * linux-low.c (__SIGRTMIN): Define if not already defined.
5975 (linux_create_inferior): Check for __ANDROID__ rather than
5976 __SIGRTMIN.
5977 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5978 are already deferred.
5979 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5980 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5981 stopped and already has a pending signal to report.
5982 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5983 a pending signal to report or is moving out of a jump pad.
5984 (linux_init_signals): Check for __ANDROID__ rather than
5985 __SIGRTMIN.
5986
b4d51a55
PA
59872010-08-28 Pedro Alves <pedro@codesourcery.com>
5988
5989 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5990 debug_threads check. Avoid a linear search when not doing debug
5991 output.
5992
ec48365d
PA
59932010-08-27 Pedro Alves <pedro@codesourcery.com>
5994
5995 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5996 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5997 (struct file_handler) <fd>: Change type to gdb_fildes_t.
5998 (process_event): Change local fd's type to gdb_fildes_t.
5999 (create_file_handler): Adjust prototype.
6000 (delete_file_handler): Adjust prototype.
6001 (handle_file_event): Adjust prototype. Use pfildes.
6002 (create_file_event): Adjsut prototype.
6003 * remote-utils.c (remote_desc, listen_desc): Change type to
6004 gdb_fildes_t.
6005 * server.h: New gdb_fildes_t typedef.
6006 [USE_WIN32API]: Include winsock2.h.
6007 (delete_file_handler, add_file_handler): Adjust prototypes.
6008 (pfildes): Declare.
6009 * utils.c (pfildes): New.
6010
854d88f0
PA
60112010-08-27 Pedro Alves <pedro@codesourcery.com>
6012
6013 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6014 * configure: Regenerate.
6015
0146f85b
PA
60162010-08-27 Pedro Alves <pedro@codesourcery.com>
6017
6018 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6019 (linux_done_accessing_memory): ... this.
6020 (linux_target_ops): Adjust.
6021 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6022 * nto-low.c (nto_target_ops): Adjust comment.
6023 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6024 * spu-low.c (spu_target_ops): Adjust comment.
6025 * target.h (target_ops): Rename unprepare_to_access_memory field
6026 to done_accessing_memory.
6027 (unprepare_to_access_memory): Rename to ...
6028 (done_accessing_memory): ... this.
6029
90d74c30
PA
60302010-08-26 Pedro Alves <pedro@codesourcery.com>
6031
6032 * linux-low.c (linux_prepare_to_access_memory): New.
6033 (linux_unprepare_to_access_memory): New.
6034 (linux_target_ops): Install them.
6035 * server.c (read_memory): Rename to ...
6036 (gdb_read_memory): ... this. Use
6037 prepare_to_access_memory/prepare_to_access_memory.
6038 (write_memory): Rename to ...
6039 (gdb_write_memory): ... this. Use
6040 prepare_to_access_memory/prepare_to_access_memory.
6041 (handle_search_memory_1): Adjust.
6042 (process_serial_event): Adjust.
6043 * target.h (struct target_ops): New fields
6044 prepare_to_access_memory and unprepare_to_access_memory.
6045 (prepare_to_access_memory, unprepare_to_access_memory): New.
6046 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6047 prepare_to_access_memory/prepare_to_access_memory.
6048 * nto-low.c (nto_target_ops): Adjust.
6049 * spu-low.c (spu_target_ops): Adjust.
6050 * win32-low.c (win32_target_ops): Adjust.
6051
fd467969
PA
60522010-08-26 Pedro Alves <pedro@codesourcery.com>
6053
6054 * Makefile.in (WARN_CFLAGS): Get it from configure.
6055 (WERROR_CFLAGS): New.
6056 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6057 * configure.ac: Introduce --enable-werror, which adds -Werror to
6058 the compiler command line. Enabled by default. Disable with
6059 --disable-werror. Add -Wdeclaration-after-statement
6060 Wpointer-arith and -Wformat-nonliteral to warning flags.
6061 * configure: Regenerate.
6062
331e2f5f
PA
60632010-08-26 Pedro Alves <pedro@codesourcery.com>
6064
6065 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6066
e581f2b4
PA
60672010-08-26 Pedro Alves <pedro@codesourcery.com>
6068
6069 * gdbreplay.c (remote_error): New.
6070 (gdbchar): New.
6071 (expect): Use gdbchar. Check for error reading from GDB.
6072 Clarify sync error output.
6073 (play): Check for errors writing to GDB.
6074 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6075 * remote-utils.c (getpkt): Check for errors writing to the remote
6076 descriptor.
6077
3c11dd79
PA
60782010-08-25 Pedro Alves <pedro@codesourcery.com>
6079
6080 * linux-low.c (linux_wait_1): Move non-debugging code out of
6081 `debug_threads' control.
6082
d20a8ad9
PA
60832010-08-25 Pedro Alves <pedro@codesourcery.com>
6084
6085 * linux-low.c (linux_wait_1): Don't set last_status here.
6086 * server.c (push_event, queue_stop_reply_callback): Assert we're
6087 not pushing a TARGET_WAITKIND_IGNORE event.
6088 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6089 (myresume, handle_target_event): Set the thread's last_resume_kind
6090 and last_status from the target returned status.
6091
964e4306
PA
60922010-08-25 Pedro Alves <pedro@codesourcery.com>
6093
6094 PR threads/10729
6095
6096 * linux-x86-low.c (update_debug_registers_callback): New.
6097 (i386_dr_low_set_addr): Use it.
6098 (i386_dr_low_get_addr): New.
6099 (i386_dr_low_set_control): Use update_debug_registers_callback.
6100 (i386_dr_low_get_control): New.
6101 (i386_dr_low_get_status): Adjust.
6102 * linux-low.c (linux_stop_lwp): New.
6103 * linux-low.h (linux_stop_lwp): Declare.
6104
6105 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6106 argument instead of a i386_debug_reg_state.
6107 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6108 a i386_debug_reg_state.
6109 (i386_insert_aligned_watchpoint): Adjust.
6110 (i386_remove_aligned_watchpoint): Adjust.
6111 (i386_low_stopped_data_address): Read the debug registers from the
6112 inferior instead of from the mirrors.
6113 * i386-low.h (struct i386_debug_reg_state): Extend comment.
6114 (i386_dr_low_get_addr): Declare.
6115 (i386_dr_low_get_control): Declare.
6116 (i386_dr_low_get_status): Change prototype.
6117
6118 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
6119 (i386_dr_low_get_addr): New.
6120 (i386_dr_low_get_control): New.
6121 (i386_dr_low_get_status): Adjust prototype. Return
6122 dr_status_mirror.
6123 (i386_initial_stuff): Clear dr_status_mirror and
6124 dr_control_mirror.
6125 (i386_get_thread_context): Adjust.
6126 (i386_set_thread_context): Adjust.
6127 (i386_thread_added): Adjust.
6128
5f21a75b
PA
61292010-08-24 Pedro Alves <pedro@codesourcery.com>
6130
6131 * linux-low.h (linux_thread_area): Delete declaration.
6132
3e4c1235
TS
61332010-08-11 Thomas Schwinge <thomas@codesourcery.com>
6134
6135 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6136 after its termination.
6137
1971b033
PA
61382010-08-09 Pedro Alves <pedro@codesourcery.com>
6139
6140 * linux-low.c (gdb_wants_lwp_stopped): Delete.
6141 (gdb_wants_all_stopped): Delete.
6142 (linux_wait_1): Don't call them.
6143 * server.c (handle_v_cont): Tag all threads as want-stopped.
6144 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
6145 stopped as "client-wants-stopped".
6146
310444ac
PA
61472010-07-31 Pedro Alves <pedro@codesourcery.com>
6148
6149 * Makefile.in (signals_h): New.
6150 (server_h): Depend on it.
6151 (server.o): Don't depend on $(signals_def).
6152 (signals.o): Depend on $(signals_def).
6153
a19cae16
JK
61542010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
6155
6156 * Makefile.in (signals_def): New.
6157 (server_h): Append include/gdb/signals.h and signals_def.
6158 (server.o): Append signals_def.
6159
30d50328
JK
61602010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6161
6162 * server.c (handle_target_event): Use target_signal_to_host for
6163 resume_info.sig initialization.
6164 * target.h (struct thread_resume) <sig>: New comment.
6165
5c3216e2
OS
61662010-07-20 Ozkan Sezer <sezeroz@gmail.com>
6167
c6f46ca0
OS
6168 * server.c (handle_query): strcpy() the returned string from paddress()
6169 instead of sprintf().
5c3216e2
OS
6170 * utils.c (paddress): Return phex_nz().
6171
6bd31874
JB
61722010-07-07 Joel Brobecker <brobecker@adacore.com>
6173
6174 * server.c (handle_v_cont): Call mourn_inferior if process
6175 just exited.
6176 (myresume): Likewise.
6177
0fb4aa4b
PA
61782010-07-01 Pedro Alves <pedro@codesourcery.com>
6179
6180 Static tracepoints, and integration with UST.
6181
6182 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
6183 * mem-break.c (uninsert_all_breakpoints)
6184 (reinsert_all_breakpoints): New.
6185 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6186 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6187 (gdb_agent_ust_loaded, helper_thread_id)
6188 (gdb_agent_helper_thread_id): New macros.
6189 (struct ipa_sym_addresses): Add addr_ust_loaded,
6190 addr_helper_thread_id, addr_cmd_buf.
6191 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6192 (in_process_agent_loaded_ust): New.
6193 (write_e_ust_not_loaded): New.
6194 (maybe_write_ipa_ust_not_loaded): New.
6195 (struct collect_static_trace_data_action): New.
6196 (enum tracepoint_type) <static_tracepoint>: New.
6197 (struct tracepoint) <handle>: Mention static tracepoints.
6198 (struct static_tracepoint_ctx): New.
6199 (CMD_BUF_SIZE): New.
6200 (add_tracepoint_action): Handle static tracepoint actions.
6201 (unprobe_marker_at): New.
6202 (clear_installed_tracepoints): Handle static tracepoints.
6203 (cmd_qtdp): Handle static tracepoints.
6204 (probe_marker_at): New.
6205 (cmd_qtstart): Handle static tracepoints.
6206 (response_tracepoint): Handle static tracepoints.
6207 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6208 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6209 (get_context_regcache): Handle static tracepoints.
6210 (do_action_at_tracepoint): Handle static tracepoint actions.
6211 (traceframe_find_block_type): Handle static trace data blocks.
6212 (traceframe_read_sdata): New.
6213 (download_tracepoints): Download static tracepoint actions.
6214 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6215 (GDB_PROBE_NAME): New.
6216 (ust_ops): New.
6217 (GET_UST_SYM): New.
6218 (USTF): New.
6219 (dlsym_ust): New.
6220 (ust_marker_to_static_tracepoint): New.
6221 (gdb_probe): New.
6222 (collect_ust_data_at_tracepoint): New.
6223 (gdb_ust_probe): New.
6224 (UNIX_PATH_MAX, SOCK_DIR): New.
6225 (gdb_ust_connect_sync_socket): New.
6226 (resume_thread, stop_thread): New.
6227 (run_inferior_command): New.
6228 (init_named_socket): New.
6229 (gdb_ust_socket_init): New.
6230 (cstr_to_hexstr): New.
6231 (next_st): New.
6232 (first_marker, next_marker): New.
6233 (response_ust_marker): New.
6234 (cmd_qtfstm, cmd_qtsstm): New.
6235 (unprobe_marker_at, probe_marker_at): New.
6236 (cmd_qtstmat, gdb_ust_thread): New.
6237 (gdb_ust_init): New.
6238 (initialize_tracepoint_ftlib): Call gdb_ust_init.
6239 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6240 (ST_REGENTRY): New.
6241 (x86_64_st_collect_regmap): New.
6242 (X86_64_NUM_ST_COLLECT_GREGS): New.
6243 (AMD64_RIP_REGNUM): New.
6244 (supply_static_tracepoint_registers): New.
6245 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6246 (ST_REGENTRY): New.
6247 (i386_st_collect_regmap): New.
6248 (i386_NUM_ST_COLLECT_GREGS): New.
6249 (supply_static_tracepoint_registers): New.
6250 * server.c (handle_query): Handle qXfer:statictrace:read.
6251 <qSupported>: Report support for StaticTracepoints, and
6252 qXfer:statictrace:read features.
6253 * server.h (traceframe_read_sdata)
6254 (supply_static_tracepoint_registers): Declare.
6255 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6256 (unpack_varlen_hex): Include in IPA build.
6257 * Makefile.in (ustlibs, ustinc): New.
6258 (IPA_OBJS): Add remote-utils-ipa.o.
6259 ($(IPA_LIB)): Link -ldl and -lpthread.
6260 (UST_CFLAGS): New.
6261 (IPAGENT_CFLAGS): Add UST_CFLAGS.
6262 * config.in, configure: Regenerate.
6263
9e4344e5
PA
62642010-06-20 Ian Lance Taylor <iant@google.com>
6265 Pedro Alves <pedro@codesourcery.com>
6266
6267 * linux-x86-low.c (always_true): Delete.
6268 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6269 trying to fool the compiler with always_true.
6270
c6beb2cb
PA
62712010-06-20 Pedro Alves <pedro@codesourcery.com>
6272
6273 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6274 conditions in gdbserver.
6275
d2ed6730
UW
62762010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
6277
6278 * spu-low.c (spu_read_memory): Wrap around local store limit.
6279 (spu_write_memory): Likewise.
6280
4e29fb54
PA
62812010-06-15 Pedro Alves <pedro@codesourcery.com>
6282
6283 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6284 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6285 LONGEST uses.
6286 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6287 uses.
6288 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6289 uses with LONGEST uses.
6290
6a271cae
PA
62912010-06-14 Stan Shebs <stan@codesourcery.com>
6292 Pedro Alves <pedro@codesourcery.com>
6293
6294 Bytecode compiler.
6295
6296 * linux-x86-low.c: Include limits.h.
6297 (add_insns): New.
6298 (always_true): New.
6299 (EMIT_ASM): New.
6300 (EMIT_ASM32): New.
6301 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6302 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6303 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6304 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6305 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6306 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6307 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6308 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6309 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6310 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6311 (amd64_emit_void_call_2): New.
6312 (amd64_emit_ops): New.
6313 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6314 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6315 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6316 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6317 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6318 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6319 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6320 (i386_emit_call, i386_emit_reg, i386_emit_pop)
6321 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6322 (i386_emit_stack_adjust, i386_emit_int_call_1)
6323 (i386_emit_void_call_2): New.
6324 (i386_emit_ops): New.
6325 (x86_emit_ops): New.
6326 (the_low_target): Install x86_emit_ops.
6327 * server.h (struct emit_ops): New.
6328 (get_raw_reg_func_addr): Declare.
6329 (current_insn_ptr, emit_error): Declare.
6330 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6331 (set_trace_state_variable_value): New defines.
6332 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6333 addr_get_trace_state_variable_value and
6334 addr_set_trace_state_variable_value.
6335 (symbol_list): New fields for get_raw_reg,
6336 get_trace_state_variable_value and set_trace_state_variable_value.
6337 (condfn): New typedef.
6338 (struct tracepoint): New field `compiled_cond'.
6339 (do_action_at_tracepoint): Clear compiled_cond.
6340 (get_trace_state_variable_value, set_trace_state_variable_value):
6341 Export in the IPA.
6342 (condition_true_at_tracepoint): If there's a compiled condition,
6343 run that.
6344 (current_insn_ptr, emit_error): New globals.
6345 (struct bytecode_address): New.
6346 (get_raw_reg_func_addr): New.
6347 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6348 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6349 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6350 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6351 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6352 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6353 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6354 (compile_tracepoint_condition, compile_bytecodes): New.
6355 * target.h (emit_ops): Forward declare.
6356 (struct target_ops): New field emit_ops.
6357 (target_emit_ops): New.
6358 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6359 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6360 * linux-low.c (linux_emit_ops): New.
6361 (linux_target_ops): Install it.
6362 * linux-low.h (struct linux_target_ops): New field emit_ops.
6363
92b72907
UW
63642010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
6365
6366 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6367 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6368
fa593d66
PA
63692010-06-01 Pedro Alves <pedro@codesourcery.com>
6370 Stan Shebs <stan@codesourcery.com>
6371
6372 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6373 (all): Depend on $(extra_libraries).
6374 (install-only): Install the IPA.
6375 (IPA_OBJS, IPA_LIB): New.
6376 (clean): Remove the IPA lib.
6377 (IPAGENT_CFLAGS): New.
6378 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6379 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6380 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6381 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6382 * configure.ac: Check for atomic builtins support in the compiler.
6383 (IPA_DEPFILES, extra_libraries): Define.
6384 * configure.srv (ipa_obj): Add description.
6385 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6386 (i[34567]86-*-linux*): Set ipa_obj.
6387 (x86_64-*-linux*): Set ipa_obj.
6388 * linux-low.c (stabilizing_threads): New.
6389 (supports_fast_tracepoints): New.
6390 (linux_detach): Stabilize threads before detaching.
6391 (handle_tracepoints): Handle internal tracing breakpoints. Assert
6392 the lwp is either not stabilizing, or is moving out of a jump pad.
6393 (linux_fast_tracepoint_collecting): New.
6394 (maybe_move_out_of_jump_pad): New.
6395 (enqueue_one_deferred_signal): New.
6396 (dequeue_one_deferred_signal): New.
6397 (linux_wait_for_event_1): If moving out of a jump pad, defer
6398 pending signals to later.
6399 (linux_stabilize_threads): New.
6400 (linux_wait_1): Check if threads need moving out of jump pads, and
6401 do it if so.
6402 (stuck_in_jump_pad_callback): New.
6403 (move_out_of_jump_pad_callback): New.
6404 (lwp_running): New.
6405 (linux_resume_one_lwp): Handle moving out of jump pads.
6406 (linux_set_resume_request): Dequeue deferred signals.
6407 (need_step_over_p): Also step over fast tracepoint jumps.
6408 (start_step_over): Also uninsert fast tracepoint jumps.
6409 (finish_step_over): Also reinsert fast tracepoint jumps.
6410 (linux_install_fast_tracepoint_jump): New.
6411 (linux_target_ops): Install linux_stabilize_threads and
6412 linux_install_fast_tracepoint_jump_pad.
6413 * linux-low.h (linux_target_ops) <get_thread_area,
6414 install_fast_tracepoint_jump_pad>: New fields.
6415 (struct lwp_info) <collecting_fast_tracepoint,
6416 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6417 (linux_get_thread_area): Declare.
6418 * linux-x86-low.c (jump_insn): New.
6419 (x86_get_thread_area): New.
6420 (append_insns): New.
6421 (push_opcode): New.
6422 (amd64_install_fast_tracepoint_jump_pad): New.
6423 (i386_install_fast_tracepoint_jump_pad): New.
6424 (x86_install_fast_tracepoint_jump_pad): New.
6425 (the_low_target): Install x86_get_thread_area and
6426 x86_install_fast_tracepoint_jump_pad.
6427 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6428 (struct fast_tracepoint_jump): New.
6429 (fast_tracepoint_jump_insn): New.
6430 (fast_tracepoint_jump_shadow): New.
6431 (find_fast_tracepoint_jump_at): New.
6432 (fast_tracepoint_jump_here): New.
6433 (delete_fast_tracepoint_jump): New.
6434 (set_fast_tracepoint_jump): New.
6435 (uninsert_fast_tracepoint_jumps_at): New.
6436 (reinsert_fast_tracepoint_jumps_at): New.
6437 (set_breakpoint_at): Use write_inferior_memory.
6438 (uninsert_raw_breakpoint): Use write_inferior_memory.
6439 (check_mem_read): Mask out fast tracepoint jumps.
6440 (check_mem_write): Mask out fast tracepoint jumps.
6441 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6442 (set_fast_tracepoint_jump): Declare.
6443 (delete_fast_tracepoint_jump)
6444 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6445 (reinsert_fast_tracepoint_jumps_at): Declare.
6446 * regcache.c: Don't compile many functions when building the
6447 in-process agent library.
6448 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6449 the register buffer in the heap.
6450 (free_register_cache): If the register buffer isn't owned by the
6451 regcache, don't free it.
6452 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6453 pre-existing register caches.
6454 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6455 type.
6456 (convert_ascii_to_int): : Constify `from' parameter type.
6457 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6458 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
6459 the needed buffer in-place.
6460 (relocate_instruction): New.
6461 * server.c (handle_query) <qSymbols>: If the target supports
6462 tracepoints, give it a chance of looking up symbols. Report
6463 support for fast tracepoints.
6464 (handle_status): Stabilize threads.
6465 (process_serial_event): Adjust.
6466 * server.h (struct fast_tracepoint_jump): Forward declare.
6467 (struct process_info) <fast_tracepoint_jumps>: New field.
6468 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6469 (decode_X_packet, decode_M_packet): Adjust.
6470 (relocate_instruction): Declare.
6471 (in_process_agent_loaded): Declare.
6472 (tracepoint_look_up_symbols): Declare.
6473 (struct fast_tpoint_collect_status): Declare.
6474 (fast_tracepoint_collecting): Declare.
6475 (force_unlock_trace_buffer): Declare.
6476 (handle_tracepoint_bkpts): Declare.
6477 (initialize_low_tracepoint)
6478 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6479 * target.h (struct target_ops) <stabilize_threads,
6480 install_fast_tracepoint_jump_pad>: New fields.
6481 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6482 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6483 [HAVE_STDINT_H]: Include stdint.h.
6484 (trace_debug_1): Rename to ...
6485 (trace_vdebug): ... this.
6486 (trace_debug): Rename to ...
6487 (trace_debug_1): ... this. Add `level' parameter.
6488 (trace_debug): New.
6489 (ATTR_USED, ATTR_NOINLINE): New.
6490 (IP_AGENT_EXPORT): New.
6491 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6492 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6493 (about_to_request_buffer_space, trace_buffer_is_full)
6494 (stopping_tracepoint, expr_eval_result, error_tracepoint)
6495 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6496 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6497 (traceframe_write_count, traceframes_created)
6498 (trace_state_variables)
6499 New renaming defines.
6500 (struct ipa_sym_addresses): New.
6501 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6502 (symbol_list): New.
6503 (ipa_sym_addrs): New.
6504 (all_tracepoint_symbols_looked_up): New.
6505 (in_process_agent_loaded): New.
6506 (write_e_ipa_not_loaded): New.
6507 (maybe_write_ipa_not_loaded): New.
6508 (tracepoint_look_up_symbols): New.
6509 (debug_threads) [IN_PROCESS_AGENT]: New.
6510 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6511 (UNKNOWN_SIDE_EFFECTS): New.
6512 (stop_tracing): New.
6513 (flush_trace_buffer): New.
6514 (stop_tracing_bkpt): New.
6515 (flush_trace_buffer_bkpt): New.
6516 (read_inferior_integer): New.
6517 (read_inferior_uinteger): New.
6518 (read_inferior_data_pointer): New.
6519 (write_inferior_data_pointer): New.
6520 (write_inferior_integer): New.
6521 (write_inferior_uinteger): New.
6522 (struct collect_static_trace_data_action): Delete.
6523 (enum tracepoint_type): New.
6524 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
6525 <actions_str, step_actions, step_actions_str>: Only include in
6526 GDBserver.
fa593d66
PA
6527 <orig_size, obj_addr_on_target, adjusted_insn_addr>
6528 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6529 (tracepoints): Use IP_AGENT_EXPORT.
6530 (last_tracepoint): Don't include in the IPA.
6531 (stopping_tracepoint): Use IP_AGENT_EXPORT.
6532 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6533 (alloced_trace_state_variables): New.
6534 (trace_state_variables): Use IP_AGENT_EXPORT.
6535 (traceframe_t): Delete unused variable.
6536 (circular_trace_buffer): Don't include in the IPA.
6537 (trace_buffer_start): Delete.
6538 (struct trace_buffer_control): New.
6539 (trace_buffer_free): Delete.
6540 (struct ipa_trace_buffer_control): New.
6541 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6542 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6543 New.
6544 (trace_buffer_ctrl): New.
6545 (TRACE_BUFFER_CTRL_CURR): New.
6546 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6547 Reimplement as macros.
6548 (trace_buffer_wrap): Delete.
6549 (traceframe_write_count, traceframe_read_count)
6550 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6551 (struct tracepoint_hit_ctx) <type>: New field.
6552 (struct fast_tracepoint_ctx): New.
6553 (memory_barrier): New.
6554 (cmpxchg): New.
6555 (record_tracepoint_error): Update atomically in the IPA.
6556 (clear_inferior_trace_buffer): New.
6557 (about_to_request_buffer_space): New.
6558 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6559 updating the same buffer.
6560 (add_tracepoint): Default the tracepoint's type to trap
6561 tracepoint, and orig_size to -1.
6562 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6563 internal variables.
6564 (create_trace_state_variable): New parameter `gdb'. Handle it.
6565 (clear_installed_tracepoints): Clear fast tracepoint jumps.
6566 (cmd_qtdp): Handle fast tracepoints.
6567 (cmd_qtdv): Adjust.
6568 (max_jump_pad_size): New.
6569 (gdb_jump_pad_head): New.
6570 (get_jump_space_head): New.
6571 (claim_jump_space): New.
6572 (sort_tracepoints): New.
6573 (MAX_JUMP_SIZE): New.
6574 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
6575 IPA.
6576 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6577 support. Upload fast traceframes, and delete internal IPA
6578 breakpoints.
6579 (stop_tracing_handler): New.
6580 (flush_trace_buffer_handler): New.
6581 (cmd_qtstop): Upload fast tracepoints.
6582 (response_tracepoint): Handle fast tracepoints.
6583 (tracepoint_finished_step): Upload fast traceframes. Set the
6584 tracepoint hit context's tracepoint type.
6585 (handle_tracepoint_bkpts): New.
6586 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6587 type. Add comment about fast tracepoints.
6588 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6589 non-existing action_str field.
6590 (get_context_regcache): Handle fast tracepoints.
6591 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6592 to the regcache.
6593 (fast_tracepoint_from_jump_pad_address): New.
6594 (fast_tracepoint_from_ipa_tpoint_address): New.
6595 (collecting_t): New.
6596 (force_unlock_trace_buffer): New.
6597 (fast_tracepoint_collecting): New.
6598 (collecting): New.
6599 (gdb_collect): New.
6600 (write_inferior_data_ptr): New.
6601 (target_tp_heap): New.
6602 (target_malloc): New.
6603 (download_agent_expr): New.
6604 (UALIGN): New.
6605 (download_tracepoints): New.
6606 (download_trace_state_variables): New.
6607 (upload_fast_traceframes): New.
6608 (IPA_FIRST_TRACEFRAME): New.
6609 (IPA_NEXT_TRACEFRAME_1): New.
6610 (IPA_NEXT_TRACEFRAME): New.
6611 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6612 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6613 (gdb_jump_pad_buffer_end): New.
6614 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6615 (initialize_tracepoint): Adjust.
6616 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6617 buffer. Initialize the low module.
6618 * utils.c (PREFIX, TOOLNAME): New.
6619 (malloc_failure): Use PREFIX.
6620 (error): In the IPA, an error causes an exit.
6621 (fatal, warning): Use PREFIX.
6622 (internal_error): Use TOOLNAME.
6623 (NUMCELLS): Increase to 10.
6624 * configure, config.in: Regenerate.
6625
d149dd1d
PA
66262010-06-01 Pedro Alves <pedro@codesourcery.com>
6627
6628 * server.c (handle_query) <qSupported>: Do two passes over the
6629 qSupported string to avoid nesting strtok.
6630
f6528abd
JK
66312010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6632
6633 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6634 (CDEPS): New.
6635 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
6636 -Wl,--dynamic-list.
6637 * configure: Regenerate.
6638 * proc-service.list: New.
6639
ca2a87a0
JK
66402010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6641
6642 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6643 New comment.
6644
363a6e9f
OS
66452010-05-26 Ozkan Sezer <sezeroz@gmail.com>
6646
6647 * gdbreplay.c (remote_open): Check error return from socket() call by
6648 its equality to -1 not by it being negative.
6649 * remote-utils.c (remote_open): Likewise.
6650
d23b6cb1
PA
66512010-05-23 Pedro Alves <pedro@codesourcery.com>
6652
6653 * config.h: Regenerate.
6654
28d3cf85
MK
66552010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6656
6657 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6658 doesn't provide PTRACE_GET_THREAD_AREA.
6659
fea36a59
MK
66602010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
6661
6662 * linux-m68k-low.c: Include <asm/ptrace.h>
6663 (ps_get_thread_area): Implement.
6664
24b066ba
DE
66652010-05-03 Doug Evans <dje@google.com>
6666
6667 * event-loop.c (struct callback_event): New struct.
6668 (callback_list): New global.
6669 (append_callback_event, delete_callback_event): New functions.
6670 (process_callback): New function.
6671 (start_event_loop): Call it.
6672 * remote-utils.c (NOT_SCHEDULED): Define.
6673 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6674 moved out of readchar.
6675 (readchar): Rewrite. Call reschedule before returning.
6676 (reset_readchar): New function.
6677 (remote_close): Call it.
6678 (process_remaining, reschedule): New functions.
6679 * server.h (callback_handler_func): New typedef.
6680 (append_callback_event, delete_callback_event): Declare.
6681
9836d6ea
PA
66822010-05-03 Pedro Alves <pedro@codesourcery.com>
6683
6684 * proc-service.c (ps_pglobal_lookup): Use
6685 thread_db_look_up_one_symbol.
6686 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6687 parameter. Use it instead of all_symbols_looked_up.
6688 * server.h (struct process_info) <all_symbols_looked_up>: Delete
6689 field.
6690 (all_symbols_looked_up): Don't declare.
6691 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6692 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6693 field.
6694 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6695 Set all_symbols_looked_up here.
6696 (thread_db_look_up_one_symbol): New.
6697 (thread_db_get_tls_address): Adjust.
6698 (thread_db_load_search, try_thread_db_load_1): Always allocate the
6699 thread_db object on the heap, and tentatively set it in the
6700 process structure.
6701 (thread_db_init): Don't set all_symbols_looked_up here.
6702 * linux-low.h (thread_db_look_up_one_symbol): Declare.
6703
7984d532
PA
67042010-05-03 Pedro Alves <pedro@codesourcery.com>
6705
6706 * linux-low.c (linux_kill, linux_detach): Adjust.
6707 (status_pending_p_callback): Remove redundant statement. Check
6708 for !TARGET_WAITIKIND_IGNORE, instead of
6709 TARGET_WAITKIND_STOPPED.
6710 (handle_tracepoints): Make sure LWP is locked. Adjust.
6711 (linux_wait_for_event_1): Adjust.
6712 (linux_cancel_breakpoints): New.
6713 (unsuspend_one_lwp): New.
6714 (unsuspend_all_lwps): New.
6715 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6716 (send_sigstop_callback): Change return type to int, add new
6717 `except' parameter and handle it.
6718 (suspend_and_send_sigstop_callback): New.
6719 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6720 pass them down. If SUSPEND, also increment the lwp's suspend
6721 count.
6722 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6723 (need_step_over_p): Don't consider suspended LWPs.
6724 (start_step_over): Adjust.
6725 (proceed_one_lwp): Change return type to int, add new `except'
6726 parameter and handle it.
6727 (unsuspend_and_proceed_one_lwp): New.
6728 (proceed_all_lwps): Use find_inferior instead of
6729 for_each_inferior.
6730 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
6731 also decrement the suspend count of LWPs. Pass `except' down,
6732 instead of hacking its suspend count.
6733 (linux_pause_all): Add `freeze' parameter. Adjust.
6734 (linux_unpause_all): New.
6735 (linux_target_ops): Install linux_unpause_all.
6736 * server.c (handle_status): Adjust.
6737 * target.h (struct target_ops): New fields `unpause_all' and
6738 `cancel_breakpoints'. Add new parameter to `pause_all'.
6739 (pause_all): Add new `freeze' parameter.
6740 (unpause_all): New.
6741 (cancel_breakpoints): New.
6742 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6743 cancel breakpoints.
6744 (cmd_qtstart): Pause threads.
6745 (stop_tracing): Pause threads, and cancel breakpoints.
6746 * win32-low.c (win32_target_ops): Adjust.
6747
e471f25b
PA
67482010-05-03 Pedro Alves <pedro@codesourcery.com>
6749
6750 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6751 the inferior right away from here...
6752 (linux_wait_1): ... to here, and adjust to check the thread's
6753 last_resume_kind instead of the lwp's step or stop_expected flags.
6754
1915ef4f
PA
67552010-05-02 Pedro Alves <pedro@codesourcery.com>
6756
6757 * README: Use consistent `GDB' and `GDBserver' spellings.
6758
f9e39928
PA
67592010-05-02 Pedro Alves <pedro@codesourcery.com>
6760
6761 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6762 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
6763 (linux_detach_one_lwp): Assume the lwp is stopped.
6764 (any_thread_of): Delete.
6765 (linux_detach): Stop all lwps here. Don't blindly delete all
6766 breakpoints.
6767 (delete_lwp_callback): New.
6768 (linux_mourn): Delete all lwps of the process that is gone.
6769 (linux_wait_1): Don't delete the last lwp of the process here.
6770 * mem-break.h (mark_breakpoints_out): Declare.
6771 * mem-break.c (mark_breakpoints_out): New.
6772 (free_all_breakpoints): Use it.
6773 * server.c (handle_target_event): If the process is gone, mark
6774 breakpoints out.
6775 * thread-db.c (struct thread_db) <create_bp>: New field.
6776 (thread_db_enable_reporting): Fix prototype. Store a thread event
6777 breakpoint reference in the thread_db struct.
6778 (thread_db_load_search): Clear the thread_db object.
6779 (try_thread_db_load_1): Ditto.
6780 (switch_to_process): New.
6781 (disable_thread_event_reporting): Use it.
6782 (remove_thread_event_breakpoints): New.
6783 (thread_db_detach, thread_db_mourn): Use it.
6784
1e7fc18c
PA
67852010-05-01 Pedro Alves <pedro@codesourcery.com>
6786
6787 * linux-low.c (linux_enable_event_reporting): New.
6788 (linux_wait_for_event_1, handle_extended_wait): Use it.
6789
02fc4de7
PA
67902010-04-30 Pedro Alves <pedro@codesourcery.com>
6791
6792 * linux-low.c (linux_kill_one_lwp, linux_kill)
6793 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6794 (send_sigstop): Take an lwp_info as parameter instead. Queue a
6795 SIGSTOP even if the LWP is stopped.
6796 (send_sigstop_callback): New.
6797 (stop_all_lwps): Use send_sigstop_callback instead.
6798 (linux_resume_one_thread): Adjust.
6799 (proceed_one_lwp): Still proceed an LWP that the client has
6800 requested to stop, if we haven't reported it as stopped yet. Make
6801 sure that LWPs the client want stopped, have a pending SIGSTOP.
6802
bc3b5632
DE
68032010-04-26 Doug Evans <dje@google.com>
6804
ae1ada35
DE
6805 * server.c (handle_general_set): Make static.
6806
bc3b5632
DE
6807 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6808 Print received char after testing for error/eof instead of before.
6809 (input_interrupt): Tweak comment.
6810
65730243
DE
68112010-04-23 Doug Evans <dje@google.com>
6812
6813 * server.c (start_inferior): Print inferior argv if --debug.
6814
a8ae7dc0
AR
68152010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
6816
6817 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6818 * nto-x86-low.c: Include server.h
6819
1c07cc19
PM
68202010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
6821
6822 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6823 be consistent with other sources of this directory.
6824 (init_registers_amd64): Correct name of source file of this function
6825 in the comment.
6826
e0a61e09
PM
68272010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6828
6829 * configure.srv (x86_64-*-mingw*): New configuration for Windows
6830 64-bit executables.
6831
54709339
PM
68322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6833
6834 * win32-i386-low.c: Add 64-bit support.
6835 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6836 (init_registers_amd64): Declare.
6837 (mappings): Add 64-bit version of array.
6838 (init_windows_x86): New function.
6839 (the_low_target): Change init_arch field to init_windows_x86.
6840
e8f0053d
PM
68412010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6842
6843 * win32-low.c: Adapt to support also 64-bit architecture.
6844 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6845 (get_image_name): Use SIZE_T type for local variable `done'.
6846 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6847 (toolhelp_get_dll_name): Idem.
6848 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6849 Use uintptr_t typecast to avoid warning.
6850 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6851 (handle_exception): Use phex_nz to avoid warning.
6852 (win32_wait): Remove unused local variable `process'.
6853
c481e77e
PM
68542010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
6855
6856 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6857 `amd64-avx.o'.
6858
12ea4b69
PM
68592010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6860
6861 * configure.ac: Use `ws2_32' library for srv_mingw.
6862 * configure: Regenerate.
6863 * gdbreplay.c: Include winsock2.h instead of winsock.h.
6864 * remote-utils.c: Likewise.
6865
f6d1620c
L
68662010-04-17 H.J. Lu <hongjiu.lu@intel.com>
6867
6868 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6869 if __x86_64__ is defined.
6870
8e642873
PM
68712010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6872
6873 * configure: Regenerate.
6874
711e434b
PM
68752010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
6876
6877 * server.c (handle_query): Handle 'qGetTIBAddr' query.
6878 * target.h (target_ops): New get_tib_address field.
6879 * win32-low.h (win32_thread_info): Add thread_local_base field.
6880 * win32-low.c (child_add_thread): Add tlb argument.
6881 Set thread_local_base field to TLB.
6882 (get_child_debug_event): Adapt to child_add_thread change.
6883 (win32_get_tib_address): New function.
6884 (win32_target_ops): Set get_tib_address field to
6885 win32_get_tib_address.
6886 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6887
505106cd
PA
68882010-04-12 Pedro Alves <pedro@codesourcery.com>
6889
505106cd
PA
6890 * linux-low.c (linux_mourn): Also remove the process.
6891 * server.c (handle_target_event): Don't remove the process here.
6892 * nto-low.c (nto_mourn): New.
6893 (nto_target_ops): Install it.
6894 * spu-low.c (spu_mourn): New.
6895 (spu_target_ops): Install it.
6896 * win32-low.c (win32_mourn): New.
6897 (win32_target_ops): Install it.
6898
e8470a06
PA
68992010-04-12 Pedro Alves <pedro@codesourcery.com>
6900
6901 * server.h (buffer_xml_printf): Remove redundant `;'.
6902
45ba0d02
PA
69032010-04-12 Pedro Alves <pedro@codesourcery.com>
6904
6905 * regcache.c (set_register_cache): Invalidate regcaches before
6906 changing the register cache layout.
6907 (regcache_invalidate_one): Allow a NULL regcache.
6908 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6909 regcaches before changing the register cache layout or the target
6910 regsets.
6911
59e04013
L
69122010-04-12 H.J. Lu <hongjiu.lu@intel.com>
6913
6914 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6915 variable warning on Linux/x86-64.
6916
8336d594
PA
69172010-04-11 Pedro Alves <pedro@codesourcery.com>
6918
6919 GDBserver disconnected tracing support.
6920
6921 * linux-low.c (linux_remove_process): Delete.
6922 (add_lwp): Don't set last_resume_kind here.
6923 (linux_kill): Use `mourn'.
6924 (linux_detach): Use `thread_db_detach', and `mourn'.
6925 (linux_mourn): New.
6926 (linux_attach_lwp_1): Adjust comment.
6927 (linux_attach): last_resume_kind moved the thread_info; adjust.
6928 (status_pending_p_callback): Adjust.
6929 (linux_wait_for_event_1): Adjust.
6930 (count_events_callback, select_singlestep_lwp_callback)
6931 (select_event_lwp_callback, cancel_breakpoints_callback)
6932 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6933 (proceed_one_lwp): Adjust.
6934 (linux_async): Add debug output.
6935 (linux_thread_stopped): New.
6936 (linux_pause_all): New.
6937 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6938 linux_pause_all.
6939 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6940 (thread_db_free): Delete declaration.
6941 (thread_db_detach, thread_db_mourn): Declare.
6942 * thread-db.c (thread_db_init): Use thread_db_mourn.
6943 (thread_db_free): Delete, split in two.
6944 (disable_thread_event_reporting): New.
6945 (thread_db_detach): New.
6946 (thread_db_mourn): New.
6947
6948 * server.h (struct thread_info) <last_resume_kind>: New field.
6949 <attached>: Add comment.
6950 <gdb_detached>: New field.
6951 (handler_func): Change return type to int.
6952 (handle_serial_event, handle_target_event): Ditto.
6953 (gdb_connected): Declare.
6954 (tracing): Delete.
6955 (disconnected_tracing): Declare.
6956 (stop_tracing): Declare.
6957
6958 * server.c (handle_query) <qSupported>: Report support for
6959 disconnected tracing.
6960 (queue_stop_reply_callback): Account for running threads.
6961 (gdb_wants_thread_stopped): New.
6962 (gdb_wants_all_threads_stopped): New.
6963 (gdb_reattached_process): New.
6964 (handle_status): Clear the `gdb_detached' flag of all processes.
6965 In all-stop, stop all threads.
6966 (main): Be sure to leave tfind mode. Handle disconnected tracing.
6967 (process_serial_event): If the remote connection breaks, or if an
6968 exit was forced with "monitor exit", force an event loop exit.
6969 Handle disconnected tracing on detach.
6970 (handle_serial_event): Adjust.
6971 (handle_target_event): If GDB isn't connected, forward events back
6972 to the inferior, unless the last process exited, in which case,
6973 exit gdbserver. Adjust interface.
6974
6975 * remote-utils.c (remote_open): Don't block in accept. Instead
6976 register an event loop source on the listen socket file
6977 descriptor. Refactor bits into ...
6978 (listen_desc): ... this new global.
6979 (gdb_connected): ... this new function.
6980 (enable_async_notification): ... this new function.
6981 (handle_accept_event): ... this new function.
6982 (remote_close): Clear remote_desc.
6983
6984 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6985
6986 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6987 New fields.
6988 (mourn_inferior): Define.
6989 (target_process_qsupported): Avoid the dangling else problem.
6990 (thread_stopped): Define.
6991 (pause_all): Define.
6992 (target_waitstatus_to_string): Declare.
6993 * target.c (target_waitstatus_to_string): New.
6994
6995 * tracepoint.c (tracing): Make extern.
6996 (disconnected_tracing): New.
6997 (stop_tracing): Make extern. Handle tracing stops due to GDB
6998 disconnecting.
6999 (cmd_qtdisconnected): New.
7000 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7001 (handle_tracepoint_general_set): Handle QTDisconnected.
7002
7003 * event-loop.c (event_handler_func): Change return type to int.
7004 (process_event): Bail out if the event handler wants the event
7005 loop to stop.
7006 (handle_file_event): Ditto.
7007 (start_event_loop): Bail out if the event handler wants the event
7008 loop to stop.
7009
7010 * nto-low.c (nto_target_ops): Adjust.
7011 * spu-low.c (spu_wait): Don't remove the process here.
7012 (spu_target_ops): Adjust.
7013 * win32-low.c (win32_wait): Don't remove the process here.
7014 (win32_target_ops): Adjust.
7015
5d267c4c
PA
70162010-04-11 Pedro Alves <pedro@codesourcery.com>
7017
7018 * regcache.c (realloc_register_cache): Invalidate inferior's
7019 regcache before recreating it.
7020
623ccd72
PA
70212010-04-09 Pedro Alves <pedro@codesourcery.com>
7022
7023 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7024
219f2f23
PA
70252010-04-09 Stan Shebs <stan@codesourcery.com>
7026 Pedro Alves <pedro@codesourcery.com>
7027
7028 * server.h (LONGEST): New.
7029 (struct thread_info) <while_stepping>: New field.
7030 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7031 Declare.
7032 (initialize_tracepoint, handle_tracepoint_general_set)
7033 (handle_tracepoint_query, tracepoint_finished_step)
7034 (tracepoint_was_hit, release_while_stepping_state_list):
7035 (current_traceframe): Declare.
7036 * server.c (handle_general_set): Handle tracepoint packets.
7037 (read_memory): New.
7038 (write_memory): New.
7039 (handle_search_memory_1): Use read_memory.
7040 (handle_query): Report support for conditional tracepoints, trace
7041 state variables, and tracepoint sources. Handle tracepoint
7042 queries.
7043 (main): Initialize the tracepoints module.
7044 (process_serial_event): Handle traceframe reads/writes.
7045
7046 * linux-low.c (handle_tracepoints): New.
7047 (linux_wait_1): Call it.
7048 (linux_resume_one_lwp): Handle while-stepping.
7049 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7050 (linux_target_ops): Install them.
7051 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7052 New field.
7053 * linux-x86-low.c (x86_supports_tracepoints): New.
7054 (the_low_target). Install it.
7055
7056 * mem-break.h (delete_breakpoint): Declare.
7057 * mem-break.c (delete_breakpoint): Make external.
7058
7059 * target.h (struct target_ops): Add `supports_tracepoints',
7060 `read_pc', and `write_pc' fields.
7061 (target_supports_tracepoints): Define.
7062 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7063 (phex_nz): New.
7064
7065 * regcache.h (struct regcache) <registers_owned>: New field.
7066 (init_register_cache, regcache_cpy): Declare.
7067 (regcache_read_pc, regcache_write_pc): Declare.
7068 (register_cache_size): Declare.
7069 (supply_regblock): Declare.
7070 * regcache.c (init_register_cache): New.
7071 (new_register_cache): Use it.
7072 (regcache_cpy): New.
7073 (register_cache_size): New.
7074 (supply_regblock): New.
7075 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 7076
219f2f23
PA
7077 * tracepoint.c: New.
7078
7079 * Makefile.in (OBS): Add tracepoint.o.
7080 (tracepoint.o): New rule.
7081
3a13a53b
L
70822010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7083
7084 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7085 (i386-mmx.o): New.
7086 (i386-mmx.c): Likewise.
7087 (i386-mmx-linux.o): Likewise.
7088 (i386-mmx-linux.c): Likewise.
7089
7090 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7091 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7092 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7093 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7094
7095 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7096 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7097 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7098
1570b33e
L
70992010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7100
7101 * Makefile.in (clean): Updated.
7102 (i386-avx.o): New.
7103 (i386-avx.c): Likewise.
7104 (i386-avx-linux.o): Likewise.
7105 (i386-avx-linux.c): Likewise.
7106 (amd64-avx.o): Likewise.
7107 (amd64-avx.c): Likewise.
7108 (amd64-avx-linux.o): Likewise.
7109 (amd64-avx-linux.c): Likewise.
7110
7111 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7112 (srv_i386_linux_regobj): Add i386-avx-linux.o.
7113 (srv_amd64_regobj): Add amd64-avx.o.
7114 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
7115 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
7116 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
7117 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
7118 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
7119 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
7120 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
7121
7122 * i387-fp.c: Include "i386-xstate.h".
7123 (i387_xsave): New.
7124 (i387_cache_to_xsave): Likewise.
7125 (i387_xsave_to_cache): Likewise.
7126 (x86_xcr0): Likewise.
7127
7128 * i387-fp.h (i387_cache_to_xsave): Likewise.
7129 (i387_xsave_to_cache): Likewise.
7130 (x86_xcr0): Likewise.
7131
7132 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7133 * linux-crisv32-low.c (target_regsets): Likewise.
7134 * linux-m68k-low.c (target_regsets): Likewise.
7135 * linux-mips-low.c (target_regsets): Likewise.
7136 * linux-ppc-low.c (target_regsets): Likewise.
7137 * linux-s390-low.c (target_regsets): Likewise.
7138 * linux-sh-low.c (target_regsets): Likewise.
7139 * linux-sparc-low.c (target_regsets): Likewise.
7140 * linux-xtensa-low.c (target_regsets): Likewise.
7141
7142 * linux-low.c: Include <sys/uio.h>.
7143 (regsets_fetch_inferior_registers): Support nt_type.
7144 (regsets_store_inferior_registers): Likewise.
7145 (linux_process_qsupported): New.
7146 (linux_target_ops): Add linux_process_qsupported.
7147
7148 * linux-low.h (regset_info): Add nt_type.
7149 (linux_target_ops): Add process_qsupported.
7150
7151 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7152 and <sys/uio.h>.
7153 (init_registers_i386_avx_linux): New.
7154 (init_registers_amd64_avx_linux): Likewise.
7155 (xmltarget_i386_linux_no_xml): Likewise.
7156 (xmltarget_amd64_linux_no_xml): Likewise.
7157 (PTRACE_GETREGSET): Likewise.
7158 (PTRACE_SETREGSET): Likewise.
7159 (x86_fill_xstateregset): Likewise.
7160 (x86_store_xstateregset): Likewise.
7161 (use_xml): Likewise.
7162 (x86_linux_update_xmltarget): Likewise.
7163 (x86_linux_process_qsupported): Likewise.
7164 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7165 (x86_arch_setup): Don't call init_registers_amd64_linux nor
7166 init_registers_i386_linux here. Call
7167 x86_linux_update_xmltarget.
7168 (the_low_target): Add x86_linux_process_qsupported.
7169
7170 * server.c (handle_query): Call target_process_qsupported.
7171
7172 * target.h (target_ops): Add process_qsupported.
7173 (target_process_qsupported): New.
7174
fc7238bb
PA
71752010-04-03 Pedro Alves <pedro@codesourcery.com>
7176
7177 * inferiors.c (add_thread): Set last_status kind to
7178 TARGET_WAITKIND_IGNORE.
7179 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7180 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
7181 (linux_wait_1): Move `thread' local definition to block that uses
7182 it. Don't NULL initialize `event_child'.
7183 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7184 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7185 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7186
bdabb078
PA
71872010-04-01 Pedro Alves <pedro@codesourcery.com>
7188
7189 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7190 an extended waitstatus, or by a watchpoint.
7191 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7192 thread was stepping or has been stopped by a watchpoint.
7193
d3bbe7a0
PA
71942010-04-01 Pedro Alves <pedro@codesourcery.com>
7195
7196 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7197 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7198 of another, then delete the previous, and validate all
7199 breakpoints.
7200 (validate_inserted_breakpoint): New.
7201 (delete_disabled_breakpoints): New.
7202 (validate_breakpoints): New.
7203 (check_mem_read): Validate breakpoints before trusting their
7204 shadow. Delete disabled breakpoints.
7205 (check_mem_write): Validate breakpoints before trusting they
7206 should be inserted. Delete disabled breakpoints.
7207 * mem-break.h (validate_breakpoints):
7208 * server.c (handle_query): Validate breakpoints when we see a
7209 qSymbol query.
7210
8b07ae33
PA
72112010-04-01 Pedro Alves <pedro@codesourcery.com>
7212
7213 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7214 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
7215 if we could tell there's a GDB breakpoint at stop_pc.
7216 (need_step_over_p): Don't do a step over if we find a GDB
7217 breakpoint at the resume PC.
7218
7219 * mem-break.c (struct raw_breakpoint): New.
7220 (enum bkpt_type): New type `gdb_breakpoint'.
7221 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7222 fields. New field `raw'.
7223 (find_raw_breakpoint_at): New.
7224 (set_raw_breakpoint_at): Handle refcounting. Create a raw
7225 breakpoint instead.
7226 (set_breakpoint_at): Adjust.
7227 (delete_raw_breakpoint): New.
7228 (release_breakpoint): New.
7229 (delete_breakpoint): Rename to...
7230 (delete_breakpoint_1): ... this. Add proc parameter. Use
7231 release_breakpoint. Return ENOENT.
7232 (delete_breakpoint): Reimplement.
7233 (find_breakpoint_at): Delete.
7234 (find_gdb_breakpoint_at): New.
7235 (delete_breakpoint_at): Delete.
7236 (set_gdb_breakpoint_at): New.
7237 (delete_gdb_breakpoint_at): New.
7238 (gdb_breakpoint_here): New.
7239 (set_reinsert_breakpoint): Use release_breakpoint.
7240 (uninsert_breakpoint): Rename to ...
7241 (uninsert_raw_breakpoint): ... this.
7242 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7243 (reinsert_raw_breakpoint): Change parameter type to
7244 raw_breakpoint.
7245 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7246 instead.
7247 (check_breakpoints): Adjust. Use release_breakpoint.
7248 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7249 (breakpoint_inserted_here): Ditto.
7250 (check_mem_read): Adjust to iterate over raw breakpoints instead.
7251 Don't trust the breakpoint's shadow if it is not inserted.
7252 (check_mem_write): Adjust to iterate over raw breakpoints instead.
7253 (delete_all_breakpoints): Adjust.
7254 (free_all_breakpoints): Mark all breakpoints as uninserted, and
7255 use delete_breakpoint_1.
7256
7257 * mem-break.h (breakpoints_supported): Delete declaration.
7258 (set_gdb_breakpoint_at): Declare.
7259 (gdb_breakpoint_here): Declare.
7260 (delete_breakpoint_at): Delete.
7261 (delete_gdb_breakpoint_at): Declare.
7262
7263 * server.h (struct raw_breakpoint): Forward declare.
7264 (struct process_info): New field `raw_breakpoints'.
7265
7266 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7267 breakpoints.
7268
6bf5e0ba
PA
72692010-03-24 Pedro Alves <pedro@codesourcery.com>
7270
7271 * linux-low.c (status_pending_p_callback): Fix comment.
7272 (linux_wait_for_event_1): Move most of the internal breakpoint
7273 handling from here...
7274 (linux_wait_1): ... to here.
7275 (count_events_callback): New.
7276 (select_singlestep_lwp_callback): New.
7277 (select_event_lwp_callback): New.
7278 (cancel_breakpoints_callback): New.
7279 (select_event_lwp): New.
7280 (linux_wait_1): Simplify internal breakpoint handling. Give equal
7281 priority to all LWPs that have had events that should be reported
7282 to the client. Cancel breakpoints when about to reporting the
7283 event to the client, not while stopping lwps. No longer cancel
7284 finished single-steps here.
7285 (cancel_finished_single_step): Delete.
7286 (cancel_finished_single_steps): Delete.
7287
414a389f
PA
72882010-03-24 Pedro Alves <pedro@codesourcery.com>
7289
7290 * mem-break.c (enum bkpt_type): New.
7291 (struct breakpoint): New field `type'.
7292 (set_breakpoint_at): Change return type to struct breakpoint
7293 pointer. Set type to `other_breakpoint' by default.
7294 (delete_breakpoint): Rewrite, supporting more than one breakpoint
7295 in the breakpoint list.
7296 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7297 (reinsert_breakpoint): Rename to ...
7298 (reinsert_raw_breakpoint): ... this.
7299 (reinsert_breakpoints_at): Adjust.
7300 * mem-break.h (struct breakpoint): Declare.
7301 (set_breakpoint_at): Change return type to struct breakpoint
7302 pointer.
7303
2280c721
PA
73042010-03-24 Pedro Alves <pedro@codesourcery.com>
7305
7306 * server.c (handle_query): Assign, not compare.
7307
d50171e4
PA
73082010-03-24 Pedro Alves <pedro@codesourcery.com>
7309
7310 Teach linux gdbserver to step-over-breakpoints.
7311
7312 * linux-low.c (can_hardware_single_step): New.
7313 (supports_breakpoints): New.
7314 (handle_extended_wait): If stopping threads, read the stop pc of
7315 the new cloned LWP.
7316 (get_pc): New.
7317 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
7318 low target doesn't support retrieving the PC.
7319 (add_lwp): Set last_resume_kind to resume_continue.
7320 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
7321 (linux_attach): Don't clear stop_expected. Set the lwp's
7322 last_resume_kind to resume_stop.
7323 (linux_detach_one_lwp): Don't check for removed breakpoints.
7324 (check_removed_breakpoint): Delete.
7325 (status_pending_p): Rename to ...
7326 (status_pending_p_callback): ... this. Don't check for removed
7327 breakpoints. Don't consider threads that are stopped from GDB's
7328 perspective.
7329 (linux_wait_for_lwp): Always read the stop_pc here.
7330 (cancel_breakpoint): New.
7331 (step_over_bkpt): New global.
7332 (linux_wait_for_event_1): Implement stepping over breakpoints.
7333 (gdb_wants_lwp_stopped): New.
7334 (gdb_wants_all_stopped): New.
7335 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
7336 single-step traps here. Store the thread's last reported target
7337 wait status.
7338 (send_sigstop): Don't clear stop_expected. Always set it,
7339 instead.
7340 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7341 (cancel_finished_single_step): New.
7342 (cancel_finished_single_steps): New.
7343 (wait_for_sigstop): Don't cancel finished single-step traps here.
7344 (linux_resume_one_lwp): Don't check for removed breakpoints.
7345 Don't set `step' on non-hardware step archs.
7346 (linux_set_resume_request): Ignore resume_stop requests if already
7347 stopping or stopped. Set the lwp's last_resume_kind.
7348 (resume_status_pending_p): Don't check for removed breakpoints.
7349 (need_step_over_p): New.
7350 (start_step_over): New.
7351 (finish_step_over): New.
7352 (linux_resume_one_thread): Always queue a sigstop for resume_stop
7353 requests. Clear the thread's last reported target waitstatus.
7354 Don't use the `suspended' flag. Don't consider pending breakpoints.
7355 (linux_resume): Start a step-over if necessary.
7356 (proceed_one_lwp): New.
7357 (proceed_all_lwps): New.
7358 (unstop_all_lwps): New.
7359 * linux-low.h (struct lwp_info): Rewrite comment for the
7360 `suspended' flag. Add the `stop_pc' field. Delete the
7361 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
7362 Add `'last_resume_kind' and `need_step_over' fields.
7363 * inferiors.c (struct thread_info): Delete, moved elsewhere.
7364 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7365 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
7366 (set_raw_breakpoint_at): New.
7367 (set_breakpoint_at): Rewrite to use it.
7368 (reinsert_breakpoint_handler): Delete.
7369 (set_reinsert_breakpoint): New.
7370 (reinsert_breakpoint_by_bp): Delete.
7371 (delete_reinsert_breakpoints): New.
7372 (uninsert_breakpoint): Rewrite.
7373 (uninsert_breakpoints_at): New.
7374 (reinsert_breakpoint): Rewrite.
7375 (reinsert_breakpoints_at): New.
7376 (check_breakpoints): Rewrite.
7377 (breakpoint_here): New.
7378 (breakpoint_inserted_here): New.
7379 (check_mem_read): Adjust.
7380 * mem-break.h (breakpoints_supported, breakpoint_here)
7381 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7382 (reinsert_breakpoint_by_bp): Delete declaration.
7383 (delete_reinsert_breakpoints): Declare.
7384 (reinsert_breakpoint): Delete declaration.
7385 (reinsert_breakpoints_at): Declare.
7386 (uninsert_breakpoint): Delete declaration.
7387 (uninsert_breakpoints_at): Declare.
7388 (check_breakpoints): Adjust prototype.
7389 * server.h: Adjust include order.
7390 (struct thread_info): Declare here. Add a `last_status' field.
7391
30ba68cb
MS
73922010-03-23 Michael Snyder <msnyder@vmware.com>
7393
7394 * server.c (crc32): New function.
7395 (handle_query): Add handling for 'qCRC:' request.
7396
b9a881c2
PA
73972010-03-23 Pedro Alves <pedro@codesourcery.com>
7398
7399 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7400 lwp had been stopped by a watchpoint.
7401
e92d13d5
PA
74022010-03-16 Pedro Alves <pedro@codesourcery.com>
7403
7404 * server.h (internal_error): Declare.
7405 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7406 * utils.c (internal_error): New function.
7407
64daa791
AS
74082010-03-15 Andreas Schwab <schwab@redhat.com>
7409
7410 * configure.srv: Fix typo setting srv_regobj.
7411
f52cd8cd
PA
74122010-03-15 Pedro Alves <pedro@codesourcery.com>
7413
7414 * linux-low.c (fetch_register): Avoid passing a non string literal
7415 format to `error'.
7416 (usr_store_inferior_registers): Ditto.
7417
93ae6fdc
PA
74182010-03-14 Pedro Alves <pedro@codesourcery.com>
7419
7420 * linux-low.c (linux_write_memory): Bail out early if peeking
7421 memory failed.
7422
c3adc08c
PA
74232010-03-14 Pedro Alves <pedro@codesourcery.com>
7424
7425 * linux-low.h (struct lwp_info): New fields
7426 `stopped_by_watchpoint' and `stopped_data_address'.
7427 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7428 here, and cache them in the lwp object.
7429 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7430 directly.
7431 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7432 field.
7433 (linux_stopped_by_watchpoint): Rewrite.
7434 (linux_stopped_data_address): Rewrite.
7435
bce522a2
PA
74362010-03-06 Simo Melenius <simo.melenius@iki.fi>
7437
7438 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7439 switching the current inferior, not before.
7440
90884b2b
L
74412010-03-01 H.J. Lu <hongjiu.lu@intel.com>
7442
7443 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7444 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7445 i386-linux.c and amd64-linux.c.
7446 (reg-i386.o): Removed.
7447 (reg-i386.c): Likewise.
7448 (reg-i386-linux.o): Likewise.
7449 (reg-i386-linux.c): Likewise.
7450 (reg-x86-64.o): Likewise.
7451 (reg-x86-64.c): Likewise.
7452 (reg-x86-64-linux.o): Likewise.
7453 (reg-x86-64-linux.c): Likewise.
7454 (i386.o): New.
7455 (i386.c): Likewise.
7456 (i386-linux.o): Likewise.
7457 (i386-linux.c): Likewise.
7458 (amd64.o): Likewise.
7459 (amd64.c): Likewise.
7460 (amd64-linux.o): Likewise.
7461 (amd64-linux.c): Likewise.
7462
7463 * configure.srv (srv_i386_regobj): New.
7464 (srv_i386_linux_regobj): Likewise.
7465 (srv_amd64_regobj): Likewise.
7466 (srv_amd64_linux_regobj): Likewise.
7467 (srv_i386_32bit_xmlfiles): Likewise.
7468 (srv_i386_64bit_xmlfiles): Likewise.
7469 (srv_i386_xmlfiles): Likewise.
7470 (srv_amd64_xmlfiles): Likewise.
7471 (srv_i386_linux_xmlfiles): Likewise.
7472 (srv_amd64_linux_xmlfiles): Likewise.
7473 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
7474 srv_xmlfiles to $srv_i386_xmlfiles.
7475 (i[34567]86-*-mingw32ce*): Likewise.
7476 (i[34567]86-*-mingw*): Likewise.
7477 (i[34567]86-*-nto*): Likewise.
7478 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7479 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
7480 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7481 (x86_64-*-linux*): Likewise.
7482
7483 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7484 (init_registers_amd64_linux): New.
7485 (x86_arch_setup): Replace init_registers_x86_64_linux with
7486 init_registers_amd64_linux.
7487
193f13e6
MK
74882010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
7489
7490 * configure.ac: Check for libdl. If it is not available link against
7491 static libthread_db.
7492 * configure: Regenerate.
7493
85d721b8
PA
74942010-02-22 Pedro Alves <pedro@codesourcery.com>
7495
7496 PR9605
7497
7498 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7499 handing a read watchpoint.
7500 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7501
6076632b
DE
75022010-02-12 Doug Evans <dje@google.com>
7503
7504 * linux-low.c (linux_supports_tracefork_flag): Document.
7505 (linux_look_up_symbols): Add comment.
7506
3327ccf7
L
75072010-02-03 H.J. Lu <hongjiu.lu@intel.com>
7508
7509 * regcache.c (supply_register): Clear regcache if buf is NULL.
7510
0718675c 75112010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 7512 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
7513
7514 * inferiors.c (find_inferior): Add function documentation.
7515 (unloaded_dll): Handle the case where the unloaded dll has not
7516 been previously registered in the dll list.
7517
177321bd
DJ
75182010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
7519
7520 * linux-arm-low.c (thumb_breakpoint_len): Delete.
7521 (thumb2_breakpoint): New.
7522 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7523
2b009048
DJ
75242010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
7525
7526 * linux-low.c (get_stop_pc): Check for SIGTRAP.
7527 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7528 breakpoints.
7529
3be029c7
PA
75302010-01-21 Pedro Alves <pedro@codesourcery.com>
7531
7532 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7533
18f5de3b
JK
75342010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7535
7536 * linux-s390-low.c (s390_collect_ptrace_register)
7537 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7538
3743bb4f
DE
75392010-01-21 Doug Evans <dje@google.com>
7540
14ce3065
DE
7541 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7542 (PTRACE_ARG4_TYPE): New macro.
7543 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7544 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7545 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7546 (usr_store_inferior_registers): Ditto.
7547 (linux_read_memory, linux_write_memory): Ditto.
7548 (linux_test_for_tracefork): Ditto.
7549
3743bb4f
DE
7550 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7551 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7552
8b315be5
PA
75532010-01-21 Pedro Alves <pedro@codesourcery.com>
7554
7555 * proc-service.c (ps_lgetregs): Don't refetch registers from the
7556 target.
7557
85492558
PA
75582010-01-21 Pedro Alves <pedro@codesourcery.com>
7559
7560 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7561 prototype to take a regcache. Adjust.
7562
442ea881
PA
75632010-01-20 Pedro Alves <pedro@codesourcery.com>
7564
7565 * regcache.h (struct thread_info): Forward declare.
7566 (struct regcache): New.
7567 (new_register_cache): Adjust prototype.
7568 (get_thread_regcache): Declare.
7569 (free_register_cache): Adjust prototype.
7570 (registers_to_string, registers_from_string): Ditto.
7571 (supply_register, supply_register_by_name, collect_register)
7572 (collect_register_as_string, collect_register_by_name): Ditto.
7573 * regcache.c (struct inferior_regcache_data): Delete.
7574 (get_regcache): Rename to ...
7575 (get_thread_regcache): ... this. Adjust. Switch inferior before
7576 fetching registers.
7577 (regcache_invalidate_one): Adjust.
7578 (regcache_invalidate): Fix prototype.
7579 (new_register_cache): Return the new register cache.
7580 (free_register_cache): Change prototype.
7581 (realloc_register_cache): Adjust.
7582 (registers_to_string): Change prototype to take a regcache. Adjust.
7583 (registers_from_string): Ditto.
7584 (register_data): Ditto.
7585 (supply_register): Ditto.
7586 (supply_register_by_name): Ditto.
7587 (collect_register): Ditto.
7588 (collect_register_as_string): Ditto.
7589 (collect_register_by_name): Ditto.
7590 * server.c (process_serial_event): Adjust.
7591 * linux-low.h (regset_fill_func, regset_store_func): Change
7592 prototype.
7593 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7594 Change prototype.
7595 * linux-low.c (get_stop_pc): Adjust.
7596 (check_removed_breakpoint): Adjust.
7597 (linux_wait_for_event): Adjust.
7598 (linux_resume_one_lwp): Adjust.
7599 (fetch_register): Add regcache parameter. Adjust.
7600 (usr_store_inferior_registers): Ditto.
7601 (regsets_fetch_inferior_registers): Ditto.
7602 (regsets_store_inferior_registers): Ditto.
7603 (linux_fetch_registers, linux_store_registers): Ditto.
7604 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7605 regcache. Adjust.
43aaf8b6
PA
7606 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7607 Ditto.
442ea881
PA
7608 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7609 prototype to take a regcache.
7610 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7611 * remote-utils.c (convert_ascii_to_int, outreg)
7612 (prepare_resume_reply): Change prototype to take a regcache.
7613 Adjust.
7614 * target.h (struct target_ops) <fetch_registers, store_registers>:
7615 Change prototype to take a regcache.
7616 (fetch_inferior_registers, store_inferior_registers): Change
7617 prototype to take a regcache. Adjust.
7618 * proc-service.c (ps_lgetregs): Adjust.
7619 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7620 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7621 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7622 take a regcache. Adjust.
7623 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7624 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7625 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7626 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
7627 * linux-cris-low.c (cris_get_pc, cris_set_pc)
7628 (cris_cannot_fetch_register):
7629 (cris_breakpoint_at): Change prototype to take a regcache.
7630 Adjust.
7631 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7632 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7633 to take a regcache. Adjust.
7634 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7635 Adjust.
7636 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7637 take a regcache. Adjust.
7638 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7639 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7640 (m68k_set_pc): Change prototype to take a regcache. Adjust.
7641 * linux-mips-low.c (mips_get_pc):
7642 (mips_set_pc): Change prototype to take a regcache. Adjust.
7643 (mips_reinsert_addr): Adjust.
7644 (mips_collect_register): Change prototype to take a regcache.
7645 Adjust.
7646 (mips_supply_register):
7647 (mips_collect_register_32bit, mips_supply_register_32bit)
7648 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7649 (mips_store_fpregset): Ditto.
43aaf8b6
PA
7650 * linux-ppc-low.c (ppc_supply_ptrace_register)
7651 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
7652 (parse_spufs_run): Adjust.
7653 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7654 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7655 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7656 take a regcache. Adjust.
7657 * linux-s390-low.c (s390_collect_ptrace_register)
7658 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7659 (s390_set_pc): Change prototype to take a regcache. Adjust.
7660 (s390_arch_setup): Adjust.
7661 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7662 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
7663 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7664 (sparc_fill_gregset, sparc_store_gregset_from_stack)
7665 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7666 regcache. Adjust.
7667 (sparc_breakpoint_at): Adjust.
7668 * linux-xtensa-low.c (xtensa_fill_gregset):
7669 (xtensa_store_gregset):
7670 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7671 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
7672 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7673 prototype to take a regcache. Adjust.
7674 * win32-arm-low.c (arm_fetch_inferior_register)
7675 (arm_store_inferior_register): Change prototype to take a
7676 regcache. Adjust.
7677 * win32-i386-low.c (i386_fetch_inferior_register)
7678 (i386_store_inferior_register): Change prototype to take a
7679 regcache. Adjust.
7680 * win32-low.c (child_fetch_inferior_registers)
7681 (child_store_inferior_registers): Change prototype to take a
7682 regcache. Adjust.
7683 (win32_wait): Adjust.
7684 (win32_fetch_inferior_registers): Change prototype to take a
7685 regcache. Adjust.
7686 (win32_store_inferior_registers): Adjust.
7687 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7688 store_inferior_register>: Change prototype to take a regcache.
7689
60c3d7b0
DE
76902010-01-20 Doug Evans <dje@google.com>
7691
7692 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7693 #ifdef.
7694 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 7695 (W_STOPCODE): Provide definition if missing.
60c3d7b0 7696
dc146f7c
VP
76972010-01-13 Vladimir Prus <vladimir@codesourcery.com>
7698
7699 * linux-low.c (linux_core_of_thread): New.
7700 (compare_ints, show_process, list_threads): New.
7701 (linux_qxfer_osdata): Report threads and cores.
7702 (linux_target_op): Register linux_core_of_thread.
7703 * remote-utils.c (prepare_resume_reply): Report the core.
7704 (buffer_xml_printf): Support %d specifier.
7705 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7706 New.
7707 (handle_query): Handle qXfer:threads. Announce availability
7708 thereof.
7709 * target.h (struct target_ops): New field core_of_thread.
7710
7803799a
UW
77112010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
7712
7713 * Makefile.in (clean): Remove new generated files.
7714 (reg-s390.o, reg-s390.c): Remove rules.
7715 (reg-s390x.o, reg-s390x.c): Likewise.
7716 (s390-linux32.o, s390-linux32.c): Add rules.
7717 (s390-linux64.o, s390-linux64.c): Likewise.
7718 (s390x-linux64.o, s390x-linux64.c): Likewise.
7719 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7720 * linux-s390-low.c: Include <elf.h>.
7721 (HWCAP_S390_HIGH_GPRS): Define if undefined.
7722 (init_registers_s390): Remove prototype.
7723 (init_registers_s390x): Likewise.
7724 (init_registers_s390_linux32): Add prototype.
7725 (init_registers_s390_linux64): Likewise.
7726 (init_registers_s390x_linux64): Likewise.
7727 (s390_num_regs_3264): New define.
7728 (s390_regmap_3264): New global variable.
7729 (s390_cannot_fetch_register): Remove obsolete check.
7730 (s390_cannot_store_register): Likewise.
7731 (s390_collect_ptrace_register): Handle upper/lower register halves.
7732 (s390_supply_ptrace_register): Likewise.
7733 (s390_fill_gregset): Update to register number changes.
7734 (s390_get_hwcap): New routine.
7735 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7736 Install appropriate regmap and register set.
7737
6e7ffa39
JB
77382010-01-01 Joel Brobecker <brobecker@adacore.com>
7739
7740 * server.c (gdbserver_version): Update copyright year to 2010.
7741 * gdbreplay.c (gdbreplay_version): Likewise.
7742
957f3f49
DE
77432009-12-28 Doug Evans <dje@google.com>
7744
7745 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7746 elf/external.h. Include <elf.h> instead but only if necessary.
7747
ca5c370d
PA
77482009-12-28 Pedro Alves <pedro@codesourcery.com>
7749
7750 * linux-low.c (linux_remove_process): Remove `detaching'
7751 parameter. Don't release/detach from thread_db here.
7752 (linux_kill): Release/detach from thread_db here, ...
7753 (linux_detach): ... and here, before actually detaching.
7754 (linux_wait_1): ... and here, when a process exits.
7755 * thread-db.c (any_thread_of): New.
7756 (thread_db_free): Switch the current inferior to a thread of the
7757 passed in process.
7758
4ee62156
DE
77592009-12-21 Doug Evans <dje@google.com>
7760
d90e6a88
DE
7761 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7762
c5f62d5f
DE
7763 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7764 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7765 warning ifndef __NR_tkill. Move setting of errno there too.
7766 Delete unnecessary resetting of errno after syscall.
7767 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7768
10e86dd7
DE
7769 * configure.ac: Check for dladdr.
7770 * config.in: Regenerate.
7771 * configure: Regenerate.
7772 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7773 (try_thread_db_load): Update.
7774
4ee62156
DE
7775 * linux-low.c (my_waitpid): Delete unnecessary prototype.
7776
00f515da
DE
77772009-12-18 Doug Evans <dje@google.com>
7778
e9464885
DE
7779 * event-loop.c: Include unistd.h if it exists.
7780
07d4f67e
DE
7781 * linux-low.c (my_waitpid): Move definition away from being in
7782 between linux_tracefork_child/linux_test_for_tracefork.
7783
00f515da
DE
7784 * gdb_proc_service.h (psaddr_t): Fix type.
7785 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7786 signature to match glibc.
7787
1de1badb
DE
77882009-12-16 Doug Evans <dje@google.com>
7789
7790 * linux-low.c (linux_read_memory): Fix argument to read.
7791
aeeb81d1
PA
77922009-11-26 Pedro Alves <pedro@codesourcery.com>
7793
7794 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7795 events, don't leave current_inferior pointing at null.
7796
10357975
PA
77972009-11-26 Pedro Alves <pedro@codesourcery.com>
7798
7799 * win32-low.c (LOG): Delete.
7800 (OUTMSG): Output to stderr.
7801 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7802 on compile time LOG macro.
7803 (win32_wait): Fix debug output.
7804
cf6e3471
PA
78052009-11-26 Pedro Alves <pedro@codesourcery.com>
7806
7807 * win32-low.c (win32_add_one_solib): If the dll name is
7808 "ntdll.dll", prepend the system directory to the dll path.
7809
0c85e18e
MK
78102009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
7811
7812 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7813
9ac544ce 78142009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 7815 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
7816
7817 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7818 * configure.ac: Check for __mcoldfire__ and set
7819 gdb_cv_m68k_is_coldfire.
7820 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7821 reg-cf.o and reg-m68k.o.
7822 * configure: Regenerated.
7823
fd7dd3e6
PA
78242009-11-16 Pedro Alves <pedro@codesourcery.com>
7825
7826 * linux-low.c (linux_remove_process): Add `detaching' parameter.
7827 Pass it to thread_db_free.
7828 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7829 proper `detaching' argument to linux_remove_process.
7830 * linux-low.h (thread_db_free): Add `detaching' parameter.
7831 * thread-db.c (thread_db_init): Pass false as `detaching' argument
7832 to thread_db_free.
7833 (thread_db_free): Add `detaching' parameter. Only
7834 call td_ta_clear_event if detaching from process.
7835
75aa492e
MK
78362009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
7837
7838 * thread-db.c (thread_db_free): Fix typo.
7839
21e1bee4
PP
78402009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
7841
7842 PR gdb/10838
7843 * thread-db.c (thread_db_free): Call td_ta_clear_event.
7844
8838b45e
NS
78452009-11-03 Nathan Sidwell <nathan@codesourcery.com>
7846
7847 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7848 with an i686 compiler.
7849 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7850 needed.
7851 * configure: Rebuilt.
7852
8a35fb51
SL
78532009-10-29 Sandra Loosemore <sandra@codesourcery.com>
7854
7855 PR gdb/10783
7856
7857 * server.c (handle_search_memory_1): Correct read_addr initialization
7858 in loop for searching subsequent chunks.
7859
96f15937
PP
78602009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
7861
7862 * configure.ac: New --with-libthread-db option.
7863 * thread-db.c: Allow direct dependence on libthread_db.
7864 (thread_db_free): Adjust.
7865 * config.in: Regenerate.
7866 * configure: Likewise.
889bf7c5 7867
5f7d1694
PP
78682009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
7869
7870 PR gdb/10757
7871 * thread-db.c (attach_thread): New function.
7872 (maybe_attach_thread): Return success/failure.
7873 (find_new_threads_callback): Adjust.
889bf7c5
PA
7874 (thread_db_find_new_threads): Loop until no new threads.
7875
88e3b899
PA
78762009-10-13 Pedro Alves <pedro@codesourcery.com>
7877
7878 * proc-service.c (ps_lgetregs): Formatting.
7879
cdbfd419
PP
78802009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
7881
7882 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7883 * configure.ac: Adjust.
7884 * linux-low.h (struct process_info_private): Move members to struct
7885 thread_db.
7886 (thread_db_free, thread_db_handle_monitor_command): New prototype.
7887 * linux-low.c (linux_remove_process): Adjust.
7888 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7889 * server.c (handle_query): Move code ...
7890 (handle_monitor_command): ... here. New function.
7891 * target.h (struct target_ops): New member.
7892 * thread-db.c (struct thread_db): New.
7893 (libthread_db_search_path): New variable.
7894 (thread_db_create_event, thread_db_enable_reporting)
7895 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7896 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7897 (try_thread_db_load_1, dladdr_to_soname): New functions.
7898 (try_thread_db_load, thread_db_load_search): New functions.
7899 (thread_db_init): Search for libthread_db.
7900 (thread_db_free): New function.
7901 (thread_db_handle_monitor_command): Likewise.
7902 * config.in: Regenerate.
7903 * configure: Regenerate.
889bf7c5 7904
4168d2d6
UW
79052009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
7906
7907 * spu-low.c (spu_kill): Wait for inferior to terminate.
7908 Call clear_inferiors.
7909 (spu_detach): Call clear_inferiors.
7910
81ecdfbb
RW
79112009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7912
7913 * aclocal.m4: Regenerate.
7914 * config.in: Likewise.
7915 * configure: Likewise.
7916
0b9ff2c0
UW
79172009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7918
7919 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7920 (parse_spufs_run): New function.
7921 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7922 (ppc_breakpoint_at): Handle SPU breakpoints.
7923
efcbbd14
UW
79242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7925
7926 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7927 (SPUFS_MAGIC): Define.
7928 (spu_enumerate_spu_ids): New function.
7929 (linux_qxfer_spu): New function.
7930 (linux_target_ops): Install linux_qxfer_spu.
7931
f4d9bade
UW
79322009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
7933
7934 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7935 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
7936 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7937 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7938 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7939 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7940 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7941 (init_registers_powerpc_cell32l): Add prototype.
7942 (init_registers_powerpc_cell64l): Likewise.
7943 (ppc_arch_setup): Detect Cell/B.E. architecture.
7944
96e946ca
RW
79452009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7946
7947 * Makefile.in (datarootdir): New variable.
7948
58d6951d
DJ
79492009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7950
7951 * linux-low.c (linux_write_memory): Update debugging output.
7952 * Makefile.in (clean): Add new descriptions.
7953 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7954 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7955 * configure.srv: Add new files for arm*-*-linux*.
7956 * linux-arm-low.c: Add new declarations.
7957 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7958 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7959 (HWCAP_VFPv3D16): New.
7960 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7961 instead of __IWMMXT__.
7962 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7963 (arm_arch_setup): New.
7964 (target_regsets): Remove #ifdef. Add VFP regset.
7965 (the_low_target): Use arm_arch_setup.
7966
12b42a12
DJ
79672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
7968
7969 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7970 the main thread again.
7971
ac8c974e
AR
79722009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
7973
7974 Adding Neutrino gdbserver.
7975 * configure: Regenerated.
7976 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7977 * configure.srv (i[34567]86-*-nto*): New target.
7978 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7979 * remote-utils.c [__QNX__]: Include sys/iomgr.h
7980 (nto_comctrl) [__QNX__]: New function.
7981 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7982
4424e0c3 79832009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
7984
7985 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7986 srv_tgtobj.
7987
912cf4ba
PA
79882009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
7989 Pedro Alves <pedro@codesourcery.com>
7990
7991 * win32-i386-low.c (i386_get_thread_context): Handle systems that
7992 don't support CONTEXT_EXTENDED_REGISTERS.
7993 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7994 (the_low_target): Install them.
7995 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7996 failing with ERROR_PIPE_NOT_CONNECTED.
7997
aa5ca48f
DE
79982009-06-30 Doug Evans <dje@google.com>
7999 Pierre Muller <muller@ics.u-strasbg.fr>
8000
8001 Add h/w watchpoint support to x86-linux, win32-i386.
8002 * Makefile.in (SFILES): Add i386-low.c
8003 (i386_low_h): Define.
8004 (i386-low.o): Add dependencies.
8005 (linux-x86-low.o): Add i386-low.h dependency.
8006 (win32-i386-low.o): Ditto.
8007 * i386-low.c: New file.
8008 * i386-low.h: New file.
8009 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8010 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8011 * linux-low.c (linux_add_process): Initialize arch_private.
8012 (linux_remove_process): Free arch_private.
8013 (add_lwp): Initialize arch_private.
8014 (delete_lwp): Free arch_private.
8015 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8016 provided.
8017 * linux-low.h (process_info_private): New member arch_private.
8018 (lwp_info): New member arch_private.
8019 (linux_target_ops): New members new_process, new_thread,
8020 prepare_to_resume.
8021 (ptid_of): New macro.
8022 * linux-x86-low.c: Include stddef.h, i386-low.h.
8023 (arch_process_info): New struct.
8024 (arch_lwp_info): New struct.
8025 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8026 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8027 (i386_dr_low_get_status): New function.
8028 (x86_insert_point, x86_remove_point): New functions.
8029 (x86_stopped_by_watchpoint): New function.
8030 (x86_stopped_data_address): New function.
8031 (x86_linux_new_process, x86_linux_new_thread): New functions.
8032 (x86_linux_prepare_to_resume): New function.
8033 (the_low_target): Add entries for insert_point, remove_point,
8034 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8035 prepare_to_resume.
8036 * server.c (debug_hw_points): New global.
8037 (monitor_show_help): Document set debug-hw-points.
8038 (handle_query): Process "set debug-hw-points".
8039 * server.h (debug_hw_points): Declare.
8040 (paddress): Declare.
8041 * utils.c (NUMCELLS, CELLSIZE): New macros.
8042 (get_sell, xsnprintf, paddress): New functions.
8043 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8044 remove_point, stopped_by_watchpoint, stopped_data_address.
8045 * win32-i386-low.c: Include i386-low.h.
8046 (debug_reg_state): Replaces dr.
8047 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8048 (i386_dr_low_get_status): New function.
8049 (i386_insert_point, i386_remove_point): New functions.
8050 (i386_stopped_by_watchpoint): New function.
8051 (i386_stopped_data_address): New function.
8052 (i386_initial_stuff): Update.
8053 (get_thread_context,set_thread_context,i386_thread_added): Update.
8054 (the_low_target): Add entries for insert_point,
8055 remove_point, stopped_by_watchpoint, stopped_data_address.
8056 * win32-low.c (win32_insert_watchpoint): New function.
8057 (win32_remove_watchpoint): New function.
8058 (win32_stopped_by_watchpoint): New function.
8059 (win32_stopped_data_address): New function.
8060 (win32_target_ops): Add entries for insert_watchpoint,
8061 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8062 * win32-low.h (win32_target_ops): New members insert_point,
8063 remove_point, stopped_by_watchpoint, stopped_data_address.
8064
d993e290
PA
80652009-06-25 Pedro Alves <pedro@codesourcery.com>
8066
8067 * server.c (process_serial_event): Re-return unsupported, not
8068 error, if the type isn't recognized. Re-allow supporting only
8069 insert or remove packets. Also call require_running for
8070 breakpoints. Add missing break statement to default case. Tidy.
8071 * target.h (struct target_ops): Rename insert_watchpoint to
8072 insert_point, and remove_watchpoint to remove_point.
8073
8074 * linux-low.h (struct linux_target_ops): Likewise.
8075 * linux-low.c (linux_insert_watchpoint): Rename to ...
8076 (linux_insert_point): ... this. Adjust.
8077 (linux_remove_watchpoint): Rename to ...
8078 (linux_remove_point): ... this. Adjust.
8079 (linux_target_ops): Adjust.
8080 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8081 (cris_insert_point): ... this.
8082 (cris_remove_watchpoint): Rename to ...
8083 (cris_remove_point): ... this.
8084 (the_low_target): Adjust.
8085
0f54c268
PM
80862009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8087
8088 * server.c (handle_v_kill): Pass signal_pid to
8089 kill_inferior if multi_process is zero.
8090
c6314022
AR
80912009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8092
8093 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8094 * target.h (target_ops): Comment for *_watchpoint to make it clear
8095 the functions can get types '0' and '1'.
8096
4463ce24
AR
80972009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8098
8099 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8100 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8101 * regcache.c (get_regcache): Likewise.
8102 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8103 * win32-low.c (child_fetch_inferior_registers): Remove check for
8104 regno 0.
8105
cf8fd78b
PA
81062009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8107 Pedro Alves <pedro@codesourcery.com>
8108
8109 * target.h (struct target_ops) <supports_multi_process>: New
8110 callback.
8111 (target_supports_multi_process): New.
8112 * server.c (handle_query): Even if GDB reports support, only
8113 enable multi-process if the target also supports it. Report
8114 multi-process support only if the target backend supports it.
8115 * linux-low.c (linux_supports_multi_process): New function.
8116 (linux_target_ops): Install it as target_supports_multi_process
8117 callback.
8118
47c0c975
DE
81192009-05-24 Doug Evans <dje@google.com>
8120
e09875d4
DE
8121 Global renaming of find_thread_pid to find_thread_ptid.
8122 * server.h (find_thread_ptid): Renamed from find_thread_pid.
8123 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8124 All callers updated.
8125
e27d73f6
DE
8126 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8127 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8128 directly.
8129
47c0c975
DE
8130 * linux-low.c (get_stop_pc): Print pc if debug_threads.
8131 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8132 (linux_resume_one_lwp): Ditto.
8133
2acc282a
DE
81342009-05-23 Doug Evans <dje@google.com>
8135
8136 * linux-low.c (linux_resume_one_lwp): Change type of first arg
8137 from struct inferior_list_entry * to struct lwp_info *.
8138 All callers updated.
8139
9f1036c1
DE
81402009-05-13 Doug Evans <dje@google.com>
8141
8142 * linux-x86-low.c: Don't include assert.h.
8143 (x86_siginfo_fixup): Use fatal, not assert.
8144 (x86_arch_setup): Fix comment.
8145
d0722149
DE
81462009-05-12 Doug Evans <dje@google.com>
8147
8148 Biarch support for i386/amd64 gdbserver.
8149 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8150 Add linux-x86-low.c.
8151 (linux-i386-low.o, linux-x86-64-low.o): Delete.
8152 (linux-x86-low.o): Add.
8153 * linux-x86-64-low.c: Delete.
8154 * linux-i386-low.c: Delete.
8155 * linux-x86-low.c: New file.
8156 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8157 linux-x86-low.o.
8158 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8159 linux-x86-low.o.
8160 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8161 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8162 (linux_child_pid_to_exec_file): New function.
8163 (elf_64_header_p, elf_64_file_p): New functions.
8164 (siginfo_fixup): New function.
8165 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
8166 give target a chance to convert layout.
8167 * linux-low.h (linux_target_ops): New member siginfo_fixup.
8168 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8169
fdeb2a12
DE
81702009-05-07 Doug Evans <dje@google.com>
8171
8172 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8173 (regsets_store_inferior_registers): Ditto.
8174
a6dbe5df
PA
81752009-05-06 Pedro Alves <pedro@codesourcery.com>
8176
8177 PR server/10048
8178
8179 * linux-low.c (must_set_ptrace_flags): Delete.
8180 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8181 of the global.
8182 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
8183 `lwp->must_set_ptrace_flags' instead.
ba42693b 8184 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
8185 (linux_wait_1): ... not here.
8186
5091eb23
DE
81872009-04-30 Doug Evans <dje@google.com>
8188
9f767825
DE
8189 * inferiors.c (started_inferior_callback): New function.
8190 (attached_inferior_callback): New function.
8191 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8192 * server.c (print_started_pid, print_attached_pid): New functions.
8193 (detach_or_kill_for_exit): New function.
8194 (main): Call it instead of for_each_inferior (kill_inferior_callback).
8195 * server.h (have_started_inferiors_p): Declare.
8196 (have_attached_inferiors_p): Declare.
8197
5091eb23
DE
8198 * inferiors.c (remove_process): Fix memory leak, free process.
8199 * linux-low.c (linux_remove_process): New function.
8200 (linux_kill): Call it instead of remove_process.
8201 (linux_detach, linux_wait_1): Ditto.
8202
155c8968
PA
82032009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
8204
8205 * configure.srv: Add x86 Windows CE target.
8206
7fe519cb
UW
82072009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8208
8209 * inferiors.c (get_thread_process): Make global.
8210 * server.h (get_thread_process): Add prototype.
8211 * thread-db.c (find_one_thread): Use get_thread_process
8212 instead of current_process.
8213 (thread_db_get_tls_address): Do not crash if called when
8214 thread layer is not yet initialized.
8215
5472f405
UW
82162009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
8217
8218 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8219 * spu-low.c (current_tid): Rename to ...
8220 (current_ptid): ... this.
8221 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8222 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8223 ptid_get_lwp (current_ptid) instead of current_tid.
8224 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8225 instead of current_tid. Use find_process_pid to verify pid
8226 argument is valid. Pass proper argument to remove_process.
8227 (spu_thread_alive): Compare current_ptid instead of current_tid.
8228 (spu_resume): Likewise.
8229
55ac2b99
PA
82302009-04-02 Pedro Alves <pedro@codesourcery.com>
8231
8232 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8233 variable.
8234
95954743
PA
82352009-04-01 Pedro Alves <pedro@codesourcery.com>
8236
8237 Implement the multiprocess extensions, and add linux multiprocess
8238 support.
8239
8240 * server.h (ULONGEST): Declare.
8241 (struct ptid, ptid_t): New.
8242 (minus_one_ptid, null_ptid): Declare.
8243 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8244 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8245 (struct inferior_list_entry): Change `id' type from unsigned from
8246 to ptid_t.
8247 (struct sym_cache, struct breakpoint, struct
8248 process_info_private): Forward declare.
8249 (struct process_info): Declare.
8250 (current_process): Declare.
8251 (all_processes): Declare.
8252 (initialize_inferiors): Declare.
8253 (add_thread): Adjust to use ptid_t.
8254 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8255 (add_process, remove_process, find_thread_pid): Declare.
8256 (find_inferior_id): Adjust to use ptid_t.
8257 (cont_thread, general_thread, step_thread): Change type to ptid_t.
8258 (multi_process): Declare.
8259 (push_event): Adjust to use ptid_t.
8260 (read_ptid, write_ptid): Declare.
8261 (prepare_resume_reply): Adjust to use ptid_t.
8262 (clear_symbol_cache): Declare.
8263 * inferiors.c (all_processes): New.
8264 (null_ptid, minus_one_ptid): New.
8265 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8266 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8267 (add_thread): Change unsigned long to ptid. Remove gdb_id
8268 parameter. Adjust.
8269 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8270 (gdb_id_to_thread): Rename to ...
8271 (find_thread_pid): ... this. Change unsigned long to ptid.
8272 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8273 (loaded_dll, pull_pid_from_list): Adjust.
8274 (add_process, remove_process, find_process_pid)
8275 (get_thread_process, current_process, initialize_inferiors): New.
8276 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8277 (struct target_waitstatus) <related_pid>: Ditto.
8278 (struct target_ops) <kill, detach>: Add `pid' argument. Change
8279 return type to int.
8280 (struct target_ops) <join>: Add `pid' argument.
8281 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8282 (struct target_ops) <wait>: Add `ptid' field. Change return type
8283 to ptid.
8284 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8285 (mywait): Add `ptid' argument. Change return type to ptid_t.
8286 (target_pid_to_str): Declare.
8287 * target.c (set_desired_inferior): Adjust to use ptids.
8288 (mywait): Add new `ptid' argument. Adjust.
8289 (target_pid_to_str): New.
8290 * mem-break.h (free_all_breakpoints): Declare.
8291 * mem-break.c (breakpoints): Delelete.
8292 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8293 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8294 to use per-process breakpoint list.
8295 (free_all_breakpoints): New.
8296 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8297 (symbol_cache, all_symbols_looked_up): Delete.
8298 (hexchars): New.
8299 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8300 read_ptid): New.
8301 (prepare_resume_reply): Change ptid argument's type from unsigned
8302 long to ptid_t. Adjust. Implement W;process and X;process.
8303 (free_sym_cache, clear_symbol_cache): New.
8304 (look_up_one_symbol): Adjust to per-process symbol cache. *
8305 * server.c (cont_thread, general_thread, step_thread): Change type
8306 to ptid_t.
8307 (attached): Delete.
8308 (multi_process): New.
8309 (last_ptid): Change type to ptid_t.
8310 (struct vstop_notif) <ptid>: Change type to ptid_t.
8311 (queue_stop_reply, push_event): Change `ptid' argument's type to
8312 ptid_t.
8313 (discard_queued_stop_replies): Add `pid' argument.
8314 (start_inferior): Adjust to use ptids. Adjust to mywait interface
8315 changes. Don't reference the `attached' global.
8316 (attach_inferior): Adjust to mywait interface changes.
8317 (handle_query): Adjust to use ptids. Parse GDB's qSupported
8318 features. Handle and report "multiprocess+". Handle
8319 "qAttached:PID".
8320 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
8321 changes.
8322 (handle_v_kill): New.
8323 (handle_v_stopped): Adjust to use target_pid_to_str.
8324 (handle_v_requests): Allow multiple attaches and runs when
8325 multiprocess extensions are in effect. Handle "vKill".
8326 (myresume): Adjust to use ptids.
8327 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
8328 (handle_status): Adjust to discard_queued_stop_replies interface
8329 change.
8330 (first_thread_of, kill_inferior_callback)
8331 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8332 (main): Call initialize_inferiors. Adjust to use ptids, killing
8333 and detaching from all inferiors. Handle multiprocess packet
8334 variants.
8335 * linux-low.h: Include gdb_proc_service.h.
8336 (struct process_info_private): New.
8337 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8338 <lwpid_of>: Use ptid_get_lwp.
8339 (get_lwp_thread): Adjust.
8340 (struct lwp_info): Add `dead' member.
8341 (find_lwp_pid): Declare.
8342 * linux-low.c (thread_db_active): Delete.
8343 (new_inferior): Adjust comment.
8344 (inferior_pid): Delete.
8345 (linux_add_process): New.
8346 (handle_extended_wait): Adjust.
8347 (add_lwp): Change unsigned long to ptid.
8348 (linux_create_inferior): Add process to processes table. Adjust
8349 to use ptids. Don't set new_inferior here.
8350 (linux_attach_lwp): Rename to ...
8351 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
8352 it. Adjust to use ptids.
8353 (linux_attach_lwp): New.
8354 (linux_attach): Add process to processes table. Don't set
8355 new_inferior here.
8356 (struct counter): New.
8357 (second_thread_of_pid_p, last_thread_of_process_p): New.
8358 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
8359 multiple processes.
8360 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
8361 processes. Remove process from process table.
8362 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
8363 to multiple processes.
8364 (any_thread_of): New.
8365 (linux_detach): Add `pid' argument, and handle it. Remove process
8366 from processes table.
8367 (linux_join): Add `pid' argument. Handle it.
8368 (linux_thread_alive): Change unsighed long argument to ptid_t.
8369 Consider dead lwps as not being alive.
8370 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
8371 threads we're not interested in.
8372 (same_lwp, find_lwp_pid): New.
8373 (linux_wait_for_lwp): Change `pid' argument's type from int to
8374 ptid_t. Adjust.
8375 (linux_wait_for_event): Rename to ...
8376 (linux_wait_for_event_1): ... this. Change `pid' argument's type
8377 from int to ptid_t. Adjust.
8378 (linux_wait_for_event): New.
8379 (linux_wait_1): Add `ptid' argument. Change return type to
8380 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
8381 that exit from the process table.
8382 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
8383 Adjust.
8384 (mark_lwp_dead): New.
8385 (wait_for_sigstop): Adjust to use ptids. If a process exits while
8386 stopping all threads, mark its main lwp as dead.
8387 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8388 ptids.
8389 (fetch_register, usr_store_inferior_registers)
8390 (regsets_fetch_inferior_registers)
8391 (regsets_store_inferior_registers, linux_read_memory)
8392 (linux_write_memory): Inline `inferior_pid'.
8393 (linux_look_up_symbols): Adjust to use per-process
8394 `thread_db_active'.
8395 (linux_request_interrupt): Adjust to use ptids.
8396 (linux_read_auxv): Inline `inferior_pid'.
8397 (initialize_low): Don't reference thread_db_active.
8398 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8399 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8400 (ps_getpid): Return the pid of the current inferior.
8401 * thread-db.c (proc_handle, thread_agent): Delete.
8402 (thread_db_create_event, thread_db_enable_reporting): Adjust to
8403 per-process data.
8404 (find_one_thread): Change argument type to ptid_t. Adjust to
8405 per-process data.
8406 (maybe_attach_thread): Adjust to per-process data and ptids.
8407 (thread_db_find_new_threads): Ditto.
8408 (thread_db_init): Ditto.
8409 * spu-low.c (spu_create_inferior, spu_attach): Add process to
8410 processes table. Adjust to use ptids.
8411 (spu_kill, spu_detach): Adjust interface. Remove process from
8412 processes table.
8413 (spu_join, spu_thread_alive): Adjust interface.
8414 (spu_wait): Adjust interface. Remove process from processes
8415 table. Adjust to use ptids.
8416 * win32-low.c (current_inferior_tid): Delete.
8417 (current_inferior_ptid): New.
8418 (debug_event_ptid): New.
8419 (thread_rec): Take a ptid. Adjust.
8420 (child_add_thread): Add `pid' argument. Adjust to use ptids.
8421 (child_delete_thread): Ditto.
8422 (do_initial_child_stuff): Add `attached' argument. Add process to
8423 processes table.
8424 (child_fetch_inferior_registers, child_store_inferior_registers):
8425 Adjust.
8426 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8427 (win32_attach): Pass 1 to do_initial_child_stuff.
8428 (win32_kill): Adjust interface. Remove process from processes
8429 table.
8430 (win32_detach): Ditto.
8431 (win32_join): Adjust interface.
8432 (win32_thread_alive): Take a ptid.
8433 (win32_resume): Adjust to use ptids.
8434 (get_child_debug_event): Ditto.
8435 (win32_wait): Adjust interface. Remove exiting process from
8436 processes table.
8437
bd99dc85
PA
84382009-04-01 Pedro Alves <pedro@codesourcery.com>
8439
8440 Non-stop mode support.
8441
8442 * server.h (non_stop): Declare.
8443 (gdb_client_data, handler_func): Declare.
8444 (delete_file_handler, add_file_handler, start_event_loop):
8445 Declare.
8446 (handle_serial_event, handle_target_event, push_event)
8447 (putpkt_notif): Declare.
8448 * target.h (enum resume_kind): New.
8449 (struct thread_resume): Replace `step' field by `kind' field.
8450 (TARGET_WNOHANG): Define.
8451 (struct target_ops) <wait>: Add `options' argument.
8452 <supports_non_stop, async, start_non_stop>: New fields.
8453 (target_supports_non_stop, target_async): New.
8454 (start_non_stop): Declare.
8455 (mywait): Add `options' argument.
8456 * target.c (mywait): Add `options' argument. Print child exit
8457 notifications here.
8458 (start_non_stop): New.
8459 * server.c (non_stop, own_buf, mem_buf): New globals.
8460 (struct vstop_notif): New.
8461 (notif_queue): New global.
8462 (queue_stop_reply, push_event, discard_queued_stop_replies)
8463 (send_next_stop_reply): New.
8464 (start_inferior): Adjust to use resume_kind. Adjust to mywait
8465 interface changes.
8466 (attach_inferior): In non-stop mode, don't wait for the target
8467 here.
8468 (handle_general_set): Handle QNonStop.
8469 (handle_query): When handling qC, return the current general
8470 thread, instead of the first thread of the list.
8471 (handle_query): If the backend supports non-stop mode, include
8472 QNonStop+ in the qSupported query response.
8473 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
8474 and non-stop mode.
8475 (handle_v_attach, handle_v_run): Handle non-stop mode.
8476 (handle_v_stopped): New.
8477 (handle_v_requests): Report support for vCont;t. Handle vStopped.
8478 (myresume): Adjust to use resume_kind. Handle non-stop.
8479 (queue_stop_reply_callback): New.
8480 (handle_status): Handle non-stop mode.
8481 (main): Clear non_stop flag on reconnection. Use the event-loop.
8482 Refactor serial protocol handling from here ...
8483 (process_serial_event): ... to this new function. When GDB
8484 selects any thread, select one here. In non-stop mode, wait until
8485 GDB acks all pending events before exiting.
8486 (handle_serial_event, handle_target_event): New.
8487 * remote-utils.c (remote_open): Install remote_desc in the event
8488 loop.
8489 (remote_close): Remove remote_desc from the event loop.
8490 (putpkt_binary): Rename to...
8491 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
8492 (putpkt_binary): New as wrapper around putpkt_binary_1.
8493 (putpkt_notif): New.
8494 (prepare_resume_reply): In non-stop mode, don't change the
8495 general_thread.
8496 * event-loop.c: New.
8497 * Makefile.in (OBJ): Add event-loop.o.
8498 (event-loop.o): New rule.
8499
8500 * linux-low.h (pid_of): Moved here.
8501 (lwpid_of): New.
8502 (get_lwp_thread): Use lwpid_of.
8503 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
8504 * linux-low.c (pid_of): Delete.
8505 (inferior_pid): Use lwpid_of.
8506 (linux_event_pipe): New.
8507 (target_is_async_p): New.
8508 (delete_lwp): New.
8509 (handle_extended_wait): Use lwpid_of.
8510 (add_lwp): Don't set lwpid field.
8511 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
8512 (linux_kill_one_lwp): If killing a running lwp, stop it first.
8513 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
8514 (linux_detach_one_lwp): If detaching from a running lwp, stop it
8515 first. Adjust to linux_wait_for_event interface changes. Use
8516 lwpid_of.
8517 (linux_detach): Don't delete the main lwp here.
8518 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
8519 (status_pending_p): Don't consider explicitly suspended lwps.
8520 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8521 pointer. Add OPTIONS argument. Change return type to int. Use
8522 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
8523 (linux_wait_for_event): Take an integer pid instead of a lwp_info
8524 pointer. Add status pointer argument. Return a pid instead of a
8525 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
8526 changes. In non-stop mode, don't switch to a random thread.
8527 (linux_wait): Rename to...
8528 (linux_wait_1): ... this. Add target_options argument, and handle
8529 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
8530 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
8531 clean exit and signal exit code. Don't stop all threads in
8532 non-stop mode. In all-stop mode, only stop all threads when
8533 reporting a stop to GDB. Handle explicit thread stop requests.
8534 (async_file_flush, async_file_mark): New.
8535 (linux_wait): New.
8536 (send_sigstop): Use lwpid_of.
8537 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
8538 interface changes. In non-stop mode, don't switch to a random
8539 thread.
8540 (linux_resume_one_lwp): Use lwpid_of.
8541 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8542 (linux_resume_one_thread): ... this. Handle resume_stop. In
8543 non-stop mode, don't look for pending flag in all threads.
8544 (resume_status_pending_p): Don't consider explicitly suspended
8545 threads.
8546 (my_waitpid): Reimplement. Emulate __WALL.
8547 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8548 Use lwpid_of.
8549 (sigchld_handler, linux_supports_non_stop, linux_async)
8550 (linux_start_non_stop): New.
8551 (linux_target_ops): Register linux_supports_non_stop, linux_async
8552 and linux_start_non_stop.
8553 (initialize_low): Install SIGCHLD handler.
8554 * thread-db.c (thread_db_create_event, find_one_thread)
8555 (thread_db_get_tls_address): Use lwpid_of.
8556 * win32-low.c (win32_detach): Adjust to use resume_kind.
8557 (win32_wait): Add `options' argument.
8558 * spu-low.c (spu_resume): Adjust to use resume_kind.
8559 (spu_wait): Add `options' argument.
8560
5b1c542e
PA
85612009-04-01 Pedro Alves <pedro@codesourcery.com>
8562
8563 Decouple target code from remote protocol.
8564
8565 * target.h (enum target_waitkind): New.
8566 (struct target_waitstatus): New.
8567 (struct target_ops) <wait>: Return an unsigned long. Take a
8568 target_waitstatus pointer instead of a char pointer.
8569 (mywait): Likewise.
8570 * target.c (mywait): Change prototype to return an unsigned long.
8571 Take a target_waitstatus pointer instead of a char pointer. Adjust.
8572 * server.h (thread_from_wait, old_thread_from_wait): Delete
8573 declarations.
8574 (prepare_resume_reply): Change prototype to take a
8575 target_waitstatus.
8576 * server.c (thread_from_wait, old_thread_from_wait): Delete.
8577 (last_status, last_ptid): New.
8578 (start_inferior): Remove "statusptr" argument. Adjust. Return a
8579 pid instead of a signal.
8580 (attach_inferior): Remove "status" and "signal" parameters.
8581 Adjust.
8582 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8583 not as an address.
8584 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8585 (handle_v_requests, myresume): Remove "status" and "signal"
8586 parameters. Adjust.
8587 (handle_status): New.
8588 (main): Delete local `status'. Adjust.
8589 * remote-utils.c: Include target.h.
8590 (prepare_resume_reply): Change prototype to take a
8591 target_waitstatus. Adjust.
8592
8593 * linux-low.c (linux_wait): Adjust to new target_ops->wait
8594 interface.
8595 * spu-low.c (spu_wait): Adjust.
8596 * win32-low.c (enum target_waitkind, struct target_waitstatus):
8597 Delete.
8598 (win32_wait): Adjust.
8599
2bd7c093
PA
86002009-04-01 Pedro Alves <pedro@codesourcery.com>
8601
8602 * target.h (struct thread_resume): Delete leave_stopped member.
8603 (struct target_ops): Add a `n' argument to the `resume' callback.
8604 * server.c (start_inferior): Adjust.
8605 (handle_v_cont, myresume): Adjust.
8606 * linux-low.c (check_removed_breakpoint): Adjust to resume
8607 interface change, and to removed leave_stopped field.
8608 (resume_ptr): Delete.
8609 (struct thread_resume_array): New.
8610 (linux_set_resume_request): Add new `arg' parameter. Adjust to
8611 resume interface change.
8612 (linux_continue_one_thread, linux_queue_one_thread)
8613 (resume_status_pending_p): Check if the resume field is NULL
8614 instead of checking the leave_stopped member.
8615 (linux_resume): Adjust to the target resume interface change.
8616 * spu-low.c (spu_resume): Adjust to the target resume interface
8617 change.
8618 * win32-low.c (win32_detach, win32_resume): Ditto.
8619
c35fafde
PA
86202009-04-01 Pedro Alves <pedro@codesourcery.com>
8621
8622 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8623 flag.
8624 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8625 pending.
8626 (linux_continue_one_thread): Only preserve the stepping flag if
8627 there's a pending breakpoint.
8628
0a59d50b
PA
86292009-03-31 Pedro Alves <pedro@codesourcery.com>
8630
8631 * server.c (main): After the inferior having exited, call
8632 remote_close before exiting gdbserver.
8633
f04c6d38
TJB
86342009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
8635
8636 Fix size of FPSCR in Power 7 processors.
8637 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8638 (PPC_FEATURE_HAS_DFP): New #define.
8639 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8640 size of the FPSCR.
8641
78e5cee6
PA
86422009-03-23 Pedro Alves <pedro@codesourcery.com>
8643
8644 * server.c (handle_query) Whitespace and formatting.
8645
1b3f6016
PA
86462009-03-22 Pedro Alves <pedro@codesourcery.com>
8647
8648 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8649 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8650 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8651 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8652 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8653 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8654 Makefile.in, configure.ac: Fix whitespace throughout.
8655 * configure: Regenerate.
8656
a07b2135
PA
86572009-03-22 Pedro Alves <pedro@codesourcery.com>
8658
8659 * inferiors.c (find_inferior): Make it safe for the callback
8660 function to delete the currently iterated inferior.
8661
67cc2626
PA
86622009-03-22 Pedro Alves <pedro@codesourcery.com>
8663
8664 * Makefile.in (linuw_low_h): Move higher.
8665 (thread-db.o): Depend on $(linux_low_h).
8666
54a0b537
PA
86672009-03-17 Pedro Alves <pedro@codesourcery.com>
8668
8669 Rename "process" to "lwp" throughout.
8670
8671 * linux-low.c (all_processes): Rename to...
8672 (all_lwps): ... this.
8673 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8674 (add_process): Rename to ...
8675 (add_lwp): ... this. Adjust.
8676 (linux_create_inferior): Adjust.
8677 (linux_attach_lwp): Adjust.
8678 (linux_attach): Adjust.
8679 (linux_kill_one_process): Rename to ...
8680 (linux_kill_one_lwp): ... this. Adjust.
8681 (linux_kill): Adjust.
8682 (linux_detach_one_process): Rename to ...
8683 (linux_detach_one_lwp): ... this. Adjust.
8684 (linux_detach): Adjust.
8685 (check_removed_breakpoint): Adjust.
8686 (status_pending_p): Adjust.
8687 (linux_wait_for_process): Rename to ...
8688 (linux_wait_for_lwp): ... this. Adjust.
8689 (linux_wait_for_event): Adjust.
8690 (send_sigstop): Adjust.
8691 (wait_for_sigstop): Adjust.
8692 (stop_all_processes): Rename to ...
8693 (stop_all_lwps): ... this.
8694 (linux_resume_one_process): Rename to ...
8695 (linux_resume_one_lwp): ... this. Adjust.
8696 (linux_set_resume_request, linux_continue_one_thread)
8697 (linux_queue_one_thread, resume_status_pending_p)
8698 (usr_store_inferior_registers, regsets_store_inferior_registers)
8699 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8700 Adjust.
8701 * linux-low.h (get_process): Rename to ...
8702 (get_lwp): ... this. Adjust.
8703 (get_thread_process): Rename to ...
8704 (get_thread_lwp): ... this. Adjust.
8705 (get_process_thread): Rename to ...
8706 (get_lwp_thread): ... this. Adjust.
8707 (struct process_info): Rename to ...
8708 (struct lwp_info): ... this.
8709 (all_processes): Rename to ...
8710 (all_lwps): ... this.
8711 * proc-service.c (ps_lgetregs): Adjust.
8712 * thread-db.c (thread_db_create_event, find_one_thread)
8713 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8714
0b16c5cf
PA
87152009-03-14 Pedro Alves <pedro@codesourcery.com>
8716
8717 * server.c (handle_query): Handle "qAttached".
8718
32de4b9d
NS
87192009-03-13 Nathan Sidwell <nathan@codesourcery.com>
8720
8721 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8722 GPLv3, update license URL.
8723
2aecd87f
DE
87242009-03-01 Doug Evans <dje@google.com>
8725
93efd302 8726 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
8727 (server_h): Add gdb_signals.h.
8728 (signals.o): Update.
8729 * server.h (target_signal_from_host,target_signal_to_host_p)
8730 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8731
86b1f9c5
PM
87322009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
8733
8734 * remote-utils.c (getpkt): Also generate remote-debug
8735 information if noack_mode is set.
8736
4aa995e1
PA
87372009-02-06 Pedro Alves <pedro@codesourcery.com>
8738
8739 * server.c (handle_query): Report qXfer:siginfo:read and
8740 qXfer:siginfo:write as supported and handle them.
8741 * target.h (struct target_ops) <qxfer_siginfo>: New field.
8742 * linux-low.c (linux_xfer_siginfo): New.
8743 (linux_target_ops): Set it.
8744
62709adf
PA
87452009-01-26 Pedro Alves <pedro@codesourcery.com>
8746
8747 * server.c (gdbserver_usage): Mention --remote-debug.
8748 (main): Accept '--remote-debug' switch.
8749
aef93bd7
DE
87502009-01-18 Doug Evans <dje@google.com>
8751
8752 * regcache.c (new_register_cache): No need to check result of xcalloc.
8753 * server.c (handle_search_memory): Back out calls to xmalloc,
8754 result is checked and error is returned to user upon failure.
8755 (handle_query): Ditto. Add more checks for result of malloc.
8756 (handle_v_cont): Check result of malloc, report error back to
8757 user upon failure.
8758 (handle_v_run): Ditto. Call freeargv.
8759 * server.h (freeargv): Declare.
8760 * utils.c (freeargv): New fn.
8761
54363045
DE
87622009-01-15 Doug Evans <dje@google.com>
8763
f626972c
DE
8764 * gdbreplay.c (perror_with_name): Make arg const char *.
8765 * server.h (target_signal_to_name): Make return type const char *.
0842e787 8766 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 8767 * utils.c (perror_with_name): Make arg const char *.
54363045 8768
18aae699
PA
87692009-01-14 Pedro Alves <pedro@codesourcery.com>
8770
8771 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8772 when handling a EXIT_PROCESS_DEBUG_EVENT.
8773
ff703abe
JB
87742009-01-06 Joel Brobecker <brobecker@adacore.com>
8775
8776 * gdbreplay.c (gdbreplay_version): Update copyright year.
8777 * server.c (gdbserver_version): Likewise.
8778
f21cc1a2 87792009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
8780
8781 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 8782 (handle_extended_wait): Improve comment.
0e21c1ec 8783
bca929d3
DE
87842008-12-13 Doug Evans <dje@google.com>
8785
8786 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8787 * server.h (ATTR_MALLOC): New macro.
8788 (xmalloc,xcalloc,xstrdup): Declare.
8789 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8790 * inferiors.c: Ditto.
8791 * linux-low.c: Ditto.
8792 * mem-break.c: Ditto.
8793 * regcache.c: Ditto.
8794 * remote-utils.c: Ditto.
8795 * server.c: Ditto.
8796 * target.c: Ditto.
8797 * win32-low.c: Ditto.
8798
97438e3f
DE
87992008-12-12 Doug Evans <dje@google.com>
8800
896c7fbb
DE
8801 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8802 in debugging printf.
8803
97438e3f
DE
8804 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8805
e3b886f8
DE
88062008-12-09 Doug Evans <dje@google.com>
8807
8808 * linux-low.h (struct process_info): Delete member tid, unused.
8809 * thread-db.c (find_one_thread): Update.
8810 (maybe_attach_thread): Update.
8811
07e059b5
VP
88122008-12-02 Pedro Alves <pedro@codesourcery.com>
8813
889bf7c5
PA
8814 * target.h (struct target_ops): Add qxfer_osdata member.
8815 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8816 and dirent.h.
8817 (linux_qxfer_osdata): New functions.
8818 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8819 callback.
8820 * server.c (handle_query): Handle "qXfer:osdata:read:".
8821 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8822 (buffer_xml_printf): New functions.
8823 * server.h (struct buffer): New.
8824 (buffer_grow_str, buffer_grow_str0): New macros.
8825 (buffer_grow, buffer_free, buffer_init, buffer_finish)
8826 (buffer_xml_printf): Declare.
07e059b5 8827
4cab47ab
DE
88282008-11-24 Doug Evans <dje@google.com>
8829
8830 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8831
f142445f
DJ
88322008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
8833
8834 * server.c (handle_v_run): Always use the supplied argument list.
8835
d0107bb6 88362008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 8837
d0107bb6
BW
8838 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8839 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 8840
2c4ad781
TJB
88412008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
8842
8843 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8844 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8845 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8846 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8847 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8848 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8849 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8850 XML target descriptions.
8851 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8852 when inferior is running on an ISA 2.05 or later processor. Add
8853 special case to return offset for full 64-bit slot of FPSCR when
8854 in 32-bits.
8855
dfb64f85
DJ
88562008-11-14 Daniel Gutson <dgutson@codesourcery.com>
8857
8858 * Makefile.in (SFILES, clean): Added sparc64 files.
8859 (reg-sparc64.o, reg-sparc64.c): New.
8860 * configure.srv (sparc*-*-linux*): New configuration.
8861 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8862 syscall arguments for SPARC.
8863 (regsets_store_inferior_registers): Likewise.
8864 * linux-sparc-low.c: New file.
8865
66b6e1dd
DE
88662008-10-21 Doug Evans <dje@google.com>
8867
8868 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8869 (READLINE_DIR,READLINE_DEP): Delete.
8870 (INTERNAL_CFLAGS): Update.
8871 (LINTFLAGS): Update.
8872
9b710a42
PA
88732008-10-10 Pedro Alves <pedro@codesourcery.com>
8874
8875 * server.c (handle_v_run): If GDB didn't specify an argv, use the
8876 whole argv from the last run, not just argv[0].
8877
5822d809
PA
88782008-09-08 Pedro Alves <pedro@codesourcery.com>
8879
8880 * regcache.c (new_register_cache): Return NULL if the register
8881 cache size isn't known yet.
8882 (free_register_cache): Avoid dereferencing a NULL regcache.
8883
74aac56f
DJ
88842008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
8885
8886 * configure.srv: Merge MIPS and MIPS64.
8887
400b20f5
MR
88882008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
8889
8890 * Makefile.in (uninstall): Apply $(EXEEXT) too.
8891
677c5bb1
LM
88922008-08-18 Luis Machado <luisgpm@br.ibm.com>
8893
8894 * Makefile.in: Add required vsx dependencies.
8895
8896 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8897 Declare init_registers_powerpc_vsx32l.
8898 Declare init_registers_powerpc_vsx64l.
8899 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8900 (ppc_arch_setup): Check for VSX in hwcap.
8901 (ppc_fill_vsxregset): New function.
8902 (ppc_store_vsxregset): New function.
8903 Add new VSX entry in regset_info target_regsets.
8904
8905 * configure.srv: Add new VSX dependencies.
8906
a6f3e723
SL
89072008-08-12 Pedro Alves <pedro@codesourcery.com>
8908
8909 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8910 (remote_open): Set or clear transport_is_reliable.
8911 (putpkt_binary): Don't expect acks in noack mode.
8912 (getpkt): Don't send ack/nac in noack mode.
8913 * server.c (handle_general_set): Handle QStartNoAckMode.
8914 (handle_query): If connected by tcp pass QStartNoAckMode+ in
8915 qSupported.
8916 (main): Reset noack_mode on every connection.
8917 * server.h (noack_mode): Declare.
8918
a417dc56
RW
89192008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8920
8921 * Makefile.in (GDBREPLAY_OBS): New variable.
8922 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8923
3221518c
UW
89242008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
8925 Daniel Jacobowitz <dan@codesourcery.com>
8926
8927 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8928 (usr_store_inferior_registers): Likewise.
8929 (regsets_store_inferior_registers): Likewise.
8930
ec56be1b
PA
89312008-07-31 Rolf Jansen <rj@surtec.com>
8932 Pedro Alves <pedro@codesourcery.com>
8933
8934 * configure.ac: Check for memmem declaration.
8935 * server.c [HAVE_MALLOC_H]: Include malloc.h.
8936 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8937 (disable_packet_qfThreadInfo): Unconditionally compile.
8938 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8939 * configure, config.in: Regenerate.
8940
2fe5e3ff
DE
89412008-07-28 Doug Kwan <dougkwan@google.com>
8942
8943 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8944 (linux_write_memory): Remove declaration of errno.
8945
836acd6d
UW
89462008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
8947
8948 * linux-low.c (handle_extended_wait): Do not use "status"
8949 variable uninitialized.
8950
aeba519e
PA
89512008-07-07 Pedro Alves <pedro@codesourcery.com>
8952
8953 * server.c (handle_v_attach): Inhibit reporting dll changes.
8954
db42f210
PA
89552008-06-27 Pedro Alves <pedro@codesourcery.com>
8956
8957 * remote-utils.c (prepare_resume_reply): If requested, don't
8958 output "thread:TID" in the T stop reply.
8959
8960 * server.c (disable_packet_vCont, disable_packet_Tthread)
8961 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8962 (handle_query): If requested, disable support for qC, qfThreadInfo
8963 and qsThreadInfo.
8964 (handle_v_requests): If requested, disable support for vCont.
8965 (gdbserver_show_disableable): New.
8966 (main): Handle --disable-packet and --disable-packet=LIST.
8967
8968 * server.h (disable_packet_vCont, disable_packet_Tthread)
8969 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8970
8e4c5421
CD
89712008-06-20 Carlos O'Donell <carlos@codesourcery.com>
8972
8973 * server.c (gdbserver_usage): Mention --version.
8974
6e23a804
DJ
89752008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
8976
8977 * Makefile.in (gdbreplay.o): New rule.
8978
90aa6a40
JM
89792008-06-06 Joseph Myers <joseph@codesourcery.com>
8980
8981 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8982 message, not gdbserver.
8983
c16158bc 89842008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
8985 Nathan Sidwell <nathan@codesourcery.com>
8986 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
8987
8988 * acinclude.m4: Include ../../config/acx.m4.
8989 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8990 * configure, config.in: Regenerate.
8991 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8992 * server.c (gdbserver_version): Print PKGVERSION.
8993 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
8994 (main): Adjust gdbserver_usage calls.
8995 * gdbreplay.c (version, host_name): Add declarations.
8996 (gdbreplay_version, gdbreplay_usage): New.
8997 (main): Accept --version and --help options.
8998
aeb75bf5
DJ
89992008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9000
9001 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9002 (arm_breakpoint_at): Handle Thumb.
9003 (the_low_target): Add comment.
9004
76b233dd
UW
90052008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9006
9007 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9008
08388c79
DE
90092008-05-09 Doug Evans <dje@google.com>
9010
a3c83fae
DE
9011 * server.h (decode_search_memory_packet): Declare.
9012 * remote-utils.c (decode_search_memory_packet): New fn.
9013 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9014 (handle_search_memory): New fn.
9015 (handle_query): Process qSearch:memory packets.
9016
bb9c3d36
UW
90172008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9018
9019 * regcache.c (registers_length): Remove.
9020 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9021 full register packet.
9022 * regcache.h (registers_length): Remove prototype.
9023 * server.h (PBUFSIZ): Define to 16384.
9024
7284e1be
UW
90252008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9026
9027 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9028 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9029 powerpc-64l.o, and powerpc-altivec64l.o.
9030 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9031 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9032 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9033 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9034 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9035 to srv_xmlfiles.
9036
9037 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9038 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9039 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9040 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9041 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9042 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9043 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9044 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9045 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9046 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9047 (clean): Update.
9048
9049 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9050 (init_registers_powerpc_32l): ... this new prototype.
9051 (init_registers_powerpc_32): Remove, replace by ...
9052 (init_registers_powerpc_altivec32l): ... this new prototype.
9053 (init_registers_powerpc_e500): Remove, replace by ...
9054 (init_registers_powerpc_e500l): ... this new prototype.
9055 (init_registers_ppc64): Remove, replace by ...
9056 (init_registers_powerpc_64l): ... this new prototype.
9057 (init_registers_powerpc_64): Remove, replace by ...
9058 (init_registers_powerpc_altivec64l): ... this new prototype.
9059 (ppc_num_regs): Set to 73.
9060 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9061 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9062 (ppc_cannot_store_register): Handle orig_r3 and trap.
9063 (ppc_arch_setup): Update init_registers_... calls.
9064 (ppc_fill_gregset): Handle orig_r3 and trap.
9065
9066 * inferiors.c (clear_inferiors): Reset current_inferior.
9067
fdc59709
PB
90682008-04-23 Paolo Bonzini <bonzini@gnu.org>
9069
889bf7c5
PA
9070 * acinclude.m4: Add override.m4.
9071 * configure: Regenerate.
fdc59709 9072
c9b2f845
UW
90732008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9074
9075 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9076 initial call to init_register_ppc64.
9077
550512b8
UW
90782008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9079
43aaf8b6
PA
9080 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9081 single powerpc*-*-linux* case.
550512b8
UW
9082 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9083
b6430ec3
UW
90842008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9085
9086 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 9087 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
9088 from reg_xmlfiles.
9089 * linux-ppc-low.c: Include <elf.h>.
9090 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9091 (ppc_hwcap): New global variable.
9092 (ppc_regmap): Remove __SPE__ #ifdef sections.
9093 (ppc_regmap_e500): New global variable.
9094 (ppc_cannot_store_register): Update __SPE__ special case.
9095 (ppc_get_hwcap): New function.
9096 (ppc_arch_setup): Use it to determine whether inferior supports
9097 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9098 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9099 Do not access registers if target does not support AltiVec.
9100 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9101 Do not access registers if target does not support SPE.
9102 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9103
52fa2412
UW
91042008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9105
9106 * linux-low.c (disabled_regsets, num_regsets): New.
9107 (use_regsets_p): Delete.
9108 (linux_wait_for_process): Clear disabled_regsets.
9109 (regsets_fetch_inferior_registers): Check and set it.
9110 (regsets_store_inferior_registers): Likewise.
9111 (linux_fetch_registers, linux_store_registers): Do not use
9112 use_regsets_p.
9113 (initialize_low): Allocate disabled_regsets.
9114
e28b3332
DJ
91152008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
9116
9117 * Makefile.in (LIBOBJS): New.
9118 (OBS): Use LIBOBJS.
9119 (memmem.o): New rule.
9120 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
9121 * configure: Regenerated.
9122
4536995d
UW
91232008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
9124
9125 * server.c (handle_query): Never return "unsupported" for
9126 qXfer:features:read queries.
9127
221c031f
UW
91282008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
9129
9130 * server.c (get_features_xml): Fix inverted condition.
9131 (handle_query): Always support qXfer:feature:read.
9132
ccd213ac
DJ
91332008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
9134
9135 * server.c (wrapper_argv): New.
9136 (start_inferior): Handle wrapper_argv. If set, expect an extra
9137 trap.
9138 (gdbserver_usage): Document --wrapper.
9139 (main): Parse --wrapper.
9140
6fe305f7
UW
91412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9142
9143 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9144 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9145 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9146 (ppc_set_pc): Likewise.
9147 (ppc_arch_setup): New function.
9148 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9149 of collect_register.
889bf7c5 9150 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 9151
5b0a002e
UW
91522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9153
9154 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9155 instead of linux-ppc64-low.o.
9156 * linux-ppc64-low.c: Remove file.
9157 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9158 (linux-ppc64-low.o): Remove rule.
9159
9160 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9161 (init_registers_powerpc_64): Likewise.
9162 (ppc_regmap): Conditionally define depending on __powerpc64__.
9163 (ppc_cannot_store_register): Do not special-case "fpscr" when
9164 compiled on __powerpc64__.
9165 (ppc_collect_ptrace_register): New function.
9166 (ppc_supply_ptrace_register): New function.
9167 (ppc_breakpoint): Change type to "unsigned int".
9168 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9169 (the_low_target): Conditionally provide initializers for the
889bf7c5 9170 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
9171 collect_ptrace_register and supply_ptrace_register members.
9172
9b4b61c8
UW
91732008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
9174
9175 * regcache.h (gdbserver_xmltarget): Add extern declaration.
9176 * server.c (gdbserver_xmltarget): Define.
9177 (get_features_xml): Use it to replace "target.xml" and arch_string.
9178
9179 * configure.srv: Remove srv_xmltarget. Add XML files that were
9180 mentioned there to srv_xmlfiles instead. Remove conditional tests
9181 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9182 srv_xmlfiles and srv_regobj to include all possible choices.
9183 * configure.ac (srv_xmltarget): Remove.
9184 (srv_xmlfiles): Do not add "target.xml".
9185 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9186 checks for supplementary target information.
9187 * configure: Regenerate.
9188 * Makefile.in (XML_TARGET): Remove.
9189 (target.xml): Remove rule.
9190 (clean): Do not clean up target.xml.
9191 (.PRECIOUS): Do not mention target.xml.
9192
9193 * target.h (struct target_ops): Remove arch_string member.
9194 * linux-low.c (linux_arch_string): Remove.
9195 (linux_target_ops): Remove arch_string initializer.
9196 * linux-low.h (struct linux_target_ops): Remove arch_string member.
9197 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9198 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9199 * spu-low.c (spu_arch_string): Remove.
9200 (spu_target_ops): Remove arch_string initializer.
9201 * win32-low.c (win32_arch_string): Remove.
9202 (win32_target_ops): Remove arch_string initializer.
9203 * win32-low.h (struct win32_target_ops): Remove arch_string member.
9204 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9205 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9206
ee1a7ae4
UW
92072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9208
9209 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9210 by collect_ptrace_register and supply_ptrace_register hooks.
9211 * linux-low.c (fetch_register): Use supply_ptrace_register callback
9212 instead of checking for the_low_target.left_pad_xfer.
9213 (usr_store_inferior_registers): Use collect_ptrace_register callback
9214 instead of checking for the_low_target.left_pad_xfer.
9215
9216 * linux-s390-low.c (s390_collect_ptrace_register): New function.
9217 (s390_supply_ptrace_register): Likewise.
9218 (s390_fill_gregset): Call s390_collect_ptrace_register.
9219 (the_low_target): Update.
9220
9221 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9222 (ppc_supply_ptrace_register): Likewise.
9223 (the_low_target): Update.
9224
9225 * linux-i386-low.c (the_low_target): Update.
9226 * linux-x86-64-low.c (the_low_target): Update.
9227
d61ddec4
UW
92282008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9229
9230 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9231 reg-s390.o and reg-s390x.o.
9232
9233 * linux-low.c (new_inferior): New global variable.
9234 (linux_create_inferior, linux_attach): Set it.
9235 (linux_wait_for_process): Call the_low_target.arch_setup after the
9236 target has stopped for the first time.
9237 (initialize_low): Do not call the_low_target.arch_setup.
9238
9239 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9240 (s390_set_pc): Likewise.
9241 (s390_arch_setup): New function.
9242 (the_low_target): Use s390_arch_setup as arch_setup routine.
9243
9244 * regcache.c (realloc_register_cache): New function.
9245 (set_register_cache): Call it for each existing regcache.
9246
d05b4ac3
UW
92472008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
9248
9249 * server.h (init_registers): Remove prototype.
9250
9251 * linux-low.h (struct linux_target_ops): Add arch_setup field.
9252 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9253 instead of init_registers ().
9254 * linux-arm-low.c (init_registers_arm): Add prototype.
9255 (init_registers_arm_with_iwmmxt): Likewise.
9256 (the_low_target): Add initializer for arch_setup field.
9257 * linux-cris-low.c (init_registers_cris): Add prototype.
9258 (the_low_target): Add initializer for arch_setup field.
9259 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9260 (the_low_target): Add initializer for arch_setup field.
9261 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9262 (the_low_target): Add initializer for arch_setup field.
9263 * linux-ia64-low.c (init_registers_ia64): Add prototype.
9264 (the_low_target): Add initializer for arch_setup field.
9265 * linux-m32r-low.c (init_registers_m32r): Add prototype.
9266 (the_low_target): Add initializer for arch_setup field.
9267 * linux-m68k-low.c (init_registers_m68k): Add prototype.
9268 (the_low_target): Add initializer for arch_setup field.
9269 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9270 (init_registers_mips64_linux): Likewise.
9271 (the_low_target): Add initializer for arch_setup field.
9272 * linux-ppc-low.c (init_registers_ppc): Add prototype.
9273 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9274 (the_low_target): Add initializer for arch_setup field.
9275 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9276 (init_registers_powerpc_64): Likewise.
9277 (the_low_target): Add initializer for arch_setup field.
9278 * linux-s390-low.c (init_registers_s390): Add prototype.
9279 (init_registers_s390x): Likewise.
9280 (the_low_target): Add initializer for arch_setup field.
9281 * linux-sh-low.c (init_registers_sh): Add prototype.
9282 (the_low_target): Add initializer for arch_setup field.
9283 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9284 (the_low_target): Add initializer for arch_setup field.
9285 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9286 (the_low_target): Add initializer for arch_setup field.
9287
9288 * win32-low.h (struct win32_target_ops): Add arch_setup field.
9289 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9290 instead of init_registers ().
9291 * win32-arm-low.c (init_registers_arm): Add prototype.
9292 (the_low_target): Add initializer for arch_setup field.
9293 * win32-i386-low.c (init_registers_i386): Add prototype.
9294 (the_low_target): Add initializer for arch_setup field.
9295
9296 * spu-low.c (init_registers_spu): Add prototype.
9297 (initialize_low): Call initialie_registers_spu () instead of
9298 initialize_registers ().
9299
fd96d250
PA
93002008-02-19 Pedro Alves <pedro@codesourcery.com>
9301
9302 * server.c (handle_v_requests): When handling the vRun and vAttach
9303 packets, if already debugging a process, don't kill it. Return an
9304 error instead.
9305
d41b6bb4
DJ
93062008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
9307
9308 * server.c (handle_query): Correct length check.
9309
5ac588cf
PA
93102008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
9311
9312 * win32-low.c (do_initial_child_stuff): Add process handle
9313 parameter. Set current_process_handle and current_process_id from the
9314 parameters. Clear globals.
9315 (win32_create_inferior): Don't set current_process_handle and
9316 current_process_id here. Instead pass them on the call to
9317 do_initial_child_stuff.
9318 (win32_attach): Likewise.
9319 (win32_clear_inferiors): New.
9320 (win32_kill): Don't close the current process handle or the
9321 current thread handle here. Instead call win32_clear_inferiors.
9322 (win32_detach): Don't open a new handle to the process. Call
9323 win32_clear_inferiors.
9324 (win32_join): Don't rely on current_process_handle; open a new
9325 handle using the process id.
9326 (win32_wait): Call win32_clear_inferiors when the inferior process
9327 has exited.
9328
ecd7ecbc
DJ
93292008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
9330
9331 * server.c (monitor_show_help): Add "exit".
9332
1525d545
MG
93332008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
9334
ecd7ecbc 9335 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
9336 (clean): Add reg-xtensa.c.
9337 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
9338 * configure.srv (xtensa*-*-linux*) New target.
9339 * linux-xtensa-low.c: New.
9340 * xtensa-xtregs.c: New.
1525d545 9341
59a016f0
PA
93422008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
9343
9344 * hostio.c: Don't include errno.h.
9345 (errno_to_fileio_errno): Move to hostio-errno.
9346 * hostio.c: (hostio_error): Remove the error parameter. Defer the
9347 error number outputting to the target->hostio_last_error callback.
9348 (hostio_packet_error): Use FILEIO_EINVAL directly.
9349 (handle_open, handle_pread, hostio_error, handle_unlink): Update
9350 calls to hostio_error.
9351 * hostio-errno.c: New.
9352 * server.h (hostio_last_error_from_errno): Declare.
9353 * target.h (target_ops): Add hostio_last_error member.
9354 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9355 as hostio_last_error handler.
889bf7c5 9356 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
9357 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9358 (wince_hostio_last_error): New functions.
9359 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9360 as hostio_last_error handler.
9361 (win32_target_ops) [!_WIN32_WCE]: Register
9362 hostio_last_error_from_errno as hostio_last_error handler.
9363 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9364 (hostio-errno.o): New rule.
9365 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9366 * configure.srv (srv_hostio_err_objs): New variable. Default to
9367 hostio-errno.o.
9368 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9369 * configure: Regenerate.
9370
2d717e4f
DJ
93712008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9372
9373 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9374 (linux_kill, linux_detach): Clean up the process list.
9375 * remote-utils.c (remote_open): Improve port number parsing.
9376 (putpkt_binary, input_interrupt): Only send interrupts if the target
9377 is running.
9378 * server.c (extended_protocol): Make static.
9379 (attached): Define earlier.
9380 (exit_requested, response_needed, program_argv): New variables.
9381 (target_running): New.
9382 (start_inferior): Clear attached here.
9383 (attach_inferior): Set attached here.
9384 (require_running): Define.
9385 (handle_query): Use require_running and target_running. Implement
9386 "monitor exit".
9387 (handle_v_attach, handle_v_run): New.
9388 (handle_v_requests): Use require_running. Handle vAttach and vRun.
9389 (gdbserver_usage): Update.
9390 (main): Redo argument parsing. Handle --debug and --multi. Handle
9391 --attach along with other options or after the port. Save
9392 program_argv. Support no initial program. Resynchronize
9393 communication with GDB after an error. Handle "monitor exit".
9394 Use require_running and target_running. Always allow the extended
9395 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
9396 restart in extended mode.
9397 * README: Refer to the GDB manual. Update --attach usage.
9398
7407e2de
AS
93992007-12-20 Andreas Schwab <schwab@suse.de>
9400
9401 * linux-low.c (STACK_SIZE): Define.
9402 (linux_tracefork_child): Use it. Use __clone2 on ia64.
9403 (linux_test_for_tracefork): Likewise.
9404
b65d95c5
DJ
94052007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
9406
9407 * linux-low.c (linux_wait_for_event): Update messages. Do not
9408 reinsert auto-delete breakpoints.
9409 * mem-break.c (struct breakpoint): Change return type of handler to
9410 int.
9411 (set_breakpoint_at): Update handler type.
9412 (reinsert_breakpoint_handler): Return 1 instead of calling
9413 delete_breakpoint.
9414 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9415 setting a new one.
9416 (check_breakpoints): Delete auto-delete breakpoints and return 2.
9417 * mem-break.h (set_breakpoint_at): Update handler type.
9418 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9419 * win32-low.c (auto_delete_breakpoint): New.
9420 (get_child_debug_event): Use it.
9421
4e799345
DJ
94222007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
9423
9424 * configure.ac: Check for pread and pwrite.
9425 * hostio.c (handle_pread): Fall back to lseek and read.
9426 (handle_pwrite): Fall back to lseek and write.
9427 * config.in, configure: Regenerated.
9428
27524b67
DJ
94292007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
9430
9431 * server.c (myresume): Add own_buf argument.
9432 (main): Update calls.
9433
a20d5e98
DJ
94342007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
9435
9436 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9437 * remote-utils.c (remote_open): Do not call disable_async_io.
9438 (block_async_io): Delete.
9439 (unblock_async_io): Make static.
9440 (initialize_async_io): New.
9441 * server.c (handle_v_cont): Handle async I/O here.
9442 (myresume): Likewise. Move other common resume tasks here...
9443 (main): ... from here. Call initialize_async_io. Disable async
9444 I/O before the main loop.
9445 * server.h (initialize_async_io): Declare.
9446 (block_async_io, unblock_async_io): Delete prototypes.
9447 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9448
b79d787e
DJ
94492007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
9450
9451 * remote-utils.c (readchar): Allow binary data in received messages.
9452
d97903b2
PA
94532007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9454
9455 * win32-low.c (attaching): New global.
9456 (win32_create_inferior): Clear the `attaching' global.
9457 (win32_attach): Set the `attaching' global.
9458 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9459 attaching. Only set a breakpoint at the entry point if not
9460 attaching.
9461
311de423
PA
94622007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9463
9464 * server.c (main): Don't report dll events on the initial
9465 connection on attaches.
9466
6c2d16d2
PA
94672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9468
9469 * server.c (main): Relax numerical bases supported for the pid of
9470 the --attach command line argument.
9471
5ca906e6
PA
94722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9473
9474 * win32-low.c (win32_attach): Call OpenProcess before
9475 DebugActiveProcess, not after. Add last error output to error
9476 call.
9477
9c6c8194
PA
94782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
9479
9480 * win32-low.c (win32_get_thread_context)
9481 (win32_set_thread_context): New functions.
9482 (thread_rec): Use win32_get_thread_context.
9483 (continue_one_thread, win32_resume): Use win32_set_thread_context.
9484 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9485 field.
9486
4d5d1aaa
PA
94872007-12-03 Leo Zayas
9488 Pedro Alves <pedro_alves@portugalmail.pt>
9489
9490 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9491 global variables.
9492 (child_add_thread): Minor cleanup.
9493 (child_continue): Resume artificially suspended threads before
9494 calling ContinueDebugEvent.
9495 (suspend_one_thread): New.
9496 (fake_breakpoint_event): New.
9497 (get_child_debug_event): Change return type to int. Check here if
9498 gdb sent an interrupt request. If a soft interrupt was requested,
9499 fake a breakpoint event. Return 0 if there is no event to handle,
9500 and 1 otherwise.
9501 (win32_wait): Don't check here if gdb sent an interrupt request.
9502 Ensure there is a valid event to handle.
9503 (win32_request_interrupt): Add soft interruption method as last
9504 resort.
9505
c436e841
PA
95062007-12-03 Leo Zayas
9507 Pedro Alves <pedro_alves@portugalmail.pt>
9508
9509 * win32-low.h (win32_thread_info): Add descriptions to the
9510 structure members. Replace `suspend_count' counter by a
9511 `suspended' flag.
9512 * win32-low.c (thread_rec): Update condition of when to get the
9513 context from the inferior. Rely on ContextFlags being set if it
9514 has already been retrieved. Only suspend the inferior thread if
9515 we haven't already. Warn if that fails.
9516 (continue_one_thread): s/suspend_count/suspended/. Only call
9517 ResumeThread once. Warn if that fails.
9518
e7b5fa67
PA
95192007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9520
9521 * win32-low.c (win32_wait): Don't read from the inferior when it
9522 has already exited.
9523
a385171d
PA
95242007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
9525
9526 * Makefile.in (win32_low_h): New variable.
9527 (win32-low.o): Add dependency on $(win32_low_h).
9528 (win32-arm-low.o, win32-i386-low.o): New rules.
9529
f80c84b3
DJ
95302007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9531
9532 * hostio.c: Correct copyright year.
9533
a6b151f1
DJ
95342007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
9535
9536 * Makefile.in (OBS): Add hostio.o.
9537 (hostio.o): New rule.
9538 * server.h (handle_vFile): Declare.
9539 * hostio.c: New file.
9540 * server.c (handle_v_requests): Take packet_len and new_packet_len
9541 for binary packets. Call handle_vFile.
9542 (main): Update call to handle_v_requests.
9543
f9387fc3
DJ
95442007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
9545
9546 * linux-low.c: Include <sched.h>.
9547
51c2684e
DJ
95482007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
9549
9550 * linux-low.c (linux_tracefork_grandchild): New.
9551 (linux_tracefork_child): Use clone.
9552 (linux_test_for_tracefork): Use clone; allocate and free a stack.
9553
75f83163
JB
95542007-10-31 Joel Brobecker <brobecker@adacore.com>
9555
9556 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9557
da5898ce
DJ
95582007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
9559
9560 * linux-low.c (handle_extended_wait): Handle unexpected signals.
9561
24a09b5f
DJ
95622007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
9563
9564 * inferiors.c (change_inferior_id): Delete.
9565 (add_pid_to_list, pull_pid_from_list): New.
9566 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9567 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9568 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9569 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9570 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9571 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9572 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9573 (using_threads): Always set to 1.
9574 (handle_extended_wait): New.
9575 (add_process): Do not set TID.
9576 (linux_create_inferior): Set must_set_ptrace_flags.
9577 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
9578 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
9579 (linux_thread_alive): Rename TID argument to LWPID.
9580 (linux_wait_for_process): Handle unknown processes. Do not use TID.
9581 (linux_wait_for_event): Do not use TID or check using_threads. Update
9582 call to dead_thread_notify. Call handle_extended_wait.
9583 (linux_create_inferior): Use PTRACE_SETOPTIONS.
9584 (send_sigstop): Delete sigstop_sent.
9585 (wait_for_sigstop): Avoid TID.
9586 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9587 (linux_test_for_tracefork): New.
9588 (linux_lookup_signals): Use thread_db_active and
9589 linux_supports_tracefork_flag.
9590 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9591 * linux-low.h (get_process_thread): Avoid TID.
9592 (struct process_ifo): Move thread_known and tid to the end. Remove
9593 sigstop_sent.
9594 (linux_attach_lwp, thread_db_init): Update prototypes.
9595 * server.h (change_inferior_id): Delete prototype.
9596 (add_pid_to_list, pull_pid_from_list): New prototypes.
9597 * thread-db.c (thread_db_use_events): New.
9598 (find_first_thread): Rename to...
9599 (find_one_thread): ...this. Update callers and messages. Do not
9600 call fatal. Check thread_db_use_events. Do not call
9601 change_inferior_id or new_thread_notify.
9602 (maybe_attach_thread): Update. Do not call new_thread_notify.
9603 (thread_db_init): Set thread_db_use_events. Check use_events.
9604 * utils.c (fatal, warning): Correct message prefix.
9605
30ed0a8f
DJ
96062007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
9607
9608 * Makefile.in (clean): Remove new files.
9609 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9610 (powerpc-64.o, powerpc-64.c): New rules.
9611 * configure.srv: Use alternate register sets for powerpc64-*-linux*
9612 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9613 with SPE.
9614 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9615 SPE targets.
9616 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9617 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9618 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9619 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9620 (target_regsets): Add AltiVec and SPE register sets.
9621 * configure.ac: Check for AltiVec and SPE.
9622 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9623 (ppc_fill_vrregset, ppc_store_vrregset): New.
9624 (target_regsets): Add AltiVec register set.
9625 * configure: Regenerated.
9626
fd462a61
DJ
96272007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
9628
9629 * linux-low.c (O_LARGEFILE): Define.
9630 (linux_read_memory): Use /proc/PID/mem.
9631 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
9632 * configure, config.in: Regenerated.
9633
69f223ed
DJ
96342007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9635
9636 * linux-low.c (linux_wait_for_event): Do not pass signals while
9637 single-stepping.
9638
aec18585
PA
96392007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9640
9641 * win32-low.c (create_process): New.
9642 (win32_create_inferior): Use create_process instead of
9643 CreateProcess. If create_process failed retry appending an ".exe"
9644 suffix. Store the GetLastError result immediatelly after
9645 create_process calls and use it on the call to error.
9646
34d86ddd
PA
96472007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
9648
9649 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9650
5a0e3bd0
JB
96512007-08-23 Joel Brobecker <brobecker@adacore.com>
9652
9653 * configure.ac: Switch license to GPLv3.
9654
f88c79e6
MS
96552007-08-01 Michael Snyder <msnyder@access-company.com>
9656
9657 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9658
6b3d9b83
PA
96592007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
9660
9661 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9662 typedef.
9663 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9664 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
9665 CloseToolhelp32Snapshot.
9666 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9667 CloseToolhelp32Snapshot.
9668
c588c53c
MS
96692007-07-27 Michael Snyder <michael.snyder@access-company.com>
9670
9671 * server.c (main): Check for inferior exit before main loop.
9672
aa0403d9
PA
96732007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
9674
9675 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9676 instead of on tmp_desc.
9677
255e7678
DJ
96782007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
9679 Daniel Jacobowitz <dan@codesourcery.com>
9680
9681 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9682 (add_thread): Minor cleanups.
9683 (clear_inferiors): Move lower in the file. Clear the DLL
9684 list.
9685 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9686 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9687 (xml_escape_text): New.
9688 * server.c (handle_query): Handle qXfer:libraries:read. Report it
9689 for qSupported.
9690 (handle_v_cont): Report errors.
9691 (gdbserver_version): Update.
9692 (main): Correct size of own_buf. Do not report initial DLL events.
9693 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9694 (unloaded_dll, xml_escape_text): New.
9695 * win32-low.c (enum target_waitkind): Update comments.
9696 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9697 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9698 (win32_EnumProcessModules, win32_GetModuleInformation)
9699 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9700 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9701 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9702 (win32_Module32First, win32_Module32Next, load_toolhelp)
9703 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9704 (get_child_debug_event): Handle DLL events.
9705 (win32_wait): Likewise.
9706
0d37add9
DJ
97072007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
9708
9709 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9710 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9711
45e2715e
PA
97122007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9713
9714 * win32-low.c (handle_output_debug_string): Ignore event if not
9715 waiting.
9716
c5674cf1
PA
97172007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
9718
9719 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9720
2bbe3cc1
DJ
97212007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
9722
9723 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9724
ae13219e
DJ
97252007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
9726
9727 * inferiors.c (change_inferior_id): Add comment.
9728 * linux-low.c (check_removed_breakpoint): Add an early
9729 prototype. Improve debug output.
9730 (linux_attach): Doc update.
9731 (linux_detach_one_process, linux_detach): Clean up before releasing
9732 each process.
9733 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9734 * linux-low.h (struct process_info): Doc improvement.
9735 * mem-break.c (delete_all_breakpoints): New.
9736 * mem-break.h (delete_all_breakpoints): New prototype.
9737 * thread-db.c (find_first_thread): New.
9738 (thread_db_create_event): Call it instead of
9739 thread_db_find_new_threads. Clean up unused variables.
9740 (maybe_attach_thread): Remove first thread handling.
9741 (thread_db_find_new_threads): Use find_first_thread.
9742 (thread_db_get_tls_address): Likewise.
9743
4105de34
DJ
97442007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
9745
9746 * thread-db.c (thread_db_find_new_threads): Add prototype.
9747 (thread_db_create_event): Check for the main thread before adding
9748 a new thread.
9749 (maybe_attach_thread): Only enable event reporting if TID == 0.
9750 (thread_db_get_tls_address): Check for new threads.
9751
2b876972
DJ
97522007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
9753
9754 * linux-low.c (linux_create_inferior): Try execv before execvp.
9755 * spu-low.c (spu_create_inferior): Likewise.
9756
7a245884
DJ
97572007-06-13 Mike Frysinger <vapier@gentoo.org>
9758
9759 * linux-low.c (linux_create_inferior): Change execv to execvp.
9760 * spu-low.c (spu_create_inferior): Likewies.
9761
117ce543
DJ
97622007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
9763
9764 * Makefile.in (clean): Clean new files instead of deleted ones.
9765 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9766 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9767 rules.
9768 * configure.srv: Specify XML files and new regformats for MIPS and
9769 MIPS64 GNU/Linux.
9770 * linux-mips-low.c (mips_num_regs): Set to only used registers.
9771 (mips_regmap): Do not fetch $0. Remove unused registers. Add
9772 an entry for the restart register.
9773 (mips_cannot_fetch_register, mips_cannot_store_register)
9774 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9775 register names to match the XML descriptions.
9776 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
9777 restart register instead of $0.
9778
0e7f50da
UW
97792007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9780 Markus Deuling <deuling@de.ibm.com>
9781
9782 * remote-utils.c (decode_xfer_write): New function.
9783 * server.h (decode_xfer_write): Add prototype.
9784 * server.c (handle_query): Add PACKET_LEN argument. Support
9785 qXfer:spu:read and qXfer:spu:write packets.
9786 (main): Pass packet_len to handle_query.
9787 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9788 * target.h (target_ops): Add qxfer_spu.
9789
374c1d38
UW
97902007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
9791
9792 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9793 accessing non-seekable spufs files.
9794
bb63802a
UW
97952007-05-16 Markus Deuling <deuling@de.ibm.com>
9796
889bf7c5 9797 * server.c (handle_query): Add reply for qC packet.
bb63802a 9798
7390519e
PA
97992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9800 Leo Zayas <lerele@champenstudios@com>
9801
9802 * server.h (check_remote_input_interrupt_request): New function.
9803 * remote_utils.c (INVALID_DESCRIPTOR): New define.
9804 (remote_desc): Initialize with INVALID_DESCRIPTOR.
9805 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
9806 (check_remote_input_interrupt_request): New function.
9807 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 9808 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
9809 winapi_GenerateConsoleCtrlEvent): New typedefs.
9810 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9811 to 250 ms.
9812 (win32_wait): Check for remote interrupt request
9813 with check_remote_input_interrupt_request.
9814 (win32_request_interrupt): New function.
9815 (win32_target_op): Set request_interrupt to win32_request_interrupt.
9816
34b34921
PA
98172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9818
9819 * win32-low.c (debug_registers_changed,
9820 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9821 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9822 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9823 (thread_rec): Get context using the low target.
9824 (child_add_thread): Call thread_added on the low target,
9825 which does the same thing.
9826 (regptr): Delete.
9827 (do_initial_child_stuff): Remove debug registers references.
9828 Set context using the low target. Resume threads after
9829 setting the contexts.
9830 (child_continue): Remove dead variable. Remove debug
9831 registers references.
9832 (child_fetch_inferior_registers): Go through the low target.
9833 (do_child_store_inferior_registers): Remove.
9834 (child_store_inferior_registers): Go through the low target.
9835 (win32_resume): Remove debug registers references.
9836 Set context using the low target.
9837 (handle_exception): Change return type to void. Don't record
9838 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
9839 first chance exception.
889bf7c5 9840 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
9841 goto loop. Always return after waiting for debug event.
9842 (win32_wait): Convert to switch statement. Handle spurious
9843 events.
9844
9845 * win32-i386-low.c (debug_registers_changed,
9846 debug_registers_used): New.
9847 (initial_stuff): Rename to ...
9848 (i386_initial_stuff): ... this. Clear debug registers
9849 state variables.
9850 (store_debug_registers): Delete.
9851 (i386_get_thread_context): New.
9852 (load_debug_registers): Delete.
9853 (i386_set_thread_context): New.
9854 (i386_thread_added): New.
9855 (single_step): Rename to ...
9856 (i386_single_step): ... this.
9857 (do_fetch_inferior_registers): Rename to ...
9858 (i386_fetch_inferior_register): ... this.
9859 (i386_store_inferior_register): New.
9860 (the_low_target): Adapt to new interface.
9861
9862 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9863 (arm_get_thread_context): New.
9864 (arm_set_thread_context): New.
9865 (regptr): New.
9866 (do_fetch_inferior_registers): Rename to ...
9867 (arm_fetch_inferior_register): ... this.
9868 (arm_store_inferior_register): New.
9869 (arm_wince_breakpoint): Reimplement as unsigned long.
9870 (arm_wince_breakpoint_len): Define.
9871 (the_low_target): Adapt to new interface.
9872
9873 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9874 load_debug_registers. Add get_thread_context, set_thread_context,
9875 thread_added and store_inferior_register. Rename
9876 fetch_inferior_registers to fetch_inferior_register.
9877 (regptr): Remove declaration.
9878
dd6953e1
PA
98792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9880
9881 * linux-low.c (linux_detach): Change return type to int. Return 0.
9882 * spu-low.c (spu_detach): Likewise.
9883
444d6139
PA
98842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9885
9886 * target.h (target_ops): Change return type of detach to int.
9887 Add join.
9888 (join_inferior): New.
9889 * server.c (main): Don't skip detach support on mingw32.
9890 If the inferior doesn't support detaching return error.
9891 Call join_inferior instead of using waitpid.
9892 * linux-low.c (linux_join): New.
9893 (linux_target_op): Add linux_join.
9894 * spu-low.c (spu_join): New.
9895 (spu_target_ops): Add spu_join.
9896 * win32-low.c (win32_detach): Adapt to new interface.
9897 Reopen current_process_handle before detaching. Issue a child
9898 resume before detaching.
9899 (win32_join): New.
9900 (win32_target_op): Add win32_join.
9901
1d5315fe
PA
99022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9903
9904 * win32-low.c (win32-attach): Fix return value.
9905 * target.h (target_ops): Describe ATTACH return values.
9906
bf914831
PA
99072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9908
9909 * win32-low.c (GETPROCADDRESS): Define.
9910 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
9911 (winapi_DebugSetProcessKillOnExit): Likewise.
9912 (win32_create_inferior): Force usage of ansi CreateProcessA.
9913 (win32_attach): Use GETPROCADDRESS.
9914 (win32_detach): Likewise.
9915
f72f3e60
PA
99162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
9917
9918 * win32-low.c (win32_wait): Don't use WSTOPSIG.
9919
ed50f18f
PA
99202007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
9921
9922 * win32-low.c: Commit leftover changes from 2007-03-29.
9923
0c2ead7e
DJ
99242007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9925
9926 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9927 fields short instead of int. Add explicit padding.
9928 (i387_cache_to_fsave): Remove unnecessary casts.
9929 (i387_fsave_to_cache): Doc fix.
9930 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9931
73725ff3
DJ
99322007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
9933
9934 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9935 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9936
d99f33d8
PA
99372007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9938
9939 * configure.srv (arm*-*-mingw32ce*): Move near the other
9940 arm targets.
9941
68070c10
PA
99422007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
9943
2482afc6 9944 * configure.ac: Add errno checking.
68070c10
PA
9945 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9946 sys/file.h and malloc.h.
9947 (AC_CHECK_DECLS): Add perror.
9948 (srv_mingwce): Handle.
2482afc6 9949 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
9950 win32-i386-low.o to srv_tgtobj.
9951 (i[34567]86-*-mingw*): Likewise.
9952 (arm*-*-mingw32ce*): Add case.
9953 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9954 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9955 [__MINGW32CE__] (strerror): New function.
9956 [__MINGW32CE__] (errno): Define to GetLastError.
9957 [__MINGW32CE__] (COUNTOF): New macro.
9958 (remote_open): Remove extra close call.
9959 * mem-break.c (delete_breakpoint_at): New function.
9960 * mem-break.h (delete_breakpoint_at): Declare.
9961 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9962 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9963 [USE_WIN32API] (read, write): Add char* casts.
9964 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9965 * server.h: Include wincecompat.h on Windows CE.
9966 [HAVE_ERRNO_H]: Check.
9967 (perror): Declare if not declared.
9968 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9969 (perror_with_name): Remove errno declaration.
9970 * wincecompat.h: New.
9971 * wincecompat.c: New.
9972 * win32-low.h: New.
9973 * win32-arm-low.c: New.
9974 * win32-i386-low.c: New.
9975 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9976 (OUTMSG2): Make it safe.
9977 (_T): New macro.
9978 (COUNTOF): New macro.
9979 (NUM_REGS): Get it from the low target.
9980 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9981 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9982 (thread_rec): Let low target handle debug registers.
9983 (child_add_thread): Likewise.
9984 (child_init_thread_list): Likewise.
9985 (continue_one_thread): Likewise.
9986 (regptr): New.
9987 (do_child_fetch_inferior_registers): Move to ...
9988 * win32-i386-low.c: ... here, and rename to ...
9989 (do_fetch_inferior_registers): ... this.
889bf7c5 9990 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
9991 Go through the low target.
9992 (do_child_store_inferior_registers): Use regptr.
9993 (strwinerror): New function.
9994 (win32_create_inferior): Handle Windows CE.
9995 Use strwinerror instead of strerror on Windows error
9996 codes. Add program to the error output.
9997 Don't close the main thread handle on Windows CE.
9998 (win32_attach): Use coredll.dll on Windows CE.
9999 (win32_kill): Close current process and current
10000 thread handles.
10001 (win32_detach): Use coredll.dll on Windows CE.
10002 (win32_resume): Let low target handle debug registers, and
10003 step request.
10004 (handle_exception): Add/Remove initial breakpoint. Avoid
10005 non-existant WSTOPSIG on Windows CE.
10006 (win32_read_inferior_memory): Cast to remove warning.
10007 (win32_arch_string): Go through the low target.
10008 (initialize_low): Call set_breakpoint_data with the low
10009 target's breakpoint.
10010 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10011 FOP_REGNUM, mappings): Move to ...
10012 * win32-i386-low.c: ... here.
10013 * win32-low.c (win32_thread_info): Move to ...
10014 * win32-low.h: ... here.
10015 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10016 win32-arm-low.c and wincecompat.c.
10017 (all:): Add $EXEEXT.
10018 (install-only:): Likewise.
10019 (gdbserver:): Likewise.
10020 (gdbreplay:): Likewise.
10021 * config.in: Regenerate.
10022 * configure: Regenerate.
10023
41093d81
PA
100242007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10025
10026 * win32-low.c: Rename typedef thread_info to
10027 win32_thread_info throughout.
10028
544afa54
PA
100292007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10030
10031 * win32-i386-low.c: Rename to ...
10032 * win32-low.c: ... this.
10033 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10034 * Makefile.in: Likewise.
10035
bce7165d
PA
100362007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10037
10038 * remote-utils.c (monitor_output): Constify msg parameter.
10039 * server.h (monitor_output): Likewise.
10040 * win32-i386-low.c (handle_output_debug_string): New.
10041 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10042 handle_output_debug_string.
10043 (get_child_debug_event): Likewise.
10044
506c7aa0
DJ
100452007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10046
10047 * server.c (main): Correct strtoul check.
10048
42c81e2a
DJ
100492007-03-27 Jon Ringle <jon@ringle.org>
10050
10051 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10052
9453113a
DJ
100532007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10054
10055 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10056
64a69107
DJ
100572007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10058
10059 * terminal.h: Check HAVE_SGTTY_H.
10060
100612007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10062
10063 * remote-utils.c (remote_open): Print out the assigned port number.
10064
c74d0ad8
DJ
100652007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10066
10067 * remote-utils.c (monitor_output): New function.
10068 * server.c (debug_threads): Define here.
10069 (monitor_show_help): New function.
10070 (handle_query): Handle qRcmd.
10071 (main): Do not handle 'd' packet.
10072 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10073 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10074 of debug_threads.
10075
de7c3b4a
PA
100762007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10077
10078 * Makefile.in (EXEEXT): New.
10079 (clean): Use $(EXEEXT).
10080
ef57601b
PA
100812007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10082
10083 * target.h (target_ops): Rename send_signal to request_interrupt,
10084 and remove enum target_signal parameter.
10085 * linux-low.c (linux_request_interrupt): Rename from
10086 linux_send_signal, and always send SIGINT.
10087 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10088 and always send SIGINT.
10089 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10090 of send_signal.
10091 (input_interrupt): Likewise.
10092
820f2bda
PA
100932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10094
10095 * server.c (get_features_xml): Check if target implemented
10096 arch_string.
10097 * win32-i386-low.c (win32_arch_string): New.
10098 (win32_target_ops): Add win32_arch_string as arch_string member.
10099
ab39bf24
UW
101002007-02-22 Markus Deuling <deuling@de.ibm.com>
10101
10102 * spu-low.c (spu_arch_string): New.
10103 (spu_target_ops): Add spu_arch_string.
10104
61ff6e04
DJ
101052007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10106
10107 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10108 * configure.ac: Do not check for terminal.h.
10109 * configure, config.in: Regenerated.
10110
fb1e4ffc
DJ
101112007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10112
10113 * Makefile.in (OBS): Add $(XML_BUILTIN).
10114 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
10115 (clean): Update.
10116 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
10117 (arm-with-iwmmxt.c): New.
10118 * config.in, configure: Regenerate.
10119 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
10120 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
10121 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
10122 (arm*-*-linux*): Add iWMMXt and regset support.
10123 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10124 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10125 (arm_store_wmmxregset, target_regsets): New.
10126 * server.c (get_features_xml): Take annex argument. Check builtin
10127 XML documents.
10128 (handle_query): Handle multiple annexes.
10129
0f48aa01
DJ
101302007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10131
10132 * remote-utils.c [USE_WIN32API] (read, write): Define.
10133 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10134 write.
10135
23181151
DJ
101362007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
10137
10138 * linux-i386-low.c (the_low_target): Set arch_string.
10139 * linux-x86-64-low.c (the_low_target): Likewise.
10140 * linux-low.c (linux_arch_string): New.
10141 (linux_target_ops): Add it.
10142 * linux-low.h (struct linux_target_ops): Add arch_string.
10143 * server.c (write_qxfer_response): Use const void * for DATA.
10144 (get_features_xml): New.
10145 (handle_query): Handle qXfer:features:read. Report it for qSupported.
10146 * target.h (struct target_ops): Add arch_string method.
10147
9d606399
DJ
101482007-01-03 Denis Pilat <denis.pilat@st.com>
10149 Daniel Jacobowitz <dan@codesourcery.com>
10150
10151 * linux-low.c (linux_kill): Handle being called with no threads.
10152 * win32-i386-low.c (win32_kill): Likewise.
10153 (get_child_debug_event): Clear current_process_handle.
10154
101552006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
10156 Daniel Jacobowitz <dan@codesourcery.com>
10157
10158 * remote-utils.c (remote_open): Check the type of specified
10159 serial port devices before opening them.
10160 * server.c (main): Kill the inferior if an error occurs during
10161 the first remote_open.
10162
a5e13d24
DJ
101632006-12-05 Markus Deuling <deuling@de.ibm.com>
10164
10165 * README: Update supported targets.
10166
186947f7
DJ
101672006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
10168
10169 * Makefile.in (clean): Remove reg-mips64.c.
10170 (reg-mips64.c, reg-mips64.o): New rules.
10171 * configure.srv: Handle mips64. Include regset support for mips.
10172 * linux-mips-low.c (union mips_register): New.
10173 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10174 (mips_breakpoint, mips_breakpoint_at): Use int.
10175 (mips_collect_register, mips_supply_register)
10176 (mips_collect_register_32bit, mips_supply_register_32bit)
10177 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10178 (mips_store_fpregset, target_regsets): New.
10179 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10180
a13e2c95
UW
101812006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
10182
10183 * configure.srv: Add target "spu*-*-*".
10184 * Makefile.in (clean): Remove reg-spu.c.
10185 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10186 * spu-low.c: New file.
10187
cb7283db
DJ
101882006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10189
10190 * configure.ac: Correct td_thr_tls_get_addr test.
10191 * configure: Regenerated.
10192
89be2091
DJ
101932006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * linux-low.c (linux_wait_for_event): Reformat. Use the
10196 pass_signals array.
10197 * remote-utils.c (decode_address_to_semicolon): New.
10198 * server.c (pass_signals, handle_general_set): New.
10199 (handle_query): Mention QPassSignals for qSupported.
10200 (main): Call handle_general_set.
10201 * server.h (pass_signals, decode_address_to_semicolon): New.
10202
000ef4f0
DJ
102032006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
10204
10205 * server.c (handle_query): Correct error handling for read_auxv.
10206
b7149293
UW
102072005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
10208
10209 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10210 and srv_linux_thread_db to yes.
10211 * linux-s390-low.c (s390_fill_gregset): New function.
10212 (target_regsets): Define data structure.
10213
dae5f5cf
DJ
102142006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
10215
10216 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10217 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
10218 * config.in, configure: Regenerated.
10219 * inferiors.c (gdb_id_to_thread): New function.
10220 (gdb_id_to_thread_id): Use it.
10221 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10222 * linux-low.h (struct process_info): Add th member.
10223 (thread_db_get_tls_address): New prototype.
10224 * remote-utils.c (decode_address): Make non-static.
10225 * server.c (handle_query): Handle qGetTLSAddr.
10226 * server.h (gdb_id_to_thread, decode_address): New prototypes.
10227 * target.h (struct target_ops): Add get_tls_address.
10228 * thread-db.c (maybe_attach_thread): Save the thread handle.
10229 (thread_db_get_tls_address): New.
10230
32ca6d61
DJ
102312006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
10232
10233 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10234 (linux_resume_one_process): Take a siginfo_t *. Update all
10235 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
10236 (struct pending_signals): Add a siginfo_t.
10237 (linux_wait_for_process): Always set last_status.
10238 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10239 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10240 * linux-low.h (struct process_info): Add last_status.
10241
5ffff7c1
DJ
102422006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
10243
10244 * remote-utils.c (try_rle): New function.
10245 (putpkt_binary): Use it.
10246
8695c747
DJ
102472006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
10248
10249 * Makefile.in (clean): Clean reg-x86-64-linux.c.
10250 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10251 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10252 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10253 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10254 point registers.
10255
290fadea
RS
102562006-08-08 Richard Sandiford <richard@codesourcery.com>
10257
10258 * server.c (terminal_fd): New variable.
10259 (old_foreground_pgrp): Likewise.
10260 (restore_old_foreground_pgrp): New function.
10261 (start_inferior): Record the terminal file descriptor in terminal_fd
10262 and its original foreground group in old_foreground_pgrp. Register
10263 restore_old_foreground_pgrp with atexit().
10264
9f2e1e63
DJ
102652006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
10266
10267 * server.c (handle_query): Correct qPart to qXfer.
10268
b80864fb
DJ
102692006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
10270
10271 * configure.ac: Check for more headers which are missing on
10272 Windows. Automatically supply -lwsock32 and USE_WIN32API.
10273 * configure.srv: Add Cygwin and mingw32.
10274 * remote-utils.c: Don't include headers unconditionally which
10275 are missing on mingw32. Include <winsock.h> for mingw32.
10276 (remote_open): Adjust for mingw32 support. Flush
10277 standard error after writing to it.
10278 (remote_close, putpkt_binary, input_interrupt, block_async_io)
10279 (unblock_async_io, enable_async_io, disable_async_io)
10280 (readchar, getpkt): Update for Winsock support.
10281 (prepare_resume_reply): Expect a protocol signal number.
10282 * server.c: Disable <sys/wait.h> on mingw32.
10283 (start_inferior): Adjust for mingw32 support. Flush
10284 standard error after writing to it.
10285 (attach_inferior): Likewise. Use protocol signal
10286 numbers.
10287 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
10288 and names.
10289 * win32-i386-low.c: New file.
10290 * Makefile.in (XM_CLIBS): Set.
10291 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10292 (win32-i386-low.o): New dependency rule.
10293 * linux-low.c (linux_wait): Use target signal numbers.
10294 * target.h (struct target_ops): Doc fix.
10295 * server.h (target_signal_to_name): New prototype.
10296 * gdbreplay.c: Don't include headers unconditionally which
10297 are missing on mingw32. Include <winsock.h> for mingw32.
10298 (remote_close, remote_open): Adjust for Winsock support.
10299 * configure, config.in: Regenerated.
10300
0876f84a
DJ
103012006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10302
10303 * server.c (decode_xfer_read, write_qxfer_response): New.
10304 (handle_query): Take a packet length argument. Handle
10305 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
10306 the qSupported response.
10307 (main): Update call to handle_query.
10308
01f9e8fa
DJ
103092006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
10310
10311 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10312 (putpkt_binary): Renamed from putpkt and adjusted for binary
10313 data.
10314 (putpkt): New wrapper for putpkt_binary.
10315 (readchar): Don't mask off the high bit.
10316 (decode_X_packet): New function.
10317 * server.c (main): Call putpkt_binary if a handler sets the packet
10318 length. Save the length of the incoming packet. Handle 'X'.
10319 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10320
be2a5f71
DJ
103212006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
10322
10323 * server.c (handle_query): Handle qSupported.
10324
ea025f5f
DJ
103252006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * remote-utils.c (all_symbols_looked_up): New variable.
10328 (look_up_one_symbol): Check it.
10329 * server.h (look_up_one_symbol): New declaration.
10330 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10331
9308fc88
DJ
103322006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
10333
10334 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 10335 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
10336 (PTRACE_GET_THREAD_AREA): Define.
10337 (ps_get_thread_area): New function.
10338
52fb6437
NS
103392006-05-09 Nathan Sidwell <nathan@codesourcery.com>
10340
10341 * configure.srv (m68k*-*-uclinux*): New target.
10342 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10343 (linux_resume_one_process): Remove extraneous cast.
10344 (linux_read_offsets): New.
10345 (linux_target_op): Add linux_read_offsets on mmuless systems.
10346 * server.c (handle_query): Add qOffsets logic.
10347 * target.h (struct target_ops): Add read_offsets.
10348
21b0f40c
DJ
103492006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10350
10351 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10352 (PTRACE_GET_THREAD_AREA): Define.
10353 (ps_get_thread_area): New function.
10354 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10355 (linux-x86-64-low.o): Update.
10356
0050a760
DJ
103572006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
10358
10359 * configure.ac: Remove checks for prfpregset_t.
10360 * gdb_proc_service.h: New file.
10361 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10362 new "gdb_proc_service.h".
10363 * proc-service.c: Likewise.
10364 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10365 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10366 * Makefile.in (gdb_proc_service_h): Updated.
10367 * configure, config.in: Regenerated.
10368
b92a518e
DJ
103692006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10370
10371 * remote-utils.c (prepare_resume_reply): Move declaration
10372 of gdb_id_from_wait to the top of the block.
10373
545587ee
DJ
103742006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
10375
10376 * linux-low.c (regsets_store_inferior_registers): Read the regset
10377 from the target before filling it.
10378
9db87ebd
DJ
103792006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10380
10381 * server.c (attach_inferior): Return SIGTRAP for a successful
10382 attach.
10383
dd24457d
DJ
103842006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10385
10386 * Makefile.in (OBS): Add version.o.
10387 (STAGESTUFF): Delete.
10388 (version.o): Add dependencies.
10389 (version.c): Replace rule.
10390 (clean): Remove version.c.
10391 * server.c (gdbserver_version): New.
10392 (gdbserver_usage): Use printf.
10393 (main): Handle --version and --help.
10394 * server.h (version, host_name): Add declarations.
10395
6f0f660e
EZ
103962005-12-23 Eli Zaretskii <eliz@gnu.org>
10397
889bf7c5
PA
10398 * linux-arm-low.c:
10399 * linux-arm-low.c:
10400 * inferiors.c:
10401 * i387-fp.h:
10402 * i387-fp.c:
10403 * gdbreplay.c:
10404 * regcache.c:
10405 * proc-service.c:
10406 * mem-break.h:
10407 * mem-break.c:
10408 * linux-x86-64-low.c:
10409 * linux-sh-low.c:
10410 * linux-s390-low.c:
10411 * linux-ppc64-low.c:
10412 * linux-ppc-low.c:
10413 * linux-mips-low.c:
10414 * linux-m68k-low.c:
10415 * linux-m32r-low.c:
10416 * linux-low.h:
10417 * linux-low.c:
10418 * linux-ia64-low.c:
10419 * linux-i386-low.c:
10420 * linux-crisv32-low.c:
10421 * thread-db.c:
10422 * terminal.h:
10423 * target.h:
10424 * target.c:
10425 * server.h:
10426 * server.c:
10427 * remote-utils.c:
10428 * regcache.h:
10429 * utils.c:
10430 * Makefile.in:
10431 * configure.ac:
6f0f660e
EZ
10432 * gdbserver.1: Add (C) after Copyright. Update the FSF
10433 address.
10434
9d1fb177
DJ
104352005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10438 (arm_breakpoint_at): Recognize both breakpoints.
10439 (the_low_target): Use the correct breakpoint instruction.
10440
011a70c2
DJ
104412005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
10442
10443 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10444 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10445 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10446 (the_low_target): Update.
10447
7fb85e41
AS
104482005-10-25 Andreas Schwab <schwab@suse.de>
10449
10450 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10451
10452 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10453 (ia64_num_regs): Reduce to 462.
10454
3db0444b
DJ
104552005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
10456
10457 * acinclude.m4: Correct quoting.
10458 * aclocal.m4: Regenerated.
10459
10460 Suggested by SZOKOVACS Robert <szo@ies.hu>:
10461 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10462 (thread_db_init): Call thread_db_err_str.
10463 * configure.ac: Check for TD_VERSION.
10464 * config.in, configure: Regenerated.
10465
bee0189a
DJ
104662005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10467
10468 * server.h (error, fatal, warning): Add ATTR_FORMAT.
10469
e9d25b98
DJ
104702005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10471
10472 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10473 is not available. Define HAVE_PTRACE_GETREGS if it is.
10474 * config.in, configure: Regenerated.
10475 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10476 * linux-i386-low.c, linux-m68k-low.c: Update to use
10477 HAVE_PTRACE_GETREGS.
10478 * linux-low.c (regsets_fetch_inferior_registers)
10479 (regsets_store_inferior_registers): Only return 0 if we processed
10480 GENERAL_REGS.
10481 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10482 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10483
a06660f7
DJ
104842005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10485
10486 * inferiors.c (struct thread_info): Add gdb_id.
10487 (add_thread): Add gdb_id argument.
10488 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10489 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10490 calls to add_thread.
10491 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10492 * server.c (handle_query): Use thread_to_gdb_id.
10493 (handle_v_cont, main): Use gdb_id_to_thread_id.
10494 * server.h (add_thread): Update prototype.
10495 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10496 prototypes.
10497
5a1f5858
DJ
104982005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
10499
10500 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10501 left-padded registers.
10502 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10503 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10504
e122f1f5
SE
105052005-07-01 Steve Ellcey <sje@cup.hp.com>
10506
10507 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10508 * configure: Regenerate.
10509 * config.in: Regenerate.
10510 * server.h (NEED_DECLARATION_STRERROR):
10511 Replace with !HAVE_DECL_STRERROR.
10512
d592fa2f
DJ
105132005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
10514
10515 * linux-low.c (linux_wait, linux_send_signal): Don't test
10516 an unsigned long variable for > 0 if it could be MAX_ULONG.
10517 * server.c (myresume): Likewise.
10518 * target.c (set_desired_inferior): Likewise.
10519
ccbd4912
MK
105202005-06-13 Mark Kettenis <kettenis@gnu.org>
10521
10522 * configure.ac: Simplify and improve check for socklen_t.
10523 * configure, config.in: Regenerate.
10524
f450004a
DJ
105252005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
10526
10527 * acconfig.h: Remove.
10528 * configure.ac: Add a test for socklen_t. Use three-argument
10529 AC_DEFINE throughout.
10530 * config.in: Regenerated using autoheader 2.59.
10531 * configure: Regenerated.
10532
10533 * gdbreplay.c (socklen_t): Provide a default.
10534 (remote_open): Use socklen_t.
10535 * remote-utils.c (socklen_t): Provide a default.
10536 (remote_open): Use socklen_t.
10537 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10538 unsigned char.
10539
10540 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10541 char for buffers.
10542 * linux-low.c (linux_read_memory, linux_write_memory)
10543 (linux_read_auxv): Likewise.
10544 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10545 (check_mem_write): Likewise.
10546 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10547 Likewise.
10548 * regcache.c (struct inferior_rgcache_data, registers_to_string)
10549 (registers_from_string, register_data): Likewise.
10550 * server.c (handle_query, main): Likewise.
10551 * server.h (convert_ascii_to_int, convert_int_to_ascii)
10552 (decode_M_packet): Likewise.
10553 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10554 * target.h (struct target_ops): Update read_memory, write_memory,
10555 and read_auxv.
10556 (read_inferior_memory, write_inferior_memory): Update.
10557 * linux-low.h (struct linux_target_ops): Change type of breakpoint
10558 to unsigned char *.
10559 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10560 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10561 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10562 linux-s390-low.c, linux-sh-low.c: Update for changes in
10563 read_inferior_memory and the_low_target->breakpoint.
10564
eee84df1
DJ
105652005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
10566
10567 * Makefile.in (SFILES): Add linux-ppc64-low.c.
10568 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10569 * configure.srv: Add powerpc64-*-linux*.
10570 * linux-ppc64-low.c: New file.
10571
45b134e5
OF
105722005-05-23 Orjan Friberg <orjanf@axis.com>
10573
10574 * linux-cris-low.c: New file with support for CRIS.
10575 * linux-crisv32-low.c: Ditto for CRISv32.
10576 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10577 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 10578 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
10579 reg-crisv32.o, and reg-crisv32.c to make rules.
10580 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10581 recognized targets.
10582
48d93c75
UW
105832005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
10584
10585 * linux-low.c (fetch_register): Ensure buffer size is a multiple
10586 of sizeof (PTRACE_XFER_TYPE).
10587 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
10588
e013ee27
OF
105892005-05-12 Orjan Friberg <orjanf@axis.com>
10590
889bf7c5 10591 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
10592 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10593 pointers for hardware watchpoint support.
10594 * linux-low.h (struct linux_target_ops): Ditto.
10595 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10596 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
10597 to linux_target_ops.
10598 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10599 reply packet.
10600 * server.c (main): Recognize 'Z' and 'z' packets.
10601
b0ded00b
UW
106022005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
10603
10604 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10605 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10606 (the_low_target): Add new members.
10607
8643e2ad
DJ
106082005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10609
10610 * proc-service.c (ps_lgetregs): Search all_processes instead of
10611 all_threads.
10612
fc620387
DJ
106132005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
10614
10615 * server.c (start_inferior): Change return type to int.
10616 (attach_inferior): Change sigptr to int *.
10617 (handle_v_cont, handle_v_requests): Change signal to int *.
10618 (main): Change signal to int.
10619
106202005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
10621
10622 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10623 * configure.srv: Add m32r*-*-linux*.
10624 * linux-m32r-low.c: New file.
10625
e0e76420
DJ
106262005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
10627
10628 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10629
a1928bad
DJ
106302005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
10631
10632 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10633 Take unsigned long arguments for PIDs.
10634 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10635 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10636 (wait_for_sigstop, linux_resume_one_process)
10637 (regsets_fetch_inferior_registers, linux_send_signal)
10638 (linux_read_auxv): Likewise. Update the types of variables holding
10639 PIDs. Update format string specifiers.
10640 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10641 * remote-utils.c (prepare_resume_reply): Likewise.
10642 * server.c (cont_thread, general_thread, step_thread)
10643 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10644 unsigned long.
10645 (handle_query): Update format specifiers.
10646 (handle_v_cont, main): Use strtoul for thread IDs.
10647 * server.h (struct inferior_list_entry): Use unsigned long for ID.
10648 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10649 (general_thread, step_thread, thread_from_wait)
10650 (old_thread_from_wait): Update.
10651 * target.h (struct thread_resume): Use unsigned long for THREAD.
10652 (struct target_ops): Use unsigned long for arguments to attach and
10653 thread_alive.
10654
dcdb98d2
DJ
106552005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
10656
10657 * acinclude.m4: Include bfd/bfd.m4 directly.
10658 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
10659 <agriffis@toolchain.org>.
10660 * aclocal.m4, configure: Regenerated.
10661
bec39cab
AC
106622005-01-07 Andrew Cagney <cagney@gnu.org>
10663
10664 * configure.ac: Rename configure.in, require autoconf 2.59.
10665 * configure: Re-generate.
10666
434c4c77
DJ
106672004-12-08 Daniel Jacobowitz <dan@debian.org>
10668
10669 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
10670 LIBS when finished.
10671 * aclocal.m4: Regenerated.
10672 * configure: Regenerated.
10673
db1d3e1b
AS
106742004-11-21 Andreas Schwab <schwab@suse.de>
10675
10676 * linux-m68k-low.c (m68k_num_gregs): Define.
10677 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10678 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10679 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10680 (m68k_breakpoint_at): New. Add to the_low_target.
10681
10682 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10683 srv_linux_thread_db to yes.
10684
43360365
JB
106852004-10-20 Joel Brobecker <brobecker@gnat.com>
10686
10687 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10688 (ARCH_SET_FS): Likewise.
10689 (ARCH_GET_FS): Likewise.
10690 (ARCH_GET_GS): Likewise.
10691
fd500816
DJ
106922004-10-16 Daniel Jacobowitz <dan@debian.org>
10693
10694 * linux-i386-low.c (ps_get_thread_area): New.
10695 * linux-x86-64-low.c (ps_get_thread_area): New.
10696 * linux-low.c: Include <sys/syscall.h>.
10697 (linux_kill_one_process): Don't kill the first thread here.
10698 (linux_kill): Kill the first thread here.
10699 (kill_lwp): New function.
10700 (send_sigstop, linux_send_signal): Use it.
10701 * proc-service.c: Clean up #ifdefs.
10702 (fpregset_info): Delete.
10703 (ps_lgetregs): Update and enable implementation.
10704 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10705 implementations.
10706 * remote-utils.c (struct sym_cache, symbol_cache): New.
10707 (input_interrupt): Print a clearer message.
10708 (async_io_enabled): New variable.
10709 (enable_async_io, disable_async_io): Use it. Update comments.
10710 (look_up_one_symbol): Use the symbol cache.
10711 * thread-db.c (thread_db_look_up_symbols): New function.
10712 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
10713
f6de3c42
DJ
107142004-10-16 Daniel Jacobowitz <dan@debian.org>
10715
10716 * configure.in: Test for -rdynamic.
10717 * configure: Regenerated.
10718 * Makefile (INTERNAL_LDFLAGS): New.
10719 (gdbserver, gdbreplay): Use it.
10720
2c0fc042
AC
107212004-09-02 Andrew Cagney <cagney@gnu.org>
10722
10723 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10724
075b3282
DJ
107252004-03-23 Daniel Jacobowitz <drow@mvista.com>
10726
10727 * linux-low.c (linux_wait): Clear all_processes list also.
10728
fa6a77dc
DJ
107292004-03-12 Daniel Jacobowitz <drow@mvista.com>
10730
10731 * linux-low.c: Include <errno.h>. Remove extern declaration of
10732 errno.
10733
6d782a97
DJ
107342004-03-12 Daniel Jacobowitz <drow@mvista.com>
10735
10736 * gdbreplay.c, server.h, utils.c: Update copyright years.
10737
3a7fb99b
DJ
107382004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10739
10740 * server.c (main): Print child status or termination signal from
10741 variable 'signal', not 'sig'.
10742
c3e735a6
DJ
107432004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
10744
10745 * linux-low.c (linux_read_memory): Change return type to
10746 int. Check for and return error from ptrace().
10747 * target.c (read_inferior_memory): Change return type to int. Pass
10748 back return status from the_target->read_memory().
10749 * target.h (struct target_ops): Adapt *read_memory() prototype.
10750 Update comment.
10751 (read_inferior_memory): Adapt prototype.
10752 * server.c (main): Return an error packet if
10753 read_inferior_memory() returns an error.
10754
a59d1c82
DJ
107552004-03-04 Daniel Jacobowitz <drow@mvista.com>
10756
10757 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10758 Unify with other clean targets.
10759
dc3f8883
DJ
107602004-02-29 Daniel Jacobowitz <drow@mvista.com>
10761
10762 * server.c (handle_v_cont): Call set_desired_inferior.
10763
89a208da
DJ
107642004-02-29 Daniel Jacobowitz <drow@mvista.com>
10765
10766 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10767
62ea82f5
DJ
107682004-02-29 Daniel Jacobowitz <drow@mvista.com>
10769
10770 * linux-low.c (linux_wait): Unblock async I/O.
10771 (linux_resume): Block and enable async I/O.
10772 * remote-utils.c (block_async_io, unblock_async_io): New functions.
10773 * server.h (block_async_io, unblock_async_io): Add prototypes.
10774
6910d122
DJ
107752004-02-29 Daniel Jacobowitz <drow@mvista.com>
10776
10777 * remote-utils.c (remote_open): Print a status notice after
10778 opening a TCP port.
10779 * server.c (attach_inferior): Print a status notice after
10780 attaching.
10781
107822004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
10783
10784 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10785
c89dc5d4
DJ
107862004-02-26 Daniel Jacobowitz <drow@mvista.com>
10787
10788 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10789 error packet.
10790 * server.c, target.h: Update copyright years.
10791
4b8dad4a
RM
107922004-02-25 Roland McGrath <roland@redhat.com>
10793
10794 * target.h (struct target_ops): New member `read_auxv'.
10795 * server.c (handle_query): Handle qPart:auxv:read: query using that.
10796 * linux-low.c (linux_read_auxv): New function.
10797 (linux_target_ops): Initialize `read_auxv' member to that.
10798
d7446758
JB
107992004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10800
10801 Committed by Jim Blandy <jimb@redhat.com>.
10802
10803 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 10804 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
10805 instead of GPR_SIZE to distiguish s390 and s390x targets.
10806
5544ad89
DJ
108072004-01-31 Daniel Jacobowitz <drow@mvista.com>
10808
10809 * linux-low.c: Update copyright year.
10810 (check_removed_breakpoint): Clear pending_is_breakpoint.
10811 (linux_set_resume_request, linux_queue_one_thread)
10812 (resume_status_pending_p): New functions.
10813 (linux_continue_one_thread): Use process->resume.
10814 (linux_resume): Only resume threads if there are no pending events.
10815 * linux-low.h (struct process_info): Add resume request
10816 pointer.
10817
2a68b70e
DJ
108182004-01-30 Daniel Jacobowitz <drow@mvista.com>
10819
10820 * regcache.c (new_register_cache): Clear the allocated register
10821 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10822
64386c31
DJ
108232003-10-13 Daniel Jacobowitz <drow@mvista.com>
10824
10825 * linux-low.c (linux_resume): Take a struct thread_resume *
10826 argument.
10827 (linux_wait): Update call.
10828 (resume_ptr): New static variable.
10829 (linux_continue_one_thread): Renamed from
10830 linux_continue_one_process. Use resume_ptr.
10831 (linux_resume): Use linux_continue_one_thread.
10832 * server.c (handle_v_cont, handle_v_requests): New functions.
10833 (myresume): New function.
10834 (main): Handle 'v' case.
10835 * target.h (struct thread_resume): New type.
10836 (struct target_ops): Change argument of "resume" to struct
10837 thread_resume *.
10838 (myresume): Delete macro.
10839
c938e9b0
L
108402003-08-08 H.J. Lu <hongjiu.lu@intel.com>
10841
10842 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10843 (uninstall): Support DESTDIR.
10844
7f313d07
BC
10845Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
10846
10847 * configure.srv: Add xscale*linux copy of arm*linux entry.
10848
3b2fc2ea
DJ
108492003-07-24 Daniel Jacobowitz <drow@mvista.com>
10850
10851 * linux-arm-low.c (arm_reinsert_addr): New function.
10852 (the_low_target): Add arm_reinsert_addr.
10853
1c0a559e
MK
108542003-07-08 Mark Kettenis <kettenis@gnu.org>
10855
10856 * mem-break.c: Remove whitespace at end of file.
10857
43d5792c
DJ
108582003-06-28 Daniel Jacobowitz <drow@mvista.com>
10859
10860 * configure.in: Check whether we need to prototype strerror.
10861 * server.h: Optionally prototype strerror.
10862 * gdbreplay.c (perror_with_name): Use strerror.
10863 * linux-low.c (linux_attach_lwp): Use strerror.
10864 * utils.c (perror_with_name): Use strerror.
10865 * config.in, configure: Regenerated.
10866
c8a86edf
DJ
108672003-06-28 Daniel Jacobowitz <drow@mvista.com>
10868
10869 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10870 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10871
73d37363
DJ
108722003-06-20 Daniel Jacobowitz <drow@mvista.com>
10873
10874 * Makefile.in (SFILES): Update.
10875 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10876 low-sun3.c: Remove files.
10877
6ad8ae5c
DJ
108782003-06-17 Daniel Jacobowitz <drow@mvista.com>
10879
10880 * linux-low.c: Move comment to linux_thread_alive where it belonged.
10881 (linux_detach_one_process, linux_detach): New functions.
10882 (linux_target_ops): Add linux_detach.
10883 * server.c (main): Handle 'D' packet.
10884 * target.h (struct target_ops): Add "detach" member.
10885 (detach_inferior): Define.
10886
1581182a
MK
108872003-06-13 Mark Kettenis <kettenis@gnu.org>
10888
10889 From Kelley Cook <kelleycook@wideopenwest.com>:
10890 * configure.srv: Accept i[34567]86 variants.
10891
e5379b03
DJ
108922003-06-05 Daniel Jacobowitz <drow@mvista.com>
10893
10894 * linux-low.c (linux_wait_for_event): Correct comment typos.
10895 (linux_resume_one_process): Call check_removed_breakpoint.
10896 (linux_send_signal): New function.
10897 (linux_target_ops): Add linux_send_signal.
10898 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10899 of kill.
10900 * target.h (struct target_ops): Add send_signal.
10901
2ff29de4
JB
109022003-05-29 Jim Blandy <jimb@redhat.com>
10903
10904 * linux-low.c (usr_store_inferior_registers): Transfer buf in
10905 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
10906 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10907 away part of the register's value.
10908
254787d4
DJ
109092003-03-26 Daniel Jacobowitz <drow@mvista.com>
10910
10911 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10912 (linux_wait_for_event, linux_init_signals): Likewise.
10913
94e10508
DJ
109142003-03-17 Daniel Jacobowitz <drow@mvista.com>
10915
10916 * configure.in: Check for stdlib.h.
10917 * configure: Regenerated.
10918 * config.in: Regenerated.
10919
4c0711e0
DJ
109202003-01-04 Andreas Schwab <schwab@suse.de>
10921
10922 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10923
ef66e766
AC
109242003-01-02 Andrew Cagney <ac131313@redhat.com>
10925
10926 * Makefile.in: Remove obsolete code.
10927
a1358604
DJ
109282002-11-20 Daniel Jacobowitz <drow@mvista.com>
10929
10930 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10931 defined(PT_FPR0_HI).
10932
23ce3b1c
DJ
109332002-11-17 Stuart Hughes <seh@zee2.com>
10934
10935 * linux-arm-low.c (arm_num_regs): Increase.
10936 (arm_regmap): Include status register.
10937
109382002-11-17 Daniel Jacobowitz <drow@mvista.com>
10939
10940 * linux-low.c (register_addr): Remove incorrect -1 check.
10941
a9fa9f7d
DJ
109422002-08-29 Daniel Jacobowitz <drow@mvista.com>
10943
10944 * linux-low.c (linux_create_inferior): Call setpgid. Return
10945 the new PID.
10946 (unstopped_p, linux_signal_pid): Remove.
10947 (linux_target_ops): Remove linux_signal_pid.
10948 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10949 global instead of target method.
10950 * target.h (struct target_ops): Remove signal_pid. Update comment
10951 for create_inferior.
10952 * server.c (signal_pid): New variable.
10953 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 10954 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
10955 (attach_inferior): Set signal_pid.
10956
17574093
DJ
109572002-08-23 Daniel Jacobowitz <drow@mvista.com>
10958
10959 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10960
109612002-08-20 Jim Blandy <jimb@redhat.com>
10962
10963 * Makefile.in (LDFLAGS): Allow the configure script to establish a
10964 default for this.
10965
109662002-08-01 Andrew Cagney <cagney@redhat.com>
10967
10968 * Makefile.in: Make chill references obsolete.
10969
109702002-07-24 Kevin Buettner <kevinb@redhat.com>
10971
10972 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10973 * configure: Regenerate.
10974 * config.in: Regenerate.
10975
109762002-07-09 David O'Brien <obrien@FreeBSD.org>
10977
10978 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10979 (perror_with_name, remote_close, remote_open, expect, play): Static.
10980
109812002-07-04 Michal Ludvig <mludvig@suse.cz>
10982
4b8dad4a 10983 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
10984 byte offsets instead of an array of indexes.
10985 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10986
109872002-06-13 Daniel Jacobowitz <drow@mvista.com>
10988
10989 * regcache.c: Add comment.
10990
109912002-06-11 Daniel Jacobowitz <drow@mvista.com>
10992
10993 * thread-db.c: New file.
10994 * proc-service.c: New file.
10995 * acinclude.m4: New file.
10996 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10997 proc-service.o, and thread-db.o.
10998 (linux-low.o): Add USE_THREAD_DB.
10999 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11000 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11001 * aclocal.m4: Regenerated.
11002 * config.in: Regenerated.
11003 * configure: Regenerated.
11004 * configure.in: Check for proc_service.h, sys/procfs.h,
11005 thread_db.h, and linux/elf.h headrs.
11006 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11007 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11008 Check for -lthread_db and thread support.
11009 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11010 PowerPC, and SuperH.
11011 * i387-fp.c: Constify arguments.
11012 * i387-fp.h: Likewise.
11013 * inferiors.c: (struct thread_info): Renamed from
11014 `struct inferior_info'. Remove PID member. Use generic inferior
11015 list header. All uses updated.
11016 (inferiors, signal_pid): Removed.
11017 (all_threads): New variable.
11018 (get_thread): Define.
11019 (add_inferior_to_list): New function.
11020 (for_each_inferior): New function.
11021 (change_inferior_id): New function.
11022 (add_inferior): Removed.
11023 (remove_inferior): New function.
11024 (add_thread): New function.
11025 (free_one_thread): New function.
11026 (remove_thread): New function.
11027 (clear_inferiors): Use for_each_inferior and free_one_thread.
11028 (find_inferior): New function.
11029 (find_inferior_id): New function.
11030 (inferior_target_data): Update argument type.
11031 (set_inferior_target_data): Likewise.
11032 (inferior_regcache_data): Likewise.
11033 (set_inferior_regcache_data): Likewise.
11034 * linux-low.c (linux_bp_reinsert): Remove.
11035 (all_processes, stopping_threads, using_thrads)
11036 (struct pending_signals, debug_threads, pid_of): New.
11037 (inferior_pid): Replace with macro.
11038 (struct inferior_linux_data): Remove.
11039 (get_stop_pc, add_process): New functions.
11040 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11041 Use add_process and add_thread.
11042 (linux_attach_lwp): New function, based on old linux_attach. Use
11043 add_process and add_thread. Set stop_expected for new threads.
11044 (linux_attach): New function.
11045 (linux_kill_one_process): New function.
11046 (linux_kill): Kill all LWPs.
11047 (linux_thread_alive): Use find_inferior_id.
11048 (check_removed_breakpoints, status_pending_p): New functions.
11049 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11050 Update. Use WNOHANG. Wait for cloned processes also. Update process
11051 struct for the found process.
11052 (linux_wait_for_event): New function.
11053 (linux_wait): Use it. Support LWPs.
11054 (send_sigstop, wait_for_sigstop, stop_all_processes)
11055 (linux_resume_one_process, linux_continue_one_process): New functions.
11056 (linux_resume): Support LWPs.
11057 (REGISTER_RAW_SIZE): Remove.
11058 (fetch_register): Use register_size instead. Call supply_register.
11059 (usr_store_inferior_registers): Likewise. Call collect_register.
11060 Fix recursive case.
11061 (regsets_fetch_inferior_registers): Improve error message.
11062 (regsets_store_inferior_registers): Add debugging.
11063 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11064 (unstopped_p, linux_signal_pid): New functions.
11065 (linux_target_ops): Add linux_signal_pid.
11066 (linux_init_signals): New function.
11067 (initialize_low): Call it. Initialize using_threads.
11068 * regcache.c (inferior_regcache_data): Add valid
11069 flag.
11070 (get_regcache): Fetch registers lazily. Add fetch argument
11071 and update all callers.
11072 (regcache_invalidate_one, regcache_invalidate): New
11073 functions.
11074 (new_register_cache): Renamed from create_register_cache.
11075 Return the new regcache.
11076 (free_register_cache): Change argument to a void *.
11077 (registers_to_string, registers_from_string): Call get_regcache
11078 with fetch flag set.
11079 (register_data): Make static. Pass fetch flag to get_regcache.
11080 (supply_register): Call get_regcache with fetch flag clear.
11081 (collect_register): Call get_regcache with fetch flag set.
11082 (collect_register_as_string): New function.
11083 * regcache.h: Update.
11084 * remote-utils.c (putpkt): Flush after debug output and use
11085 stderr.
11086 Handle input interrupts while waiting for an ACK.
11087 (input_interrupt): Use signal_pid method.
11088 (getpkt): Flush after debug output and use stderr.
11089 (outreg): Use collect_register_as_string.
11090 (new_thread_notify, dead_thread_notify): New functions.
11091 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11092 and general_thread.
11093 (look_up_one_symbol): Flush after debug output.
11094 * server.c (step_thread, server_waiting): New variables.
11095 (start_inferior): Don't use signal_pid. Update call to mywait.
11096 (attach_inferior): Update call to mywait.
11097 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11098 (main): Don't fetch/store registers explicitly. Use
11099 set_desired_inferior. Support proposed ``Hs'' packet. Update
11100 calls to mywait.
11101 * server.h: Update.
11102 (struct inferior_list, struct_inferior_list_entry): New.
11103 * target.c (set_desired_inferior): New.
11104 (write_inferior_memory): Constify.
11105 (mywait): New function.
11106 * target.h: Update.
11107 (struct target_ops): New signal_pid method.
11108 (mywait): Removed macro, added prototype.
11109
11110 * linux-low.h (regset_func): Removed.
11111 (regset_fill_func, regset_store_func): New.
11112 (enum regset_type): New.
11113 (struct regset_info): Add type field. Use new operation types.
11114 (struct linux_target_ops): stop_pc renamed to get_pc.
11115 Add decr_pc_after_break and breakpoint_at.
11116 (get_process, get_thread_proess, get_process_thread)
11117 (strut process_info, all_processes, linux_attach_lwp)
11118 (thread_db_init): New.
11119
11120 * linux-arm-low.c (arm_get_pc, arm_set_pc,
11121 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
11122 (the_low_target): Add new members.
11123 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11124 (i386_store_fpxregset): Constify.
11125 (target_regsets): Add new kind identifier.
11126 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
11127 (i386_set_pc): Add debugging.
11128 (i386_breakpoint_at): New function.
11129 (the_low_target): Add new members.
11130 * linux-mips-low.c (mips_get_pc, mips_set_pc)
11131 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11132 (mips_breakpoint_at): New.
11133 (the_low_target): Add new members.
11134 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11135 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11136 (the_low_target): Add new members.
11137 * linux-sh-low.c (sh_get_pc, sh_set_pc)
11138 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11139 (the_low_target): Add new members.
11140 * linux-x86-64-low.c (target_regsets): Add new kind
11141 identifier.
11142
111432002-05-15 Daniel Jacobowitz <drow@mvista.com>
11144
11145 From Martin Pool <mbp@samba.org>:
11146 * server.c (gdbserver_usage): New function.
11147 (main): Call it.
11148
111492002-05-14 Daniel Jacobowitz <drow@mvista.com>
11150
11151 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11152 stop_at -> stop_pc.
11153
111542002-05-04 Andrew Cagney <ac131313@redhat.com>
11155
11156 * Makefile.in: Remove obsolete code.
11157
111582002-04-24 Michal Ludvig <mludvig@suse.cz>
11159
11160 * linux-low.c (regsets_fetch_inferior_registers),
11161 (regsets_store_inferior_registers): Removed cast to int from
11162 ptrace() calls.
11163 * regcache.h: Added declaration of struct inferior_info.
11164
111652002-04-20 Daniel Jacobowitz <drow@mvista.com>
11166
11167 * inferiors.c (struct inferior_info): Add regcache_data.
11168 (add_inferior): Call create_register_cache.
11169 (clear_inferiors): Call free_register_cache.
11170 (inferior_regcache_data, set_inferior_regcache_data): New functions.
11171 * regcache.c (struct inferior_regcache_data): New.
11172 (registers): Remove.
11173 (get_regcache): New function.
11174 (create_register_cache, free_register_cache): New functions.
11175 (set_register_cache): Don't initialize the register cache here.
11176 (registers_to_string, registers_from_string, register_data): Call
11177 get_regcache.
11178 * regcache.h: Add prototypes.
11179 * server.h: Likewise.
11180
111812002-04-20 Daniel Jacobowitz <drow@mvista.com>
11182
11183 * mem-break.c: New file.
11184 * mem-break.h: New file.
11185 * Makefile.in: Add mem-break.o rule; update server.h
11186 dependencies.
11187 * inferiors.c (struct inferior_info): Add target_data
11188 member.
11189 (clear_inferiors): Free target_data member if set.
11190 (inferior_target_data, set_inferior_target_data): New functions.
11191 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11192 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
11193 * linux-low.c (linux_bp_reinsert): New variable.
11194 (struct inferior_linux_data): New.
11195 (linux_create_inferior): Use set_inferior_target_data.
11196 (linux_attach): Likewise. Call add_inferior.
11197 (linux_wait_for_one_inferior): New function.
11198 (linux_wait): Call it.
11199 (linux_write_memory): Add const.
11200 (initialize_low): Call set_breakpoint_data.
11201 * linux-low.h (struct linux_target_ops): Add breakpoint
11202 handling members.
11203 * server.c (attach_inferior): Remove extra add_inferior
11204 call.
11205 * server.h: Include mem-break.h. Update inferior.c
11206 prototypes.
11207 * target.c (read_inferior_memory)
11208 (write_inferior_memory): New functions.
11209 * target.h (read_inferior_memory)
11210 (write_inferior_memory): Change macros to prototypes.
11211 (struct target_ops): Update comments. Add const to write_memory
11212 definition.
11213
112142002-04-11 Daniel Jacobowitz <drow@mvista.com>
11215
11216 * linux-low.c (usr_store_inferior_registers): Support
11217 registers which are allowed to fail to store.
11218 * linux-low.h (linux_target_ops): Likewise.
11219 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11220 (ppc_cannot_store_register): FPSCR may not be storable.
11221
112222002-04-09 Daniel Jacobowitz <drow@mvista.com>
11223
11224 * server.h: Include <string.h> if HAVE_STRING_H.
11225 * ChangeLog: Correct paths in last ChangeLog entry.
11226
112272002-04-09 Daniel Jacobowitz <drow@mvista.com>
11228
11229 * linux-low.h: Remove obsolete prototypes.
11230 (struct linux_target_ops): New.
11231 (extern the_low_target): New.
11232 * linux-low.c (num_regs, regmap): Remove declarations.
11233 (register_addr): Use the_low_target explicitly.
11234 (fetch_register): Likewise.
11235 (usr_fetch_inferior_registers): Likewise.
11236 (usr_store_inferior_registers): Likewise.
11237 * linux-arm-low.c (num_regs): Remove.
11238 (arm_num_regs): Define.
11239 (arm_regmap): Renamed from regmap, made static.
11240 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11241 made static.
11242 (arm_cannot_store_register): Renamed from cannot_store_register,
11243 made static.
11244 (the_low_target): New.
11245 * linux-i386-low.c (num_regs): Remove.
11246 (i386_num_regs): Define.
11247 (i386_regmap): Renamed from regmap, made static.
11248 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11249 made static.
11250 (i386_cannot_store_register): Renamed from cannot_store_register,
11251 made static.
11252 (the_low_target): New.
11253 * linux-ia64-low.c (num_regs): Remove.
11254 (ia64_num_regs): Define.
11255 (ia64_regmap): Renamed from regmap, made static.
11256 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11257 made static.
11258 (ia64_cannot_store_register): Renamed from cannot_store_register,
11259 made static.
11260 (the_low_target): New.
11261 * linux-m68k-low.c (num_regs): Remove.
11262 (m68k_num_regs): Define.
11263 (m68k_regmap): Renamed from regmap, made static.
11264 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11265 made static.
11266 (m68k_cannot_store_register): Renamed from cannot_store_register,
11267 made static.
11268 (the_low_target): New.
11269 * linux-mips-low.c (num_regs): Remove.
11270 (mips_num_regs): Define.
11271 (mips_regmap): Renamed from regmap, made static.
11272 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11273 made static.
11274 (mips_cannot_store_register): Renamed from cannot_store_register,
11275 made static.
11276 (the_low_target): New.
11277 * linux-ppc-low.c (num_regs): Remove.
11278 (ppc_num_regs): Define.
11279 (ppc_regmap): Renamed from regmap, made static.
11280 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11281 made static.
11282 (ppc_cannot_store_register): Renamed from cannot_store_register,
11283 made static.
11284 (the_low_target): New.
11285 * linux-s390-low.c (num_regs): Remove.
11286 (s390_num_regs): Define.
11287 (s390_regmap): Renamed from regmap, made static.
11288 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11289 made static.
11290 (s390_cannot_store_register): Renamed from cannot_store_register,
11291 made static.
11292 (the_low_target): New.
11293 * linux-sh-low.c (num_regs): Remove.
11294 (sh_num_regs): Define.
11295 (sh_regmap): Renamed from regmap, made static.
11296 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11297 made static.
11298 (sh_cannot_store_register): Renamed from cannot_store_register,
11299 made static.
11300 (the_low_target): New.
11301 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11302 (the_low_target): New.
11303
113042002-04-09 Daniel Jacobowitz <drow@mvista.com>
11305
11306 * Makefile.in: Add stamp-h target.
11307 * configure.in: Create stamp-h.
11308 * configure: Regenerated.
11309
113102002-04-09 Daniel Jacobowitz <drow@mvista.com>
11311
11312 * inferiors.c: New file.
11313 * target.c: New file.
11314 * target.h: New file.
11315 * Makefile.in: Add target.o and inferiors.o. Update
11316 dependencies.
11317 * linux-low.c (inferior_pid): New static variable,
11318 moved from server.c.
11319 (linux_create_inferior): Renamed from create_inferior.
11320 Call add_inferior. Return 0 on success instead of a PID.
11321 (linux_attach): Renamed from myattach.
11322 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
11323 (linux_thread_alive): Renamed from mythread_alive.
11324 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
11325 child dies.
11326 (linux_resume): Renamed from myresume. Add missing ``return 0''.
11327 (regsets_store_inferior_registers): Correct error message.
11328 Add missing ``return 0''.
11329 (linux_fetch_registers): Renamed from fetch_inferior_registers.
11330 (linux_store_registers): Renamed from store_inferior_registers.
11331 (linux_read_memory): Renamed from read_inferior_memory.
11332 (linux_write_memory): Renamed from write_inferior_memory.
11333 (linux_target_ops): New structure.
11334 (initialize_low): Call set_target_ops ().
11335 * remote-utils.c (unhexify): New function.
11336 (hexify): New function.
11337 (input_interrupt): Send signals to ``signal_pid''.
11338 * server.c (inferior_pid): Remove.
11339 (start_inferior): Update create_inferior call.
11340 (attach_inferior): Call add_inferior.
11341 (handle_query): New function.
11342 (main): Call handle_query for `q' packets.
11343 * server.h: Include "target.h". Remove obsolete prototypes.
11344 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11345
113462002-04-09 Daniel Jacobowitz <drow@mvista.com>
11347
11348 * Makefile.in: Add WARN_CFLAGS. Update configury
11349 dependencies.
11350 * configure.in: Check for <string.h>
11351 * configure: Regenerate.
11352 * config.in: Regenerate.
11353 * gdbreplay.c: Include needed system headers.
11354 (remote_open): Remove strchr prototype.
11355 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11356 * regcache.c (supply_register): Change buf argument to const void *.
11357 (supply_register_by_name): Likewise.
11358 (collect_register): Change buf argument to void *.
11359 (collect_register_by_name): Likewise.
11360 * regcache.h: Add missing prototypes.
11361 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11362 * server.c (handle_query): New function.
11363 (attached): New static variable, moved out of main.
11364 (main): Quiet longjmp clobber warnings.
11365 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
11366 * utils.c (error): Remove NORETURN.
11367 (fatal): Likewise.
This page took 1.435684 seconds and 4 git commands to generate.